Sort sockets by their names.

This commit is contained in:
Andrius Štikonas 2015-10-05 01:10:50 +01:00
parent 7e79483e1b
commit 1049a56400
2 changed files with 2 additions and 1 deletions

View File

@ -157,6 +157,7 @@ void Server::readPendingDatagrams()
if (!duplicate) {
Socket *socket = new Socket(sender, reply);
sockets->push_back(socket);
std::sort(sockets->begin(), sockets->end(), [](const Socket* a, const Socket* b) -> bool { return QString(a->socketName) < QString(b->socketName); });
Q_EMIT discovered();
}
mac = reply.mid(7, 6);

File diff suppressed because one or more lines are too long