Use std::unique_ptr for pimpl classes

This is consistent with what we do in frameworks
This commit is contained in:
Alexander Lohnau 2023-08-13 08:24:18 +02:00 committed by Albert Vaca Cintora
parent c3b4103d0c
commit 88d89e7211
5 changed files with 5 additions and 5 deletions

View file

@ -88,7 +88,7 @@ protected:
void addDevice(Device *device);
void removeDevice(Device *d);
QScopedPointer<struct DaemonPrivate> d;
const std::unique_ptr<struct DaemonPrivate> d;
};
#endif

View file

@ -51,7 +51,7 @@ public:
}
private:
QScopedPointer<KdeConnectPluginPrivate> d;
const std::unique_ptr<KdeConnectPluginPrivate> d;
};
#endif

View file

@ -14,6 +14,7 @@
#include <QVariant>
#include "kdeconnectcore_export.h"
#include <memory>
struct KdeConnectPluginConfigPrivate;
@ -66,7 +67,7 @@ Q_SIGNALS:
private:
void loadConfig();
QScopedPointer<KdeConnectPluginConfigPrivate> d;
std::unique_ptr<KdeConnectPluginConfigPrivate> d;
QString m_deviceId;
QString m_pluginName;
};

View file

@ -13,7 +13,6 @@
#include <QQmlEngine>
#include <QDebug>
#include <QScopedPointer>
void AbstractPointerLocker::setWindow(QWindow *window)
{

View file

@ -30,7 +30,7 @@ Q_SIGNALS:
private:
const QString m_replyId;
const QScopedPointer<Ui::SendReplyDialog> m_ui;
const std::unique_ptr<Ui::SendReplyDialog> m_ui;
};
class SendReplyTextEdit : public QTextEdit