diff options
author | Tobias Hunger <tobias.hunger@nokia.com> | 2012-04-24 15:49:09 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@nokia.com> | 2012-06-21 12:08:12 +0200 |
commit | 24314562165588b56a318b3b8a846bf5deda7c41 (patch) | |
tree | b5dcf951e76d003c2623011b0e91994e06e7e061 /src/plugins/madde/maemopublishingbuildsettingspagefremantlefree.cpp | |
parent | 8c77b8c9d7b25d0c89003c8c4a54e8da5bfb7edd (diff) | |
download | qt-creator-24314562165588b56a318b3b8a846bf5deda7c41.tar.gz |
Profile introduction
Introduce Profiles to store sets of values that describe a system/device.
These profiles are held by a target, getting rid of much of the information
stored in the Build-/Run-/DeployConfigurations, greatly simplifying those.
This is a squash of the wip/profile branch which has been on gerrit for a
while, rebased to current master.
Change-Id: I25956c8dd4d1962b2134bfaa8a8076ae3909460f
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Diffstat (limited to 'src/plugins/madde/maemopublishingbuildsettingspagefremantlefree.cpp')
-rw-r--r-- | src/plugins/madde/maemopublishingbuildsettingspagefremantlefree.cpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/plugins/madde/maemopublishingbuildsettingspagefremantlefree.cpp b/src/plugins/madde/maemopublishingbuildsettingspagefremantlefree.cpp index 5c04ae126e..61160b409a 100644 --- a/src/plugins/madde/maemopublishingbuildsettingspagefremantlefree.cpp +++ b/src/plugins/madde/maemopublishingbuildsettingspagefremantlefree.cpp @@ -41,6 +41,8 @@ #include <qt4projectmanager/qt4buildconfiguration.h> #include <qt4projectmanager/qt4projectmanagerconstants.h> #include <qtsupport/baseqtversion.h> +#include <qtsupport/qtprofileinformation.h> +#include <qtsupport/qtsupportconstants.h> #include <utils/qtcassert.h> using namespace ProjectExplorer; @@ -56,11 +58,13 @@ MaemoPublishingBuildSettingsPageFremantleFree::MaemoPublishingBuildSettingsPageF ui(new Ui::MaemoPublishingWizardPageFremantleFree) { ui->setupUi(this); + collectBuildConfigurations(project); QTC_ASSERT(!m_buildConfigs.isEmpty(), return); - foreach (const Qt4BuildConfiguration * const bc, m_buildConfigs) { + + foreach (const Qt4BuildConfiguration *const bc, m_buildConfigs) ui->buildConfigComboBox->addItem(bc->displayName()); - } + ui->buildConfigComboBox->setSizeAdjustPolicy(QComboBox::AdjustToContentsOnFirstShow); ui->buildConfigComboBox->setCurrentIndex(0); connect(ui->skipUploadCheckBox, SIGNAL(toggled(bool)), @@ -74,22 +78,17 @@ MaemoPublishingBuildSettingsPageFremantleFree::~MaemoPublishingBuildSettingsPage void MaemoPublishingBuildSettingsPageFremantleFree::collectBuildConfigurations(const Project *project) { + m_buildConfigs.clear(); + foreach (const Target *const target, project->targets()) { - if (target->id() != Core::Id(Constants::MAEMO5_DEVICE_TARGET_ID)) + QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target->profile()); + if (!version || version->platformName() != QLatin1String(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM)) continue; - foreach (BuildConfiguration * const bc, target->buildConfigurations()) { - Qt4BuildConfiguration * const qt4Bc - = qobject_cast<Qt4BuildConfiguration *>(bc); - if (!qt4Bc) - continue; - - QtSupport::BaseQtVersion *lqt = qt4Bc->qtVersion(); - if (!lqt) - continue; - if (MaemoGlobal::deviceType(lqt->qmakeCommand().toString()) == Core::Id(Maemo5OsType)) + foreach (BuildConfiguration *const bc, target->buildConfigurations()) { + Qt4BuildConfiguration *const qt4Bc = qobject_cast<Qt4BuildConfiguration *>(bc); + if (qt4Bc) m_buildConfigs << qt4Bc; } - break; } } |