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

List:       kde-commits
Subject:    [kdelibs/frameworks] staging/frameworkintegration: Implemented update for SystemIconThemeName
From:       Àlex_Fiestas <afiestas () kde ! org>
Date:       2013-08-31 17:09:42
Message-ID: E1VFogA-00080f-8T () scm ! kde ! org
[Download RAW message or body]

Git commit c19bf9ae3eb68a902321199d3e933bd4218406a3 by Àlex Fiestas.
Committed on 31/08/2013 at 14:53.
Pushed by afiestas into branch 'frameworks'.

Implemented update for SystemIconThemeName

I couldn't figure out how Qt app's realize that the icon theme has
changed, but tested with assistant and it seems to work.

Also, had to implement support for the old KGlobalSettings dbus signal
even though KIconLoader has its own now. Once we port the KCM to the new
KIconLoader APi this fallback should not be needed anymore.

M  +5    -0    staging/frameworkintegration/autotests/kdeplatformtheme_unittest.cpp
M  +6    -0    staging/frameworkintegration/src/platformtheme/khintssettings.cpp

http://commits.kde.org/kdelibs/c19bf9ae3eb68a902321199d3e933bd4218406a3

diff --git a/staging/frameworkintegration/autotests/kdeplatformtheme_unittest.cpp \
b/staging/frameworkintegration/autotests/kdeplatformtheme_unittest.cpp index \
                252e127..768b0af 100644
--- a/staging/frameworkintegration/autotests/kdeplatformtheme_unittest.cpp
+++ b/staging/frameworkintegration/autotests/kdeplatformtheme_unittest.cpp
@@ -213,6 +213,11 @@ class KdePlatformTheme_UnitTest : public QObject
             m_loop.exec();
 
             QCOMPARE(m_qpa->themeHint(QPlatformTheme::DialogButtonBoxButtonsHaveIcons).toBool(), \
true); +
+            sendNotifyChange(KHintsSettings::IconChanged, 4);
+            m_loop.exec();
+
+            QCOMPARE(m_qpa->themeHint(QPlatformTheme::SystemIconThemeName).toString(), \
QLatin1String("other-non-existent"));  }
 };
 
diff --git a/staging/frameworkintegration/src/platformtheme/khintssettings.cpp \
b/staging/frameworkintegration/src/platformtheme/khintssettings.cpp index \
                e61c19a..42128ae 100644
--- a/staging/frameworkintegration/src/platformtheme/khintssettings.cpp
+++ b/staging/frameworkintegration/src/platformtheme/khintssettings.cpp
@@ -144,6 +144,9 @@ void KHintsSettings::slotNotifyChange(int type, int arg)
         }
         break;
     }
+    case IconChanged:
+        iconChanged(arg); //Once the KCM is ported to use IconChanged, this should \
not be needed +        break;
     case StyleChanged: {
         QApplication *app = \
qobject_cast<QApplication*>(QCoreApplication::instance());  if (!app) {
@@ -175,6 +178,9 @@ void KHintsSettings::iconChanged(int group)
 {
     KIconLoader::Group iconGroup = (KIconLoader::Group) group;
     if (iconGroup != KIconLoader::MainToolbar) {
+        KSharedConfig::Ptr ptr = KSharedConfig::openConfig("kdeglobals");
+        KConfigGroup cgIcons(ptr, "Icons");
+        m_hints[QPlatformTheme::SystemIconThemeName] = cgIcons.readEntry("Theme", \
"oxygen");  return;
     }
 


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

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