forked from qt-creator/qt-creator
Use mkspec of the Qt version of qmake when matching profiles
In case the qmake-line does not contain a mkspec argument, use the mkspec of the Qt version found by matching the qmake binary. This reduces the duplication of targets/profiles when opening new projects. Change-Id: I647e166ae0322fd093967abea760197cf4c7eedd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
committed by
Friedemann Kleint
parent
1be3ad29df
commit
f43c02d12f
@@ -331,15 +331,13 @@ void TargetSetupPage::import(const Utils::FileName &path, const bool silent)
|
||||
Utils::FileName parsedSpec =
|
||||
Qt4BuildConfiguration::extractSpecFromArguments(&additionalArguments, path.toString(), version);
|
||||
Utils::FileName versionSpec = version->mkspec();
|
||||
if (parsedSpec.isEmpty() || parsedSpec == Utils::FileName::fromString(QLatin1String("default")))
|
||||
parsedSpec = versionSpec;
|
||||
|
||||
QString specArgument;
|
||||
// Compare mkspecs and add to additional arguments
|
||||
if (parsedSpec.isEmpty() || parsedSpec == versionSpec
|
||||
|| parsedSpec == Utils::FileName::fromString(QLatin1String("default"))) {
|
||||
// using the default spec, don't modify additional arguments
|
||||
} else {
|
||||
if (parsedSpec != versionSpec)
|
||||
specArgument = QLatin1String("-spec ") + Utils::QtcProcess::quoteArg(parsedSpec.toUserOutput());
|
||||
}
|
||||
Utils::QtcProcess::addArgs(&specArgument, additionalArguments);
|
||||
|
||||
// Find profile:
|
||||
|
||||
Reference in New Issue
Block a user