summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordt <qtc-committer@nokia.com>2009-07-23 14:31:21 +0200
committerdt <qtc-committer@nokia.com>2009-07-23 14:31:21 +0200
commitd6d98836929ea6d358072cc583e356d6003fa2c9 (patch)
tree83fbaca4d2a34a607f29bb14ec02d8040d9e5a23 /src
parentae6344371597b9aefc720895ce479fa2141dfb56 (diff)
downloadqt-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.cpp13
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);
+ }
}
}