The qtversions's toolchain now depends on the actual compiler not mkspec

That is we actually parse the mkspec and evaluate QMAKE_CXX (and a few
other variables) to figure out the correct mkspec. This makes using
custom mkspecs easier and is also cleaner. I also changed mkspec() and
mkspecPath() to behave a little diffrent, essentialy mkspec() will
return only the name (the actual dir name) of the mkspec. That is in
general not sufficient for passing on to qmake. mkspecPath() only
returns the correct path to mkspecs/default.
Hopefully I haven't broken WinCE/Maemo/MinGW.
This commit is contained in:
dt
2009-10-22 14:22:16 +02:00
parent fd0fbddebb
commit cfc7040ede
13 changed files with 141 additions and 308 deletions

View File

@@ -288,17 +288,6 @@ void Qt4ProjectConfigWidget::importLabelClicked()
QtVersion::QmakeBuildConfig qmakeBuildConfig = result.first;
QStringList additionalArguments = result.second;
QString versionSpec = version->sourcePath() + "/mkspecs/" + version->mkspec();
QString parsedSpec = Qt4Project::extractSpecFromArgumentList(additionalArguments);
QString parsedSpecOrginal = parsedSpec;
if (QFileInfo(parsedSpec).isRelative())
parsedSpec = QDir::cleanPath(directory + "/" + parsedSpec);
additionalArguments = Qt4Project::removeSpecFromArgumentList(additionalArguments);
if (parsedSpec != versionSpec) {
additionalArguments.prepend(parsedSpecOrginal);
additionalArguments.prepend("-spec");
}
// So we got all the information now apply it...
m_pro->setQtVersion(bc, version->uniqueId());
// Combo box will be updated at the end