← Back to team overview

ayatana-commits team mailing list archive

[Branch ~agateau/plasma-widget-message-indicator/trunk] Rev 129: Ported to dbusmenu-qt 0.3.0.

 

------------------------------------------------------------
revno: 129
committer: Aurelien Gateau <aurelien.gateau@xxxxxxxxxxxxx>
branch nick: plasma-widget-message-indicator
timestamp: Wed 2010-03-10 10:35:35 +0100
message:
  Ported to dbusmenu-qt 0.3.0.
modified:
  CMakeLists.txt
  src/listenermodel.cpp


--
lp:plasma-widget-message-indicator
https://code.launchpad.net/~agateau/plasma-widget-message-indicator/trunk

Your team ayatana-commits is subscribed to branch lp:plasma-widget-message-indicator.
To unsubscribe from this branch go to https://code.launchpad.net/~agateau/plasma-widget-message-indicator/trunk/+edit-subscription.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt	2010-03-08 10:20:45 +0000
+++ CMakeLists.txt	2010-03-10 09:35:35 +0000
@@ -8,7 +8,7 @@
 find_package(PkgConfig REQUIRED)
 pkg_check_modules(INDICATE REQUIRED indicate>=0.2.1)
 pkg_check_modules(INDICATEQT REQUIRED indicate-qt>=0.2.5)
-pkg_check_modules(DBUSMENUQT REQUIRED dbusmenu-qt>=0.2.2)
+pkg_check_modules(DBUSMENUQT REQUIRED dbusmenu-qt>=0.3.0)
 
 include_directories(
     ${KDE4_INCLUDES}

=== modified file 'src/listenermodel.cpp'
--- src/listenermodel.cpp	2010-03-08 14:09:51 +0000
+++ src/listenermodel.cpp	2010-03-10 09:35:35 +0000
@@ -51,16 +51,11 @@
 class MyDBusMenuImporter : public DBusMenuImporter
 {
 public:
-    MyDBusMenuImporter(QDBusAbstractInterface* iface, QObject* parent = 0)
-    : DBusMenuImporter(iface, parent)
+    MyDBusMenuImporter(const QString& service, const QString& path, QObject* parent = 0)
+    : DBusMenuImporter(service, path, parent)
     {}
 
 protected:
-    virtual QMenu* createMenu(QWidget* parent)
-    {
-        return new QMenu(parent);
-    }
-
     virtual QIcon iconForName(const QString& name)
     {
         return KIcon(name);
@@ -103,7 +98,7 @@
 
 
 /**
- * An item representing a indicate server.
+ * An item representing an indicate server.
  */
 class ServerItem : public QStandardItem, protected QObject
 {
@@ -426,8 +421,7 @@
         return;
     }
 
-    QDBusInterface* iface = new QDBusInterface(dbusName, objectPath);
-    DBusMenuImporter* importer = new MyDBusMenuImporter(iface);
+    DBusMenuImporter* importer = new MyDBusMenuImporter(dbusName, objectPath);
     serverItem->setMenuImporter(importer);
 }