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"
......
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
#include "blackberryconfigurationmanager.h" #include "blackberryconfigurationmanager.h"
#include "blackberrycertificate.h" #include "blackberrycertificate.h"
#include "blackberryconfiguration.h" #include "blackberryapilevelconfiguration.h"
#include "blackberryruntimeconfiguration.h"
#include "qnxtoolchain.h" #include "qnxtoolchain.h"
#include "qnxutils.h" #include "qnxutils.h"
...@@ -54,6 +55,7 @@ ...@@ -54,6 +55,7 @@
#include <QMessageBox> #include <QMessageBox>
#include <QFileInfo> #include <QFileInfo>
#include <QDebug> #include <QDebug>
#include <QDir>
using namespace ProjectExplorer; using namespace ProjectExplorer;
...@@ -79,7 +81,7 @@ static Utils::FileName bbConfigSettingsFileName() ...@@ -79,7 +81,7 @@ static Utils::FileName bbConfigSettingsFileName()
+ QLatin1String(Constants::QNX_BLACKBERRY_CONFIGS_FILENAME)); + QLatin1String(Constants::QNX_BLACKBERRY_CONFIGS_FILENAME));
} }
static bool sortConfigurationsByVersion(const BlackBerryConfiguration *a, const BlackBerryConfiguration *b) template <class T> static bool sortConfigurationsByVersion(const T *a, const T *b)
{ {
return a->version() > b->version(); return a->version() > b->version();
} }
...@@ -99,8 +101,17 @@ void BlackBerryConfigurationManager::saveConfigurations() ...@@ -99,8 +101,17 @@ void BlackBerryConfigurationManager::saveConfigurations()
QVariantMap data; QVariantMap data;
data.insert(QLatin1String(BBConfigsFileVersionKey), 1); data.insert(QLatin1String(BBConfigsFileVersionKey), 1);
int count = 0; int count = 0;
foreach (BlackBerryConfiguration *config, m_configs) { foreach (BlackBerryApiLevelConfiguration *apiLevel, m_apiLevels) {
QVariantMap tmp = config->toMap(); QVariantMap tmp = apiLevel->toMap();
if (tmp.isEmpty())
continue;
data.insert(BBConfigDataKey + QString::number(count), tmp);
++count;
}
foreach (BlackBerryRuntimeConfiguration *runtime, m_runtimes) {
QVariantMap tmp = runtime->toMap();
if (tmp.isEmpty()) if (tmp.isEmpty())
continue; continue;
...@@ -110,8 +121,8 @@ void BlackBerryConfigurationManager::saveConfigurations() ...@@ -110,8 +121,8 @@ void BlackBerryConfigurationManager::saveConfigurations()
data.insert(QLatin1String(BBConfigCountKey), count); data.insert(QLatin1String(BBConfigCountKey), count);
const QString newestConfig = (newestConfigurationEnabled()) const QString newestConfig = (newestApiLevelEnabled())
? NewestConfigurationValue : defaultConfiguration()->ndkEnvFile().toString(); ? NewestConfigurationValue : defaultApiLevel()->ndkEnvFile().toString();
//save default configuration //save default configuration
data.insert(QLatin1String(DefaultConfigurationKey), newestConfig); data.insert(QLatin1String(DefaultConfigurationKey), newestConfig);
...@@ -142,13 +153,19 @@ void BlackBerryConfigurationManager::restoreConfigurations() ...@@ -142,13 +153,19 @@ void BlackBerryConfigurationManager::restoreConfigurations()
continue; continue;
const QVariantMap dMap = data.value(key).toMap(); const QVariantMap dMap = data.value(key).toMap();
const QString configurationType =
BlackBerryConfiguration *config = new BlackBerryConfiguration(dMap); dMap.value(QLatin1String(Constants::QNX_BB_KEY_CONFIGURATION_TYPE)).toString();
if (configurationType == QLatin1String(Constants::QNX_BB_RUNTIME_TYPE)) {
insertByVersion(config); BlackBerryRuntimeConfiguration *runtime = new BlackBerryRuntimeConfiguration(dMap);
insertRuntimeByVersion(runtime);
if (!useNewestConfiguration && (config->ndkEnvFile().toString() == ndkEnvFile)) } else if (configurationType == QLatin1String(Constants::QNX_BB_APILEVEL_TYPE)
setDefaultConfiguration(config); || configurationType.isEmpty()) { // Backward compatibility
BlackBerryApiLevelConfiguration *apiLevel = new BlackBerryApiLevelConfiguration(dMap);
insertApiLevelByVersion(apiLevel);
if (!useNewestConfiguration && (apiLevel->ndkEnvFile().toString() == ndkEnvFile))
setDefaultConfiguration(apiLevel);
}
} }
emit settingsChanged(); emit settingsChanged();
...@@ -174,8 +191,9 @@ void BlackBerryConfigurationManager::loadManualConfigurations() ...@@ -174,8 +191,9 @@ void BlackBerryConfigurationManager::loadManualConfigurations()
ndkEnvPath = QnxUtils::envFilePath(ndkPath); ndkEnvPath = QnxUtils::envFilePath(ndkPath);
} }
BlackBerryConfiguration *config = new BlackBerryConfiguration(Utils::FileName::fromString(ndkEnvPath)); BlackBerryApiLevelConfiguration *config =
if (!addConfiguration(config)) new BlackBerryApiLevelConfiguration(Utils::FileName::fromString(ndkEnvPath));
if (!addApiLevel(config))
delete config; delete config;
settings->endGroup(); settings->endGroup();
...@@ -186,20 +204,36 @@ void BlackBerryConfigurationManager::loadManualConfigurations() ...@@ -186,20 +204,36 @@ void BlackBerryConfigurationManager::loadManualConfigurations()
settings->endGroup(); settings->endGroup();
} }
void BlackBerryConfigurationManager::loadAutoDetectedConfigurations() void BlackBerryConfigurationManager::loadAutoDetectedApiLevels()
{ {
foreach (const NdkInstallInformation &ndkInfo, QnxUtils::installedNdks()) { foreach (const NdkInstallInformation &ndkInfo, QnxUtils::installedNdks()) {
BlackBerryConfiguration *config = new BlackBerryConfiguration(ndkInfo); BlackBerryApiLevelConfiguration *config = new BlackBerryApiLevelConfiguration(ndkInfo);
if (!addConfiguration(config)) { if (!addApiLevel(config)) {
delete config; delete config;
continue;
} }
} }
} }
void BlackBerryConfigurationManager::setDefaultConfiguration(BlackBerryConfiguration *config) void BlackBerryConfigurationManager::loadAutoDetectedRuntimes()
{
QRegExp regExp(QLatin1String("runtime_(\\d+)_(\\d+)_(\\d+)_(\\d+)"));
foreach (BlackBerryApiLevelConfiguration *apiLevel, m_apiLevels) {
QDir ndkDir(apiLevel->ndkPath());
foreach (const QFileInfo& fi, ndkDir.entryInfoList(QDir::Dirs)) {
if (regExp.exactMatch(fi.baseName())) {
BlackBerryRuntimeConfiguration *runtime =
new BlackBerryRuntimeConfiguration(fi.absoluteFilePath());
if (!addRuntime(runtime))
delete runtime;
}
}
}
}
void BlackBerryConfigurationManager::setDefaultConfiguration(
BlackBerryApiLevelConfiguration *config)
{ {
if (config && !m_configs.contains(config)) { if (config && !m_apiLevels.contains(config)) {
qWarning() << "BlackBerryConfigurationManager::setDefaultConfiguration -" qWarning() << "BlackBerryConfigurationManager::setDefaultConfiguration -"
" configuration does not belong to this instance: " " configuration does not belong to this instance: "
<< config->ndkEnvFile().toString(); << config->ndkEnvFile().toString();
...@@ -210,7 +244,7 @@ void BlackBerryConfigurationManager::setDefaultConfiguration(BlackBerryConfigura ...@@ -210,7 +244,7 @@ void BlackBerryConfigurationManager::setDefaultConfiguration(BlackBerryConfigura
emit settingsChanged(); emit settingsChanged();
} }
bool BlackBerryConfigurationManager::newestConfigurationEnabled() const bool BlackBerryConfigurationManager::newestApiLevelEnabled() const
{ {
return !m_defaultConfiguration; return !m_defaultConfiguration;
} }
...@@ -227,7 +261,7 @@ void BlackBerryConfigurationManager::setKitsAutoDetectionSource() ...@@ -227,7 +261,7 @@ void BlackBerryConfigurationManager::setKitsAutoDetectionSource()
(DeviceTypeKitInformation::deviceTypeId(kit) == Constants::QNX_BB_CATEGORY_ICON) && (DeviceTypeKitInformation::deviceTypeId(kit) == Constants::QNX_BB_CATEGORY_ICON) &&
kit->autoDetectionSource().isEmpty()) { kit->autoDetectionSource().isEmpty()) {
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit); QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit);
foreach (BlackBerryConfiguration *config, m_configs) { foreach (BlackBerryApiLevelConfiguration *config, m_apiLevels) {
if ((version && if ((version &&
(version->qmakeCommand() == config->qmake4BinaryFile() || version->qmakeCommand() == config->qmake5BinaryFile())) (version->qmakeCommand() == config->qmake4BinaryFile() || version->qmakeCommand() == config->qmake5BinaryFile()))
&& (SysRootKitInformation::sysRoot(kit) == config->sysRoot())) && (SysRootKitInformation::sysRoot(kit) == config->sysRoot()))
...@@ -237,17 +271,28 @@ void BlackBerryConfigurationManager::setKitsAutoDetectionSource() ...@@ -237,17 +271,28 @@ void BlackBerryConfigurationManager::setKitsAutoDetectionSource()
} }
} }
void BlackBerryConfigurationManager::insertByVersion(BlackBerryConfiguration *config)