Commit b44d71b3 authored by dt's avatar dt
Browse files

Fix available buildconfigurations for all cases

parent 51ddf10a
......@@ -124,12 +124,10 @@ QList<BuildConfigurationInfo> Qt4DesktopTargetFactory::availableBuildConfigurati
if (!version->isValid())
continue;
QtVersion::QmakeBuildConfigs config = version->defaultBuildConfig();
bool buildAll = version->defaultBuildConfig() & QtVersion::BuildAll;
QString dir = defaultShadowBuildDirectory(Qt4Project::defaultTopLevelBuildDirectory(proFilePath), Constants::DESKTOP_TARGET_ID);
infos.append(BuildConfigurationInfo(version, config, QString(), dir));
if (buildAll)
infos.append(BuildConfigurationInfo(version, config ^ QtVersion::DebugBuild, QString(), dir));
infos.append(BuildConfigurationInfo(version, config ^ QtVersion::DebugBuild, QString(), dir));
}
return infos;
}
......@@ -144,12 +142,11 @@ Qt4BaseTarget *Qt4DesktopTargetFactory::create(ProjectExplorer::Project *parent,
return 0;
QtVersion *qtVersion = knownVersions.first();
bool buildAll = qtVersion->isValid() && (qtVersion->defaultBuildConfig() & QtVersion::BuildAll);
QtVersion::QmakeBuildConfigs config = buildAll ? QtVersion::BuildAll : QtVersion::QmakeBuildConfig(0);
QtVersion::QmakeBuildConfigs config = qtVersion->defaultBuildConfig();
QList<BuildConfigurationInfo> infos;
infos.append(BuildConfigurationInfo(qtVersion, config | QtVersion::DebugBuild, QString(), QString()));
infos.append(BuildConfigurationInfo(qtVersion, config, QString(), QString()));
infos.append(BuildConfigurationInfo(qtVersion, config ^ QtVersion::DebugBuild, QString(), QString()));
return create(parent, id, infos);
}
......
......@@ -128,8 +128,7 @@ QList<BuildConfigurationInfo> Qt4SimulatorTargetFactory::availableBuildConfigura
QtVersion::QmakeBuildConfigs config = version->defaultBuildConfig();
QString dir = defaultShadowBuildDirectory(Qt4Project::defaultTopLevelBuildDirectory(proFilePath), Constants::QT_SIMULATOR_TARGET_ID);
infos.append(BuildConfigurationInfo(version, config, QString(), dir));
if (config)
infos.append(BuildConfigurationInfo(version, config ^ QtVersion::DebugBuild, QString(), dir));
infos.append(BuildConfigurationInfo(version, config ^ QtVersion::DebugBuild, QString(), dir));
}
return infos;
}
......@@ -144,12 +143,10 @@ Qt4BaseTarget *Qt4SimulatorTargetFactory::create(ProjectExplorer::Project *paren
return 0;
QtVersion *qtVersion = knownVersions.first();
bool buildAll = qtVersion->isValid() && (qtVersion->defaultBuildConfig() & QtVersion::BuildAll);
QtVersion::QmakeBuildConfigs config = buildAll ? QtVersion::BuildAll : QtVersion::QmakeBuildConfig(0);
QtVersion::QmakeBuildConfigs config = qtVersion->defaultBuildConfig();
QList<BuildConfigurationInfo> infos;
infos.append(BuildConfigurationInfo(qtVersion, config | QtVersion::DebugBuild, QString(), QString()));
infos.append(BuildConfigurationInfo(qtVersion, config, QString(), QString()));
infos.append(BuildConfigurationInfo(qtVersion, config ^ QtVersion::DebugBuild, QString(), QString()));
return create(parent, id, infos);
}
......
......@@ -159,11 +159,9 @@ QList<BuildConfigurationInfo> Qt4MaemoTargetFactory::availableBuildConfiguration
if (!version->isValid())
continue;
QtVersion::QmakeBuildConfigs config = version->defaultBuildConfig();
bool buildAll = config & QtVersion::BuildAll;
QString dir = defaultShadowBuildDirectory(Qt4Project::defaultTopLevelBuildDirectory(proFilePath), id);
infos.append(BuildConfigurationInfo(version, config, QString(), dir));
if (buildAll)
infos.append(BuildConfigurationInfo(version, config ^ QtVersion::DebugBuild, QString(), dir));
infos.append(BuildConfigurationInfo(version, config ^ QtVersion::DebugBuild, QString(), dir));
}
return infos;
}
......@@ -178,12 +176,11 @@ Qt4BaseTarget *Qt4MaemoTargetFactory::create(ProjectExplorer::Project *parent, c
return 0;
QtVersion *qtVersion = knownVersions.first();
bool buildAll = qtVersion->isValid() && (qtVersion->defaultBuildConfig() & QtVersion::BuildAll);
QtVersion::QmakeBuildConfigs config = buildAll ? QtVersion::BuildAll : QtVersion::QmakeBuildConfig(0);
QtVersion::QmakeBuildConfigs config = qtVersion->defaultBuildConfig();
QList<BuildConfigurationInfo> infos;
infos.append(BuildConfigurationInfo(qtVersion, config | QtVersion::DebugBuild, QString(), QString()));
infos.append(BuildConfigurationInfo(qtVersion, config, QString(), QString()));
infos.append(BuildConfigurationInfo(qtVersion, config ^ QtVersion::DebugBuild, QString(), QString()));
return create(parent, id, infos);
}
......
......@@ -145,11 +145,9 @@ QList<BuildConfigurationInfo> Qt4SymbianTargetFactory::availableBuildConfigurati
if (!version->isValid())
continue;
QtVersion::QmakeBuildConfigs config = version->defaultBuildConfig();
bool buildAll = config & QtVersion::BuildAll;
QString dir = defaultShadowBuildDirectory(Qt4Project::defaultTopLevelBuildDirectory(proFilePath), Constants::S60_DEVICE_TARGET_ID);
infos.append(BuildConfigurationInfo(version, config, QString(), dir));
if (buildAll)
infos.append(BuildConfigurationInfo(version, config ^ QtVersion::DebugBuild, QString(), dir));
infos.append(BuildConfigurationInfo(version, config ^ QtVersion::DebugBuild, QString(), dir));
}
return infos;
......@@ -165,13 +163,18 @@ Qt4BaseTarget *Qt4SymbianTargetFactory::create(ProjectExplorer::Project *parent,
return 0;
QtVersion *qtVersion = knownVersions.first();
bool buildAll = qtVersion->isValid() && (qtVersion->defaultBuildConfig() & QtVersion::BuildAll);
QtVersion::QmakeBuildConfigs config = buildAll ? QtVersion::BuildAll : QtVersion::QmakeBuildConfig(0);
QtVersion::QmakeBuildConfigs config = qtVersion->defaultBuildConfig();
QList<BuildConfigurationInfo> infos;
infos.append(BuildConfigurationInfo(qtVersion, config | QtVersion::DebugBuild, QString(), QString()));
if (id != Constants::S60_EMULATOR_TARGET_ID)
if (id != Constants::S60_EMULATOR_TARGET_ID) {
infos.append(BuildConfigurationInfo(qtVersion, config, QString(), QString()));
infos.append(BuildConfigurationInfo(qtVersion, config ^ QtVersion::DebugBuild, QString(), QString()));
} else {
if(config & QtVersion::DebugBuild)
infos.append(BuildConfigurationInfo(qtVersion, config, QString(), QString()));
else
infos.append(BuildConfigurationInfo(qtVersion, config ^ QtVersion::DebugBuild, QString(), QString()));
}
return create(parent, id, infos);
}
......
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