summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleix Pol <[email protected]>2016-12-19 17:24:20 +0100
committerAleix Pol <[email protected]>2016-12-19 17:24:20 +0100
commit451e8ae06750e1b664b8c047ee075345c45f1109 (patch)
tree8a4d78876f04d09b5b7f4a01a0aebadfaee666c3
parentd7412e8e0a7128e888c09be2fde8dfa42ddf4437 (diff)
Notify backends changed at bulk
Otherwise it's an initialization mess
-rw-r--r--libdiscover/resources/ResourcesModel.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libdiscover/resources/ResourcesModel.cpp b/libdiscover/resources/ResourcesModel.cpp
index 3a31e0c..cd0aabd 100644
--- a/libdiscover/resources/ResourcesModel.cpp
+++ b/libdiscover/resources/ResourcesModel.cpp
@@ -101,8 +101,6 @@ void ResourcesModel::addResourcesBackend(AbstractResourcesBackend* backend)
connect(backend, &AbstractResourcesBackend::resourceRemoved, this, &ResourcesModel::resourceRemoved);
connect(backend, &AbstractResourcesBackend::passiveMessage, this, &ResourcesModel::passiveMessage);
- emit backendsChanged();
-
if(m_initializingBackends==0)
emit allInitialized();
else
@@ -187,6 +185,7 @@ void ResourcesModel::registerAllBackends()
foreach(AbstractResourcesBackend* b, backends) {
addResourcesBackend(b);
}
+ emit backendsChanged();
}
}
@@ -195,6 +194,8 @@ void ResourcesModel::registerBackendByName(const QString& name)
DiscoverBackendsFactory f;
for(auto b : f.backend(name))
addResourcesBackend(b);
+
+ emit backendsChanged();
}
void ResourcesModel::integrateActions(KActionCollection* w)