Skip to content
Snippets Groups Projects
Commit 9606c818 authored by Lasse Holmstedt's avatar Lasse Holmstedt
Browse files

Sorting for runnable qml files alphabetically

parent a1f7e462
No related branches found
No related tags found
No related merge requests found
......@@ -151,6 +151,11 @@ uint QmlProjectRunConfiguration::debugServerPort() const
return m_debugServerPort;
}
static bool caseInsensitiveLessThan(const QString &s1, const QString &s2)
{
return s1.toLower() < s2.toLower();
}
QWidget *QmlProjectRunConfiguration::configurationWidget()
{
QWidget *config = new QWidget;
......@@ -165,7 +170,10 @@ QWidget *QmlProjectRunConfiguration::configurationWidget()
int currentIndex = -1;
foreach (const QString &fn, qmlTarget()->qmlProject()->files()) {
QStringList sortedFiles = qmlTarget()->qmlProject()->files();
qStableSort(sortedFiles.begin(), sortedFiles.end(), caseInsensitiveLessThan);
foreach (const QString &fn, sortedFiles) {
QFileInfo fileInfo(fn);
if (fileInfo.suffix() != QLatin1String("qml"))
continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment