Commit ecd8098e authored by Laurent Montel's avatar Laurent Montel 😁

Make sure that we reset completly filter

parent c593a14b
......@@ -100,7 +100,7 @@ void QuickSearchLine::slotClearButtonClicked()
if (mTagFilterCombo->isVisible()) {
mTagFilterCombo->setCurrentIndex(0);
}
mSearchEdit->clearFilterAction();
mSearchEdit->clearFilterButtonClicked();
Q_EMIT clearButtonClicked();
}
......@@ -132,7 +132,7 @@ void QuickSearchLine::resetFilter()
if (mTagFilterCombo->isVisible()) {
mTagFilterCombo->setCurrentIndex(0);
}
mSearchEdit->clearFilterAction();
mSearchEdit->clearFilterButtonClicked();
mSearchEdit->setLocked(false);
}
......
......@@ -52,7 +52,7 @@ SearchLineStatus::SearchLineStatus(QWidget *parent)
createMenuSearch();
QAction *act = findChild<QAction *>(QLatin1String(qLineEditclearButtonActionNameC));
if (act) {
connect(act, &QAction::triggered, this, &SearchLineStatus::clearButtonClicked);
connect(act, &QAction::triggered, this, &SearchLineStatus::slotClear);
} else {
qCWarning(MESSAGELIST_LOG) << "Clear button name was changed ! Please verify qt code";
}
......@@ -63,6 +63,11 @@ SearchLineStatus::~SearchLineStatus()
}
void SearchLineStatus::slotClear()
{
Q_EMIT clearButtonClicked();
}
void SearchLineStatus::updateLockAction()
{
if (mLocked) {
......@@ -260,6 +265,7 @@ void SearchLineStatus::createFilterByAction()
void SearchLineStatus::clearFilterByAction()
{
//qDebug() << " void SearchLineStatus::clearFilterByAction()";
mSearchEveryWhereAction->setChecked(true);
}
......
......@@ -39,13 +39,13 @@ public:
void setLocked(bool b);
bool locked() const;
void clearFilterAction();
void setContainsOutboundMessages(bool containsOutboundMessages);
bool containsOutboundMessages() const;
QuickSearchLine::SearchOptions searchOptions() const;
void addCompletionItem(const QString &str);
void slotClearHistory();
void clearFilterButtonClicked();
Q_SIGNALS:
void filterActionChanged(const QList<Akonadi::MessageStatus> &lst);
void searchOptionChanged();
......@@ -57,10 +57,10 @@ protected:
private Q_SLOTS:
void slotToggledLockAction();
void showMenu();
void clearFilterButtonClicked();
void slotSearchOptionChanged();
void slotFilterActionClicked(QAction *act);
private:
void clearFilterAction();
void createFilterAction(const QIcon &icon, const QString &text, int value);
void createMenuSearch();
void updateLockAction();
......@@ -70,6 +70,7 @@ private:
void createFilterByAction();
void clearFilterByAction();
void changeSearchAgainstFromOrToText();
void slotClear();
bool mLocked;
bool mHasFilter;
......
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