mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-02 07:46:07 +00:00
Sort the host list
This commit is contained in:
parent
94d821a4a9
commit
d165bf7498
@ -450,7 +450,12 @@ QVector<NvComputer*> ComputerManager::getComputers()
|
|||||||
{
|
{
|
||||||
QReadLocker lock(&m_Lock);
|
QReadLocker lock(&m_Lock);
|
||||||
|
|
||||||
return QVector<NvComputer*>::fromList(m_KnownHosts.values());
|
// Return a sorted host list
|
||||||
|
auto hosts = QVector<NvComputer*>::fromList(m_KnownHosts.values());
|
||||||
|
std::stable_sort(hosts.begin(), hosts.end(), [](const NvComputer* host1, const NvComputer* host2) {
|
||||||
|
return host1->name.toLower() < host2->name.toLower();
|
||||||
|
});
|
||||||
|
return hosts;
|
||||||
}
|
}
|
||||||
|
|
||||||
class DeferredHostDeletionTask : public QRunnable
|
class DeferredHostDeletionTask : public QRunnable
|
||||||
|
Loading…
x
Reference in New Issue
Block a user