diff options
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbintegration.cpp | 13 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbintegration.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbnativeinterface.cpp | 12 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbnativeinterface.h | 1 |
4 files changed, 15 insertions, 13 deletions
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index 19e8b1de7d..c42ea627a8 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -454,4 +454,17 @@ void QXcbIntegration::sync() } } +// For QApplication::beep() +void QXcbIntegration::beep() const +{ + QScreen *priScreen = QGuiApplication::primaryScreen(); + if (!priScreen) + return; + QPlatformScreen *screen = priScreen->handle(); + if (!screen) + return; + xcb_connection_t *connection = static_cast<QXcbScreen *>(screen)->xcb_connection(); + xcb_bell(connection, 0); +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h index 4e2a3c2bbd..f833015596 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.h +++ b/src/plugins/platforms/xcb/qxcbintegration.h @@ -104,6 +104,8 @@ public: void sync() Q_DECL_OVERRIDE; + void beep() const Q_DECL_OVERRIDE; + static QXcbIntegration *instance() { return m_instance; } private: diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp index 8a47fe1b43..1403cee622 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp @@ -92,18 +92,6 @@ QXcbNativeInterface::QXcbNativeInterface() : { } -void QXcbNativeInterface::beep() // For QApplication::beep() -{ - QScreen *priScreen = QGuiApplication::primaryScreen(); - if (!priScreen) - return; - QPlatformScreen *screen = priScreen->handle(); - if (!screen) - return; - xcb_connection_t *connection = static_cast<QXcbScreen *>(screen)->xcb_connection(); - xcb_bell(connection, 0); -} - static inline QXcbSystemTrayTracker *systemTrayTracker(const QScreen *s) { if (!s) diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.h b/src/plugins/platforms/xcb/qxcbnativeinterface.h index c823b474ab..fdda10e307 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.h +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.h @@ -108,7 +108,6 @@ public: static void setAppTime(QScreen *screen, xcb_timestamp_t time); static void setAppUserTime(QScreen *screen, xcb_timestamp_t time); - Q_INVOKABLE void beep(); Q_INVOKABLE bool systemTrayAvailable(const QScreen *screen) const; Q_INVOKABLE void setParentRelativeBackPixmap(QWindow *window); Q_INVOKABLE bool systrayVisualHasAlphaChannel(); |