forked from qt-creator/qt-creator
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:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user