From 7642433a4fafd2ccf7e8b43c81ec18282f544a3b Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 27 Mar 2015 16:45:48 +0100 Subject: Shutdown notification to achieve a clean shutdown. Otherwise the client always restarts the resource because of the lost connection. We currently require this in tests to be able to delete the db, but eventually we likely want a "disable akonadi" function that shuts resources down, and keeps clients from restarting them (e.g. via configuration). --- synchronizer/listener.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'synchronizer/listener.h') diff --git a/synchronizer/listener.h b/synchronizer/listener.h index ee73766..8dad3a4 100644 --- a/synchronizer/listener.h +++ b/synchronizer/listener.h @@ -49,7 +49,7 @@ public: } QString name; - QLocalSocket *socket; + QPointer socket; QByteArray commandBuffer; }; @@ -74,12 +74,13 @@ private Q_SLOTS: void readFromSocket(); void processClientBuffers(); void refreshRevision(); + void quit(); private: void processCommand(int commandId, uint messageId, Client &client, uint size, const std::function &callback); bool processClientBuffer(Client &client); void sendCurrentRevision(Client &client); - void sendCommandCompleted(Client &client, uint messageId); + void sendCommandCompleted(QLocalSocket *socket, uint messageId); void updateClientsWithRevision(); void loadResource(); -- cgit v1.2.3