gui: Make polling in ClientModel asynchronous

With this change polling runs in a different thread to prevent
disturbing the event loop.
This commit is contained in:
João Barbosa
2019-10-14 20:46:34 +01:00
parent d882f63589
commit 6b6be41c36
2 changed files with 21 additions and 14 deletions

View File

@@ -90,7 +90,8 @@ private:
PeerTableModel *peerTableModel;
BanTableModel *banTableModel;
QTimer *pollTimer;
//! A thread to interact with m_node asynchronously
QThread* const m_thread;
void subscribeToCoreSignals();
void unsubscribeFromCoreSignals();
@@ -110,7 +111,6 @@ Q_SIGNALS:
void showProgress(const QString &title, int nProgress);
public Q_SLOTS:
void updateTimer();
void updateNumConnections(int numConnections);
void updateNetworkActive(bool networkActive);
void updateAlert();