Commit b39dccf0 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

KitModel: Delay connections to avoid needless updates



Change-Id: I4ef40fd76b65f6504c8dee71bf8b5d76e1d23cbe
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent f2e24ac1
......@@ -92,15 +92,6 @@ KitModel::KitModel(QBoxLayout *parentLayout, QObject *parent) :
m_defaultNode(0),
m_keepUnique(true)
{
connect(KitManager::instance(), SIGNAL(kitAdded(ProjectExplorer::Kit*)),
this, SLOT(addKit(ProjectExplorer::Kit*)));
connect(KitManager::instance(), SIGNAL(kitRemoved(ProjectExplorer::Kit*)),
this, SLOT(removeKit(ProjectExplorer::Kit*)));
connect(KitManager::instance(), SIGNAL(unmanagedKitUpdated(ProjectExplorer::Kit*)),
this, SLOT(updateKit(ProjectExplorer::Kit*)));
connect(KitManager::instance(), SIGNAL(defaultkitChanged()),
this, SLOT(changeDefaultKit()));
m_root = new KitNode(0);
m_autoRoot = new KitNode(m_root);
m_manualRoot = new KitNode(m_root);
......@@ -109,6 +100,15 @@ KitModel::KitModel(QBoxLayout *parentLayout, QObject *parent) :
addKit(k);
changeDefaultKit();
connect(KitManager::instance(), SIGNAL(kitAdded(ProjectExplorer::Kit*)),
this, SLOT(addKit(ProjectExplorer::Kit*)));
connect(KitManager::instance(), SIGNAL(kitRemoved(ProjectExplorer::Kit*)),
this, SLOT(removeKit(ProjectExplorer::Kit*)));
connect(KitManager::instance(), SIGNAL(unmanagedKitUpdated(ProjectExplorer::Kit*)),
this, SLOT(updateKit(ProjectExplorer::Kit*)));
connect(KitManager::instance(), SIGNAL(defaultkitChanged()),
this, SLOT(changeDefaultKit()));
}
KitModel::~KitModel()
......
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