Merge remote branch 'origin/KDE/4.7' into origin-frameworks

This commit is contained in:
David Faure 2011-09-02 10:08:03 +02:00
commit 24bd3d69eb
2 changed files with 6 additions and 2 deletions

View File

@ -199,7 +199,7 @@ void DataEngine::setData(const QString &source, const QString &key, const QVaria
s->setData(key, value); s->setData(key, value);
if (isNew) { if (isNew && source != d->waitingSourceRequest) {
emit sourceAdded(source); emit sourceAdded(source);
} }
@ -221,7 +221,7 @@ void DataEngine::setData(const QString &source, const Data &data)
++it; ++it;
} }
if (isNew) { if (isNew && source != d->waitingSourceRequest) {
emit sourceAdded(source); emit sourceAdded(source);
} }
@ -713,6 +713,7 @@ DataContainer *DataEnginePrivate::requestSource(const QString &sourceName, bool
/*kDebug() << "DataEngine " << q->objectName() /*kDebug() << "DataEngine " << q->objectName()
<< ": could not find DataContainer " << sourceName << ": could not find DataContainer " << sourceName
<< " will create on request" << endl;*/ << " will create on request" << endl;*/
waitingSourceRequest = sourceName;
if (q->sourceRequestEvent(sourceName)) { if (q->sourceRequestEvent(sourceName)) {
s = source(sourceName, false); s = source(sourceName, false);
if (s) { if (s) {
@ -722,8 +723,10 @@ DataContainer *DataEnginePrivate::requestSource(const QString &sourceName, bool
*newSource = true; *newSource = true;
} }
QObject::connect(s, SIGNAL(becameUnused(QString)), q, SLOT(removeSource(QString))); QObject::connect(s, SIGNAL(becameUnused(QString)), q, SLOT(removeSource(QString)));
emit q->sourceAdded(sourceName);
} }
} }
waitingSourceRequest.clear();
} }
return s; return s;

View File

@ -118,6 +118,7 @@ class DataEnginePrivate
QString serviceName; QString serviceName;
Package *package; Package *package;
Service *publishedService; Service *publishedService;
QString waitingSourceRequest;
}; };
} // Plasma namespace } // Plasma namespace