ProjectExplorer: Employ FuzzyMatcher in run config creation dialog

... when filtering the candidates.

Change-Id: Ia95475ae3ee2a6eab2c9551ed22f97a9540d3503
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
Christian Kandeler
2024-02-29 15:54:21 +01:00
parent d6eb041e6d
commit dfb685d64c

View File

@@ -9,6 +9,7 @@
#include <utils/itemviews.h>
#include <utils/fancylineedit.h>
#include <utils/fuzzymatcher.h>
#include <utils/qtcassert.h>
#include <utils/treemodel.h>
@@ -129,7 +130,7 @@ AddRunConfigDialog::AddRunConfigDialog(Target *target, QWidget *parent)
buttonBox->button(QDialogButtonBox::Ok)->setText(Tr::tr("Create"));
connect(filterEdit, &FancyLineEdit::textChanged, this, [proxyModel](const QString &text) {
proxyModel->setFilterRegularExpression(QRegularExpression(text, QRegularExpression::CaseInsensitiveOption));
proxyModel->setFilterRegularExpression(FuzzyMatcher::createRegExp(text));
});
connect(m_view, &TreeView::doubleClicked, this, [this] { accept(); });
const auto updateOkButton = [buttonBox, this] {