mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-14 13:18:36 -05:00
Add option to set flags in FindIdxInRagne()
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user