forked from qt-creator/qt-creator
Fix importing adding a empty spec argument to qmake
This commit is contained in:
@@ -69,15 +69,20 @@ ProjectLoadWizard::ProjectLoadWizard(Qt4Project *project, QWidget *parent, Qt::W
|
|||||||
|
|
||||||
QString versionSpec = m_importVersion->sourcePath() + "/mkspecs/" + m_importVersion->mkspec();
|
QString versionSpec = m_importVersion->sourcePath() + "/mkspecs/" + m_importVersion->mkspec();
|
||||||
QString parsedSpec = Qt4Project::extractSpecFromArgumentList(m_additionalArguments);
|
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");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Compare mkspecs and add to additional arguments
|
||||||
|
if (parsedSpec.isEmpty()) {
|
||||||
|
// using the default spec, don't modify additional arguments
|
||||||
|
} else {
|
||||||
|
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
|
// So now we have the version and the configuration for that version
|
||||||
|
Reference in New Issue
Block a user