Commit fb3d65a8 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

do not look for mkspecs/ directories in project trees

this pretty surprising behavior would interfere with building the
examples from an installed qt tree with qmakes from other qt builds.

.qmake.conf (and .qmake.cache) files provide a possibility to explicitly
"anchor" project roots, so there is no point in having a second, even
more magic way to do it.

Task-number: QTBUG-35485
Change-Id: I8fd4fda67cabafdf55e7a98282dcdfaffb4a405e
Reviewed-by: default avatarTor Arne Vestbø <>
(cherry picked from qtbase/65a676372c533e8b35117081ec0aa1a94e1500e5)
Reviewed-by: default avatarDaniel Teske <>
parent e2c156b4
......@@ -1090,28 +1090,7 @@ bool QMakeEvaluator::prepareProject(const QString &inDir)
// Look for mkspecs/ in source and build. First to win determines the root.
QString sdir = inDir;
QString dir = m_outputDir;
while (dir != m_buildRoot) {
if ((dir != sdir && QFileInfo(sdir, QLatin1String("mkspecs")).isDir())
|| QFileInfo(dir, QLatin1String("mkspecs")).isDir()) {
if (dir != sdir)
m_sourceRoot = sdir;
m_buildRoot = dir;
if (dir == superdir)
QFileInfo qsdfi(sdir);
QFileInfo qdfi(dir);
if (qsdfi.isRoot() || qdfi.isRoot())
sdir = qsdfi.path();
dir = qdfi.path();
dir = m_outputDir;
forever {
QString stashfile = dir + QLatin1String("/.qmake.stash");
if (dir == (!superdir.isEmpty() ? superdir : m_buildRoot) || m_vfs->exists(stashfile)) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment