Commit 9926752d authored by David Kaspar's avatar David Kaspar

Qnx: Fixing refresh of Setup options page after API Level installation

Task-number: QTCREATORBUG-11961
Change-Id: Ib4e2d4513c23ca24fe2b7ca1e2ad97897213c418
Reviewed-by: default avatarMehdi Fekari <mfekari@blackberry.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
Reviewed-by: default avatarDavid Kaspar <dkaspar@blackberry.com>
parent d80814bd
......@@ -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();
......
......@@ -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
......@@ -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()
......
......@@ -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();
}
......
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