From 50f5b183f1e2ae9c8b6d6eb1b80fbe84be44ba46 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Wed, 30 Jun 2021 20:58:04 -0600 Subject: [PATCH] fix sorting of names --- GUI/extenwindow.cpp | 2 +- GUI/mainwindow.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GUI/extenwindow.cpp b/GUI/extenwindow.cpp index 07ab793..be02765 100644 --- a/GUI/extenwindow.cpp +++ b/GUI/extenwindow.cpp @@ -18,7 +18,7 @@ extern const char* EXTEN_WINDOW_INSTRUCTIONS; namespace { constexpr auto EXTEN_SAVE_FILE = u8"SavedExtensions.txt"; - constexpr auto DEFAULT_EXTENSIONS = u8"Remove Repeated Characters>Remove Repeated Phrases>Regex Filter>Copy to Clipboard>Google Translate>Extra Window>Extra Newlines>Styler"; + constexpr auto DEFAULT_EXTENSIONS = u8"Remove Repeated Characters>Regex Filter>Copy to Clipboard>Google Translate>Extra Window>Extra Newlines>Styler"; struct Extension { diff --git a/GUI/mainwindow.cpp b/GUI/mainwindow.cpp index ff408b3..e33bcc9 100644 --- a/GUI/mainwindow.cpp +++ b/GUI/mainwindow.cpp @@ -185,7 +185,7 @@ namespace processesMap.insert(fileName, processId); } } - std::sort(processIcons.begin(), processIcons.end()); + std::sort(processIcons.begin(), processIcons.end(), [](auto one, auto two) { return QString::compare(one.first, two.first, Qt::CaseInsensitive) < 0; }); AttachProcessDialog attachProcessDialog(This, processIcons); if (attachProcessDialog.exec())