From 3f991c3e2dbd156def8f51cca860797c133d10e6 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Tue, 1 Sep 2020 20:04:41 +0200 Subject: [PATCH] Modernize code --- agents/archivemailagent/job/archivejob.h | 4 ++-- .../followupreminderagent/followupreminderinfowidget.cpp | 1 - agents/mailfilteragent/filterlogdialog.cpp | 1 - agents/mailfilteragent/filtermanager.cpp | 8 ++------ agents/mailfilteragent/mailfilteragent.cpp | 1 - agents/sendlateragent/sendlateragent.cpp | 1 - agents/sendlateragent/sendlateragent.h | 2 +- agents/sendlateragent/sendlaterjob.h | 4 ++-- agents/sendlateragent/sendlatermanager.h | 2 +- agents/sendlateragent/sendlaterremovemessagejob.cpp | 1 - agents/sendlateragent/sendlaterremovemessagejob.h | 2 +- agents/unifiedmailboxagent/settingsdialog.h | 2 +- agents/unifiedmailboxagent/unifiedmailboxeditor.h | 2 +- src/editor/attachment/attachmentcontroller.h | 4 ++-- src/editor/kmcomposereditorng.h | 2 +- src/editor/kmcomposerglobalaction.h | 2 +- src/editor/validatesendmailshortcut.h | 4 ++-- src/folderarchive/folderarchiveagentcheckcollection.h | 2 +- src/folderarchive/folderarchiveagentjob.h | 4 ++-- src/folderarchive/folderarchivemanager.cpp | 2 +- src/folderarchive/folderarchivemanager.h | 2 +- src/foldershortcutactionmanager.h | 2 +- src/identity/identitydialog.cpp | 1 - src/identity/newidentitydialog.h | 2 +- src/job/addressvalidationjob.h | 2 +- src/job/createnewcontactjob.h | 2 +- src/job/removeduplicatemailjob.h | 4 ++-- src/job/removeduplicatemessageinfolderandsubfolderjob.h | 2 +- src/kmail_part.h | 2 +- src/kmlaunchexternalcomponent.h | 3 +-- src/kmmainwidget.h | 2 +- src/main.cpp | 6 ++---- src/search/checkindexingjob.h | 2 +- src/search/checkindexingmanager.h | 2 +- src/searchdialog/searchwindow.h | 2 +- src/tag/tagactionmanager.h | 8 ++++---- src/widgets/kactionmenutransport.cpp | 1 - 37 files changed, 41 insertions(+), 55 deletions(-) diff --git a/agents/archivemailagent/job/archivejob.h b/agents/archivemailagent/job/archivejob.h index 30431dec2..8264ada9b 100644 --- a/agents/archivemailagent/job/archivejob.h +++ b/agents/archivemailagent/job/archivejob.h @@ -26,8 +26,8 @@ private: void slotBackupDone(const QString &info); void slotError(const QString &error); QString mDefaultIconName; - ArchiveMailInfo *mInfo = nullptr; - ArchiveMailManager *mManager = nullptr; + ArchiveMailInfo *const mInfo; + ArchiveMailManager *const mManager; }; /// A scheduled "expire mails in this folder" task. diff --git a/agents/followupreminderagent/followupreminderinfowidget.cpp b/agents/followupreminderagent/followupreminderinfowidget.cpp index 6c061fdf8..bb9368990 100644 --- a/agents/followupreminderagent/followupreminderinfowidget.cpp +++ b/agents/followupreminderagent/followupreminderinfowidget.cpp @@ -29,7 +29,6 @@ inline QString followUpItemPattern() FollowUpReminderInfoItem::FollowUpReminderInfoItem(QTreeWidget *parent) : QTreeWidgetItem(parent) - , mInfo(nullptr) { } diff --git a/agents/mailfilteragent/filterlogdialog.cpp b/agents/mailfilteragent/filterlogdialog.cpp index 4d77751bf..b3eaa717c 100644 --- a/agents/mailfilteragent/filterlogdialog.cpp +++ b/agents/mailfilteragent/filterlogdialog.cpp @@ -40,7 +40,6 @@ using namespace MailCommon; FilterLogDialog::FilterLogDialog(QWidget *parent) : QDialog(parent) - , mIsInitialized(false) { setWindowTitle(i18nc("@title:window", "Filter Log Viewer")); QVBoxLayout *mainLayout = new QVBoxLayout(this); diff --git a/agents/mailfilteragent/filtermanager.cpp b/agents/mailfilteragent/filtermanager.cpp index b5861f4ef..7cd5e5ca6 100644 --- a/agents/mailfilteragent/filtermanager.cpp +++ b/agents/mailfilteragent/filtermanager.cpp @@ -42,10 +42,6 @@ class FilterManager::Private public: Private(FilterManager *qq) : q(qq) - , mRequiredPartsBasedOnAll(SearchRule::Envelope) - , mTotalProgressCount(0) - , mCurrentProgressCount(0) - , mInboundFiltersExist(false) { } @@ -62,10 +58,10 @@ public: void endFiltering(const Akonadi::Item &item) const; bool atLeastOneFilterAppliesTo(const QString &accountId) const; bool atLeastOneIncomingFilterAppliesTo(const QString &accountId) const; - FilterManager *q; + FilterManager *const q; QVector mFilters; QMap mRequiredParts; - SearchRule::RequiredPart mRequiredPartsBasedOnAll; + SearchRule::RequiredPart mRequiredPartsBasedOnAll = SearchRule::Envelope; int mTotalProgressCount = 0; int mCurrentProgressCount = 0; bool mInboundFiltersExist = false; diff --git a/agents/mailfilteragent/mailfilteragent.cpp b/agents/mailfilteragent/mailfilteragent.cpp index 55c742f88..22cd5a4a7 100644 --- a/agents/mailfilteragent/mailfilteragent.cpp +++ b/agents/mailfilteragent/mailfilteragent.cpp @@ -51,7 +51,6 @@ bool MailFilterAgent::isFilterableCollection(const Akonadi::Collection &collecti MailFilterAgent::MailFilterAgent(const QString &id) : Akonadi::AgentBase(id) - , m_filterLogDialog(nullptr) { Kdelibs4ConfigMigrator migrate(QStringLiteral("mailfilteragent")); migrate.setConfigFiles(QStringList() << QStringLiteral("akonadi_mailfilter_agentrc") << QStringLiteral("akonadi_mailfilter_agent.notifyrc")); diff --git a/agents/sendlateragent/sendlateragent.cpp b/agents/sendlateragent/sendlateragent.cpp index a3871ed89..21d4a0374 100644 --- a/agents/sendlateragent/sendlateragent.cpp +++ b/agents/sendlateragent/sendlateragent.cpp @@ -35,7 +35,6 @@ SendLaterAgent::SendLaterAgent(const QString &id) : Akonadi::AgentBase(id) - , mAgentInitialized(false) { Kdelibs4ConfigMigrator migrate(QStringLiteral("sendlateragent")); migrate.setConfigFiles(QStringList() << QStringLiteral("akonadi_sendlater_agentrc") << QStringLiteral("akonadi_sendlater_agent.notifyrc")); diff --git a/agents/sendlateragent/sendlateragent.h b/agents/sendlateragent/sendlateragent.h index eb7ef1622..426a57c91 100644 --- a/agents/sendlateragent/sendlateragent.h +++ b/agents/sendlateragent/sendlateragent.h @@ -44,7 +44,7 @@ protected: private: void slotSendNow(Akonadi::Item::Id id); void slotStartAgent(); - bool mAgentInitialized; + bool mAgentInitialized = false; SendLaterManager *mManager = nullptr; }; diff --git a/agents/sendlateragent/sendlaterjob.h b/agents/sendlateragent/sendlaterjob.h index d9de373d5..519420f16 100644 --- a/agents/sendlateragent/sendlaterjob.h +++ b/agents/sendlateragent/sendlaterjob.h @@ -36,8 +36,8 @@ private: void slotDeleteItem(KJob *); void updateAndCleanMessageBeforeSending(const KMime::Message::Ptr &msg); Akonadi::ItemFetchScope mFetchScope; - SendLaterManager *mManager = nullptr; - MessageComposer::SendLaterInfo *mInfo = nullptr; + SendLaterManager *const mManager; + MessageComposer::SendLaterInfo *const mInfo; Akonadi::Item mItem; }; diff --git a/agents/sendlateragent/sendlatermanager.h b/agents/sendlateragent/sendlatermanager.h index f8f0eb667..ef46071a8 100644 --- a/agents/sendlateragent/sendlatermanager.h +++ b/agents/sendlateragent/sendlatermanager.h @@ -69,7 +69,7 @@ private: MessageComposer::SendLaterInfo *mCurrentInfo = nullptr; SendLaterJob *mCurrentJob = nullptr; QTimer *mTimer = nullptr; - MessageComposer::AkonadiSender *mSender = nullptr; + MessageComposer::AkonadiSender *const mSender; QQueue mSendLaterQueue; }; diff --git a/agents/sendlateragent/sendlaterremovemessagejob.cpp b/agents/sendlateragent/sendlaterremovemessagejob.cpp index 1613c54bc..218427408 100644 --- a/agents/sendlateragent/sendlaterremovemessagejob.cpp +++ b/agents/sendlateragent/sendlaterremovemessagejob.cpp @@ -11,7 +11,6 @@ SendLaterRemoveMessageJob::SendLaterRemoveMessageJob(const QVector &listItem, QObject *parent) : QObject(parent) , mListItems(listItem) - , mIndex(0) { } diff --git a/agents/sendlateragent/sendlaterremovemessagejob.h b/agents/sendlateragent/sendlaterremovemessagejob.h index 18a0c8c8b..f2fdad1a8 100644 --- a/agents/sendlateragent/sendlaterremovemessagejob.h +++ b/agents/sendlateragent/sendlaterremovemessagejob.h @@ -26,7 +26,7 @@ private: void slotItemDeleteDone(KJob *job); void deleteItem(); QVector mListItems; - int mIndex; + int mIndex = 0; }; #endif // SENDLATERREMOVEMESSAGEJOB_H diff --git a/agents/unifiedmailboxagent/settingsdialog.h b/agents/unifiedmailboxagent/settingsdialog.h index 16ca2a2b8..46c7213b2 100644 --- a/agents/unifiedmailboxagent/settingsdialog.h +++ b/agents/unifiedmailboxagent/settingsdialog.h @@ -31,7 +31,7 @@ private: void writeConfig(); QStandardItemModel *mBoxModel = nullptr; UnifiedMailboxManager &mBoxManager; - MailKernel *mKernel = nullptr; + MailKernel *const mKernel; KSharedConfigPtr mConfig; }; diff --git a/agents/unifiedmailboxagent/unifiedmailboxeditor.h b/agents/unifiedmailboxagent/unifiedmailboxeditor.h index 0c935becd..36769b155 100644 --- a/agents/unifiedmailboxagent/unifiedmailboxeditor.h +++ b/agents/unifiedmailboxagent/unifiedmailboxeditor.h @@ -23,7 +23,7 @@ public: private: void writeConfig(); void readConfig(); - UnifiedMailbox *mMailbox = nullptr; + UnifiedMailbox *const mMailbox; KSharedConfigPtr mConfig; }; diff --git a/src/editor/attachment/attachmentcontroller.h b/src/editor/attachment/attachmentcontroller.h index 5059ecf75..f50c221f1 100644 --- a/src/editor/attachment/attachmentcontroller.h +++ b/src/editor/attachment/attachmentcontroller.h @@ -42,8 +42,8 @@ private: void doubleClicked(const QModelIndex &itemClicked); void slotSelectAllAttachment(); - KMComposerWin *mComposer = nullptr; - AttachmentView *mView = nullptr; + KMComposerWin *const mComposer; + AttachmentView *const mView; }; } // namespace KMail diff --git a/src/editor/kmcomposereditorng.h b/src/editor/kmcomposereditorng.h index 0cf971ebf..7d463cb3e 100644 --- a/src/editor/kmcomposereditorng.h +++ b/src/editor/kmcomposereditorng.h @@ -36,7 +36,7 @@ protected: void insertFromMimeData(const QMimeData *source) override; private: - KMComposerWin *mComposerWin = nullptr; + KMComposerWin *const mComposerWin; }; #endif // KMCOMPOSEREDITORNG_H diff --git a/src/editor/kmcomposerglobalaction.h b/src/editor/kmcomposerglobalaction.h index d4e73033a..fdc04130e 100644 --- a/src/editor/kmcomposerglobalaction.h +++ b/src/editor/kmcomposerglobalaction.h @@ -27,7 +27,7 @@ public Q_SLOTS: void slotInsertText(const QString &str); private: Q_DISABLE_COPY(KMComposerGlobalAction) - KMComposerWin *mComposerWin = nullptr; + KMComposerWin *const mComposerWin; }; #endif // KMCOMPOSERGLOBALACTION_H diff --git a/src/editor/validatesendmailshortcut.h b/src/editor/validatesendmailshortcut.h index 281b8e934..840642350 100644 --- a/src/editor/validatesendmailshortcut.h +++ b/src/editor/validatesendmailshortcut.h @@ -18,8 +18,8 @@ public: Q_REQUIRED_RESULT bool validate(); private: - QWidget *mParent = nullptr; - KActionCollection *mActionCollection = nullptr; + QWidget *const mParent; + KActionCollection *const mActionCollection; }; #endif // VALIDATESENDMAILSHORTCUT_H diff --git a/src/folderarchive/folderarchiveagentcheckcollection.h b/src/folderarchive/folderarchiveagentcheckcollection.h index 3baf2b6b2..0af03c0cb 100644 --- a/src/folderarchive/folderarchiveagentcheckcollection.h +++ b/src/folderarchive/folderarchiveagentcheckcollection.h @@ -29,7 +29,7 @@ private: void slotCreateNewFolder(KJob *); void createNewFolder(const QString &name); QDate mCurrentDate; - FolderArchiveAccountInfo *mInfo = nullptr; + FolderArchiveAccountInfo *const mInfo; }; #endif // FOLDERARCHIVEAGENTCHECKCOLLECTION_H diff --git a/src/folderarchive/folderarchiveagentjob.h b/src/folderarchive/folderarchiveagentjob.h index 0b153d187..ce5b5bed2 100644 --- a/src/folderarchive/folderarchiveagentjob.h +++ b/src/folderarchive/folderarchiveagentjob.h @@ -31,8 +31,8 @@ private: void sendError(const QString &error); Akonadi::Item::List mListItem; - FolderArchiveManager *mManager = nullptr; - FolderArchiveAccountInfo *mInfo = nullptr; + FolderArchiveManager *const mManager; + FolderArchiveAccountInfo *const mInfo; }; #endif // FOLDERARCHIVEAGENTJOB_H diff --git a/src/folderarchive/folderarchivemanager.cpp b/src/folderarchive/folderarchivemanager.cpp index 7000b67d0..d5303aed8 100644 --- a/src/folderarchive/folderarchivemanager.cpp +++ b/src/folderarchive/folderarchivemanager.cpp @@ -25,8 +25,8 @@ FolderArchiveManager::FolderArchiveManager(QObject *parent) : QObject(parent) + , mFolderArchiveCache(new FolderArchiveCache(this)) { - mFolderArchiveCache = new FolderArchiveCache(this); load(); } diff --git a/src/folderarchive/folderarchivemanager.h b/src/folderarchive/folderarchivemanager.h index 83376de29..2d09f8a8d 100644 --- a/src/folderarchive/folderarchivemanager.h +++ b/src/folderarchive/folderarchivemanager.h @@ -52,7 +52,7 @@ private: QQueue mJobQueue; FolderArchiveAgentJob *mCurrentJob = nullptr; QList mListAccountInfo; - FolderArchiveCache *mFolderArchiveCache = nullptr; + FolderArchiveCache *const mFolderArchiveCache; }; #endif // FOLDERARCHIVEMANAGER_H diff --git a/src/foldershortcutactionmanager.h b/src/foldershortcutactionmanager.h index 99c1bb5b3..2b5a31d1d 100644 --- a/src/foldershortcutactionmanager.h +++ b/src/foldershortcutactionmanager.h @@ -39,7 +39,7 @@ Q_SIGNALS: private: Q_DISABLE_COPY(FolderShortcutCommand) Akonadi::Collection mCollectionFolder; - QWidget *mMainWidget = nullptr; + QWidget *const mMainWidget; QAction *mAction = nullptr; }; diff --git a/src/identity/identitydialog.cpp b/src/identity/identitydialog.cpp index f37d1b24c..048a34852 100644 --- a/src/identity/identitydialog.cpp +++ b/src/identity/identitydialog.cpp @@ -146,7 +146,6 @@ KeyGenerationJob::KeyGenerationJob(const QString &name, const QString &email, Ke : QGpgME::Job(parent) , mName(name) , mEmail(email) - , mJob(nullptr) { } diff --git a/src/identity/newidentitydialog.h b/src/identity/newidentitydialog.h index cf840e69a..84d5b2546 100644 --- a/src/identity/newidentitydialog.h +++ b/src/identity/newidentitydialog.h @@ -46,7 +46,7 @@ private: QLineEdit *mLineEdit = nullptr; QComboBox *mComboBox = nullptr; QButtonGroup *mButtonGroup = nullptr; - KIdentityManagement::IdentityManager *mIdentityManager = nullptr; + KIdentityManagement::IdentityManager *const mIdentityManager; QPushButton *mOkButton = nullptr; }; } diff --git a/src/job/addressvalidationjob.h b/src/job/addressvalidationjob.h index 93e72805e..867ad0079 100644 --- a/src/job/addressvalidationjob.h +++ b/src/job/addressvalidationjob.h @@ -32,7 +32,7 @@ private: QString mEmailAddresses; QString mDomainDefaultName; bool mIsValid = false; - QWidget *mParentWidget = nullptr; + QWidget *const mParentWidget; }; #endif diff --git a/src/job/createnewcontactjob.h b/src/job/createnewcontactjob.h index f9dc00ee8..77a275308 100644 --- a/src/job/createnewcontactjob.h +++ b/src/job/createnewcontactjob.h @@ -45,7 +45,7 @@ private: void createContact(); - QWidget *mParentWidget = nullptr; + QWidget *const mParentWidget; }; #endif // CREATENEWCONTACTJOB_H diff --git a/src/job/removeduplicatemailjob.h b/src/job/removeduplicatemailjob.h index 809b0d838..96cccb689 100644 --- a/src/job/removeduplicatemailjob.h +++ b/src/job/removeduplicatemailjob.h @@ -28,8 +28,8 @@ private: void slotRemoveDuplicatesDone(KJob *job); void slotRemoveDuplicatesCanceled(KPIM::ProgressItem *item); void slotRemoveDuplicatesUpdate(KJob *job, const QString &description); - QWidget *mParent = nullptr; - QItemSelectionModel *mSelectionModel = nullptr; + QWidget *const mParent; + QItemSelectionModel *const mSelectionModel; }; #endif // REMOVEDUPLICATEMAILJOB_H diff --git a/src/job/removeduplicatemessageinfolderandsubfolderjob.h b/src/job/removeduplicatemessageinfolderandsubfolderjob.h index d1e8152ef..fe52c8695 100644 --- a/src/job/removeduplicatemessageinfolderandsubfolderjob.h +++ b/src/job/removeduplicatemessageinfolderandsubfolderjob.h @@ -33,7 +33,7 @@ private: void slotRemoveDuplicatesUpdate(KJob *job, const QString &description); void slotRemoveDuplicatesCanceled(KPIM::ProgressItem *item); Akonadi::Collection mTopLevelCollection; - QWidget *mParentWidget = nullptr; + QWidget *const mParentWidget; }; #endif // REMOVEDUPLICATEMESSAGEINFOLDERANDSUBFOLDERJOB_H diff --git a/src/kmail_part.h b/src/kmail_part.h index 99e7a71b4..47cf5dcb4 100644 --- a/src/kmail_part.h +++ b/src/kmail_part.h @@ -38,7 +38,7 @@ protected: private: KMMainWidget *mainWidget = nullptr; - QWidget *mParentWidget = nullptr; + QWidget *const mParentWidget; }; #endif diff --git a/src/kmlaunchexternalcomponent.h b/src/kmlaunchexternalcomponent.h index d48f8e7af..c7dac3f6d 100644 --- a/src/kmlaunchexternalcomponent.h +++ b/src/kmlaunchexternalcomponent.h @@ -28,8 +28,7 @@ public Q_SLOTS: void slotFilterLogViewer(); private: Q_DISABLE_COPY(KMLaunchExternalComponent) - QString akonadiPath(QString service); - QWidget *mParentWidget = nullptr; + QWidget *const mParentWidget; }; #endif // KMLAUNCHEXTERNALCOMPONENT_H diff --git a/src/kmmainwidget.h b/src/kmmainwidget.h index c4448d89e..33b18f205 100644 --- a/src/kmmainwidget.h +++ b/src/kmmainwidget.h @@ -629,7 +629,7 @@ private: MessageViewer::Viewer::DisplayFormatMessage mFolderDisplayFormatPreference = MessageViewer::Viewer::UseGlobalSetting; QAction *mSearchMessages = nullptr; KMLaunchExternalComponent *mLaunchExternalComponent = nullptr; - ManageShowCollectionProperties *mManageShowCollectionProperties = nullptr; + ManageShowCollectionProperties *const mManageShowCollectionProperties; QAction *mShowIntroductionAction = nullptr; QAction *mMarkAllMessageAsReadAndInAllSubFolder = nullptr; KActionMenuAccount *mAccountActionMenu = nullptr; diff --git a/src/main.cpp b/src/main.cpp index 04a87e5a4..c5fdb5735 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -36,8 +36,6 @@ class KMailApplication : public KontactInterface::PimUniqueApplication public: KMailApplication(int &argc, char **argv[]) : KontactInterface::PimUniqueApplication(argc, argv) - , mDelayedInstanceCreation(false) - , mEventLoopReached(false) { } @@ -50,8 +48,8 @@ public Q_SLOTS: int newInstance(const QByteArray &startupId, const QStringList &arguments, const QString &workingDirectory) override; protected: - bool mDelayedInstanceCreation; - bool mEventLoopReached; + bool mDelayedInstanceCreation = false; + bool mEventLoopReached = false; }; void KMailApplication::commitData(QSessionManager &) diff --git a/src/search/checkindexingjob.h b/src/search/checkindexingjob.h index a07ef3a0b..f75ef108f 100644 --- a/src/search/checkindexingjob.h +++ b/src/search/checkindexingjob.h @@ -36,7 +36,7 @@ private: void slotCollectionPropertiesFinished(KJob *job); void askForNextCheck(quint64 id, bool needToReindex = false); Akonadi::Collection mCollection; - Akonadi::Search::PIM::IndexedItems *mIndexedItems = nullptr; + Akonadi::Search::PIM::IndexedItems *const mIndexedItems; }; #endif // CHECKINDEXINGJOB_H diff --git a/src/search/checkindexingmanager.h b/src/search/checkindexingmanager.h index 229aba135..5b623adb6 100644 --- a/src/search/checkindexingmanager.h +++ b/src/search/checkindexingmanager.h @@ -37,7 +37,7 @@ private: void createJob(); void callToReindexCollection(); - Akonadi::Search::PIM::IndexedItems *mIndexedItems = nullptr; + Akonadi::Search::PIM::IndexedItems *const mIndexedItems; Akonadi::Collection::List mListCollection; QTimer *mTimer = nullptr; QList mCollectionsIndexed; diff --git a/src/searchdialog/searchwindow.h b/src/searchdialog/searchwindow.h index a226271f1..4bc42bd01 100644 --- a/src/searchdialog/searchwindow.h +++ b/src/searchdialog/searchwindow.h @@ -176,7 +176,7 @@ private: QTimer mRenameTimer; QByteArray mHeaderState; // not owned by us - KMMainWidget *mKMMainWidget = nullptr; + KMMainWidget *const mKMMainWidget; SearchPatternWarning *mSearchPatternWidget = nullptr; Akonadi::StandardMailActionManager *mAkonadiStandardAction = nullptr; diff --git a/src/tag/tagactionmanager.h b/src/tag/tagactionmanager.h index 728695881..921063264 100644 --- a/src/tag/tagactionmanager.h +++ b/src/tag/tagactionmanager.h @@ -102,9 +102,9 @@ private: void checkTags(const QList &tags); QList checkedTags() const; - KActionCollection *mActionCollection = nullptr; - MessageActions *mMessageActions = nullptr; - KXMLGUIClient *mGUIClient = nullptr; + KActionCollection *const mActionCollection; + MessageActions *const mMessageActions; + KXMLGUIClient *const mGUIClient; QAction *mSeparatorMoreAction = nullptr; QAction *mSeparatorNewTagAction = nullptr; @@ -123,7 +123,7 @@ private: // Uri of a newly created tag qint64 mNewTagId = -1; bool mTagFetchInProgress = false; - Akonadi::Monitor *mMonitor = nullptr; + Akonadi::Monitor *const mMonitor; }; } diff --git a/src/widgets/kactionmenutransport.cpp b/src/widgets/kactionmenutransport.cpp index afb338d0c..1374b6aaf 100644 --- a/src/widgets/kactionmenutransport.cpp +++ b/src/widgets/kactionmenutransport.cpp @@ -10,7 +10,6 @@ KActionMenuTransport::KActionMenuTransport(QObject *parent) : KActionMenu(parent) - , mInitialized(false) { setDelayed(true); connect(MailTransport::TransportManager::self(), &MailTransport::TransportManager::transportsChanged, this, &KActionMenuTransport::updateTransportMenu);