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

Forward signal

parent 47ccd5d9
Pipeline #64675 passed with stage
in 40 minutes and 4 seconds
......@@ -123,6 +123,7 @@ Widget::Widget(QWidget *pParent)
connect(d->quickSearchLine, &QuickSearchLine::statusButtonsClicked, this, &Widget::slotStatusButtonsClicked);
connect(d->quickSearchLine, &QuickSearchLine::forceLostFocus, this, &Widget::forceLostFocus);
connect(d->quickSearchLine, &QuickSearchLine::saveFilter, this, &Widget::slotSaveFilter);
connect(d->quickSearchLine, &QuickSearchLine::activateFilter, this, &Widget::slotActivateFilter);
g->addWidget(d->quickSearchLine, 0);
d->quickSearchWarning = new QuickSearchWarning(this);
g->addWidget(d->quickSearchWarning, 0);
......@@ -162,6 +163,11 @@ Widget::~Widget()
delete d;
}
void Widget::slotActivateFilter(Filter *f)
{
setFilter(f);
}
void Widget::slotSaveFilter(const QString &filterName)
{
if (d->mFilter) {
......
......@@ -255,6 +255,7 @@ protected Q_SLOTS:
void slotSaveFilter(const QString &filterName);
private:
void slotActivateFilter(Filter *f);
class Private;
Private *const d;
};
......
......@@ -9,6 +9,7 @@
#include "messagelistsettings.h"
#include <KStringHandler>
#include "core/filter.h"
#include "searchlinestatus.h"
#include <KLocalizedString>
......@@ -43,6 +44,7 @@ QuickSearchLine::QuickSearchLine(QWidget *parent)
connect(mSearchEdit, &QLineEdit::textChanged, this, &QuickSearchLine::slotSearchEditTextEdited);
connect(mSearchEdit, &SearchLineStatus::clearButtonClicked, this, &QuickSearchLine::slotClearButtonClicked);
connect(mSearchEdit, &SearchLineStatus::saveFilter, this, &QuickSearchLine::saveFilter);
connect(mSearchEdit, &SearchLineStatus::activateFilter, this, &QuickSearchLine::activateFilter);
hbox->addWidget(mSearchEdit);
......
......@@ -18,6 +18,7 @@ namespace MessageList
namespace Core
{
class SearchLineStatus;
class Filter;
/**
* @brief The QuickSearchLine class
* @author Laurent Montel <montel@kde.org>
......@@ -65,6 +66,7 @@ Q_SIGNALS:
void statusButtonsClicked();
void forceLostFocus();
void saveFilter(const QString &filterName);
void activateFilter(Filter *f);
protected:
bool eventFilter(QObject *object, QEvent *e) override;
......
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