diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp index 2c275a92e22..80af2ca4995 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp +++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp @@ -389,7 +389,7 @@ QWaylandDisplay::~QWaylandDisplay(void) qDeleteAll(mWaitingScreens); #if QT_CONFIG(wayland_datadevice) - delete mDndSelectionHandler.take(); + mDndSelectionHandler.reset(); #endif #if QT_CONFIG(cursor) mCursorThemes.clear(); diff --git a/src/plugins/platforms/wayland/qwaylanddisplay_p.h b/src/plugins/platforms/wayland/qwaylanddisplay_p.h index daef31e522c..c81b09ce0a1 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay_p.h +++ b/src/plugins/platforms/wayland/qwaylanddisplay_p.h @@ -165,7 +165,7 @@ public: QWaylandInputDevice *defaultInputDevice() const; QWaylandInputDevice *currentInputDevice() const { return defaultInputDevice(); } #if QT_CONFIG(wayland_datadevice) - QWaylandDataDeviceManager *dndSelectionHandler() const { return mDndSelectionHandler.data(); } + QWaylandDataDeviceManager *dndSelectionHandler() const { return mDndSelectionHandler.get(); } #endif #if QT_CONFIG(wayland_client_primary_selection) QWaylandPrimarySelectionDeviceManagerV1 *primarySelectionManager() const { return mPrimarySelectionManager.data(); } @@ -249,7 +249,7 @@ private: }; struct wl_display *mDisplay = nullptr; - QScopedPointer m_eventThread; + std::unique_ptr m_eventThread; wl_event_queue *m_frameEventQueue = nullptr; QScopedPointer m_frameEventQueueThread; QtWayland::wl_compositor mCompositor; diff --git a/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory.cpp b/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory.cpp index e3a9aeb377b..ade2b4e3c1f 100644 --- a/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory.cpp +++ b/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory.cpp @@ -58,13 +58,13 @@ QStringList QWaylandShellIntegrationFactory::keys() QWaylandShellIntegration *QWaylandShellIntegrationFactory::create(const QString &name, QWaylandDisplay *display, const QStringList &args) { - QScopedPointer integration; + std::unique_ptr integration; integration.reset(qLoadPlugin(loader(), name, args)); if (integration && !integration->initialize(display)) return nullptr; - return integration.take(); + return integration.release(); } }