summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-04-22 16:35:41 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-04-22 16:35:43 +0200
commit4c231d5df3040dbf4545a9a77145ee0e1f9c380c (patch)
tree2cc5b71a5d2b464214cf5372776913fbe4622e1e /src/plugins/platforms/xcb/qxcbnativeinterface.cpp
parent7df16fb4ccbe0476bc34274a77e98eec4e8d2d93 (diff)
parentd672ef07681a959d9559dd1e11e70db1f448a7f1 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbnativeinterface.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
index 08e72ed5ce..6241898462 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
@@ -57,6 +57,10 @@
#include "qglxintegration.h"
#endif
+#ifndef XCB_USE_XLIB
+# include <stdio.h>
+#endif
+
QT_BEGIN_NAMESPACE
class QXcbResourceMap : public QMap<QByteArray, QXcbNativeInterface::ResourceType>
@@ -84,6 +88,16 @@ QXcbNativeInterface::QXcbNativeInterface() :
{
}
+void QXcbNativeInterface::beep() // For QApplication::beep()
+{
+#ifdef XCB_USE_XLIB
+ ::Display *display = (::Display *)nativeResourceForScreen(QByteArrayLiteral("display"), QGuiApplication::primaryScreen());
+ XBell(display, 0);
+#else
+ fputc(7, stdout);
+#endif
+}
+
void *QXcbNativeInterface::nativeResourceForContext(const QByteArray &resourceString, QOpenGLContext *context)
{
QByteArray lowerCaseResource = resourceString.toLower();