From b94c6913ff5ef580097302780690916144d1aa09 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Tue, 29 Apr 2008 00:26:33 +0000 Subject: [PATCH] small optimization: prevent reconnecting (and likely a delete and new of a SignalObject) when the requested polling interval and the current one are the same svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802273 --- datacontainer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/datacontainer.cpp b/datacontainer.cpp index 025e2ee86..47843daa5 100644 --- a/datacontainer.cpp +++ b/datacontainer.cpp @@ -87,6 +87,11 @@ void DataContainer::connectVisualization(QObject* visualization, uint pollingInt if (relay) { // connected to a relay //kDebug() << " already connected, but to a relay"; + if (relay->m_interval == pollingInterval) { + //kDebug() << " already connected to a relay of the same interval of" + // << pollingInterval << ", nothing to do"; + return; + } if (relay->receiverCount() == 1) { //kDebug() << " removing relay, as it is now unused";