Commit 538b7915 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use std::unique_ptr + add missing override

parent 8c603b9d
Pipeline #48247 canceled with stage
......@@ -155,8 +155,8 @@ private:
void setErrorMessage(const QString &str);
//@cond PRIVATE
SieveJob(QObject *parent = nullptr);
~SieveJob();
explicit SieveJob(QObject *parent = nullptr);
~SieveJob() override;
class Private;
Private *const d;
......
......@@ -34,7 +34,6 @@ CheckKolabKep14SupportJob::CheckKolabKep14SupportJob(QObject *parent)
CheckKolabKep14SupportJob::~CheckKolabKep14SupportJob()
{
delete d;
}
void CheckKolabKep14SupportJob::start()
......
......@@ -11,7 +11,7 @@
#include <QStringList>
#include "ksieveui_export.h"
#include <memory>
#include <QUrl>
namespace KManageSieve {
......@@ -48,7 +48,7 @@ class KSIEVEUI_EXPORT CheckKolabKep14SupportJob : public QObject
Q_OBJECT
public:
explicit CheckKolabKep14SupportJob(QObject *parent = nullptr);
~CheckKolabKep14SupportJob();
~CheckKolabKep14SupportJob() override;
void start();
......@@ -64,7 +64,7 @@ Q_SIGNALS:
void result(KSieveUi::CheckKolabKep14SupportJob *, bool);
private:
CheckKolabKep14SupportJobPrivate *const d;
std::unique_ptr<CheckKolabKep14SupportJobPrivate> const d;
private:
Q_DISABLE_COPY(CheckKolabKep14SupportJob)
......
......@@ -27,7 +27,6 @@ RenameScriptJob::RenameScriptJob(QObject *parent)
RenameScriptJob::~RenameScriptJob()
{
delete d;
}
void RenameScriptJob::setOldUrl(const QUrl &url)
......
......@@ -10,6 +10,7 @@
#include <QObject>
#include <QUrl>
#include "ksieveui_export.h"
#include <memory>
namespace KManageSieve {
class SieveJob;
}
......@@ -45,7 +46,7 @@ private Q_SLOTS:
private:
Q_DISABLE_COPY(RenameScriptJob)
RenameScriptJobPrivate *const d;
std::unique_ptr<RenameScriptJobPrivate> const d;
};
}
#endif // RENAMESCRIPTJOB_H
......@@ -51,7 +51,6 @@ MultiImapVacationDialog::MultiImapVacationDialog(MultiImapVacationManager *manag
MultiImapVacationDialog::~MultiImapVacationDialog()
{
writeConfig();
delete d;
}
void MultiImapVacationDialog::switchToServerNamePage(const QString &serverName)
......
......@@ -10,6 +10,7 @@
#include <QDialog>
#include "ksieveui_export.h"
#include "util_p.h"
#include <memory>
class QDialogButtonBox;
namespace KSieveUi {
class VacationCreateScriptJob;
......@@ -45,7 +46,7 @@ private:
void writeConfig();
void initialize();
QDialogButtonBox *mButtonBox = nullptr;
MultiImapVacationDialogPrivate *const d;
std::unique_ptr<MultiImapVacationDialogPrivate> const d;
};
}
......
......@@ -77,7 +77,6 @@ ManageSieveWidget::~ManageSieveWidget()
{
disconnect(d->mTreeView, &ManageSieveTreeView::itemSelectionChanged, this, &ManageSieveWidget::slotUpdateButtons);
clear();
delete d;
}
void ManageSieveWidget::slotCheckNetworkStatus()
......
......@@ -7,7 +7,7 @@
#ifndef MANAGESIEVEWIDGET_H
#define MANAGESIEVEWIDGET_H
#include "ksieveui_export.h"
#include <memory>
#include <QUrl>
#include <KSieveUi/SieveImapAccountSettings>
#include <QWidget>
......@@ -107,8 +107,7 @@ private:
bool itemIsActived(QTreeWidgetItem *item) const;
void changeActiveScript(QTreeWidgetItem *item, bool activate);
void slotGenerateGlobalScriptError(const QString &errorStr);
ManageSieveWidgetPrivate *const d;
std::unique_ptr<ManageSieveWidgetPrivate> const d;
};
}
......
......@@ -74,7 +74,6 @@ SieveTreeWidgetItem::SieveTreeWidgetItem(QTreeWidget *treeWidget, QTreeWidgetIte
SieveTreeWidgetItem::~SieveTreeWidgetItem()
{
delete d;
}
void SieveTreeWidgetItem::startAnimation()
......
......@@ -9,7 +9,7 @@
#include <KPixmapSequence>
#include <QTreeWidgetItem>
#include <memory>
#include "ksieveui_export.h"
class QTimer;
......@@ -27,7 +27,7 @@ class KSIEVEUI_EXPORT SieveTreeWidgetItem : public QTreeWidgetItem
{
public:
SieveTreeWidgetItem(QTreeWidget *treeWidget, QTreeWidgetItem *item);
~SieveTreeWidgetItem();
~SieveTreeWidgetItem() override;
void startAnimation();
void stopAnimation();
......@@ -35,7 +35,7 @@ public:
void setProgressAnimation(const QPixmap &pix);
private:
SieveTreeWidgetItemPrivate *const d;
std::unique_ptr<SieveTreeWidgetItemPrivate> const d;
};
class SieveTreeWidgetProgress : public QObject
......@@ -43,7 +43,7 @@ class SieveTreeWidgetProgress : public QObject
Q_OBJECT
public:
explicit SieveTreeWidgetProgress(SieveTreeWidgetItem *item, QObject *parent = nullptr);
~SieveTreeWidgetProgress();
~SieveTreeWidgetProgress() override;
void startAnimation();
void stopAnimation();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment