From 88d89e721112525b7df9a93736c9fff1bceb92a2 Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Sun, 13 Aug 2023 08:24:18 +0200 Subject: [PATCH] Use std::unique_ptr for pimpl classes This is consistent with what we do in frameworks --- core/daemon.h | 2 +- core/kdeconnectplugin.h | 2 +- core/kdeconnectpluginconfig.h | 3 ++- declarativeplugin/pointerlocker.cpp | 1 - plugins/notifications/sendreplydialog.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/daemon.h b/core/daemon.h index 7f476132a..be7a059ff 100644 --- a/core/daemon.h +++ b/core/daemon.h @@ -88,7 +88,7 @@ protected: void addDevice(Device *device); void removeDevice(Device *d); - QScopedPointer d; + const std::unique_ptr d; }; #endif diff --git a/core/kdeconnectplugin.h b/core/kdeconnectplugin.h index 5beec6518..a7236e798 100644 --- a/core/kdeconnectplugin.h +++ b/core/kdeconnectplugin.h @@ -51,7 +51,7 @@ public: } private: - QScopedPointer d; + const std::unique_ptr d; }; #endif diff --git a/core/kdeconnectpluginconfig.h b/core/kdeconnectpluginconfig.h index e4bed1b2a..1df8adb23 100644 --- a/core/kdeconnectpluginconfig.h +++ b/core/kdeconnectpluginconfig.h @@ -14,6 +14,7 @@ #include #include "kdeconnectcore_export.h" +#include struct KdeConnectPluginConfigPrivate; @@ -66,7 +67,7 @@ Q_SIGNALS: private: void loadConfig(); - QScopedPointer d; + std::unique_ptr d; QString m_deviceId; QString m_pluginName; }; diff --git a/declarativeplugin/pointerlocker.cpp b/declarativeplugin/pointerlocker.cpp index b30a70de3..30630d4ba 100644 --- a/declarativeplugin/pointerlocker.cpp +++ b/declarativeplugin/pointerlocker.cpp @@ -13,7 +13,6 @@ #include #include -#include void AbstractPointerLocker::setWindow(QWindow *window) { diff --git a/plugins/notifications/sendreplydialog.h b/plugins/notifications/sendreplydialog.h index a4eb6a025..a848b657a 100644 --- a/plugins/notifications/sendreplydialog.h +++ b/plugins/notifications/sendreplydialog.h @@ -30,7 +30,7 @@ Q_SIGNALS: private: const QString m_replyId; - const QScopedPointer m_ui; + const std::unique_ptr m_ui; }; class SendReplyTextEdit : public QTextEdit