qa: Avoid deprecation warnings for QList/QSet conversions
[quassel.git] / src / qtui / statusnotifieritemdbus.h
index d033c9c..fb1f5cd 100644 (file)
@@ -4,9 +4,9 @@
  *   Quasselfied 2010 by Manuel Nickschas <sputnick@quassel-irc.org>       *
  *                                                                         *
  *   This file is free software; you can redistribute it and/or modify     *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
+ *   it under the terms of the GNU Library General Public License (LGPL)   *
+ *   as published by the Free Software Foundation; either version 2 of the *
+ *   License, or (at your option) any later version.                       *
  *                                                                         *
  *   This program is distributed in the hope that it will be useful,       *
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
  *   You should have received a copy of the GNU General Public License     *
  *   along with this program; if not, write to the                         *
  *   Free Software Foundation, Inc.,                                       *
- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
 #ifndef STATUSNOTIFIERITEMDBUS_H_
 #define STATUSNOTIFIERITEMDBUS_H_
 
-#include <QObject>
-#include <QString>
 #include <QDBusArgument>
 #include <QDBusConnection>
+#include <QObject>
 #include <QPixmap>
+#include <QString>
 
-//Custom message type for DBus
-struct DBusImageStruct {
+// Custom message type for DBus
+struct DBusImageStruct
+{
     int width;
     int height;
     QByteArray data;
 };
 
-typedef QVector<DBusImageStruct> DBusImageVector;
+using DBusImageVector = QVector<DBusImageStruct>;
 
-struct DBusToolTipStruct {
+struct DBusToolTipStruct
+{
     QString icon;
     DBusImageVector image;
     QString title;
@@ -67,9 +69,10 @@ class StatusNotifierItemDBus : public QObject
     Q_PROPERTY(QDBusObjectPath Menu READ Menu)
 
     friend class StatusNotifierItem;
+
 public:
-    StatusNotifierItemDBus(StatusNotifierItem *parent);
-    ~StatusNotifierItemDBus();
+    StatusNotifierItemDBus(StatusNotifierItemparent);
+    ~StatusNotifierItemDBus() override;
 
     /**
      * @return the dbus connection used by this object
@@ -77,14 +80,14 @@ public:
     QDBusConnection dbusConnection() const;
 
     /**
-     * Register the service to DBus
+     * Register the StatusNotifierItem to DBus
      */
-    void registerService();
+    void registerTrayIcon();
 
     /**
-     * Unregister the service from DBus
+     * Unregister the StatusNotifierItem from DBus
      */
-    void unregisterService();
+    void unregisterTrayIcon();
 
     /**
      * @return the service this object is registered on the bus under
@@ -172,8 +175,8 @@ public:
      */
     QDBusObjectPath Menu() const;
 
-public Q_SLOTS:
-    //interaction
+public slots:
+    // interaction
     /**
      * Shows the context menu associated to this item
      * at the desired screen position
@@ -194,9 +197,9 @@ public Q_SLOTS:
     /**
      * Inform this item that the mouse wheel was used on its representation
      */
-    void Scroll(int delta, const QString &orientation);
+    void Scroll(int delta, const QStringorientation);
 
-Q_SIGNALS:
+signals:
     /**
      * Inform the systemtray that the own main icon has been changed,
      * so should be reloaded
@@ -223,28 +226,26 @@ Q_SIGNALS:
      * Signal the new status when it has been changed
      * @see Status
      */
-    void NewStatus(const QString &status);
+    void NewStatus(const QStringstatus);
 
 private:
-    StatusNotifierItem *m_statusNotifierItem;
-    QString m_service;
+    StatusNotifierItem* m_statusNotifierItem;
     QDBusConnection m_dbus;
     static int s_serviceCount;
 };
 
-
-const QDBusArgument &operator<<(QDBusArgument &argument, const DBusImageStruct &icon);
-const QDBusArgument &operator>>(const QDBusArgument &argument, DBusImageStruct &icon);
+const QDBusArgument& operator<<(QDBusArgument& argument, const DBusImageStruct& icon);
+const QDBusArgument& operator>>(const QDBusArgument& argument, DBusImageStruct& icon);
 
 Q_DECLARE_METATYPE(DBusImageStruct)
 
-const QDBusArgument &operator<<(QDBusArgument &argument, const DBusImageVector &iconVector);
-const QDBusArgument &operator>>(const QDBusArgument &argument, DBusImageVector &iconVector);
+const QDBusArgument& operator<<(QDBusArgument& argument, const DBusImageVector& iconVector);
+const QDBusArgument& operator>>(const QDBusArgument& argument, DBusImageVector& iconVector);
 
 Q_DECLARE_METATYPE(DBusImageVector)
 
-const QDBusArgument &operator<<(QDBusArgument &argument, const DBusToolTipStruct &toolTip);
-const QDBusArgument &operator>>(const QDBusArgument &argument, DBusToolTipStruct &toolTip);
+const QDBusArgument& operator<<(QDBusArgument& argument, const DBusToolTipStruct& toolTip);
+const QDBusArgument& operator>>(const QDBusArgument& argument, DBusToolTipStruct& toolTip);
 
 Q_DECLARE_METATYPE(DBusToolTipStruct)