diff --git a/src/utils/utility.cpp b/src/utils/utility.cpp index e021fa70..b04292b6 100644 --- a/src/utils/utility.cpp +++ b/src/utils/utility.cpp @@ -1141,7 +1141,7 @@ void AddSelectionGroup(QComboBox *selection, const QStringList &group, } int FindIdxInRagne(QComboBox *list, int start, int stop, - const std::string &value) + const std::string &value, Qt::MatchFlags flags) { if (value.empty()) { return 0; @@ -1150,7 +1150,7 @@ int FindIdxInRagne(QComboBox *list, int start, int stop, auto startIdx = model->index(start, 0); auto match = model->match(startIdx, Qt::DisplayRole, QString::fromStdString(value), 1, - Qt::MatchExactly | Qt::MatchCaseSensitive); + flags); if (match.isEmpty()) { return 0; } diff --git a/src/utils/utility.hpp b/src/utils/utility.hpp index 89804a49..65888bdc 100644 --- a/src/utils/utility.hpp +++ b/src/utils/utility.hpp @@ -97,7 +97,8 @@ QMetaObject::Connection PulseWidget(QWidget *widget, QColor startColor, void SetHeightToContentHeight(QListWidget *list); void SetButtonIcon(QPushButton *button, const char *path); int FindIdxInRagne(QComboBox *list, int start, int stop, - const std::string &value); + const std::string &value, + Qt::MatchFlags = Qt::MatchExactly | Qt::MatchCaseSensitive); /* UI helpers */