Commit aa8786fb authored by El Mehdi Fekari's avatar El Mehdi Fekari Committed by Mehdi Fekari

Qnx: Add BlackBerry runtime management support

Add support for managing user BlackBerry runtime configurations.

This does not handle adding manual runtimes yet, but only detects
runtimes from the NDK directories of the available API levels.

The BlackBerry NDK should provide a better way to detect installed
runtimes (e.g xml installation files) in order to improve
the BlackBerry runtime managemnt in Qt Creator.

Change-Id: I4f139d52352f903a27dfe4175d12b016b4ee25a9
Reviewed-by: Nicolas Arnaud-Cormos's avatarNicolas Arnaud-Cormos <nicolas@kdab.com>
parent b840a243
...@@ -29,11 +29,12 @@ ...@@ -29,11 +29,12 @@
** **
****************************************************************************/ ****************************************************************************/
#include "blackberryconfiguration.h" #include "blackberryapilevelconfiguration.h"
#include "blackberryconfigurationmanager.h" #include "blackberryconfigurationmanager.h"
#include "blackberryqtversion.h" #include "blackberryqtversion.h"
#include "qnxtoolchain.h" #include "qnxtoolchain.h"
#include "qnxconstants.h"
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
...@@ -76,10 +77,10 @@ const QLatin1String NDKAutoDetectionSourceKey("NDKAutoDetectionSource"); ...@@ -76,10 +77,10 @@ const QLatin1String NDKAutoDetectionSourceKey("NDKAutoDetectionSource");
const QLatin1String NDKAutoDetectedKey("NDKAutoDetectedKey"); const QLatin1String NDKAutoDetectedKey("NDKAutoDetectedKey");
#ifdef WITH_TESTS #ifdef WITH_TESTS
bool BlackBerryConfiguration::m_fakeConfig = false; bool BlackBerryApiLevelConfiguration::m_fakeConfig = false;
#endif #endif
BlackBerryConfiguration::BlackBerryConfiguration(const NdkInstallInformation &ndkInstallInfo) BlackBerryApiLevelConfiguration::BlackBerryApiLevelConfiguration(const NdkInstallInformation &ndkInstallInfo)
{ {
QString envFilePath = QnxUtils::envFilePath(ndkInstallInfo.path, ndkInstallInfo.version); QString envFilePath = QnxUtils::envFilePath(ndkInstallInfo.path, ndkInstallInfo.version);
QTC_ASSERT(!envFilePath.isEmpty(), return); QTC_ASSERT(!envFilePath.isEmpty(), return);
...@@ -96,7 +97,7 @@ BlackBerryConfiguration::BlackBerryConfiguration(const NdkInstallInformation &nd ...@@ -96,7 +97,7 @@ BlackBerryConfiguration::BlackBerryConfiguration(const NdkInstallInformation &nd
ctor(); ctor();
} }
BlackBerryConfiguration::BlackBerryConfiguration(const FileName &ndkEnvFile) BlackBerryApiLevelConfiguration::BlackBerryApiLevelConfiguration(const FileName &ndkEnvFile)
: m_autoDetectionSource(Utils::FileName()) : m_autoDetectionSource(Utils::FileName())
{ {
QTC_ASSERT(!QFileInfo(ndkEnvFile.toString()).isDir(), return); QTC_ASSERT(!QFileInfo(ndkEnvFile.toString()).isDir(), return);
...@@ -129,7 +130,7 @@ BlackBerryConfiguration::BlackBerryConfiguration(const FileName &ndkEnvFile) ...@@ -129,7 +130,7 @@ BlackBerryConfiguration::BlackBerryConfiguration(const FileName &ndkEnvFile)
ctor(); ctor();
} }
BlackBerryConfiguration::BlackBerryConfiguration(const QVariantMap &data) BlackBerryApiLevelConfiguration::BlackBerryApiLevelConfiguration(const QVariantMap &data)
{ {
QString envFilePath = data.value(NDKEnvFileKey).toString(); QString envFilePath = data.value(NDKEnvFileKey).toString();
QTC_ASSERT(!envFilePath.isEmpty(), return); QTC_ASSERT(!envFilePath.isEmpty(), return);
...@@ -148,7 +149,7 @@ BlackBerryConfiguration::BlackBerryConfiguration(const QVariantMap &data) ...@@ -148,7 +149,7 @@ BlackBerryConfiguration::BlackBerryConfiguration(const QVariantMap &data)
ctor(); ctor();
} }
void BlackBerryConfiguration::ctor() void BlackBerryApiLevelConfiguration::ctor()
{ {
FileName qmake4Path = QnxUtils::executableWithExtension(FileName::fromString(m_qnxHost + QLatin1String("/usr/bin/qmake"))); FileName qmake4Path = QnxUtils::executableWithExtension(FileName::fromString(m_qnxHost + QLatin1String("/usr/bin/qmake")));
FileName qmake5Path = QnxUtils::executableWithExtension(FileName::fromString(m_qnxHost + QLatin1String("/usr/bin/qt5/qmake"))); FileName qmake5Path = QnxUtils::executableWithExtension(FileName::fromString(m_qnxHost + QLatin1String("/usr/bin/qt5/qmake")));
...@@ -172,42 +173,42 @@ void BlackBerryConfiguration::ctor() ...@@ -172,42 +173,42 @@ void BlackBerryConfiguration::ctor()
m_simulatorDebugger = simulatorGdbPath; m_simulatorDebugger = simulatorGdbPath;
} }
QString BlackBerryConfiguration::ndkPath() const QString BlackBerryApiLevelConfiguration::ndkPath() const
{ {
return m_ndkEnvFile.parentDir().toString(); return m_ndkEnvFile.parentDir().toString();
} }
QString BlackBerryConfiguration::displayName() const QString BlackBerryApiLevelConfiguration::displayName() const
{ {
return m_displayName; return m_displayName;
} }
QString BlackBerryConfiguration::targetName() const QString BlackBerryApiLevelConfiguration::targetName() const
{ {
return m_targetName; return m_targetName;
} }
QString BlackBerryConfiguration::qnxHost() const QString BlackBerryApiLevelConfiguration::qnxHost() const
{ {
return m_qnxHost; return m_qnxHost;
} }
BlackBerryVersionNumber BlackBerryConfiguration::version() const BlackBerryVersionNumber BlackBerryApiLevelConfiguration::version() const
{ {
return m_version; return m_version;
} }
bool BlackBerryConfiguration::isAutoDetected() const bool BlackBerryApiLevelConfiguration::isAutoDetected() const
{ {
return !m_autoDetectionSource.isEmpty(); return !m_autoDetectionSource.isEmpty();
} }
Utils::FileName BlackBerryConfiguration::autoDetectionSource() const Utils::FileName BlackBerryApiLevelConfiguration::autoDetectionSource() const
{ {
return m_autoDetectionSource; return m_autoDetectionSource;
} }
bool BlackBerryConfiguration::isActive() const bool BlackBerryApiLevelConfiguration::isActive() const
{ {
foreach (Kit *kit, KitManager::kits()) { foreach (Kit *kit, KitManager::kits()) {
if (kit->isAutoDetected() && if (kit->isAutoDetected() &&
...@@ -218,10 +219,10 @@ bool BlackBerryConfiguration::isActive() const ...@@ -218,10 +219,10 @@ bool BlackBerryConfiguration::isActive() const
return false; return false;
} }
bool BlackBerryConfiguration::isValid() const bool BlackBerryApiLevelConfiguration::isValid() const
{ {
#ifdef WITH_TESTS #ifdef WITH_TESTS
if (BlackBerryConfiguration::fakeConfig()) if (BlackBerryApiLevelConfiguration::fakeConfig())
return true; return true;
#endif #endif
...@@ -232,49 +233,51 @@ bool BlackBerryConfiguration::isValid() const ...@@ -232,49 +233,51 @@ bool BlackBerryConfiguration::isValid() const
&& m_sysRoot.toFileInfo().exists()); && m_sysRoot.toFileInfo().exists());
} }
FileName BlackBerryConfiguration::ndkEnvFile() const FileName BlackBerryApiLevelConfiguration::ndkEnvFile() const
{ {
return m_ndkEnvFile; return m_ndkEnvFile;
} }
FileName BlackBerryConfiguration::qmake4BinaryFile() const FileName BlackBerryApiLevelConfiguration::qmake4BinaryFile() const
{ {
return m_qmake4BinaryFile; return m_qmake4BinaryFile;
} }
FileName BlackBerryConfiguration::qmake5BinaryFile() const FileName BlackBerryApiLevelConfiguration::qmake5BinaryFile() const
{ {
return m_qmake5BinaryFile; return m_qmake5BinaryFile;
} }
FileName BlackBerryConfiguration::gccCompiler() const FileName BlackBerryApiLevelConfiguration::gccCompiler() const
{ {
return m_gccCompiler; return m_gccCompiler;
} }
FileName BlackBerryConfiguration::deviceDebuger() const FileName BlackBerryApiLevelConfiguration::deviceDebuger() const
{ {
return m_deviceDebugger; return m_deviceDebugger;
} }
FileName BlackBerryConfiguration::simulatorDebuger() const FileName BlackBerryApiLevelConfiguration::simulatorDebuger() const
{ {
return m_simulatorDebugger; return m_simulatorDebugger;
} }
FileName BlackBerryConfiguration::sysRoot() const FileName BlackBerryApiLevelConfiguration::sysRoot() const
{ {
return m_sysRoot; return m_sysRoot;
} }
QList<Utils::EnvironmentItem> BlackBerryConfiguration::qnxEnv() const QList<Utils::EnvironmentItem> BlackBerryApiLevelConfiguration::qnxEnv() const
{ {
return m_qnxEnv; return m_qnxEnv;
} }
QVariantMap BlackBerryConfiguration::toMap() const QVariantMap BlackBerryApiLevelConfiguration::toMap() const
{ {
QVariantMap data; QVariantMap data;
data.insert(QLatin1String(Qnx::Constants::QNX_BB_KEY_CONFIGURATION_TYPE),
QLatin1String(Qnx::Constants::QNX_BB_APILEVEL_TYPE));
data.insert(QLatin1String(NDKEnvFileKey), m_ndkEnvFile.toString()); data.insert(QLatin1String(NDKEnvFileKey), m_ndkEnvFile.toString());
data.insert(QLatin1String(NDKDisplayNameKey), m_displayName); data.insert(QLatin1String(NDKDisplayNameKey), m_displayName);
data.insert(QLatin1String(NDKPathKey), ndkPath()); data.insert(QLatin1String(NDKPathKey), ndkPath());
...@@ -286,7 +289,7 @@ QVariantMap BlackBerryConfiguration::toMap() const ...@@ -286,7 +289,7 @@ QVariantMap BlackBerryConfiguration::toMap() const
return data; return data;
} }
QnxAbstractQtVersion *BlackBerryConfiguration::createQtVersion( QnxAbstractQtVersion *BlackBerryApiLevelConfiguration::createQtVersion(
const FileName &qmakePath, Qnx::QnxArchitecture arch, const QString &versionName) const FileName &qmakePath, Qnx::QnxArchitecture arch, const QString &versionName)
{ {
QnxAbstractQtVersion *version = new BlackBerryQtVersion( QnxAbstractQtVersion *version = new BlackBerryQtVersion(
...@@ -296,7 +299,7 @@ QnxAbstractQtVersion *BlackBerryConfiguration::createQtVersion( ...@@ -296,7 +299,7 @@ QnxAbstractQtVersion *BlackBerryConfiguration::createQtVersion(
return version; return version;
} }
QnxToolChain *BlackBerryConfiguration::createToolChain( QnxToolChain *BlackBerryApiLevelConfiguration::createToolChain(
ProjectExplorer::Abi abi, const QString &versionName) ProjectExplorer::Abi abi, const QString &versionName)
{ {
QnxToolChain* toolChain = new QnxToolChain(ToolChain::AutoDetection); QnxToolChain* toolChain = new QnxToolChain(ToolChain::AutoDetection);
...@@ -309,7 +312,7 @@ QnxToolChain *BlackBerryConfiguration::createToolChain( ...@@ -309,7 +312,7 @@ QnxToolChain *BlackBerryConfiguration::createToolChain(
return toolChain; return toolChain;
} }
QVariant BlackBerryConfiguration::createDebuggerItem( QVariant BlackBerryApiLevelConfiguration::createDebuggerItem(
QList<ProjectExplorer::Abi> abis, Qnx::QnxArchitecture arch, const QString &versionName) QList<ProjectExplorer::Abi> abis, Qnx::QnxArchitecture arch, const QString &versionName)
{ {
Utils::FileName command = arch == X86 ? m_simulatorDebugger : m_deviceDebugger; Utils::FileName command = arch == X86 ? m_simulatorDebugger : m_deviceDebugger;
...@@ -322,7 +325,7 @@ QVariant BlackBerryConfiguration::createDebuggerItem( ...@@ -322,7 +325,7 @@ QVariant BlackBerryConfiguration::createDebuggerItem(
return DebuggerItemManager::registerDebugger(debugger); return DebuggerItemManager::registerDebugger(debugger);
} }
Kit *BlackBerryConfiguration::createKit( Kit *BlackBerryApiLevelConfiguration::createKit(
QnxAbstractQtVersion *version, QnxToolChain *toolChain, const QVariant &debuggerItemId) QnxAbstractQtVersion *version, QnxToolChain *toolChain, const QVariant &debuggerItemId)
{ {
Kit *kit = new Kit; Kit *kit = new Kit;
...@@ -359,7 +362,7 @@ Kit *BlackBerryConfiguration::createKit( ...@@ -359,7 +362,7 @@ Kit *BlackBerryConfiguration::createKit(
return kit; return kit;
} }
bool BlackBerryConfiguration::activate() bool BlackBerryApiLevelConfiguration::activate()
{ {
if (!isValid()) { if (!isValid()) {
if (!m_autoDetectionSource.isEmpty()) if (!m_autoDetectionSource.isEmpty())
...@@ -441,7 +444,7 @@ bool BlackBerryConfiguration::activate() ...@@ -441,7 +444,7 @@ bool BlackBerryConfiguration::activate()
return true; return true;
} }
void BlackBerryConfiguration::deactivate() void BlackBerryApiLevelConfiguration::deactivate()
{ {
foreach (Kit *kit, KitManager::kits()) { foreach (Kit *kit, KitManager::kits()) {
if (kit->isAutoDetected() && if (kit->isAutoDetected() &&
...@@ -464,12 +467,12 @@ void BlackBerryConfiguration::deactivate() ...@@ -464,12 +467,12 @@ void BlackBerryConfiguration::deactivate()
} }
#ifdef WITH_TESTS #ifdef WITH_TESTS
void BlackBerryConfiguration::setFakeConfig(bool fakeConfig) void BlackBerryApiLevelConfiguration::setFakeConfig(bool fakeConfig)
{ {
m_fakeConfig = fakeConfig; m_fakeConfig = fakeConfig;
} }
bool BlackBerryConfiguration::fakeConfig() bool BlackBerryApiLevelConfiguration::fakeConfig()
{ {
return m_fakeConfig; return m_fakeConfig;
} }
......
...@@ -54,13 +54,13 @@ namespace Internal { ...@@ -54,13 +54,13 @@ namespace Internal {
class QnxAbstractQtVersion; class QnxAbstractQtVersion;
class QnxToolChain; class QnxToolChain;
class BlackBerryConfiguration class BlackBerryApiLevelConfiguration
{ {
Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::BlackBerryConfiguration) Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::BlackBerryApiLevelConfiguration)
public: public:
BlackBerryConfiguration(const NdkInstallInformation &ndkInstallInfo); BlackBerryApiLevelConfiguration(const NdkInstallInformation &ndkInstallInfo);
BlackBerryConfiguration(const Utils::FileName &ndkEnvFile); BlackBerryApiLevelConfiguration(const Utils::FileName &ndkEnvFile);
BlackBerryConfiguration(const QVariantMap &data); BlackBerryApiLevelConfiguration(const QVariantMap &data);
bool activate(); bool activate();
void deactivate(); void deactivate();
QString ndkPath() const; QString ndkPath() const;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
****************************************************************************/ ****************************************************************************/
#include "blackberrycertificate.h" #include "blackberrycertificate.h"
#include "blackberryconfiguration.h" #include "blackberryapilevelconfiguration.h"
#include "blackberryconfigurationmanager.h" #include "blackberryconfigurationmanager.h"
#include "blackberryndkprocess.h" #include "blackberryndkprocess.h"
......
...@@ -43,7 +43,8 @@ namespace Utils { class PersistentSettingsWriter; } ...@@ -43,7 +43,8 @@ namespace Utils { class PersistentSettingsWriter; }
namespace Qnx { namespace Qnx {
namespace Internal { namespace Internal {
class BlackBerryConfiguration; class BlackBerryApiLevelConfiguration;
class BlackBerryRuntimeConfiguration;
class BlackBerryConfigurationManager : public QObject class BlackBerryConfigurationManager : public QObject
{ {
...@@ -51,13 +52,17 @@ class BlackBerryConfigurationManager : public QObject ...@@ -51,13 +52,17 @@ class BlackBerryConfigurationManager : public QObject
public: public:
static BlackBerryConfigurationManager &instance(); static BlackBerryConfigurationManager &instance();
~BlackBerryConfigurationManager(); ~BlackBerryConfigurationManager();
bool addConfiguration(BlackBerryConfiguration *config); bool addApiLevel(BlackBerryApiLevelConfiguration *config);
void removeConfiguration(BlackBerryConfiguration *config); void removeApiLevel(BlackBerryApiLevelConfiguration *config);
QList<BlackBerryConfiguration*> configurations() const; bool addRuntime(BlackBerryRuntimeConfiguration *runtime);
QList<BlackBerryConfiguration*> manualConfigurations() const; void removeRuntime(BlackBerryRuntimeConfiguration *runtime);
QList<BlackBerryConfiguration *> activeConfigurations() const; QList<BlackBerryApiLevelConfiguration*> apiLevels() const;
BlackBerryConfiguration *configurationFromEnvFile(const Utils::FileName &envFile) const; QList<BlackBerryRuntimeConfiguration *> runtimes() const;
BlackBerryConfiguration *defaultConfiguration() const; QList<BlackBerryApiLevelConfiguration*> manualApiLevels() const;
QList<BlackBerryApiLevelConfiguration *> activeApiLevels() const;
BlackBerryApiLevelConfiguration *apiLevelFromEnvFile(const Utils::FileName &envFile) const;
BlackBerryRuntimeConfiguration *runtimeFromFilePath(const QString &path);
BlackBerryApiLevelConfiguration *defaultApiLevel() const;
QString barsignerCskPath() const; QString barsignerCskPath() const;
QString idTokenPath() const; QString idTokenPath() const;
...@@ -68,10 +73,11 @@ public: ...@@ -68,10 +73,11 @@ public:
// returns the environment for the default API level // returns the environment for the default API level
QList<Utils::EnvironmentItem> defaultConfigurationEnv() const; QList<Utils::EnvironmentItem> defaultConfigurationEnv() const;
void loadAutoDetectedConfigurations(); void loadAutoDetectedApiLevels();
void setDefaultConfiguration(BlackBerryConfiguration *config); void loadAutoDetectedRuntimes();
void setDefaultConfiguration(BlackBerryApiLevelConfiguration *config);
bool newestConfigurationEnabled() const; bool newestApiLevelEnabled() const;
void emitSettingsChanged(); void emitSettingsChanged();
...@@ -86,9 +92,10 @@ signals: ...@@ -86,9 +92,10 @@ signals:
private: private:
BlackBerryConfigurationManager(QObject *parent = 0); BlackBerryConfigurationManager(QObject *parent = 0);
QList<BlackBerryConfiguration*> m_configs; QList<BlackBerryApiLevelConfiguration*> m_apiLevels;
QList<BlackBerryRuntimeConfiguration*> m_runtimes;
BlackBerryConfiguration *m_defaultConfiguration; BlackBerryApiLevelConfiguration *m_defaultConfiguration;
Utils::PersistentSettingsWriter *m_writer; Utils::PersistentSettingsWriter *m_writer;
...@@ -98,7 +105,8 @@ private: ...@@ -98,7 +105,8 @@ private:
void loadManualConfigurations(); void loadManualConfigurations();
void setKitsAutoDetectionSource(); void setKitsAutoDetectionSource();
void insertByVersion(BlackBerryConfiguration* config); void insertApiLevelByVersion(BlackBerryApiLevelConfiguration* apiLevel);
void insertRuntimeByVersion(BlackBerryRuntimeConfiguration* runtime);
}; };
} // namespace Internal } // namespace Internal
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include "blackberrydebugtokenuploader.h" #include "blackberrydebugtokenuploader.h"
#include "blackberrydebugtokenrequestdialog.h" #include "blackberrydebugtokenrequestdialog.h"
#include "ui_blackberrydeviceconfigurationwidget.h" #include "ui_blackberrydeviceconfigurationwidget.h"
#include "blackberryconfiguration.h"
#include "blackberrydeviceconnectionmanager.h" #include "blackberrydeviceconnectionmanager.h"
#include "blackberrysigningutils.h" #include "blackberrysigningutils.h"
#include "blackberrydebugtokenreader.h" #include "blackberrydebugtokenreader.h"
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
****************************************************************************/ ****************************************************************************/
#include "blackberrydeviceconfigurationwizardpages.h" #include "blackberrydeviceconfigurationwizardpages.h"
#include "blackberryconfiguration.h"
#include "blackberrydebugtokenrequestdialog.h" #include "blackberrydebugtokenrequestdialog.h"
#include "blackberrydebugtokenreader.h" #include "blackberrydebugtokenreader.h"
#include "blackberrysshkeysgenerator.h" #include "blackberrysshkeysgenerator.h"
...@@ -38,7 +37,6 @@ ...@@ -38,7 +37,6 @@
#include "ui_blackberrydeviceconfigurationwizardsetuppage.h" #include "ui_blackberrydeviceconfigurationwizardsetuppage.h"
#include "ui_blackberrydeviceconfigurationwizardquerypage.h" #include "ui_blackberrydeviceconfigurationwizardquerypage.h"
#include "ui_blackberrydeviceconfigurationwizardconfigpage.h" #include "ui_blackberrydeviceconfigurationwizardconfigpage.h"
#include "blackberryconfiguration.h"
#include "blackberrydeviceconnectionmanager.h" #include "blackberrydeviceconnectionmanager.h"
#include "blackberrysigningutils.h" #include "blackberrysigningutils.h"
#include "qnxutils.h" #include "qnxutils.h"
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include "blackberrydeviceconnection.h" #include "blackberrydeviceconnection.h"
#include "blackberryconfiguration.h"
#include "blackberryconfigurationmanager.h" #include "blackberryconfigurationmanager.h"
#include "qnxutils.h" #include "qnxutils.h"
......
...@@ -114,7 +114,7 @@ void BlackBerryDeviceConnectionManager::connectDevice(Core::Id deviceId) ...@@ -114,7 +114,7 @@ void BlackBerryDeviceConnectionManager::connectDevice(Core::Id deviceId)
// BlackBerry Device connection needs the Qnx environments to be set // BlackBerry Device connection needs the Qnx environments to be set
// in order to find the Connect.jar package. // in order to find the Connect.jar package.
// Let's delay the device connections at startup till the Qnx settings are loaded. // Let's delay the device connections at startup till the Qnx settings are loaded.
if (BlackBerryConfigurationManager::instance().configurations().isEmpty()) { if (BlackBerryConfigurationManager::instance().apiLevels().isEmpty()) {
m_pendingDeviceConnections << device; m_pendingDeviceConnections << device;
connect(&BlackBerryConfigurationManager::instance(), SIGNAL(settingsLoaded()), connect(&BlackBerryConfigurationManager::instance(), SIGNAL(settingsLoaded()),
this, SLOT(processPendingDeviceConnections()), Qt::UniqueConnection); this, SLOT(processPendingDeviceConnections()), Qt::UniqueConnection);
...@@ -308,7 +308,7 @@ void BlackBerryDeviceConnectionManager::handleProcessOutput(const QString &outpu ...@@ -308,7 +308,7 @@ void BlackBerryDeviceConnectionManager::handleProcessOutput(const QString &outpu
void BlackBerryDeviceConnectionManager::processPendingDeviceConnections() void BlackBerryDeviceConnectionManager::processPendingDeviceConnections()
{ {
if (m_pendingDeviceConnections.isEmpty() if (m_pendingDeviceConnections.isEmpty()
|| BlackBerryConfigurationManager::instance().configurations().isEmpty()) || BlackBerryConfigurationManager::instance().apiLevels().isEmpty())
return; return;
foreach (ProjectExplorer::IDevice::ConstPtr device, m_pendingDeviceConnections) foreach (ProjectExplorer::IDevice::ConstPtr device, m_pendingDeviceConnections)
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include "blackberryinstallwizardpages.h" #include "blackberryinstallwizardpages.h"
#include "blackberryconfigurationmanager.h" #include "blackberryconfigurationmanager.h"
#include "blackberryconfiguration.h" #include "blackberryapilevelconfiguration.h"
#include "ui_blackberryinstallwizardoptionpage.h" #include "ui_blackberryinstallwizardoptionpage.h"
#include "ui_blackberryinstallwizardtargetpage.h" #include "ui_blackberryinstallwizardtargetpage.h"
...@@ -482,7 +482,7 @@ void BlackBerryInstallWizardProcessPage::processTarget() ...@@ -482,7 +482,7 @@ void BlackBerryInstallWizardProcessPage::processTarget()
// deactivate target if activated before uninstalling // deactivate target if activated before uninstalling
if (m_data.mode == BlackBerryInstallerDataHandler::UninstallMode) { if (m_data.mode == BlackBerryInstallerDataHandler::UninstallMode) {
foreach (BlackBerryConfiguration *config, BlackBerryConfigurationManager::instance().configurations()) { foreach (BlackBerryApiLevelConfiguration *config, BlackBerryConfigurationManager::instance().apiLevels()) {
if (m_data.target.contains((config->targetName())) && config->isActive()) { if (m_data.target.contains((config->targetName())) && config->isActive()) {
config->deactivate(); config->deactivate();
break; break;
...@@ -519,11 +519,12 @@ void BlackBerryInstallWizardFinalPage::initializePage() ...@@ -519,11 +519,12 @@ void BlackBerryInstallWizardFinalPage::initializePage()
if (m_data.mode == BlackBerryInstallerDataHandler::ManuallMode) { if (m_data.mode == BlackBerryInstallerDataHandler::ManuallMode) {
BlackBerryConfigurationManager &configManager = BlackBerryConfigurationManager::instance(); BlackBerryConfigurationManager &configManager = BlackBerryConfigurationManager::instance();
BlackBerryConfiguration *config = configManager.configurationFromEnvFile(Utils::FileName::fromString(m_data.ndkPath)); BlackBerryApiLevelConfiguration *config =
configManager.apiLevelFromEnvFile(Utils::FileName::fromString(m_data.ndkPath));
if (!config) { if (!config) {
config = new BlackBerryConfiguration(Utils::FileName::fromString(m_data.ndkPath)); config = new BlackBerryApiLevelConfiguration(Utils::FileName::fromString(m_data.ndkPath));
if (!configManager.addConfiguration(config)) { if (!configManager.addApiLevel(config)) {
delete config; delete config;
// TODO: more explicit error message! // TODO: more explicit error message!
label->setText(tr("An error has occurred while adding target from:\n %1").arg(m_data.ndkPath)); label->setText(tr("An error has occurred while adding target from:\n %1").arg(m_data.ndkPath));
......
...@@ -32,8 +32,6 @@ ...@@ -32,8 +32,6 @@
#ifndef BLACKBERRYKEYSWIDGET_H_H #ifndef BLACKBERRYKEYSWIDGET_H_H
#define BLACKBERRYKEYSWIDGET_H_H #define BLACKBERRYKEYSWIDGET_H_H
#include "blackberryconfiguration.h"
#include <QWidget> #include <QWidget>
#include <QString> #include <QString>
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
****************************************************************************/ ****************************************************************************/
#include "blackberryndkprocess.h" #include "blackberryndkprocess.h"
#include "blackberryconfiguration.h"
#include "blackberryconfigurationmanager.h" #include "blackberryconfigurationmanager.h"
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "blackberryndksettingspage.h"