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 addDevice(Device *device);
|
||||||
void removeDevice(Device *d);
|
void removeDevice(Device *d);
|
||||||
|
|
||||||
QScopedPointer<struct DaemonPrivate> d;
|
const std::unique_ptr<struct DaemonPrivate> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -51,7 +51,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QScopedPointer<KdeConnectPluginPrivate> d;
|
const std::unique_ptr<KdeConnectPluginPrivate> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
|
||||||
#include "kdeconnectcore_export.h"
|
#include "kdeconnectcore_export.h"
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
struct KdeConnectPluginConfigPrivate;
|
struct KdeConnectPluginConfigPrivate;
|
||||||
|
|
||||||
|
@ -66,7 +67,7 @@ Q_SIGNALS:
|
||||||
private:
|
private:
|
||||||
void loadConfig();
|
void loadConfig();
|
||||||
|
|
||||||
QScopedPointer<KdeConnectPluginConfigPrivate> d;
|
std::unique_ptr<KdeConnectPluginConfigPrivate> d;
|
||||||
QString m_deviceId;
|
QString m_deviceId;
|
||||||
QString m_pluginName;
|
QString m_pluginName;
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
#include <QQmlEngine>
|
#include <QQmlEngine>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QScopedPointer>
|
|
||||||
|
|
||||||
void AbstractPointerLocker::setWindow(QWindow *window)
|
void AbstractPointerLocker::setWindow(QWindow *window)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,7 @@ Q_SIGNALS:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const QString m_replyId;
|
const QString m_replyId;
|
||||||
const QScopedPointer<Ui::SendReplyDialog> m_ui;
|
const std::unique_ptr<Ui::SendReplyDialog> m_ui;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SendReplyTextEdit : public QTextEdit
|
class SendReplyTextEdit : public QTextEdit
|
||||||
|
|
Loading…
Reference in a new issue