Commit 15464838 authored by dt's avatar dt
Browse files

Try harder to follow qmake's behaviour for debug_and_release

That is we don't default to debug_and_release. We check the qt version
that is used for building, and if that one is not using
debug_and_release, we don't neither.
parent 8d8ca9a0
......@@ -131,6 +131,7 @@ void ProjectLoadWizard::done(int result)
QString directory = QFileInfo(m_project->file()->fileName()).absolutePath();
if (m_importVersion && importCheckbox->isChecked()) {
// Importing
if (m_temporaryVersion)
m_project->qt4ProjectManager()->versionManager()->addVersion(m_importVersion);
// Import the existing stuff
......@@ -150,11 +151,21 @@ void ProjectLoadWizard::done(int result)
addBuildConfiguration(debug ? "Release" : "Debug", m_importVersion, otherBuildConfiguration);
}
} else {
// Not importing
if (m_temporaryVersion)
delete m_importVersion;
// Create default
addBuildConfiguration("Debug", 0, QtVersion::QmakeBuildConfig(QtVersion::BuildAll | QtVersion::DebugBuild));
addBuildConfiguration("Release", 0, QtVersion::BuildAll);
bool buildAll = false;
QtVersion *defaultVersion = m_project->qt4ProjectManager()->versionManager()->version(0);
if (defaultVersion && defaultVersion->isValid() && (defaultVersion->defaultBuildConfig() & QtVersion::BuildAll))
buildAll = true;
if (buildAll) {
addBuildConfiguration("Debug", 0, QtVersion::QmakeBuildConfig(QtVersion::BuildAll | QtVersion::DebugBuild));
addBuildConfiguration("Release", 0, QtVersion::BuildAll);
} else {
addBuildConfiguration("Debug", 0, QtVersion::DebugBuild);
addBuildConfiguration("Release", 0, 0);
}
}
if (!m_project->buildConfigurations().isEmpty())
......
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