summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-09-20 13:43:26 +0200
committerMontel Laurent <[email protected]>2017-09-20 13:43:26 +0200
commite5054ca24930a8c8dacc9d00f481ba01f3707c4a (patch)
tree0bd118a419cc52f761f551a27e54799fefb25fc7
parent6df9ac72548563e0d256c0fde172dd193e321738 (diff)
Clean up
-rw-r--r--agents/archivemailagent/archivemailinfo.cpp16
-rw-r--r--agents/archivemailagent/archivemailinfo.h14
-rw-r--r--agents/archivemailagent/archivemailwidget.h3
-rw-r--r--agents/followupreminderagent/followupremindermanager.cpp1
-rw-r--r--agents/followupreminderagent/followupremindermanager.h2
-rw-r--r--src/collectionpage/collectionmailinglistpage.h4
-rw-r--r--src/collectionpage/collectionquotapage.h4
-rw-r--r--src/collectionpage/collectionviewpage.h3
8 files changed, 12 insertions, 35 deletions
diff --git a/agents/archivemailagent/archivemailinfo.cpp b/agents/archivemailagent/archivemailinfo.cpp
index e9e5226..1021214 100644
--- a/agents/archivemailagent/archivemailinfo.cpp
+++ b/agents/archivemailagent/archivemailinfo.cpp
@@ -23,26 +23,10 @@
#include <QDir>
ArchiveMailInfo::ArchiveMailInfo()
- : mLastDateSaved(QDate())
- , mArchiveAge(1)
- , mArchiveType(MailCommon::BackupJob::Zip)
- , mArchiveUnit(ArchiveMailInfo::ArchiveDays)
- , mSaveCollectionId(-1)
- , mMaximumArchiveCount(0)
- , mSaveSubCollection(false)
- , mIsEnabled(true)
{
}
ArchiveMailInfo::ArchiveMailInfo(const KConfigGroup &config)
- : mLastDateSaved(QDate())
- , mArchiveAge(1)
- , mArchiveType(MailCommon::BackupJob::Zip)
- , mArchiveUnit(ArchiveMailInfo::ArchiveDays)
- , mSaveCollectionId(-1)
- , mMaximumArchiveCount(0)
- , mSaveSubCollection(false)
- , mIsEnabled(true)
{
readConfig(config);
}
diff --git a/agents/archivemailagent/archivemailinfo.h b/agents/archivemailagent/archivemailinfo.h
index c19acf5..9f5b1a0 100644
--- a/agents/archivemailagent/archivemailinfo.h
+++ b/agents/archivemailagent/archivemailinfo.h
@@ -83,14 +83,14 @@ public:
private:
QString dirArchive(bool &dirExit) const;
QDate mLastDateSaved;
- int mArchiveAge;
- MailCommon::BackupJob::ArchiveType mArchiveType;
- ArchiveUnit mArchiveUnit;
- Akonadi::Collection::Id mSaveCollectionId;
+ int mArchiveAge = 1;
+ MailCommon::BackupJob::ArchiveType mArchiveType = MailCommon::BackupJob::Zip;
+ ArchiveUnit mArchiveUnit = ArchiveMailInfo::ArchiveDays;
+ Akonadi::Collection::Id mSaveCollectionId = -1;
QUrl mPath;
- int mMaximumArchiveCount;
- bool mSaveSubCollection;
- bool mIsEnabled;
+ int mMaximumArchiveCount = 0;
+ bool mSaveSubCollection = false;
+ bool mIsEnabled = true;
};
#endif // ARCHIVEMAILINFO_H
diff --git a/agents/archivemailagent/archivemailwidget.h b/agents/archivemailagent/archivemailwidget.h
index 8e23320..d6a45d9 100644
--- a/agents/archivemailagent/archivemailwidget.h
+++ b/agents/archivemailagent/archivemailwidget.h
@@ -65,7 +65,6 @@ private:
bool verifyExistingArchive(ArchiveMailInfo *info) const;
void updateDiffDate(ArchiveMailItem *item, ArchiveMailInfo *info);
-private:
void slotRemoveItem();
void slotModifyItem();
void slotAddItem();
@@ -74,7 +73,7 @@ private:
void customContextMenuRequested(const QPoint &);
void slotArchiveNow();
void slotItemChanged(QTreeWidgetItem *item, int);
- bool mChanged;
+ bool mChanged = false;
Ui::ArchiveMailWidget *mWidget = nullptr;
};
diff --git a/agents/followupreminderagent/followupremindermanager.cpp b/agents/followupreminderagent/followupremindermanager.cpp
index 0cd3d3f..de8f653 100644
--- a/agents/followupreminderagent/followupremindermanager.cpp
+++ b/agents/followupreminderagent/followupremindermanager.cpp
@@ -39,7 +39,6 @@ using namespace FollowUpReminder;
FollowUpReminderManager::FollowUpReminderManager(QObject *parent)
: QObject(parent)
- , mInitialize(false)
{
mConfig = KSharedConfig::openConfig();
}
diff --git a/agents/followupreminderagent/followupremindermanager.h b/agents/followupreminderagent/followupremindermanager.h
index 63bedf8..f7bdb15 100644
--- a/agents/followupreminderagent/followupremindermanager.h
+++ b/agents/followupreminderagent/followupremindermanager.h
@@ -51,7 +51,7 @@ private:
KSharedConfig::Ptr mConfig;
QList<FollowUpReminder::FollowUpReminderInfo *> mFollowUpReminderInfoList;
QPointer<FollowUpReminderNoAnswerDialog> mNoAnswerDialog;
- bool mInitialize;
+ bool mInitialize = false;
};
#endif // FOLLOWUPREMINDERMANAGER_H
diff --git a/src/collectionpage/collectionmailinglistpage.h b/src/collectionpage/collectionmailinglistpage.h
index 08065f3..cc2a819 100644
--- a/src/collectionpage/collectionmailinglistpage.h
+++ b/src/collectionpage/collectionmailinglistpage.h
@@ -49,13 +49,11 @@ public:
bool canHandle(const Akonadi::Collection &col) const override;
-protected:
- void init(const Akonadi::Collection &);
-
protected Q_SLOTS:
void slotFetchDone(KJob *job);
private:
+ void init(const Akonadi::Collection &);
/*
* Detects mailing-list related stuff
*/
diff --git a/src/collectionpage/collectionquotapage.h b/src/collectionpage/collectionquotapage.h
index 73245c9..836d1b5 100644
--- a/src/collectionpage/collectionquotapage.h
+++ b/src/collectionpage/collectionquotapage.h
@@ -47,10 +47,8 @@ public:
void save(Akonadi::Collection &col) override;
bool canHandle(const Akonadi::Collection &collection) const override;
-protected:
- void init();
-
private:
+ void init();
CollectionQuotaWidget *mQuotaWidget = nullptr;
};
diff --git a/src/collectionpage/collectionviewpage.h b/src/collectionpage/collectionviewpage.h
index 29cfbd7..ee5fcdc 100644
--- a/src/collectionpage/collectionviewpage.h
+++ b/src/collectionpage/collectionviewpage.h
@@ -47,14 +47,13 @@ public:
void load(const Akonadi::Collection &col) override;
void save(Akonadi::Collection &col) override;
-private Q_SLOTS:
+private:
void slotChangeIcon(const QString &icon);
void slotAggregationCheckboxChanged();
void slotThemeCheckboxChanged();
void slotSelectFolderAggregation();
void slotSelectFolderTheme();
-private:
void init(const Akonadi::Collection &);
QSharedPointer<MailCommon::FolderSettings> mFolderCollection;
QCheckBox *mIconsCheckBox = nullptr;