diff --git a/src/plugins/platforms/wayland/qwaylandintegration_p.h b/src/plugins/platforms/wayland/qwaylandintegration_p.h index 39bd812d96b..1689581a2f6 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration_p.h +++ b/src/plugins/platforms/wayland/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 mDisplay; + protected: QScopedPointer mClientBufferIntegration; QScopedPointer mServerBufferIntegration; @@ -130,7 +135,6 @@ private: QScopedPointer mClipboard; QScopedPointer mDrag; #endif - QScopedPointer mDisplay; QScopedPointer mNativeInterface; QScopedPointer mInputContext; #if QT_CONFIG(accessibility)