diff options
author | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2015-12-16 15:55:12 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2015-12-17 17:14:34 +0000 |
commit | 420438b5d304f815b65510fa8678beb08bcc4fd2 (patch) | |
tree | 30e87ff53de8d827bc0f43c13054c5972c10dec1 /src/plugins/platforms/windows | |
parent | a1bb00becec04bfb4d775cd8056b6894f4eef198 (diff) |
iOS: Implement support for QApplication::beep()
Vibrates the device or plays an alert sound on devices
that do not support vibration.
The other implementations of beep() have been moved to
QPlatformIntegration as a proper API instead of having
them as invokables in QPlatformNativeInterface.
Change-Id: Ic597dbef04b46d49862b070e78ddfc0d763829a2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
Diffstat (limited to 'src/plugins/platforms/windows')
4 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index 5f22ca1887..f43265be67 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -596,4 +596,9 @@ QPlatformServices *QWindowsIntegration::services() const return &d->m_services; } +void QWindowsIntegration::beep() const +{ + MessageBeep(MB_OK); // For QApplication +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/windows/qwindowsintegration.h b/src/plugins/platforms/windows/qwindowsintegration.h index cb10bf08f5..a93e2c9856 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.h +++ b/src/plugins/platforms/windows/qwindowsintegration.h @@ -96,6 +96,8 @@ public: unsigned options() const; + void beep() const Q_DECL_OVERRIDE; + #if !defined(Q_OS_WINCE) && !defined(QT_NO_SESSIONMANAGER) QPlatformSessionManager *createPlatformSessionManager(const QString &id, const QString &key) const Q_DECL_OVERRIDE; #endif diff --git a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp b/src/plugins/platforms/windows/qwindowsnativeinterface.cpp index 57e33e6322..5b0f6f637e 100644 --- a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp +++ b/src/plugins/platforms/windows/qwindowsnativeinterface.cpp @@ -211,11 +211,6 @@ QString QWindowsNativeInterface::registerWindowClass(const QString &classNameIn, return QWindowsContext::instance()->registerWindowClass(classNameIn, (WNDPROC)eventProc); } -void QWindowsNativeInterface::beep() -{ - MessageBeep(MB_OK); // For QApplication -} - bool QWindowsNativeInterface::asyncExpose() const { return QWindowsContext::instance()->asyncExpose(); diff --git a/src/plugins/platforms/windows/qwindowsnativeinterface.h b/src/plugins/platforms/windows/qwindowsnativeinterface.h index 653442de39..48de0f514d 100644 --- a/src/plugins/platforms/windows/qwindowsnativeinterface.h +++ b/src/plugins/platforms/windows/qwindowsnativeinterface.h @@ -75,8 +75,6 @@ public: Q_INVOKABLE QString registerWindowClass(const QString &classNameIn, void *eventProc) const; - Q_INVOKABLE void beep(); - Q_INVOKABLE void registerWindowsMime(void *mimeIn); Q_INVOKABLE void unregisterWindowsMime(void *mime); Q_INVOKABLE int registerMimeType(const QString &mimeType); |