More import fixes and tweaks

Don't add -spec foo to the additional Arguments if foo is the same as
the default mkspec. This makes the common case better, while breaking if
you have QMAKESPEC set in teh environment and used -spec foo to override
it.
This commit is contained in:
dt
2009-07-24 18:12:19 +02:00
parent 4b26aaa31b
commit 15471e6410
4 changed files with 67 additions and 45 deletions

View File

@@ -66,6 +66,18 @@ ProjectLoadWizard::ProjectLoadWizard(Qt4Project *project, QWidget *parent, Qt::W
QtVersionManager::scanMakeFile(directory, m_importVersion->defaultBuildConfig());
m_importBuildConfig = result.first;
m_additionalArguments = result.second;
QString versionSpec = m_importVersion->sourcePath() + "/mkspecs/" + m_importVersion->mkspec();
QString parsedSpec = Qt4Project::extractSpecFromArgumentList(m_additionalArguments);
QString parsedSpecOrginal = parsedSpec;
if (QFileInfo(parsedSpec).isRelative())
parsedSpec = QDir::cleanPath(directory + "/" + parsedSpec);
m_additionalArguments = Qt4Project::removeSpecFromArgumentList(m_additionalArguments);
if (parsedSpec != versionSpec) {
m_additionalArguments.prepend(parsedSpecOrginal);
m_additionalArguments.prepend("-spec");
}
}
// So now we have the version and the configuration for that version