forked from qt-creator/qt-creator
Qnx: Fix broken configuration manager test
The change 0e67b293b7
broke the configuration manager test since
the manager gets now instantiated when loading the plugin
whereas the test assumes that it would be instantiated
when ::instance() is called the first time.
Change-Id: I8f873fa56305da37590e401e8cfb98b8c92fe89d
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
This commit is contained in:
committed by
Mehdi Fekari
parent
6f6dbe23b8
commit
5962f2b5b1
@@ -258,6 +258,19 @@ void BlackBerryConfigurationManager::emitSettingsChanged()
|
|||||||
emit settingsChanged();
|
emit settingsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WITH_TESTS
|
||||||
|
void BlackBerryConfigurationManager::initUnitTest()
|
||||||
|
{
|
||||||
|
foreach (BlackBerryApiLevelConfiguration *apiLevel, m_apiLevels)
|
||||||
|
removeApiLevel(apiLevel);
|
||||||
|
|
||||||
|
foreach (BlackBerryRuntimeConfiguration *runtime, m_runtimes)
|
||||||
|
removeRuntime(runtime);
|
||||||
|
|
||||||
|
m_defaultConfiguration = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void BlackBerryConfigurationManager::setKitsAutoDetectionSource()
|
void BlackBerryConfigurationManager::setKitsAutoDetectionSource()
|
||||||
{
|
{
|
||||||
foreach (Kit *kit, KitManager::kits()) {
|
foreach (Kit *kit, KitManager::kits()) {
|
||||||
|
@@ -82,6 +82,10 @@ public:
|
|||||||
|
|
||||||
void emitSettingsChanged();
|
void emitSettingsChanged();
|
||||||
|
|
||||||
|
#ifdef WITH_TESTS
|
||||||
|
void initUnitTest();
|
||||||
|
#endif
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void loadSettings();
|
void loadSettings();
|
||||||
void saveSettings();
|
void saveSettings();
|
||||||
|
@@ -482,6 +482,7 @@ void QnxPlugin::testConfigurationManager_data()
|
|||||||
void QnxPlugin::testConfigurationManager()
|
void QnxPlugin::testConfigurationManager()
|
||||||
{
|
{
|
||||||
BlackBerryConfigurationManager *manager = BlackBerryConfigurationManager::instance();
|
BlackBerryConfigurationManager *manager = BlackBerryConfigurationManager::instance();
|
||||||
|
manager->initUnitTest();
|
||||||
|
|
||||||
QCOMPARE(manager->apiLevels().count(), 0);
|
QCOMPARE(manager->apiLevels().count(), 0);
|
||||||
QCOMPARE(manager->activeApiLevels().count(), 0);
|
QCOMPARE(manager->activeApiLevels().count(), 0);
|
||||||
|
Reference in New Issue
Block a user