summaryrefslogtreecommitdiffstats
path: root/qmake/library/qmakeevaluator.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-07-12 01:00:11 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2019-07-12 15:29:54 +0200
commit38c2b80e65b66f8f85ad177307277107d63d9b50 (patch)
treef46fd98df047244fc5eb90b3643e967399784f25 /qmake/library/qmakeevaluator.cpp
parentf5840944a6c29df162c5bdcaf488647f17877fab (diff)
parent77d126ccb58aba85ab6f363c4314f8481aa0cf1d (diff)
Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"
Diffstat (limited to 'qmake/library/qmakeevaluator.cpp')
-rw-r--r--qmake/library/qmakeevaluator.cpp39
1 files changed, 13 insertions, 26 deletions
diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp
index 40bd657f7c..ade8e15a39 100644
--- a/qmake/library/qmakeevaluator.cpp
+++ b/qmake/library/qmakeevaluator.cpp
@@ -1128,48 +1128,35 @@ 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 (!cachefile.isEmpty()) {
+ if (!conffile.isEmpty() || !cachefile.isEmpty()) {
+ if (dir != sdir)
+ m_sourceRoot = sdir;
m_buildRoot = dir;
break;
}
if (dir == superdir)
goto no_cache;
- QFileInfo qdfi(dir);
- 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;
- }
+ QFileInfo qdfi(dir);
+ if (qsdfi.isRoot() || qdfi.isRoot())
+ goto no_cache;
sdir = qsdfi.path();
+ dir = qdfi.path();
}
} else {
m_buildRoot = QFileInfo(cachefile).path();
}
- if (!conffile.isEmpty())
- m_conffile = QDir::cleanPath(conffile);
- if (!cachefile.isEmpty())
- m_cachefile = QDir::cleanPath(cachefile);
+ m_conffile = QDir::cleanPath(conffile);
+ m_cachefile = QDir::cleanPath(cachefile);
}
no_cache: