Commit c4408fcd authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use more unique_ptr

parent 0c8bd021
Pipeline #87182 passed with stage
in 43 minutes and 29 seconds
......@@ -89,10 +89,7 @@ AttachmentCompressJob::AttachmentCompressJob(const AttachmentPart::Ptr &part, QO
d->mOriginalPart = part;
}
AttachmentCompressJob::~AttachmentCompressJob()
{
delete d;
}
AttachmentCompressJob::~AttachmentCompressJob() = default;
void AttachmentCompressJob::start()
{
......
......@@ -11,6 +11,7 @@
#include "attachmentpart.h"
#include <KJob>
#include <memory>
namespace MessageCore
{
......@@ -67,7 +68,7 @@ public:
private:
//@cond PRIVATE
class Private;
Private *const d;
std::unique_ptr<Private> const d;
//@endcond
};
}
......
......@@ -15,7 +15,7 @@
using namespace MessageCore;
using KMime::Content;
class Q_DECL_HIDDEN MessageCore::AttachmentFromMimeContentJob::Private
class Q_DECL_HIDDEN MessageCore::AttachmentFromMimeContentJob::AttachmentFromMimeContentJobPrivate
{
public:
const Content *mMimeContent = nullptr;
......@@ -23,15 +23,12 @@ public:
AttachmentFromMimeContentJob::AttachmentFromMimeContentJob(const Content *content, QObject *parent)
: AttachmentLoadJob(parent)
, d(new Private)
, d(new AttachmentFromMimeContentJobPrivate)
{
d->mMimeContent = content;
}
AttachmentFromMimeContentJob::~AttachmentFromMimeContentJob()
{
delete d;
}
AttachmentFromMimeContentJob::~AttachmentFromMimeContentJob() = default;
const Content *AttachmentFromMimeContentJob::mimeContent() const
{
......
......@@ -9,7 +9,7 @@
#include "messagecore_private_export.h"
#include "attachmentloadjob.h"
#include <memory>
namespace KMime
{
class Content;
......@@ -55,8 +55,8 @@ protected Q_SLOTS:
private:
//@cond PRIVATE
class Private;
Private *const d;
class AttachmentFromMimeContentJobPrivate;
std::unique_ptr<AttachmentFromMimeContentJobPrivate> const d;
//@endcond
};
}
......
......@@ -27,10 +27,7 @@ ScamAttribute::ScamAttribute()
{
}
ScamAttribute::~ScamAttribute()
{
delete d;
}
ScamAttribute::~ScamAttribute() = default;
ScamAttribute *ScamAttribute::clone() const
{
......
......@@ -8,6 +8,7 @@
#pragma once
#include <Akonadi/Attribute>
#include <memory>
namespace MessageViewer
{
class ScamAttributePrivate;
......@@ -30,7 +31,7 @@ public:
private:
friend class ScamAttributePrivate;
ScamAttributePrivate *const d;
std::unique_ptr<ScamAttributePrivate> const d;
};
}
......@@ -31,10 +31,7 @@ AttachmentTemporaryFilesDirs::AttachmentTemporaryFilesDirs(QObject *parent)
{
}
AttachmentTemporaryFilesDirs::~AttachmentTemporaryFilesDirs()
{
delete d;
}
AttachmentTemporaryFilesDirs::~AttachmentTemporaryFilesDirs() = default;
void AttachmentTemporaryFilesDirs::setDelayRemoveAllInMs(int ms)
{
......
......@@ -9,7 +9,7 @@
#include "mimetreeparser_export.h"
#include <QObject>
#include <QStringList>
#include <memory>
namespace MimeTreeParser
{
class AttachmentTemporaryFilesDirsPrivate;
......@@ -38,7 +38,7 @@ private Q_SLOTS:
void slotRemoveTempFiles();
private:
AttachmentTemporaryFilesDirsPrivate *const d;
std::unique_ptr<AttachmentTemporaryFilesDirsPrivate> const d;
};
}
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