miscellaneous refactors (#4521)

This commit is contained in:
ebbit1q 2022-01-16 23:58:53 +01:00 committed by GitHub
parent 994704d353
commit ae9b8b8f34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 32 additions and 50 deletions

View file

@ -206,8 +206,9 @@ Servatrice::~Servatrice()
// clients live in other threads, we need to lock them
clientsLock.lockForRead();
for (auto client : clients)
for (auto *client : clients) {
QMetaObject::invokeMethod(client, "prepareDestroy", Qt::QueuedConnection);
}
clientsLock.unlock();
// client destruction is asynchronous, wait for all clients to be gone