summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-10-15 00:17:30 +0300
committerQt by Nokia <qt-info@nokia.com>2011-10-17 10:29:57 +0200
commit5d8d7b1dbc703c381033681c2cd4f7a912f60850 (patch)
tree6b5016d4b218570306a547a4d97dc520a9cf82ed /src
parent86ea95259d3fe827e340b4691710d7d971efc35a (diff)
Add a warning and a return value to xcb's createGLPlatformContext
There was no value returned previously when none of GLX, EGL, DRI was enabled. Now we show a warning message and return null (resulting in a crash). Previously not returning a value resulted in obscure crashes with strange-looking call stacks, now it will be clear what the problem is. This is particularly important because not having libx11-xcb-dev installed results in silently disabled xlib support which in turn disallows the usage of glx too. The result is an obscure crash in any GL (e.g. QML2) app. Now there will be a proper warning message at least. Change-Id: I15cf3a6c16ca373d4ada7abb6d3c8f7e30c1e03d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index 91d7e287f3..aa5c7e444b 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -175,6 +175,8 @@ QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLCont
#elif defined(XCB_USE_DRI2)
return new QDri2Context(context->format(), context->shareHandle());
#endif
+ qWarning("Cannot create platform GL context, none of GLX, EGL, DRI2 is enabled");
+ return 0;
}
QPlatformBackingStore *QXcbIntegration::createPlatformBackingStore(QWindow *window) const