Qmake: Fix compilation with QMAKE_USE_CACHE

Change-Id: Ib2872093d1e82a59baad94104dafe8329a9e8942
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
Orgad Shaneh 2018-06-12 16:55:52 +03:00 committed by Orgad Shaneh
parent 33fea7e7a9
commit de6b81399e

View File

@ -1050,7 +1050,7 @@ void QMakeSourceFileInfo::saveCache(const QString &cf)
QFile file(QMakeLocalFileName(cf).local());
if(file.open(QIODevice::WriteOnly)) {
QTextStream stream(&file);
stream << qmake_version() << endl << endl; //version
stream << QMAKE_VERSION_STR << endl << endl; //version
{ //cache verification
QMap<QString, QStringList> verify = getCacheVerification();
stream << verify.count() << endl;
@ -1105,11 +1105,11 @@ void QMakeSourceFileInfo::loadCache(const QString &cf)
return;
QFile file;
if(!file.open(QIODevice::ReadOnly, fd))
if (!file.open(fd, QIODevice::ReadOnly))
return;
QTextStream stream(&file);
if(stream.readLine() == qmake_version()) { //version check
if (stream.readLine() == QMAKE_VERSION_STR) { //version check
stream.skipWhiteSpace();
bool verified = true;