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

Qnx: Skip warnings when deactivating an API level

Task-number: QTCREATORBUG-11792

Change-Id: If683ce1261bbcdfd3ffd2d949c355e6edf376839
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent f32b6fd3
......@@ -452,23 +452,39 @@ bool BlackBerryApiLevelConfiguration::activate()
void BlackBerryApiLevelConfiguration::deactivate()
{
QList<BaseQtVersion *> qtvToRemove;
QList<ToolChain *> tcToRemove;
QList<const DebuggerItem *> dbgToRemove;
foreach (Kit *kit, KitManager::kits()) {
if (kit->isAutoDetected() &&
kit->autoDetectionSource() == ndkEnvFile().toString()) {
BaseQtVersion *version = QtKitInformation::qtVersion(kit);
ToolChain *toolChain = ToolChainKitInformation::toolChain(kit);
const DebuggerItem *debugger = DebuggerKitInformation::debugger(kit);
if (version)
QtVersionManager::removeVersion(version);
if (toolChain)
ToolChainManager::deregisterToolChain(toolChain);
if (debugger)
DebuggerItemManager::deregisterDebugger(debugger->id());
// Kit's Qt version, tool chain or debugger might be used by other BB kits
// generated for the same API level that are not yet unregistered. This triggers warning outputs.
// Let's unregistered/removed them later once all API level kits are unregistered.
if (version && !qtvToRemove.contains(version))
qtvToRemove << version;
if (toolChain && !tcToRemove.contains(toolChain))
tcToRemove << toolChain;
if (debugger && !dbgToRemove.contains(debugger))
dbgToRemove << debugger;
KitManager::deregisterKit(kit);
}
}
foreach (BaseQtVersion *qtv, qtvToRemove)
QtVersionManager::removeVersion(qtv);
foreach (ToolChain *tc, tcToRemove)
ToolChainManager::deregisterToolChain(tc);
foreach (const DebuggerItem *debugger, dbgToRemove)
DebuggerItemManager::deregisterDebugger(debugger->id());
BlackBerryConfigurationManager::instance()->emitSettingsChanged();
}
......
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