summaryrefslogtreecommitdiffstats
path: root/qmake/library
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-06-14 11:56:56 +0200
committerLiang Qi <liang.qi@qt.io>2019-06-14 13:45:18 +0200
commitb1a216649ec064412160638dd00195cd47c567aa (patch)
treea4134415a3849cfb857942e698514be9da18924f /qmake/library
parent2e20ae3c1b57169497f6f3904623be4f5e617e12 (diff)
parent1632786f00875d23c7d111cbb29dedaa35c1c8c2 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts: qmake/generators/makefile.cpp qmake/generators/unix/unixmake2.cpp src/corelib/thread/qthread_unix.cpp tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp Change-Id: I1df0d4ba20685de7f9300bf07458c13376493408
Diffstat (limited to 'qmake/library')
-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 c9dc7bd80b..2db4f22f88 100644
--- a/qmake/library/qmakeevaluator.cpp
+++ b/qmake/library/qmakeevaluator.cpp
@@ -1130,35 +1130,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: