summaryrefslogtreecommitdiffstats
path: root/qmake/library/qmakeevaluator.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-06-07 13:12:57 +0200
committerLiang Qi <liang.qi@qt.io>2019-06-07 13:19:27 +0200
commit9967a011eaae8988b10e56fde0f2ab8b6bab90ac (patch)
tree353b932414a8d9d94a418e84068550b0a2376b37 /qmake/library/qmakeevaluator.cpp
parent91ab70d17f892f3ff6b2019632fda3920d045dcb (diff)
parent99636127d10f96d8313bc26030cabf9841381914 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts: qmake/generators/makefile.cpp src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoaintegration.mm Done-With: Jörg Bornemann <joerg.bornemann@qt.io> Change-Id: I5a61e161784cc6f947abe370aab8f2971a9cbe78
Diffstat (limited to 'qmake/library/qmakeevaluator.cpp')
-rw-r--r--qmake/library/qmakeevaluator.cpp39
1 files changed, 26 insertions, 13 deletions
diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp
index ade8e15a39..40bd657f7c 100644
--- a/qmake/library/qmakeevaluator.cpp
+++ b/qmake/library/qmakeevaluator.cpp
@@ -1128,35 +1128,48 @@ bool QMakeEvaluator::prepareProject(const QString &inDir)
}
superdir = qdfi.path();
}
- QString sdir = inDir;
QString dir = m_outputDir;
forever {
- conffile = sdir + QLatin1String("/.qmake.conf");
- if (!m_vfs->exists(conffile, flags))
- conffile.clear();
cachefile = dir + QLatin1String("/.qmake.cache");
if (!m_vfs->exists(cachefile, flags))
cachefile.clear();
- if (!conffile.isEmpty() || !cachefile.isEmpty()) {
- if (dir != sdir)
- m_sourceRoot = sdir;
+ if (!cachefile.isEmpty()) {
m_buildRoot = dir;
break;
}
if (dir == superdir)
goto no_cache;
- QFileInfo qsdfi(sdir);
QFileInfo qdfi(dir);
- if (qsdfi.isRoot() || qdfi.isRoot())
- goto no_cache;
- sdir = qsdfi.path();
+ if (qdfi.isRoot()) {
+ cachefile.clear();
+ break;
+ }
dir = qdfi.path();
}
+ QString sdir = inDir;
+ forever {
+ conffile = sdir + QLatin1String("/.qmake.conf");
+ if (!m_vfs->exists(conffile, flags))
+ conffile.clear();
+ if (!conffile.isEmpty()) {
+ if (sdir != m_buildRoot)
+ m_sourceRoot = sdir;
+ break;
+ }
+ QFileInfo qsdfi(sdir);
+ if (qsdfi.isRoot()) {
+ conffile.clear();
+ break;
+ }
+ sdir = qsdfi.path();
+ }
} else {
m_buildRoot = QFileInfo(cachefile).path();
}
- m_conffile = QDir::cleanPath(conffile);
- m_cachefile = QDir::cleanPath(cachefile);
+ if (!conffile.isEmpty())
+ m_conffile = QDir::cleanPath(conffile);
+ if (!cachefile.isEmpty())
+ m_cachefile = QDir::cleanPath(cachefile);
}
no_cache: