diff options
author | David Kaspar <dkaspar@blackberry.com> | 2014-04-18 14:26:10 +0200 |
---|---|---|
committer | David Kaspar <dkaspar@blackberry.com> | 2014-05-06 10:50:31 +0200 |
commit | 9926752d344d009f1fa46055668f9294819a8818 (patch) | |
tree | b6aa6a258f0273833be5943d4aaaacfad050f394 | |
parent | d80814bdea32091a7611709dd82620e4cd5d6d0e (diff) | |
download | qt-creator-9926752d344d009f1fa46055668f9294819a8818.tar.gz |
Qnx: Fixing refresh of Setup options page after API Level installation
Task-number: QTCREATORBUG-11961
Change-Id: Ib4e2d4513c23ca24fe2b7ca1e2ad97897213c418
Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: David Kaspar <dkaspar@blackberry.com>
-rw-r--r-- | src/plugins/qnx/blackberryconfigurationmanager.cpp | 9 | ||||
-rw-r--r-- | src/plugins/qnx/blackberryconfigurationmanager.h | 14 | ||||
-rw-r--r-- | src/plugins/qnx/blackberryndksettingswidget.cpp | 5 | ||||
-rw-r--r-- | src/plugins/qnx/blackberrysetupwidget.cpp | 3 |
4 files changed, 25 insertions, 6 deletions
diff --git a/src/plugins/qnx/blackberryconfigurationmanager.cpp b/src/plugins/qnx/blackberryconfigurationmanager.cpp index 2f239be9ec..ff927195d1 100644 --- a/src/plugins/qnx/blackberryconfigurationmanager.cpp +++ b/src/plugins/qnx/blackberryconfigurationmanager.cpp @@ -456,6 +456,15 @@ QList<Utils::EnvironmentItem> BlackBerryConfigurationManager::defaultConfigurati return QList<Utils::EnvironmentItem>(); } +void BlackBerryConfigurationManager::loadAutoDetectedConfigurations(QFlags<ConfigurationType> types) +{ + if (types.testFlag(ApiLevel)) + loadAutoDetectedApiLevels(); + if (types.testFlag(Runtime)) + loadAutoDetectedRuntimes(); + emit settingsChanged(); +} + void BlackBerryConfigurationManager::loadSettings() { restoreConfigurations(); diff --git a/src/plugins/qnx/blackberryconfigurationmanager.h b/src/plugins/qnx/blackberryconfigurationmanager.h index 823bece6b0..fb21f42e42 100644 --- a/src/plugins/qnx/blackberryconfigurationmanager.h +++ b/src/plugins/qnx/blackberryconfigurationmanager.h @@ -51,6 +51,12 @@ class BlackBerryConfigurationManager : public QObject { Q_OBJECT public: + enum ConfigurationType { + ApiLevel = 0x01, + Runtime = 0x02 + }; + Q_DECLARE_FLAGS(ConfigurationTypes, ConfigurationType) + static BlackBerryConfigurationManager *instance(); ~BlackBerryConfigurationManager(); bool addApiLevel(BlackBerryApiLevelConfiguration *config); @@ -74,8 +80,7 @@ public: // returns the environment for the default API level QList<Utils::EnvironmentItem> defaultConfigurationEnv() const; - void loadAutoDetectedApiLevels(); - void loadAutoDetectedRuntimes(); + void loadAutoDetectedConfigurations(QFlags<ConfigurationType> types); void setDefaultConfiguration(BlackBerryApiLevelConfiguration *config); bool newestApiLevelEnabled() const; @@ -106,6 +111,9 @@ private: void saveConfigurations(); void restoreConfigurations(); + void loadAutoDetectedApiLevels(); + void loadAutoDetectedRuntimes(); + void loadManualConfigurations(); void setKitsAutoDetectionSource(); @@ -118,4 +126,6 @@ private: } // namespace Internal } // namespace Qnx +Q_DECLARE_OPERATORS_FOR_FLAGS(Qnx::Internal::BlackBerryConfigurationManager::ConfigurationTypes) + #endif // BLACKBERRYCONFIGURATIONMANAGER_H diff --git a/src/plugins/qnx/blackberryndksettingswidget.cpp b/src/plugins/qnx/blackberryndksettingswidget.cpp index 370cbcc048..8c0f86d47c 100644 --- a/src/plugins/qnx/blackberryndksettingswidget.cpp +++ b/src/plugins/qnx/blackberryndksettingswidget.cpp @@ -370,9 +370,8 @@ void BlackBerryNDKSettingsWidget::cleanUp() void BlackBerryNDKSettingsWidget::handleInstallationFinished() { - m_bbConfigManager->loadAutoDetectedApiLevels(); - m_bbConfigManager->loadAutoDetectedRuntimes(); - updateConfigurationList(); + m_bbConfigManager->loadAutoDetectedConfigurations( + BlackBerryConfigurationManager::ApiLevel | BlackBerryConfigurationManager::Runtime); } void BlackBerryNDKSettingsWidget::handleUninstallationFinished() diff --git a/src/plugins/qnx/blackberrysetupwidget.cpp b/src/plugins/qnx/blackberrysetupwidget.cpp index a971fbe752..c6f8dc9215 100644 --- a/src/plugins/qnx/blackberrysetupwidget.cpp +++ b/src/plugins/qnx/blackberrysetupwidget.cpp @@ -211,7 +211,8 @@ void APILevelSetupItem::handleInstallationFinished() { // manually-added API Levels are automatically registered by BlackBerryInstallWizard // auto-detected API Levels needs to reloaded explicitly - BlackBerryConfigurationManager::instance()->loadAutoDetectedApiLevels(); + BlackBerryConfigurationManager::instance()->loadAutoDetectedConfigurations( + BlackBerryConfigurationManager::ApiLevel); validate(); } |