[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.4/kdeplasma-addons/applets/systemloadviewer
From: Matthew John Dawson <matthew () mjdsystems ! ca>
Date: 2010-03-04 17:53:18
Message-ID: 1267725198.282971.21155.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1098934 by mdawson:
Fix a series of bugs regarding the cpu usage not properly rendering, either with a \
floating bar or with a non-updating bar.
Also disables disconnecting unused cpu sources.
BUG: 227291
BUG: 221375
BUG: 227144
M +6 -4 systemloadviewer.cpp
--- branches/KDE/4.4/kdeplasma-addons/applets/systemloadviewer/systemloadviewer.cpp \
#1098933:1098934 @@ -68,8 +68,8 @@
readConfig();
sys_mon = dataEngine("systemmonitor");
+ connect(sys_mon, SIGNAL(sourceAdded(const QString &)), this, \
SLOT(sourcesAdded(const QString &))); reconnectSources();
- connect(sys_mon, SIGNAL(sourceAdded(const QString &)), this, \
SLOT(sourcesAdded(const QString &)));
Plasma::ToolTipManager::self()->registerWidget(this);
}
@@ -140,6 +140,7 @@
void SystemLoadViewer::disconnectCPUSources()
{
+#if 0
if (!m_showMultiCPU) {
sys_mon->disconnectSource("cpu/system/user", this);
@@ -164,6 +165,7 @@
}
}
+#endif
}
void SystemLoadViewer::sourcesAdded(const QString &source)
@@ -173,7 +175,7 @@
sys_mon->connectSource(source, this, m_updateInterval);
- } else if (source.startsWith(QLatin1String("cpu/system/")) && !m_showMultiCPU) {
+ } else if (source.startsWith(QLatin1String("cpu/system/"))) {
if (source.endsWith(QLatin1String("/user")) || \
source.endsWith(QLatin1String("/sys")) ||
source.endsWith(QLatin1String("/nice")) || \
source.endsWith(QLatin1String("/wait")) || @@ -182,7 +184,7 @@
sys_mon->connectSource(source, this, m_updateInterval);
}
- } else if (source.startsWith(QLatin1String("cpu/cpu")) && m_showMultiCPU) {
+ } else if (source.startsWith(QLatin1String("cpu/cpu"))) {
if (source.endsWith(QLatin1String("/user")) || \
source.endsWith(QLatin1String("/sys")) ||
source.endsWith(QLatin1String("/nice")) || \
source.endsWith(QLatin1String("/wait")) || @@ -420,7 +422,7 @@
m_cpuInfo[0].clockValid = true;
m_cpuInfo[0].clock = (data["value"].toString().toDouble());
}
- } else if (m_showMultiCPU && source.startsWith(QLatin1String("cpu/")) && \
(m_numCPUs != 0)) { + } else if (m_showMultiCPU && \
source.startsWith(QLatin1String("cpu/cpu")) && (m_numCPUs != 0)) { int cpu = \
source.split('/')[1].mid(3).toInt();
if (cpu >= m_cpuInfo.size()) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic