forked from qt-creator/qt-creator
KitManager: Scope KitGuard
Scope KitGuard correctly to avoid emitting kitUpdated signal when adding a kit. Change-Id: Id9b0f92c7c2be8adaf7490cfbecfaceb8717b80f Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Tobias Hunger
parent
f841f3743d
commit
b437b988e5
@@ -446,6 +446,7 @@ void KitManager::addKit(Kit *k)
|
|||||||
if (!k)
|
if (!k)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
{
|
||||||
KitGuard g(k);
|
KitGuard g(k);
|
||||||
foreach (KitInformation *ki, d->m_informationList) {
|
foreach (KitInformation *ki, d->m_informationList) {
|
||||||
if (!k->hasValue(ki->dataId()))
|
if (!k->hasValue(ki->dataId()))
|
||||||
@@ -453,6 +454,7 @@ void KitManager::addKit(Kit *k)
|
|||||||
else
|
else
|
||||||
ki->fix(k);
|
ki->fix(k);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
d->m_kitList.append(k);
|
d->m_kitList.append(k);
|
||||||
if (!d->m_defaultKit ||
|
if (!d->m_defaultKit ||
|
||||||
|
Reference in New Issue
Block a user