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

Fix initialize values

parent aa7ad82a
Pipeline #25937 passed with stage
in 28 minutes and 40 seconds
......@@ -26,13 +26,6 @@
using namespace MailCommon;
ExpireCollectionAttribute::ExpireCollectionAttribute()
: mExpireMessages(false)
, mUnreadExpireAge(28)
, mReadExpireAge(14)
, mUnreadExpireUnits(ExpireNever)
, mReadExpireUnits(ExpireNever)
, mExpireAction(ExpireDelete)
, mExpireToFolderId(-1)
{
}
......
......@@ -132,13 +132,13 @@ public:
bool operator==(const ExpireCollectionAttribute &other) const;
private:
static int daysToExpire(int number, ExpireCollectionAttribute::ExpireUnits units);
bool mExpireMessages; // true if old messages are expired
int mUnreadExpireAge; // Given in unreadExpireUnits
int mReadExpireAge; // Given in readExpireUnits
ExpireCollectionAttribute::ExpireUnits mUnreadExpireUnits;
ExpireCollectionAttribute::ExpireUnits mReadExpireUnits;
ExpireCollectionAttribute::ExpireAction mExpireAction;
Akonadi::Collection::Id mExpireToFolderId;
bool mExpireMessages = false; // true if old messages are expired
int mUnreadExpireAge = 28; // Given in unreadExpireUnits
int mReadExpireAge = 14; // Given in readExpireUnits
ExpireCollectionAttribute::ExpireUnits mUnreadExpireUnits = ExpireNever;
ExpireCollectionAttribute::ExpireUnits mReadExpireUnits = ExpireNever;
ExpireCollectionAttribute::ExpireAction mExpireAction = ExpireDelete;
Akonadi::Collection::Id mExpireToFolderId = -1;
};
}
MAILCOMMON_EXPORT QDebug operator <<(QDebug d, const MailCommon::ExpireCollectionAttribute &t);
......
......@@ -52,11 +52,6 @@ using namespace MailCommon;
CollectionGeneralPage::CollectionGeneralPage(QWidget *parent)
: CollectionPropertiesPage(parent)
, mContentsComboBox(nullptr)
, mIncidencesForComboBox(nullptr)
, mSharedSeenFlagsCheckBox(nullptr)
, mNameEdit(nullptr)
, mFolderCollection(nullptr)
{
setObjectName(QStringLiteral("MailCommon::CollectionGeneralPage"));
setPageTitle(i18nc("@title:tab General settings for a folder.", "General"));
......
......@@ -40,7 +40,6 @@
FilterActionMissingFolderDialog::FilterActionMissingFolderDialog(
const Akonadi::Collection::List &list, const QString &filtername, const QString &argStr, QWidget *parent)
: QDialog(parent)
, mListwidget(nullptr)
{
setModal(true);
setWindowTitle(i18nc("@title:window", "Select Folder"));
......
......@@ -27,7 +27,6 @@ using namespace MailCommon;
FilterImporterGmail::FilterImporterGmail(QFile *file)
: FilterImporterAbstract()
, mFilterCount(0)
{
QDomDocument doc;
if (!loadDomElement(doc, file)) {
......
......@@ -36,9 +36,9 @@ public:
~FilterImporterGmail();
static QString defaultFiltersSettingsPath();
private:
QString createUniqFilterName();
Q_REQUIRED_RESULT QString createUniqFilterName();
void parseFilters(const QDomElement &e);
int mFilterCount;
int mFilterCount = 0;
};
}
......
......@@ -29,7 +29,6 @@ using namespace MailCommon;
FilterImporterProcmail::FilterImporterProcmail(QFile *file)
: FilterImporterAbstract()
, mFilterCount(0)
{
QTextStream stream(file);
readStream(stream);
......@@ -37,7 +36,6 @@ FilterImporterProcmail::FilterImporterProcmail(QFile *file)
FilterImporterProcmail::FilterImporterProcmail(QString string)
: FilterImporterAbstract()
, mFilterCount(0)
{
QTextStream stream(&string);
readStream(stream);
......
......@@ -40,7 +40,7 @@ private:
Q_REQUIRED_RESULT MailCommon::MailFilter *parseLine(QTextStream &stream, QString line, MailCommon::MailFilter *filter);
void readStream(QTextStream &stream);
Q_REQUIRED_RESULT QString createUniqFilterName();
int mFilterCount;
int mFilterCount = 0;
};
}
......
......@@ -44,24 +44,22 @@ public:
Private(FilterLog *qq)
: q(qq)
, mMaxLogSize(512 * 1024)
, mCurrentLogSize(0)
, mAllowedTypes(FilterLog::Meta
|FilterLog::PatternDescription
|FilterLog::RuleResult
|FilterLog::PatternResult
|FilterLog::AppliedAction)
, mLogging(false)
{
}
static FilterLog *mSelf;
FilterLog *q;
FilterLog *const q;
QStringList mLogEntries;
long mMaxLogSize;
long mCurrentLogSize;
long mCurrentLogSize = 0;
int mAllowedTypes;
bool mLogging;
bool mLogging = false;
void checkLogSize();
};
......
......@@ -39,9 +39,7 @@ class Q_DECL_HIDDEN FilterManager::Private
public:
Private(FilterManager *qq)
: q(qq)
, mMailFilterAgentInterface(nullptr)
, mMonitor(new Akonadi::Monitor)
, mInitialized(false)
{
const auto service = Akonadi::ServerManager::agentServiceName(Akonadi::ServerManager::Agent,
QStringLiteral("akonadi_mailfilter_agent"));
......@@ -58,7 +56,7 @@ public:
static FilterManager *mInstance;
static FilterActionDict *mFilterActionDict;
FilterManager *q;
FilterManager *const q;
OrgFreedesktopAkonadiMailFilterAgentInterface *mMailFilterAgentInterface = nullptr;
QVector<MailCommon::MailFilter *> mFilters;
Akonadi::Monitor *mMonitor = nullptr;
......
......@@ -81,9 +81,6 @@ using namespace MailCommon;
KMFilterDialog::KMFilterDialog(const QList<KActionCollection *> &actionCollection, QWidget *parent, bool createDummyFilter)
: QDialog(parent)
, mFilter(nullptr)
, mDoNotClose(false)
, mIgnoreFilterUpdates(true)
{
setWindowTitle(i18nc("@title:window", "Filter Rules"));
QVBoxLayout *mainLayout = new QVBoxLayout(this);
......
......@@ -248,7 +248,7 @@ protected:
QPushButton *mRunNow = nullptr;
QPushButton *mApplyButton = nullptr;
bool mDoNotClose = false;
bool mIgnoreFilterUpdates = false;
bool mIgnoreFilterUpdates = true;
};
}
......
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