forked from qt-creator/qt-creator
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:
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include <utils/itemviews.h>
|
#include <utils/itemviews.h>
|
||||||
#include <utils/fancylineedit.h>
|
#include <utils/fancylineedit.h>
|
||||||
|
#include <utils/fuzzymatcher.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/treemodel.h>
|
#include <utils/treemodel.h>
|
||||||
|
|
||||||
@@ -129,7 +130,7 @@ AddRunConfigDialog::AddRunConfigDialog(Target *target, QWidget *parent)
|
|||||||
buttonBox->button(QDialogButtonBox::Ok)->setText(Tr::tr("Create"));
|
buttonBox->button(QDialogButtonBox::Ok)->setText(Tr::tr("Create"));
|
||||||
|
|
||||||
connect(filterEdit, &FancyLineEdit::textChanged, this, [proxyModel](const QString &text) {
|
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(); });
|
connect(m_view, &TreeView::doubleClicked, this, [this] { accept(); });
|
||||||
const auto updateOkButton = [buttonBox, this] {
|
const auto updateOkButton = [buttonBox, this] {
|
||||||
|
Reference in New Issue
Block a user