Sort sockets by their names.
This commit is contained in:
parent
7e79483e1b
commit
1049a56400
|
@ -157,6 +157,7 @@ void Server::readPendingDatagrams()
|
||||||
if (!duplicate) {
|
if (!duplicate) {
|
||||||
Socket *socket = new Socket(sender, reply);
|
Socket *socket = new Socket(sender, reply);
|
||||||
sockets->push_back(socket);
|
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();
|
Q_EMIT discovered();
|
||||||
}
|
}
|
||||||
mac = reply.mid(7, 6);
|
mac = reply.mid(7, 6);
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue