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

Minor coding style

parent 5d83f526
Pipeline #26580 failed with stage
in 13 minutes and 13 seconds
......@@ -47,7 +47,7 @@ private:
void slotUrlChanged(const QString &path);
void slotItemSelectionChanged();
Ui::SelectThunderbirdFilterFilesWidget *ui = nullptr;
Ui::SelectThunderbirdFilterFilesWidget *const ui;
};
}
#endif // SELECTTHUNDERBIRDFILTERFILESWIDGET_H
......@@ -46,10 +46,6 @@ class Q_DECL_HIDDEN FilterActionWidget::Private
public:
Private(FilterActionWidget *qq)
: q(qq)
, mComboBox(nullptr)
, mAdd(nullptr)
, mRemove(nullptr)
, mLayout(nullptr)
{
}
......@@ -65,7 +61,7 @@ public:
void slotAddWidget();
void slotRemoveWidget();
FilterActionWidget *q;
FilterActionWidget *const q;
QList<MailCommon::FilterAction *> mActionList;
QComboBox *mComboBox = nullptr;
QPushButton *mAdd = nullptr;
......@@ -273,7 +269,7 @@ public:
void regenerateActionListFromWidgets();
FilterActionWidgetLister *q;
FilterActionWidgetLister *const q;
QVector<MailCommon::FilterAction *> *mActionList = nullptr;
};
......
......@@ -59,7 +59,7 @@ public:
FilterManager *const q;
OrgFreedesktopAkonadiMailFilterAgentInterface *mMailFilterAgentInterface = nullptr;
QVector<MailCommon::MailFilter *> mFilters;
Akonadi::Monitor *mMonitor = nullptr;
Akonadi::Monitor * const mMonitor;
bool mInitialized = false;
};
......
......@@ -113,7 +113,7 @@ using namespace MailCommon;
KMFilterListBox::KMFilterListBox(const QString &title, QWidget *parent)
: QGroupBox(title, parent)
{
QVBoxLayout *layout = new QVBoxLayout();
QVBoxLayout *layout = new QVBoxLayout(this);
//----------- the list box
mListWidget = new QListWidget(this);
......@@ -202,7 +202,6 @@ KMFilterListBox::KMFilterListBox(const QString &title, QWidget *parent)
mBtnRename->setWhatsThis(i18n(_wt_filterlist_rename));
layout->addWidget(hb);
setLayout(layout);
QShortcut *shortcut = new QShortcut(this);
shortcut->setKey(Qt::Key_Delete);
......
......@@ -42,7 +42,7 @@ using namespace MailCommon;
struct InstanceStruct {
QString name;
QIcon icon;
bool isValid() const
Q_REQUIRED_RESULT bool isValid() const
{
return !name.isEmpty();
}
......
......@@ -48,7 +48,7 @@ bool SearchRuleEncryption::matches(const Akonadi::Item &item) const
}
const auto msg = item.payload<KMime::Message::Ptr>();
bool rc = (shouldBeEncrypted == CryptoUtils::isEncrypted(msg.data()));
const bool rc = (shouldBeEncrypted == CryptoUtils::isEncrypted(msg.data()));
if (FilterLog::instance()->isLogging()) {
QString msg = (rc ? QStringLiteral("<font color=#00FF00>1 = </font>")
: QStringLiteral("<font color=#FF0000>0 = </font>"));
......
......@@ -47,7 +47,7 @@ private Q_SLOTS:
void onTagsFetched(KJob *);
private:
QComboBox *mComboBox = nullptr;
QComboBox * mComboBox = nullptr;
};
FillTagComboJob::FillTagComboJob(QComboBox *combo, QObject *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