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)) {
|
||||
kDebug() << "source no longer exists... remove that data.";
|
||||
removeSource(source);
|
||||
emit sourceRemoved(source);
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,11 +137,12 @@ void RemoteDataEngine::remoteCallFinished(Plasma::ServiceJob *job)
|
||||
if (!oldsources.contains(source) && !s.contains(source)) {
|
||||
kDebug() << "new source = " << source;
|
||||
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) {
|
||||
createSource(pendingSource);
|
||||
}
|
||||
@ -154,11 +156,13 @@ void RemoteDataEngine::remoteCallFinished(Plasma::ServiceJob *job)
|
||||
if (newSource) {
|
||||
// the source doesn't exist on the remote side!
|
||||
removeSource(source);
|
||||
emit sourceRemoved(source);
|
||||
m_pendingServices.remove(source);
|
||||
}
|
||||
} else {
|
||||
if (newSource) {
|
||||
m_sources.insert(source);
|
||||
emit sourceAdded(source);
|
||||
|
||||
RemoteService *rs = m_pendingServices.value(source);
|
||||
if (rs) {
|
||||
|
Loading…
Reference in New Issue
Block a user