diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-02-14 16:22:25 +0100 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2018-02-26 15:59:45 +0000 |
commit | 72999738489b5251d025c954a77c93e8e1fdfd9d (patch) | |
tree | 1e17836dea84c49e078aacbc3a363ca305dbe605 /src/client/qwaylandintegration_p.h | |
parent | 5b69d5f05fdf187ae8a5f08e9a57375cbbd7f142 (diff) |
Client: Fail gracefully when wl_display_connect fails
[ChangeLog][QPA plugin] If we're unable to create a connection to the Wayland
display, fail gracefully so other platform integrations can be tried instead.
This also adds QWaylandIntegration::hasFailed() which can later be extended to
report that the platform plugin is unusable for other reasons. I.e. no
compatible shell extensions or similar.
Task-number: QTBUG-59762
Change-Id: I0f1ae73982e2860814235c1a189741d130e1db3e
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/client/qwaylandintegration_p.h')
-rw-r--r-- | src/client/qwaylandintegration_p.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/qwaylandintegration_p.h b/src/client/qwaylandintegration_p.h index 174eca253..17144b8d7 100644 --- a/src/client/qwaylandintegration_p.h +++ b/src/client/qwaylandintegration_p.h @@ -73,6 +73,8 @@ public: QWaylandIntegration(); ~QWaylandIntegration(); + bool hasFailed() { return mFailed; } + bool hasCapability(QPlatformIntegration::Capability cap) const override; QPlatformWindow *createPlatformWindow(QWindow *window) const override; #if QT_CONFIG(opengl) @@ -144,6 +146,7 @@ private: #if QT_CONFIG(accessibility) QScopedPointer<QPlatformAccessibility> mAccessibility; #endif + bool mFailed = false; bool mClientBufferIntegrationInitialized; bool mServerBufferIntegrationInitialized; bool mShellIntegrationInitialized; |