forked from Public/monero-gui
qt: implement FutureScheduler, always await async code to complete
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include <QPointer>
|
||||
#include <QWaitCondition>
|
||||
#include <QMutex>
|
||||
#include "qt/FutureScheduler.h"
|
||||
#include "NetworkType.h"
|
||||
|
||||
class Wallet;
|
||||
@@ -151,7 +152,7 @@ public:
|
||||
Q_INVOKABLE bool localDaemonSynced() const;
|
||||
Q_INVOKABLE bool isDaemonLocal(const QString &daemon_address) const;
|
||||
|
||||
Q_INVOKABLE void miningStatusAsync() const;
|
||||
Q_INVOKABLE void miningStatusAsync();
|
||||
Q_INVOKABLE bool startMining(const QString &address, quint32 threads, bool backgroundMining, bool ignoreBattery);
|
||||
Q_INVOKABLE bool stopMining();
|
||||
|
||||
@@ -175,7 +176,7 @@ public:
|
||||
Q_INVOKABLE bool parse_uri(const QString &uri, QString &address, QString &payment_id, uint64_t &amount, QString &tx_description, QString &recipient_name, QVector<QString> &unknown_parameters, QString &error) const;
|
||||
Q_INVOKABLE QVariantMap parse_uri_to_object(const QString &uri) const;
|
||||
Q_INVOKABLE bool saveQrCode(const QString &, const QString &) const;
|
||||
Q_INVOKABLE void checkUpdatesAsync(const QString &software, const QString &subdir) const;
|
||||
Q_INVOKABLE void checkUpdatesAsync(const QString &software, const QString &subdir);
|
||||
Q_INVOKABLE QString checkUpdates(const QString &software, const QString &subdir) const;
|
||||
|
||||
// clear/rename wallet cache
|
||||
@@ -200,6 +201,7 @@ private:
|
||||
friend class WalletPassphraseListenerImpl;
|
||||
|
||||
explicit WalletManager(QObject *parent = 0);
|
||||
~WalletManager();
|
||||
|
||||
bool isMining() const;
|
||||
|
||||
@@ -212,6 +214,8 @@ private:
|
||||
QMutex m_mutex_pass;
|
||||
QString m_passphrase;
|
||||
bool m_passphrase_abort;
|
||||
|
||||
FutureScheduler m_scheduler;
|
||||
};
|
||||
|
||||
#endif // WALLETMANAGER_H
|
||||
|
||||
Reference in New Issue
Block a user