diff --git a/src/platformsupport/dbustray/qdbustrayicon.cpp b/src/platformsupport/dbustray/qdbustrayicon.cpp index ae01542e8a..fed8d219d9 100644 --- a/src/platformsupport/dbustray/qdbustrayicon.cpp +++ b/src/platformsupport/dbustray/qdbustrayicon.cpp @@ -115,12 +115,6 @@ void QDBusTrayIcon::cleanup() m_registered = false; } -void QDBusTrayIcon::activate(int x, int y) -{ - qCDebug(qLcTray) << x << y; - emit activated(Trigger); -} - void QDBusTrayIcon::attentionTimerExpired() { m_messageTitle = QString(); @@ -213,11 +207,6 @@ void QDBusTrayIcon::updateMenu(QPlatformMenu * menu) m_menu->emitUpdated(); } -void QDBusTrayIcon::contextMenu(int x, int y) -{ - qCDebug(qLcTray) << x << y; -} - void QDBusTrayIcon::showMessage(const QString &title, const QString &msg, const QIcon &icon, QPlatformSystemTrayIcon::MessageIcon iconType, int msecs) { diff --git a/src/platformsupport/dbustray/qdbustrayicon_p.h b/src/platformsupport/dbustray/qdbustrayicon_p.h index 78dfae7c02..34a89c9018 100644 --- a/src/platformsupport/dbustray/qdbustrayicon_p.h +++ b/src/platformsupport/dbustray/qdbustrayicon_p.h @@ -113,10 +113,6 @@ public: QDBusPlatformMenu *menu() { return m_menu; } -public Q_SLOTS: - void activate(int x, int y); - void contextMenu(int x, int y); - signals: void categoryChanged(); void statusChanged(QString arg); diff --git a/src/platformsupport/dbustray/qstatusnotifieritemadaptor.cpp b/src/platformsupport/dbustray/qstatusnotifieritemadaptor.cpp index 540e2f011d..36212e9b61 100644 --- a/src/platformsupport/dbustray/qstatusnotifieritemadaptor.cpp +++ b/src/platformsupport/dbustray/qstatusnotifieritemadaptor.cpp @@ -50,6 +50,7 @@ QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY(qLcMenu) +Q_DECLARE_LOGGING_CATEGORY(qLcTray) QStatusNotifierItemAdaptor::QStatusNotifierItemAdaptor(QDBusTrayIcon *parent) : QDBusAbstractAdaptor(parent), m_trayIcon(parent) @@ -151,22 +152,26 @@ QXdgDBusToolTipStruct QStatusNotifierItemAdaptor::toolTip() const void QStatusNotifierItemAdaptor::Activate(int x, int y) { - m_trayIcon->activate(x, y); + qCDebug(qLcTray) << x << y; + emit m_trayIcon->activated(QPlatformSystemTrayIcon::Trigger); } void QStatusNotifierItemAdaptor::ContextMenu(int x, int y) { - m_trayIcon->contextMenu(x, y); + qCDebug(qLcTray) << x << y; + emit m_trayIcon->activated(QPlatformSystemTrayIcon::Context); } -void QStatusNotifierItemAdaptor::Scroll(int, const QString &) +void QStatusNotifierItemAdaptor::Scroll(int w, const QString &s) { + qCDebug(qLcTray) << w << s; // unsupported } -void QStatusNotifierItemAdaptor::SecondaryActivate(int, int) +void QStatusNotifierItemAdaptor::SecondaryActivate(int x, int y) { - // unsupported + qCDebug(qLcTray) << x << y; + emit m_trayIcon->activated(QPlatformSystemTrayIcon::MiddleClick); } QT_END_NAMESPACE