DebuggerKitInformation: Make setup() handle new kits

Those return a invalid QVariant, so handle that explicitly.

Change-Id: I50726552aeb76d21032c119c5ea2db48e6d88e8b
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Tobias Hunger
2013-10-18 11:23:30 +02:00
parent df83d1574d
commit b2f27649a2

View File

@@ -126,7 +126,10 @@ void DebuggerKitInformation::setup(Kit *k)
// <value type="int" key="EngineType">4</value>
// </valuemap>
if (rawId.type() == QVariant::String) {
if (rawId.isNull()) {
// Initial setup of a kit
detection = NotDetected;
} else if (rawId.type() == QVariant::String) {
detection = DetectedById;
} else {
QMap<QString, QVariant> map = rawId.toMap();
@@ -140,8 +143,6 @@ void DebuggerKitInformation::setup(Kit *k)
}
}
QTC_CHECK(detection != NotDetected);
const DebuggerItem *bestItem = 0;
DebuggerItem::MatchLevel bestLevel = DebuggerItem::DoesNotMatch;
foreach (const DebuggerItem &item, DebuggerItemManager::debuggers()) {