Use std::unique_ptr for pimpl classes
This is consistent with what we do in frameworks
This commit is contained in:
parent
c3b4103d0c
commit
88d89e7211
5 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
QScopedPointer<KdeConnectPluginPrivate> d;
|
||||
const std::unique_ptr<KdeConnectPluginPrivate> d;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include <QQmlEngine>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QScopedPointer>
|
||||
|
||||
void AbstractPointerLocker::setWindow(QWindow *window)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue