mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-06 07:37:25 -04:00
DaemonManager: async stop, simple mode wizard - show splash on stop
This commit is contained in:
@@ -153,21 +153,19 @@ bool DaemonManager::start(const QString &flags, NetworkType::Type nettype, const
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DaemonManager::stop(NetworkType::Type nettype)
|
||||
void DaemonManager::stopAsync(NetworkType::Type nettype, const QJSValue& callback)
|
||||
{
|
||||
QString message;
|
||||
sendCommand({"exit"}, nettype, message);
|
||||
qDebug() << message;
|
||||
const auto feature = m_scheduler.run([this, nettype] {
|
||||
QString message;
|
||||
sendCommand({"exit"}, nettype, message);
|
||||
|
||||
// Start stop watcher - Will kill if not shutting down
|
||||
m_scheduler.run([this, nettype] {
|
||||
if (stopWatcher(nettype))
|
||||
{
|
||||
emit daemonStopped();
|
||||
}
|
||||
});
|
||||
return QJSValueList({stopWatcher(nettype)});
|
||||
}, callback);
|
||||
|
||||
return true;
|
||||
if (!feature.first)
|
||||
{
|
||||
QJSValue(callback).call(QJSValueList({false}));
|
||||
}
|
||||
}
|
||||
|
||||
bool DaemonManager::startWatcher(NetworkType::Type nettype) const
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
static DaemonManager * instance(const QStringList *args);
|
||||
|
||||
Q_INVOKABLE bool start(const QString &flags, NetworkType::Type nettype, const QString &dataDir = "", const QString &bootstrapNodeAddress = "", bool noSync = false);
|
||||
Q_INVOKABLE bool stop(NetworkType::Type nettype);
|
||||
Q_INVOKABLE void stopAsync(NetworkType::Type nettype, const QJSValue& callback);
|
||||
|
||||
Q_INVOKABLE bool noSync() const noexcept;
|
||||
// return true if daemon process is started
|
||||
|
||||
Reference in New Issue
Block a user