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

Fix search agent

parent ac019ae3
......@@ -54,13 +54,20 @@ ManageAccountWidget::ManageAccountWidget(QWidget *parent)
d->ui.mAccountList->view()->setSelectionMode(QAbstractItemView::SingleSelection);
connect(d->ui.mFilterAccount, &QLineEdit::textChanged, d->ui.mAccountList->agentFilterProxyModel(), &AgentFilterProxyModel::setFilterFixedString);
connect(d->ui.mFilterAccount, &QLineEdit::textChanged, this, &ManageAccountWidget::slotSearchAgentType);
d->ui.mFilterAccount->installEventFilter(this);
slotAccountSelected(d->ui.mAccountList->currentAgentInstance());
}
ManageAccountWidget::~ManageAccountWidget() = default;
void ManageAccountWidget::slotSearchAgentType(const QString &str)
{
d->ui.mAccountList->agentFilterProxyModel()->setFilterRegularExpression(str);
}
void ManageAccountWidget::disconnectAddAccountButton()
{
disconnect(d->ui.mAddAccountButton, &QPushButton::clicked, this, &ManageAccountWidget::slotAddAccount);
......
......@@ -62,6 +62,7 @@ private Q_SLOTS:
void slotModifySelectedAccount();
private:
void slotSearchAgentType(const QString &str);
QScopedPointer<ManageAccountWidgetPrivate> const d;
};
}
......
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