process list in order of last used
This commit is contained in:
parent
67d88c48a7
commit
b7ec42ee4e
@ -214,7 +214,7 @@ void MainWindow::LaunchProcess()
|
|||||||
{
|
{
|
||||||
QStringList savedProcesses = QString::fromUtf8(QTextFile(GAME_SAVE_FILE, QIODevice::ReadOnly).readAll()).split("\n", QString::SkipEmptyParts);
|
QStringList savedProcesses = QString::fromUtf8(QTextFile(GAME_SAVE_FILE, QIODevice::ReadOnly).readAll()).split("\n", QString::SkipEmptyParts);
|
||||||
savedProcesses.removeDuplicates();
|
savedProcesses.removeDuplicates();
|
||||||
savedProcesses.sort(Qt::CaseInsensitive);
|
std::reverse(savedProcesses.begin(), savedProcesses.end());
|
||||||
savedProcesses.push_back(SEARCH_GAME);
|
savedProcesses.push_back(SEARCH_GAME);
|
||||||
std::wstring process = S(QInputDialog::getItem(this, SELECT_PROCESS, "", savedProcesses, 0, true, &ok, Qt::WindowCloseButtonHint));
|
std::wstring process = S(QInputDialog::getItem(this, SELECT_PROCESS, "", savedProcesses, 0, true, &ok, Qt::WindowCloseButtonHint));
|
||||||
if (!ok) return;
|
if (!ok) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user