Port a usage of QScopedPointer to std::unique_ptr

This commit is contained in:
Vlad Zahorodnii 2022-11-16 00:37:27 +02:00
parent 34aa734c7b
commit 98b65bb447
2 changed files with 3 additions and 2 deletions

View file

@ -47,7 +47,7 @@ LockscreenOverlayV1Interface::~LockscreenOverlayV1Interface() = default;
LockscreenOverlayV1Interface::LockscreenOverlayV1Interface(Display *display, QObject *parent) LockscreenOverlayV1Interface::LockscreenOverlayV1Interface(Display *display, QObject *parent)
: QObject(parent) : QObject(parent)
, d(new LockscreenOverlayV1InterfacePrivate(display, this)) , d(std::make_unique<LockscreenOverlayV1InterfacePrivate>(display, this))
{ {
} }

View file

@ -11,6 +11,7 @@
#include <QObject> #include <QObject>
#include <QVector> #include <QVector>
#include <functional> #include <functional>
#include <memory>
#include <optional> #include <optional>
struct wl_resource; struct wl_resource;
@ -37,7 +38,7 @@ Q_SIGNALS:
private: private:
friend class LockscreenOverlayV1InterfacePrivate; friend class LockscreenOverlayV1InterfacePrivate;
LockscreenOverlayV1Interface(LockscreenOverlayV1Interface *parent); LockscreenOverlayV1Interface(LockscreenOverlayV1Interface *parent);
QScopedPointer<LockscreenOverlayV1InterfacePrivate> d; std::unique_ptr<LockscreenOverlayV1InterfacePrivate> d;
}; };
} }