diff --git a/companion/src/helpers.cpp b/companion/src/helpers.cpp index 5eca9b671..9d9345cde 100644 --- a/companion/src/helpers.cpp +++ b/companion/src/helpers.cpp @@ -1020,3 +1020,8 @@ QSet getFilesSet(const QString &path, const QStringList &filter, int ma } return result; } + +bool caseInsensitiveLessThan(const QString &s1, const QString &s2) +{ + return s1.toLower() < s2.toLower(); +} diff --git a/companion/src/helpers.h b/companion/src/helpers.h index 03c8578a4..c57cdbda6 100644 --- a/companion/src/helpers.h +++ b/companion/src/helpers.h @@ -157,4 +157,6 @@ bool isTempFileName(const QString & fileName); QString getSoundsPath(const GeneralSettings &generalSettings); QSet getFilesSet(const QString &path, const QStringList &filter, int maxLen); +bool caseInsensitiveLessThan(const QString &s1, const QString &s2); + #endif // HELPERS_H diff --git a/companion/src/modeledit/customfunctions.cpp b/companion/src/modeledit/customfunctions.cpp index 2b28ee066..f7c8d0eab 100644 --- a/companion/src/modeledit/customfunctions.cpp +++ b/companion/src/modeledit/customfunctions.cpp @@ -665,7 +665,10 @@ void CustomFunctionsPanel::populateFuncParamArmTCB(QComboBox *b, char * value, c bool added = false; QString currentvalue(value); - foreach (QString entry, paramsList) { + // Convert set into list and sort it alphabetically case insensitive + QStringList list = QStringList::fromSet(paramsList); + qSort(list.begin(), list.end(), caseInsensitiveLessThan); + foreach (QString entry, list) { b->addItem(entry); if (entry==currentvalue) { b->setCurrentIndex(b->count()-1);