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

Const'ify pointer

parent b78a3ffc
Pipeline #50565 canceled with stage
in 9 minutes and 38 seconds
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
using namespace MessageList::Core; using namespace MessageList::Core;
QuickSearchLine::QuickSearchLine(QWidget *parent) QuickSearchLine::QuickSearchLine(QWidget *parent)
: QWidget(parent) : QWidget(parent)
, mSearchEdit(new SearchLineStatus(this))
, mTagFilterCombo(new QComboBox(this))
{ {
auto vbox = new QVBoxLayout(this); auto vbox = new QVBoxLayout(this);
vbox->setContentsMargins({}); vbox->setContentsMargins({});
...@@ -31,7 +33,6 @@ QuickSearchLine::QuickSearchLine(QWidget *parent) ...@@ -31,7 +33,6 @@ QuickSearchLine::QuickSearchLine(QWidget *parent)
hbox->setSpacing(0); hbox->setSpacing(0);
vbox->addWidget(w); vbox->addWidget(w);
mSearchEdit = new SearchLineStatus(this);
connect(mSearchEdit, &SearchLineStatus::filterActionChanged, this, &QuickSearchLine::slotFilterActionChanged); connect(mSearchEdit, &SearchLineStatus::filterActionChanged, this, &QuickSearchLine::slotFilterActionChanged);
connect(mSearchEdit, &SearchLineStatus::searchOptionChanged, this, &QuickSearchLine::searchOptionChanged); connect(mSearchEdit, &SearchLineStatus::searchOptionChanged, this, &QuickSearchLine::searchOptionChanged);
connect(mSearchEdit, &SearchLineStatus::forceLostFocus, this, &QuickSearchLine::forceLostFocus); connect(mSearchEdit, &SearchLineStatus::forceLostFocus, this, &QuickSearchLine::forceLostFocus);
...@@ -45,7 +46,6 @@ QuickSearchLine::QuickSearchLine(QWidget *parent) ...@@ -45,7 +46,6 @@ QuickSearchLine::QuickSearchLine(QWidget *parent)
hbox->addWidget(mSearchEdit); hbox->addWidget(mSearchEdit);
// The status filter button. Will be populated later, as populateStatusFilterCombo() is virtual // The status filter button. Will be populated later, as populateStatusFilterCombo() is virtual
mTagFilterCombo = new QComboBox(this);
mTagFilterCombo->setMaximumWidth(300); mTagFilterCombo->setMaximumWidth(300);
mTagFilterCombo->setMaximumWidth(200); mTagFilterCombo->setMaximumWidth(200);
mTagFilterCombo->hide(); mTagFilterCombo->hide();
......
...@@ -74,8 +74,8 @@ private Q_SLOTS: ...@@ -74,8 +74,8 @@ private Q_SLOTS:
void slotFilterActionChanged(const QVector<Akonadi::MessageStatus> &lst); void slotFilterActionChanged(const QVector<Akonadi::MessageStatus> &lst);
private: private:
SearchLineStatus *mSearchEdit = nullptr; SearchLineStatus *const mSearchEdit;
QComboBox *mTagFilterCombo = nullptr; QComboBox *const mTagFilterCombo;
QVector<Akonadi::MessageStatus> mLstStatus; QVector<Akonadi::MessageStatus> mLstStatus;
}; };
} }
......
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