From fb85325fe6f71a19d281d11dfc88caa626dc573e Mon Sep 17 00:00:00 2001 From: Anne-Marie Mahfouf Date: Thu, 24 Apr 2008 11:46:06 +0000 Subject: [PATCH] API review: remove setSourceLimit() svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800552 --- dataengine.cpp | 15 --------------- dataengine.h | 9 --------- scripting/dataenginescript.cpp | 7 ------- scripting/dataenginescript.h | 1 - 4 files changed, 32 deletions(-) diff --git a/dataengine.cpp b/dataengine.cpp index ba2876294..1f37b8c5d 100644 --- a/dataengine.cpp +++ b/dataengine.cpp @@ -417,21 +417,6 @@ void DataEngine::addSource(DataContainer* source) emit sourceAdded(source->objectName()); } -void DataEngine::setSourceLimit(uint limit) -{ - if (d->limit == limit) { - return; - } - - d->limit = limit; - - if (d->limit > 0) { - d->trimQueue(); - } else { - d->sourceQueue.clear(); - } -} - void DataEngine::setMinimumPollingInterval(int minimumMs) { d->minPollingInterval = minimumMs; diff --git a/dataengine.h b/dataengine.h index 44e3b70ff..5b4fc27e9 100644 --- a/dataengine.h +++ b/dataengine.h @@ -307,15 +307,6 @@ class PLASMA_EXPORT DataEngine : public QObject **/ void addSource(DataContainer* source); - /** - * Sets an upper limit on the number of data sources to keep in this engine. - * If the limit is exceeded, then the oldest data source, as defined by last - * update, is dropped. - * - * @param limit the maximum number of sources to keep active - **/ - void setSourceLimit(uint limit); - /** * Sets the minimum amount of time, in milliseconds, that must pass between * successive updates of data. This can help prevent too many updates happening diff --git a/scripting/dataenginescript.cpp b/scripting/dataenginescript.cpp index c2ff49046..701ad8c37 100644 --- a/scripting/dataenginescript.cpp +++ b/scripting/dataenginescript.cpp @@ -92,13 +92,6 @@ void DataEngineScript::removeData(const QString& source, const QString& key) } } -void DataEngineScript::setSourceLimit(uint limit) -{ - if (d->dataEngine) { - d->dataEngine->setSourceLimit(limit); - } -} - void DataEngineScript::setMinimumPollingInterval(int minimumMs) { if (d->dataEngine) { diff --git a/scripting/dataenginescript.h b/scripting/dataenginescript.h index 4d42bd4af..13c85eb80 100644 --- a/scripting/dataenginescript.h +++ b/scripting/dataenginescript.h @@ -80,7 +80,6 @@ protected: void setData(const QString &source, const QVariant &value); void clearData(const QString& source); void removeData(const QString& source, const QString& key); - void setSourceLimit(uint limit); void setMinimumPollingInterval(int minimumMs); int minimumPollingInterval() const; void setPollingInterval(uint frequency);