diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2022-03-04 12:28:49 +0100 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2022-03-08 15:44:17 +0100 |
commit | 034d8898f8166423db085da529787e56204c8e15 (patch) | |
tree | f58e930c7880d1cd79cd39745ed366d27dcd9e55 /src/gui/rhi/qrhi.cpp | |
parent | 87725ee75981ec9ab25456c41acc74681c85ae2e (diff) |
Fix deprecated uses of QScopedPointer
By changing it to unique_ptr.
Pick-to: 6.2 6.3
Change-Id: I91abb69445b537d4c95983ae735341882352b29d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/rhi/qrhi.cpp')
-rw-r--r-- | src/gui/rhi/qrhi.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp index d62b2eea61..70b99abbb6 100644 --- a/src/gui/rhi/qrhi.cpp +++ b/src/gui/rhi/qrhi.cpp @@ -55,6 +55,8 @@ #include "qrhimetal_p_p.h" #endif +#include <memory> + QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY(QRHI_LOG_INFO, "qt.rhi.general") @@ -5305,7 +5307,7 @@ QRhi::~QRhi() */ QRhi *QRhi::create(Implementation impl, QRhiInitParams *params, Flags flags, QRhiNativeHandles *importDevice) { - QScopedPointer<QRhi> r(new QRhi); + std::unique_ptr<QRhi> r(new QRhi); switch (impl) { case Null: @@ -5351,7 +5353,7 @@ QRhi *QRhi::create(Implementation impl, QRhiInitParams *params, Flags flags, QRh } if (r->d) { - r->d->q = r.data(); + r->d->q = r.get(); // Play nice with QSG_INFO since that is still the most commonly used // way to get graphics info printed from Qt Quick apps, and the Quick @@ -5364,7 +5366,7 @@ QRhi *QRhi::create(Implementation impl, QRhiInitParams *params, Flags flags, QRh if (r->d->create(flags)) { r->d->implType = impl; r->d->implThread = QThread::currentThread(); - return r.take(); + return r.release(); } } |