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

Fix search agent

parent fab1255b
Pipeline #40741 canceled with stage
......@@ -124,11 +124,16 @@ AgentWidget::AgentWidget(QWidget *parent)
connect(ui.restartButton, &QPushButton::clicked, this, &AgentWidget::restartAgent);
ui.instanceWidget->agentFilterProxyModel()->setFilterCaseSensitivity(Qt::CaseInsensitive);
connect(ui.mFilterAccount, &QLineEdit::textChanged, ui.instanceWidget->agentFilterProxyModel(), &AgentFilterProxyModel::setFilterFixedString);
connect(ui.mFilterAccount, &QLineEdit::textChanged, this, &AgentWidget::slotSearchAgentType);
ui.mFilterAccount->installEventFilter(this);
ControlGui::widgetNeedsAkonadi(this);
}
void AgentWidget::slotSearchAgentType(const QString &str)
{
ui.instanceWidget->agentFilterProxyModel()->setFilterRegularExpression(str);
}
bool AgentWidget::eventFilter(QObject *obj, QEvent *event)
{
if (event->type() == QEvent::KeyPress && obj == ui.mFilterAccount) {
......
......@@ -56,6 +56,7 @@ private Q_SLOTS:
void slotDataChanged(const QModelIndex &, const QModelIndex &);
private:
void slotSearchAgentType(const QString &str);
Ui::AgentWidget ui;
QMenu *mSyncMenu, *mConfigMenu;
Akonadi::AgentInstance mCloneSource;
......
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