summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@qt.io>2016-11-22 15:45:28 +0100
committerPaul Olav Tvete <paul.tvete@qt.io>2016-11-23 09:46:23 +0000
commit36dcbb054ec84f6d93d755d905ad3d9bcadb2900 (patch)
treefc52053a0f294a5fb4a8a0b1d998809047024f02
parent893fd8540f2a2182a5e28fc88d59310f0aff8afe (diff)
Fix crash on exit
Make sure that QWaylandDrag and QWaylandClientBufferIntegration are destructed before the QWaylandDisplay. Change-Id: I606154c9861a51d7cf3e5afb16d4f805ab9368b8 Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
-rw-r--r--src/client/qwaylandintegration_p.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/qwaylandintegration_p.h b/src/client/qwaylandintegration_p.h
index 39bd812d9..1689581a2 100644
--- a/src/client/qwaylandintegration_p.h
+++ b/src/client/qwaylandintegration_p.h
@@ -112,6 +112,11 @@ public:
virtual QWaylandServerBufferIntegration *serverBufferIntegration() const;
virtual QWaylandShellIntegration *shellIntegration() const;
+private:
+ // NOTE: mDisplay *must* be destructed after mDrag and mClientBufferIntegration.
+ // Do not move this definition into the private section at the bottom.
+ QScopedPointer<QWaylandDisplay> mDisplay;
+
protected:
QScopedPointer<QWaylandClientBufferIntegration> mClientBufferIntegration;
QScopedPointer<QWaylandServerBufferIntegration> mServerBufferIntegration;
@@ -130,7 +135,6 @@ private:
QScopedPointer<QPlatformClipboard> mClipboard;
QScopedPointer<QPlatformDrag> mDrag;
#endif
- QScopedPointer<QWaylandDisplay> mDisplay;
QScopedPointer<QPlatformNativeInterface> mNativeInterface;
QScopedPointer<QPlatformInputContext> mInputContext;
#if QT_CONFIG(accessibility)