emit sourceadded or sourceremoved when it notices sources have been added or removed remotely
svn path=/trunk/KDE/kdelibs/; revision=1091937
This commit is contained in:
parent
5ae0574f54
commit
ac7b1cce29
@ -120,6 +120,7 @@ void RemoteDataEngine::remoteCallFinished(Plasma::ServiceJob *job)
|
|||||||
if (!m_sources.contains(source)) {
|
if (!m_sources.contains(source)) {
|
||||||
kDebug() << "source no longer exists... remove that data.";
|
kDebug() << "source no longer exists... remove that data.";
|
||||||
removeSource(source);
|
removeSource(source);
|
||||||
|
emit sourceRemoved(source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,11 +137,12 @@ void RemoteDataEngine::remoteCallFinished(Plasma::ServiceJob *job)
|
|||||||
if (!oldsources.contains(source) && !s.contains(source)) {
|
if (!oldsources.contains(source) && !s.contains(source)) {
|
||||||
kDebug() << "new source = " << source;
|
kDebug() << "new source = " << source;
|
||||||
setData(source, DataEngine::Data());
|
setData(source, DataEngine::Data());
|
||||||
|
emit sourceAdded(source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//and now check and update any nding resources
|
//and now check and update any pending resources
|
||||||
foreach (const QString &pendingSource, m_pendingSources) {
|
foreach (const QString &pendingSource, m_pendingSources) {
|
||||||
createSource(pendingSource);
|
createSource(pendingSource);
|
||||||
}
|
}
|
||||||
@ -154,11 +156,13 @@ void RemoteDataEngine::remoteCallFinished(Plasma::ServiceJob *job)
|
|||||||
if (newSource) {
|
if (newSource) {
|
||||||
// the source doesn't exist on the remote side!
|
// the source doesn't exist on the remote side!
|
||||||
removeSource(source);
|
removeSource(source);
|
||||||
|
emit sourceRemoved(source);
|
||||||
m_pendingServices.remove(source);
|
m_pendingServices.remove(source);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (newSource) {
|
if (newSource) {
|
||||||
m_sources.insert(source);
|
m_sources.insert(source);
|
||||||
|
emit sourceAdded(source);
|
||||||
|
|
||||||
RemoteService *rs = m_pendingServices.value(source);
|
RemoteService *rs = m_pendingServices.value(source);
|
||||||
if (rs) {
|
if (rs) {
|
||||||
|
Loading…
Reference in New Issue
Block a user