Commit 32b7adcf authored by Laurent Montel's avatar Laurent Montel 😁

Fix search account type

parent 82c595a4
Pipeline #40008 failed with stage
in 60 minutes and 3 seconds
...@@ -31,6 +31,7 @@ public: ...@@ -31,6 +31,7 @@ public:
} }
void readConfig(); void readConfig();
void writeConfig() const; void writeConfig() const;
void slotSearchAgentType(const QString &str);
AgentTypeWidget *Widget = nullptr; AgentTypeWidget *Widget = nullptr;
AgentType agentType; AgentType agentType;
AgentTypeDialog * const q; AgentTypeDialog * const q;
...@@ -51,6 +52,11 @@ void AgentTypeDialog::Private::readConfig() ...@@ -51,6 +52,11 @@ void AgentTypeDialog::Private::readConfig()
} }
} }
void AgentTypeDialog::Private::slotSearchAgentType(const QString &str)
{
Widget->agentFilterProxyModel()->setFilterRegularExpression(str);
}
AgentTypeDialog::AgentTypeDialog(QWidget *parent) AgentTypeDialog::AgentTypeDialog(QWidget *parent)
: QDialog(parent) : QDialog(parent)
, d(new Private(this)) , d(new Private(this))
...@@ -63,7 +69,9 @@ AgentTypeDialog::AgentTypeDialog(QWidget *parent) ...@@ -63,7 +69,9 @@ AgentTypeDialog::AgentTypeDialog(QWidget *parent)
QLineEdit *searchLine = new QLineEdit(this); QLineEdit *searchLine = new QLineEdit(this);
layout->addWidget(searchLine); layout->addWidget(searchLine);
searchLine->setClearButtonEnabled(true); searchLine->setClearButtonEnabled(true);
connect(searchLine, &QLineEdit::textChanged, d->Widget->agentFilterProxyModel(), &AgentFilterProxyModel::setFilterFixedString); connect(searchLine, &QLineEdit::textChanged, this, [this](const QString &str) {
d->slotSearchAgentType(str);
});
layout->addWidget(d->Widget); layout->addWidget(d->Widget);
......
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