summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Fernengel <harald.fernengel@nokia.com>2011-04-06 08:39:40 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2011-04-06 08:40:37 (GMT)
commite19229a9f1f69d9f486c8adbba17a4b6ab3cb26b (patch)
tree7f10cb42a404434ca6cddc7df96b86567dc834bd /src
parent4de04d2b15e63287e7436a4ad60a383d959aee34 (diff)
downloadQt-e19229a9f1f69d9f486c8adbba17a4b6ab3cb26b.zip
Qt-e19229a9f1f69d9f486c8adbba17a4b6ab3cb26b.tar.gz
Qt-e19229a9f1f69d9f486c8adbba17a4b6ab3cb26b.tar.bz2
qFatal() if no connection to wayland is available
abort here is the only thing that makes sense, otherwise, we'll get crashes all over Qt. Reviewed-by: Jørgen Lind
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/wayland/qwaylanddisplay.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp
index b79f355..1c1702f 100644
--- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp
+++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp
@@ -53,6 +53,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
+#include <errno.h>
struct wl_surface *QWaylandDisplay::createSurface(void *handle)
{
@@ -186,8 +187,8 @@ QWaylandDisplay::QWaylandDisplay(void)
{
mDisplay = wl_display_connect(NULL);
if (mDisplay == NULL) {
- fprintf(stderr, "failed to create display: %m\n");
- return;
+ qErrnoWarning(errno, "Failed to create display");
+ qFatal("No wayland connection available.");
}
wl_display_add_global_listener(mDisplay,