modernize: Reformat ALL the source... again!
[quassel.git] / src / qtui / statusnotifieritem.h
index 5a103b6..2973919 100644 (file)
 
 #ifdef HAVE_DBUS
 
-#include <QDBusError>
-#include <QHash>
-#include <QString>
-#include <QTemporaryDir>
-
-#include "notificationsclient.h"
-#include "systemtray.h"
-#include "statusnotifierwatcher.h"
-
-#ifdef QT_NO_SYSTEMTRAYICON
-#  define StatusNotifierItemParent SystemTray
-#else
-#  define StatusNotifierItemParent LegacySystemTray
-#  include "legacysystemtray.h"
-#endif
+#    include <QDBusError>
+#    include <QHash>
+#    include <QString>
+#    include <QTemporaryDir>
+
+#    include "notificationsclient.h"
+#    include "statusnotifierwatcher.h"
+#    include "systemtray.h"
+
+#    ifdef QT_NO_SYSTEMTRAYICON
+#        define StatusNotifierItemParent SystemTray
+#    else
+#        define StatusNotifierItemParent LegacySystemTray
+#        include "legacysystemtray.h"
+#    endif
 
 class QDBusServiceWatcher;
 
@@ -50,12 +50,16 @@ class StatusNotifierItem : public StatusNotifierItemParent
     Q_OBJECT
 
 public:
-    explicit StatusNotifierItem(QWidget *parent);
+    explicit StatusNotifierItem(QWidgetparent);
 
     bool isSystemTrayAvailable() const override;
 
 public slots:
-    void showMessage(const QString &title, const QString &message, MessageIcon icon = Information, int msTimeout = 10000, uint notificationId = 0) override;
+    void showMessage(const QString& title,
+                     const QString& message,
+                     MessageIcon icon = Information,
+                     int msTimeout = 10000,
+                     uint notificationId = 0) override;
     void closeMessage(uint notificationId) override;
 
 protected:
@@ -66,16 +70,16 @@ protected:
     QString iconThemePath() const;
     QString menuObjectPath() const;
 
-    bool eventFilter(QObject *watched, QEvent *event) override;
+    bool eventFilter(QObject* watched, QEvent* event) override;
 
 private slots:
-    void activated(const QPoint &pos);
-    void serviceChange(const QString &name, const QString &oldOwner, const QString &newOwner);
+    void activated(const QPointpos);
+    void serviceChange(const QString& name, const QString& oldOwner, const QString& newOwner);
     void checkForRegisteredHosts();
-    void onDBusError(const QDBusError &error);
+    void onDBusError(const QDBusErrorerror);
 
     void notificationClosed(uint id, uint reason);
-    void notificationInvoked(uint id, const QString &action);
+    void notificationInvoked(uint id, const QStringaction);
 
     void refreshIcons();
 
@@ -86,14 +90,14 @@ private slots:
 private:
     void registerToWatcher();
 
-    QDBusServiceWatcher *_serviceWatcher{nullptr};
-    StatusNotifierItemDBus *_statusNotifierItemDBus{nullptr};
-    org::kde::StatusNotifierWatcher *_statusNotifierWatcher{nullptr};
-    org::freedesktop::Notifications *_notificationsClient{nullptr};
+    QDBusServiceWatcher_serviceWatcher{nullptr};
+    StatusNotifierItemDBus_statusNotifierItemDBus{nullptr};
+    org::kde::StatusNotifierWatcher_statusNotifierWatcher{nullptr};
+    org::freedesktop::Notifications_notificationsClient{nullptr};
     bool _notificationsClientSupportsMarkup{false};
     bool _notificationsClientSupportsActions{false};
     quint32 _lastNotificationsDBusId{0};
-    QHash<uint, uint> _notificationsIdMap; ///< Maps our own notification ID to the D-Bus one
+    QHash<uint, uint> _notificationsIdMap;  ///< Maps our own notification ID to the D-Bus one
 
     QString _iconThemePath;
     QString _menuObjectPath;