diff --git a/doorlockd/client/doorlock-client.cpp b/doorlockd/client/doorlock-client.cpp index 5762f4e..82e8906 100644 --- a/doorlockd/client/doorlock-client.cpp +++ b/doorlockd/client/doorlock-client.cpp @@ -155,11 +155,9 @@ int main(int argc, char** argv) // In normal operation, it never returns doorlock_client(hostname, port); + // This will stop the Qapplication mainWindow->hide(); - mainWindow.reset(); - - // Stop the QT application - app.quit(); + mainWindow->close(); }); // This routine will never return in normal operation @@ -167,6 +165,9 @@ int main(int argc, char** argv) clientThread.join(); + if (mainWindow) + mainWindow.reset(); + l(LogLevel::notice, "Stopping doorlock-client"); return 0; }