diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2022-04-26 09:44:25 -0700 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-05-11 21:00:44 +0000 |
commit | 07f092fd1f88aa5a2892c97d97619a4471b2c8ce (patch) | |
tree | 8c793c2bb28207442cd1460b98bbf0d9e2a62885 /src/client/shellintegration | |
parent | 6a767a2e327efd8f1db8ed9c1aa6937aba8b6c38 (diff) |
Replace QScopedPointer with std::unique_ptr
As the warning asked.
qwaylandshellintegrationfactory.cpp:67:28: warning: ‘T* QScopedPointer<T, Cleanup>::take() [with T = QtWaylandClient::QWaylandShellIntegration; Cleanup = QScopedPointerDeleter<QtWaylandClient::QWaylandShellIntegration>]’ is deprecated: Use std::unique_ptr instead, and call release(). [-Wdeprecated-declarations]
As a drive-by, change *foo.get() to *foo.
Pick-to: 6.3 6.2
Change-Id: I7fb65b80b7844c8d8f26fffd16e97fe161d6a67a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/client/shellintegration')
-rw-r--r-- | src/client/shellintegration/qwaylandshellintegrationfactory.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/shellintegration/qwaylandshellintegrationfactory.cpp b/src/client/shellintegration/qwaylandshellintegrationfactory.cpp index e3a9aeb37..ade2b4e3c 100644 --- a/src/client/shellintegration/qwaylandshellintegrationfactory.cpp +++ b/src/client/shellintegration/qwaylandshellintegrationfactory.cpp @@ -58,13 +58,13 @@ QStringList QWaylandShellIntegrationFactory::keys() QWaylandShellIntegration *QWaylandShellIntegrationFactory::create(const QString &name, QWaylandDisplay *display, const QStringList &args) { - QScopedPointer<QWaylandShellIntegration> integration; + std::unique_ptr<QWaylandShellIntegration> integration; integration.reset(qLoadPlugin<QWaylandShellIntegration, QWaylandShellIntegrationPlugin>(loader(), name, args)); if (integration && !integration->initialize(display)) return nullptr; - return integration.take(); + return integration.release(); } } |