Fix importing adding a empty spec argument to qmake

(cherry picked from commit 6492101ea3)
This commit is contained in:
dt
2009-09-01 12:27:25 +02:00
committed by con
parent 03f3161979
commit 81ed95dda7

View File

@@ -69,6 +69,11 @@ 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);
// Compare mkspecs and add to additional arguments
if (parsedSpec.isEmpty()) {
// using the default spec, don't modify additional arguments
} else {
QString parsedSpecOrginal = parsedSpec; QString parsedSpecOrginal = parsedSpec;
if (QFileInfo(parsedSpec).isRelative()) if (QFileInfo(parsedSpec).isRelative())
parsedSpec = QDir::cleanPath(directory + "/" + parsedSpec); parsedSpec = QDir::cleanPath(directory + "/" + parsedSpec);
@@ -77,7 +82,7 @@ ProjectLoadWizard::ProjectLoadWizard(Qt4Project *project, QWidget *parent, Qt::W
m_additionalArguments.prepend(parsedSpecOrginal); m_additionalArguments.prepend(parsedSpecOrginal);
m_additionalArguments.prepend("-spec"); 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