Commit d3d616ea authored by Ulf Hermann's avatar Ulf Hermann

qmake: Don't generate profile build configurations for Qt4

In Qt4 the force_debug_info flag doesn't work, so we won't actually get
a profile build, but only a regular release build.

Change-Id: Ie8c31f882b393e35eb525dd12392354ecbbaee75
Task-number: QTCREATORBUG-15457
Reviewed-by: default avatarRobert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent cbd69856
......@@ -612,17 +612,24 @@ int QmakeBuildConfigurationFactory::priority(const Target *parent) const
return canHandle(parent) ? 0 : -1;
}
static QList<BuildConfiguration::BuildType> availableBuildTypes(const BaseQtVersion *version)
{
QList<BuildConfiguration::BuildType> types = {BuildConfiguration::Debug,
BuildConfiguration::Release};
if (version && version->qtVersion().majorVersion > 4)
types << BuildConfiguration::Profile;
return types;
}
QList<BuildInfo *> QmakeBuildConfigurationFactory::availableBuilds(const Target *parent) const
{
QList<ProjectExplorer::BuildInfo *> result;
const QString projectFilePath = parent->project()->projectFilePath().toString();
for (BuildConfiguration::BuildType buildType : { BuildConfiguration::Debug,
BuildConfiguration::Profile,
BuildConfiguration::Release }) {
QmakeBuildInfo *info = createBuildInfo(parent->kit(), projectFilePath,
buildType);
foreach (BuildConfiguration::BuildType buildType,
availableBuildTypes(QtSupport::QtKitInformation::qtVersion(parent->kit()))) {
QmakeBuildInfo *info = createBuildInfo(parent->kit(), projectFilePath, buildType);
info->displayName.clear(); // ask for a name
info->buildDirectory.clear(); // This depends on the displayName
result << info;
......@@ -645,9 +652,10 @@ QList<BuildInfo *> QmakeBuildConfigurationFactory::availableSetups(const Kit *k,
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(k);
if (!qtVersion || !qtVersion->isValid())
return result;
result << createBuildInfo(k, projectPath, ProjectExplorer::BuildConfiguration::Debug);
result << createBuildInfo(k, projectPath, ProjectExplorer::BuildConfiguration::Profile);
result << createBuildInfo(k, projectPath, ProjectExplorer::BuildConfiguration::Release);
foreach (BuildConfiguration::BuildType buildType, availableBuildTypes(qtVersion))
result << createBuildInfo(k, projectPath, buildType);
return result;
}
......
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