scheduleSourcesUpdated() is now private
This commit is contained in:
parent
5c051f10eb
commit
41b3a17011
@ -187,7 +187,7 @@ void DataEngine::setData(const QString &source, const QString &key, const QVaria
|
||||
emit sourceAdded(source);
|
||||
}
|
||||
|
||||
scheduleSourcesUpdated();
|
||||
d->scheduleSourcesUpdated();
|
||||
}
|
||||
|
||||
void DataEngine::setData(const QString &source, const Data &data)
|
||||
@ -209,7 +209,7 @@ void DataEngine::setData(const QString &source, const Data &data)
|
||||
emit sourceAdded(source);
|
||||
}
|
||||
|
||||
scheduleSourcesUpdated();
|
||||
d->scheduleSourcesUpdated();
|
||||
}
|
||||
|
||||
void DataEngine::removeAllData(const QString &source)
|
||||
@ -217,7 +217,7 @@ void DataEngine::removeAllData(const QString &source)
|
||||
DataContainer *s = d->source(source, false);
|
||||
if (s) {
|
||||
s->removeAllData();
|
||||
scheduleSourcesUpdated();
|
||||
d->scheduleSourcesUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
@ -226,7 +226,7 @@ void DataEngine::removeData(const QString &source, const QString &key)
|
||||
DataContainer *s = d->source(source, false);
|
||||
if (s) {
|
||||
s->setData(key, QVariant());
|
||||
scheduleSourcesUpdated();
|
||||
d->scheduleSourcesUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
@ -244,7 +244,7 @@ void DataEngine::addSource(DataContainer *source)
|
||||
QObject::connect(source, SIGNAL(destroyed(QObject*)), this, SLOT(sourceDestroyed(QObject*)));
|
||||
d->sources.insert(source->objectName(), source);
|
||||
emit sourceAdded(source->objectName());
|
||||
scheduleSourcesUpdated();
|
||||
d->scheduleSourcesUpdated();
|
||||
}
|
||||
|
||||
void DataEngine::setMinimumPollingInterval(int minimumMs)
|
||||
@ -355,7 +355,7 @@ void DataEngine::updateAllSources()
|
||||
updateSourceEvent(it.key());
|
||||
}
|
||||
|
||||
scheduleSourcesUpdated();
|
||||
d->scheduleSourcesUpdated();
|
||||
}
|
||||
|
||||
void DataEngine::forceImmediateUpdateOfAllVisualizations()
|
||||
@ -370,15 +370,6 @@ Package DataEngine::package() const
|
||||
return d->package ? *d->package : Package();
|
||||
}
|
||||
|
||||
void DataEngine::scheduleSourcesUpdated()
|
||||
{
|
||||
if (d->checkSourcesTimerId) {
|
||||
return;
|
||||
}
|
||||
|
||||
d->checkSourcesTimerId = startTimer(0);
|
||||
}
|
||||
|
||||
void DataEngine::setStorageEnabled(const QString &source, bool store)
|
||||
{
|
||||
DataContainer *s = d->source(source, false);
|
||||
@ -453,7 +444,7 @@ void DataEnginePrivate::internalUpdateSource(DataContainer *source)
|
||||
|
||||
if (q->updateSourceEvent(source->objectName())) {
|
||||
//kDebug() << "queuing an update";
|
||||
q->scheduleSourcesUpdated();
|
||||
scheduleSourcesUpdated();
|
||||
}/* else {
|
||||
#ifndef NDEBUG
|
||||
kDebug() << "no update";
|
||||
@ -602,6 +593,15 @@ void DataEnginePrivate::setupScriptSupport()
|
||||
}
|
||||
}
|
||||
|
||||
void DataEnginePrivate::scheduleSourcesUpdated()
|
||||
{
|
||||
if (checkSourcesTimerId) {
|
||||
return;
|
||||
}
|
||||
|
||||
checkSourcesTimerId = q->startTimer(0);
|
||||
}
|
||||
|
||||
QStringList DataEngine::listAllEngines(const QString &parentApp)
|
||||
{
|
||||
QString constraint;
|
||||
|
@ -435,13 +435,6 @@ NoAlignment) const;
|
||||
void setStorageEnabled(const QString &source, bool store);
|
||||
|
||||
protected Q_SLOTS:
|
||||
/**
|
||||
* Call this method when you call setData directly on a DataContainer instead
|
||||
* of using the DataEngine::setData methods.
|
||||
* If this method is not called, no dataUpdated(..) signals will be emitted!
|
||||
*/
|
||||
void scheduleSourcesUpdated();
|
||||
|
||||
/**
|
||||
* Removes a data source.
|
||||
* @param source the name of the data source to remove
|
||||
@ -474,6 +467,7 @@ NoAlignment) const;
|
||||
|
||||
Q_PRIVATE_SLOT(d, void internalUpdateSource(DataContainer *source))
|
||||
Q_PRIVATE_SLOT(d, void sourceDestroyed(QObject *object))
|
||||
Q_PRIVATE_SLOT(d, void scheduleSourcesUpdated())
|
||||
|
||||
DataEnginePrivate *const d;
|
||||
};
|
||||
|
@ -84,6 +84,13 @@ class DataEnginePrivate
|
||||
*/
|
||||
void retrieveStoredData(DataContainer *s);
|
||||
|
||||
/**
|
||||
* Call this method when you call setData directly on a DataContainer instead
|
||||
* of using the DataEngine::setData methods.
|
||||
* If this method is not called, no dataUpdated(..) signals will be emitted!
|
||||
*/
|
||||
void scheduleSourcesUpdated();
|
||||
|
||||
DataEngine *q;
|
||||
KPluginInfo dataEngineDescription;
|
||||
int refCount;
|
||||
|
@ -174,13 +174,6 @@ DataEngine::SourceDict DataEngineScript::containerDict() const
|
||||
return DataEngine::SourceDict();
|
||||
}
|
||||
|
||||
void DataEngineScript::scheduleSourcesUpdated()
|
||||
{
|
||||
if (d->dataEngine) {
|
||||
d->dataEngine->scheduleSourcesUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
void DataEngineScript::removeSource(const QString &source)
|
||||
{
|
||||
if (d->dataEngine) {
|
||||
|
@ -135,7 +135,6 @@ protected:
|
||||
void removeAllSources();
|
||||
void addSource(DataContainer *source);
|
||||
DataEngine::SourceDict containerDict() const;
|
||||
void scheduleSourcesUpdated();
|
||||
void removeSource(const QString &source);
|
||||
void updateAllSources();
|
||||
void forceImmediateUpdateOfAllVisualizations();
|
||||
|
Loading…
x
Reference in New Issue
Block a user