Commit 867d2db2 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Modernize code

parent 66a2f519
Pipeline #33084 passed with stage
in 10 minutes and 39 seconds
......@@ -24,7 +24,6 @@ EmptyTrashCommand::EmptyTrashCommand(const QAbstractItemModel *model, QObject *p
: CommandBase(parent)
, mModel(model)
, the_trashCollectionFolder(-1)
, mNumberOfTrashToEmpty(0)
{
}
......@@ -33,7 +32,6 @@ EmptyTrashCommand::EmptyTrashCommand(const Akonadi::Collection &folder, QObject
, mModel(nullptr)
, the_trashCollectionFolder(-1)
, mFolder(folder)
, mNumberOfTrashToEmpty(0)
{
}
......
......@@ -34,7 +34,7 @@ private:
Akonadi::Collection collectionFromId(Akonadi::Collection::Id id) const;
bool folderIsTrash(const Akonadi::Collection &col);
const QAbstractItemModel *mModel = nullptr;
const QAbstractItemModel *const mModel;
Akonadi::Collection::Id the_trashCollectionFolder;
Akonadi::Collection mFolder;
int mNumberOfTrashToEmpty = 0;
......
......@@ -22,20 +22,16 @@ class Akonadi::MarkAsCommandPrivate
{
public:
MarkAsCommandPrivate()
: mMarkJobCount(0)
, mFolderListJobCount(0)
, mInvertMark(0)
, mRecursive(false)
{
}
Akonadi::Collection::List mFolders;
Akonadi::Item::List mMessages;
Akonadi::MessageStatus mTargetStatus;
int mMarkJobCount;
int mFolderListJobCount;
int mInvertMark;
bool mRecursive;
int mMarkJobCount = 0;
int mFolderListJobCount = 0;
int mInvertMark = 0;
bool mRecursive = false;
};
MarkAsCommand::MarkAsCommand(Akonadi::MessageStatus targetStatus, const Akonadi::Item::List &msgList, bool invert, QObject *parent)
......
......@@ -11,12 +11,7 @@ using namespace Akonadi;
class Akonadi::MessageFolderAttribute::Private
{
public:
Private()
: isOutboundFolder(false)
{
}
bool isOutboundFolder;
bool isOutboundFolder = false;
};
MessageFolderAttribute::MessageFolderAttribute()
......
......@@ -20,10 +20,7 @@ class Q_DECL_HIDDEN Akonadi::RemoveDuplicatesJob::Private
{
public:
Private(RemoveDuplicatesJob *parent)
: mCurrentJob(nullptr)
, mJobCount(0)
, mKilled(false)
, mParent(parent)
:mParent(parent)
{
}
......@@ -139,11 +136,11 @@ public:
Akonadi::Collection::List mFolders;
Akonadi::Item::List mDuplicateItems;
Akonadi::Job *mCurrentJob = nullptr;
int mJobCount;
int mJobCount = 0;
bool mKilled = false;
private:
RemoveDuplicatesJob *mParent = nullptr;
RemoveDuplicatesJob *const mParent;
};
using namespace Akonadi;
......
......@@ -46,8 +46,6 @@ public:
Private(KActionCollection *actionCollection, QWidget *parentWidget, StandardMailActionManager *parent)
: mActionCollection(actionCollection)
, mParentWidget(parentWidget)
, mCollectionSelectionModel(nullptr)
, mItemSelectionModel(nullptr)
, mParent(parent)
{
mGenericManager = new StandardActionManager(actionCollection, parentWidget);
......@@ -663,14 +661,14 @@ public:
command->execute();
}
KActionCollection *mActionCollection = nullptr;
QWidget *mParentWidget = nullptr;
KActionCollection *const mActionCollection;
QWidget *const mParentWidget;
StandardActionManager *mGenericManager = nullptr;
QItemSelectionModel *mCollectionSelectionModel = nullptr;
QItemSelectionModel *mItemSelectionModel = nullptr;
QHash<StandardMailActionManager::Type, QAction *> mActions;
QSet<StandardMailActionManager::Type> mInterceptedActions;
StandardMailActionManager *mParent = nullptr;
StandardMailActionManager *const mParent;
};
StandardMailActionManager::StandardMailActionManager(KActionCollection *actionCollection, QWidget *parent)
......
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