Rework startup and Application-Engine relation

- Application and Engine will be started by __init__.run() independently
- Exiting app will disconnect clients
- Signals like SIGINT (Ctrl-C) are now handled for proper exit
This commit is contained in:
miruka
2019-05-01 01:23:38 -04:00
parent 5ad13aed7d
commit 12ce4cdb30
8 changed files with 72 additions and 55 deletions

View File

@@ -85,6 +85,13 @@ class ClientManager(QObject):
client.logout()
@pyqtSlot()
def deleteAll(self) -> None:
for user_id in self.clients.copy():
self.delete(user_id)
print("deleted", user_id, self.clients)
@pyqtProperty(str, constant=True)
def defaultDeviceName(self) -> str: # pylint: disable=no-self-use
os_ = f" on {platform.system()}".rstrip()