diff options
| author | dt <qtc-committer@nokia.com> | 2009-07-23 14:31:21 +0200 |
|---|---|---|
| committer | dt <qtc-committer@nokia.com> | 2009-07-23 14:31:21 +0200 |
| commit | d6d98836929ea6d358072cc583e356d6003fa2c9 (patch) | |
| tree | 83fbaca4d2a34a607f29bb14ec02d8040d9e5a23 /src | |
| parent | ae6344371597b9aefc720895ce479fa2141dfb56 (diff) | |
| download | qt-creator-d6d98836929ea6d358072cc583e356d6003fa2c9.tar.gz | |
Make qmakestep even smarter about not running.
Use the mkspec of the qt version if none is specified in the additional
arguments. Also if given a relative path, try the source directory
first.
Diffstat (limited to 'src')
| -rw-r--r-- | src/plugins/qt4projectmanager/qmakestep.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp index b8f4ac1640..0e441b1476 100644 --- a/src/plugins/qt4projectmanager/qmakestep.cpp +++ b/src/plugins/qt4projectmanager/qmakestep.cpp @@ -156,17 +156,24 @@ bool QMakeStep::init(const QString &name) // we have to compare without the spec/platform cmd argument // and compare that on its own QString actualSpec = extractSpecFromArgumentList(value(name, "qmakeArgs").toStringList()); + if (actualSpec.isEmpty()) + actualSpec = m_pro->qtVersion(name)->mkspec(); QString parsedSpec = extractSpecFromArgumentList(result.second); // Now to convert the actualSpec to a absolute path, we go through a few hops if (QFileInfo(actualSpec).isRelative()) { - QString path = qtVersion->versionInfo().value("QMAKE_MKSPECS") + "/" + actualSpec; + QString path = qtVersion->sourcePath() + "/mkspecs/" + actualSpec; if (QFileInfo(path).exists()) { actualSpec = QDir::cleanPath(path); } else { - QString path = workingDirectory + "/" + actualSpec; - if (QFileInfo(path).exists()) + path = qtVersion->versionInfo().value("QMAKE_MKSPECS") + "/" + actualSpec; + if (QFileInfo(path).exists()) { actualSpec = QDir::cleanPath(path); + } else { + path = workingDirectory + "/" + actualSpec; + if (QFileInfo(path).exists()) + actualSpec = QDir::cleanPath(path); + } } } |
