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

List:       kde-panel-devel
Subject:    Optional Qt 4.7 dependency (Qt 4.7 pre-release users should read this)
From:       Aurélien_Gâteau <aurelien.gateau () canonical ! com>
Date:       2010-05-06 12:27:25
Message-ID: 4BE2B5AD.4060001 () canonical ! com
[Download RAW message or body]

Hi,

Unless someone objects, I am going to commit this small attached patch 
to kdelibs tomorrow. It brings back icons in KStatusNotifierItem menus.

This patch takes advantage of QIcon::name(), which was introduced in Qt 
4.7. It does not break build for Qt 4.6 users as the code is in a #if 
QT_VERSION >= 0x040700 block, but it will break the build for Qt 4.7 
pre-release users because QIcon::name() is in 4.7 git branch, but is not 
in 4.7 TP.

kdelibs does not depend on Qt 4.7 yet, but since Qt 4.7 is planned for 
release on week 23, we could make kdelibs 4.5 depends on Qt 4.7.

Aurélien

["kdelibs-ksni-icon-name.diff" (text/x-diff)]

diff --git a/kdeui/notifications/kstatusnotifieritem.cpp b/kdeui/notifications/kstatusnotifieritem.cpp
index b8b13f9..63e93d8 100644
--- a/kdeui/notifications/kstatusnotifieritem.cpp
+++ b/kdeui/notifications/kstatusnotifieritem.cpp
@@ -65,8 +65,10 @@ protected:
     virtual QString iconNameForAction(QAction *action)
     {
         KIcon icon(action->icon());
-        // FIXME: Need a way to test for the availability of QIcon::name()
-#ifdef HAVE_QICON_NAME
+#if QT_VERSION >= 0x040700
+        // QIcon::name() is in the 4.7 git branch, but it is not in 4.7 TP.
+        // If you get a build error here, you need to update your pre-release
+        // of Qt 4.7.
         return icon.isNull() ? QString() : icon.name();
 #else
         return QString();


_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


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

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