From 64cc15bca4f6e91917dea28387c39706a40805f3 Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Tue, 20 Jan 2015 12:43:46 +0100 Subject: Kit: Fix crash on removing android kits that were autodetected To reproduce: In the Android settings, enabled "Automatically create kits" -> This creates kits with autodetected set to true Switch to the kits page to get the KitPage filled, those kits now appear under the autodetected node. Switch to the Android settings and disable "Automatically create kits", -> This doesn't want to delete the old kits, to not throw away user settings, so the kits are marked as manual by calling setAutoDetected Switch to the Kit page and notice the kits still listed under the autodetected node. Clicking apply enables the remove button and on removing Creator crashes. Add the necessary signal emissions to setAutoDetected and several other methods and fix the KitModel to cope with changes to autodetected. Task-number: QTCREATORBUG-13736 Change-Id: I3d0ff247a6bfff8ace53df8535749db5c736d54b Reviewed-by: Tobias Hunger --- src/plugins/projectexplorer/kit.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/plugins/projectexplorer/kit.cpp') diff --git a/src/plugins/projectexplorer/kit.cpp b/src/plugins/projectexplorer/kit.cpp index 7fae069f36..b1247fd2eb 100644 --- a/src/plugins/projectexplorer/kit.cpp +++ b/src/plugins/projectexplorer/kit.cpp @@ -582,16 +582,19 @@ QString Kit::toHtml(const QList &additional) const void Kit::setAutoDetected(bool detected) { d->m_autodetected = detected; + kitUpdated(); } void Kit::setAutoDetectionSource(const QString &autoDetectionSource) { d->m_autoDetectionSource = autoDetectionSource; + kitUpdated(); } void Kit::setSdkProvided(bool sdkProvided) { d->m_sdkProvided = sdkProvided; + kitUpdated(); } void Kit::makeSticky() @@ -608,11 +611,13 @@ void Kit::setSticky(Core::Id id, bool b) d->m_sticky.insert(id); else d->m_sticky.remove(id); + kitUpdated(); } void Kit::makeUnSticky() { d->m_sticky.clear(); + kitUpdated(); } void Kit::setMutable(Id id, bool b) @@ -621,6 +626,7 @@ void Kit::setMutable(Id id, bool b) d->m_mutable.insert(id); else d->m_mutable.remove(id); + kitUpdated(); } bool Kit::isMutable(Id id) const -- cgit v1.2.1