Commit 81ed95dd authored by dt's avatar dt Committed by con

Fix importing adding a empty spec argument to qmake

(cherry picked from commit 6492101e)
parent 03f31619
......@@ -69,15 +69,20 @@ ProjectLoadWizard::ProjectLoadWizard(Qt4Project *project, QWidget *parent, Qt::W
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");
}
// 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment