diff options
| author | xiphon <xiphon@protonmail.com> | 2019-08-13 12:21:47 +0000 |
|---|---|---|
| committer | xiphon <xiphon@protonmail.com> | 2019-08-13 12:21:47 +0000 |
| commit | a01ffc6e1ae24dfbabaa640d65208140fa281dbf (patch) | |
| tree | 39bc0c9aa9aa2c3629663577fff16b47cf7503f5 /src/daemon/DaemonManager.h | |
| parent | 55b4425c5db5d25e72dc9089d9ec5aac4f2c5ddf (diff) | |
| download | monzero-gui-a01ffc6e1ae24dfbabaa640d65208140fa281dbf.tar.gz monzero-gui-a01ffc6e1ae24dfbabaa640d65208140fa281dbf.tar.xz monzero-gui-a01ffc6e1ae24dfbabaa640d65208140fa281dbf.zip | |
daemon: async daemon status check, don't freeze on wallet startup
Diffstat (limited to 'src/daemon/DaemonManager.h')
| -rw-r--r-- | src/daemon/DaemonManager.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/daemon/DaemonManager.h b/src/daemon/DaemonManager.h index 6063c8cb..5a29ea64 100644 --- a/src/daemon/DaemonManager.h +++ b/src/daemon/DaemonManager.h @@ -48,7 +48,7 @@ public: Q_INVOKABLE bool stop(NetworkType::Type nettype); // return true if daemon process is started - Q_INVOKABLE bool running(NetworkType::Type nettype) const; + Q_INVOKABLE void runningAsync(NetworkType::Type nettype, const QJSValue& callback) const; // Send daemon command from qml and prints output in console window. Q_INVOKABLE bool sendCommand(const QString &cmd, NetworkType::Type nettype) const; Q_INVOKABLE void exit(); @@ -56,6 +56,7 @@ public: private: + bool running(NetworkType::Type nettype) const; bool sendCommand(const QString &cmd, NetworkType::Type nettype, QString &message) const; bool startWatcher(NetworkType::Type nettype) const; bool stopWatcher(NetworkType::Type nettype) const; @@ -82,7 +83,7 @@ private: bool m_has_daemon = true; bool m_app_exit = false; - FutureScheduler m_scheduler; + mutable FutureScheduler m_scheduler; }; #endif // DAEMONMANAGER_H |
