[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.5/kdebase/workspace/plasma/generic/applets/battery
From:       Christoph Feck <christoph () maxiom ! de>
Date:       2010-08-30 23:48:59
Message-ID: 20100830234859.0BA11AC857 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1170162 by cfeck:

Limit number of profiles that are visible (backport r1162174 and r1170157)

FIXED-IN: 4.5.2
BUG: 219873


 M  +9 -1      battery.cpp  


--- branches/KDE/4.5/kdebase/workspace/plasma/generic/applets/battery/battery.cpp #1170161:1170162
@@ -46,6 +46,7 @@
 #include <KConfigDialog>
 #include <KGlobalSettings>
 #include <KPushButton>
+#include <KComboBox>
 
 #include <kworkspace/kworkspace.h>
 
@@ -510,7 +511,14 @@
         m_controlsLayout->addItem(m_profileLabel, row, 0);
 
         m_profileCombo = new Plasma::ComboBox(m_controls);
-        // This is necessary until Qt task #217874 is fixed
+        // Workaround for bug 219873
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 7, 0))
+        m_profileCombo->nativeWidget()->setMaxVisibleItems(4);
+#else
+        // Value passed needs to be one less than intended on Qt < 4.7.0
+        m_profileCombo->nativeWidget()->setMaxVisibleItems(3);
+#endif
+        // This is necessary until QTBUG-2368 is fixed
         m_profileCombo->setZValue(110);
         connect(m_profileCombo, SIGNAL(activated(QString)),
                 this, SLOT(setProfile(QString)));
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic