Commit 1ae15d37 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: Modernize code

parent 055dec24
Pipeline #100654 passed with stage
in 4 minutes and 52 seconds
......@@ -262,7 +262,7 @@ QSet<QByteArray> SerializerPluginMail::parts(const Item &item) const
QString SerializerPluginMail::extractGid(const Item &item) const
{
if (!item.hasPayload<KMime::Message::Ptr>()) {
return QString();
return {};
}
const auto msg = item.payload<KMime::Message::Ptr>();
KMime::Headers::MessageID *mid = msg->messageID(false);
......@@ -271,7 +271,7 @@ QString SerializerPluginMail::extractGid(const Item &item) const
} else if (KMime::Headers::Base *uid = msg->headerByType("X-Akonotes-UID")) {
return uid->asUnicodeString();
}
return QString();
return {};
}
#include "moc_akonadi_serializer_mail.cpp"
......@@ -21,9 +21,7 @@ using namespace Akonadi;
class Akonadi::MarkAsCommandPrivate
{
public:
MarkAsCommandPrivate()
{
}
MarkAsCommandPrivate() = default;
Akonadi::Collection::List mFolders;
Akonadi::Item::List mMessages;
......
......@@ -105,7 +105,7 @@ QVariant MessageModel::entityData(const Item &item, int column, int role) const
return KFormat().formatByteSize(item.size());
}
default:
return QVariant();
return {};
}
} else if (role == Qt::EditRole) {
switch (column) {
......@@ -120,7 +120,7 @@ QVariant MessageModel::entityData(const Item &item, int column, int role) const
case Size:
return item.size();
default:
return QVariant();
return {};
}
}
......
......@@ -15,9 +15,7 @@ using namespace Akonadi;
class Akonadi::MoveCommandPrivate
{
public:
MoveCommandPrivate()
{
}
MoveCommandPrivate() = default;
Akonadi::Collection mDestFolder;
Akonadi::Item::List mMessages;
......
......@@ -135,5 +135,5 @@ Akonadi::Collection MoveToTrashCommand::findTrashFolder(const Akonadi::Collectio
if (folder != col) {
return col;
}
return Akonadi::Collection();
return {};
}
......@@ -34,7 +34,7 @@ static inline QByteArray enumToType(SpecialMailCollections::Type type)
return "templates";
case SpecialMailCollections::LastType: // fallthrough
default:
return QByteArray();
return {};
}
}
......@@ -74,9 +74,7 @@ SpecialMailCollectionsRequestJob::SpecialMailCollectionsRequestJob(QObject *pare
setIconForTypeMap(iconNameMap);
}
SpecialMailCollectionsRequestJob::~SpecialMailCollectionsRequestJob()
{
}
SpecialMailCollectionsRequestJob::~SpecialMailCollectionsRequestJob() = default;
void SpecialMailCollectionsRequestJob::requestDefaultCollection(SpecialMailCollections::Type type)
{
......
......@@ -14,7 +14,7 @@
#include "akonadi_mime_debug.h"
#include <KIO/Job>
#include <KJobUiDelegate>
#include <assert.h>
#include <cassert>
namespace Util
{
......
Supports Markdown
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