aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-12-01 13:20:30 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2015-12-01 13:20:34 +0100
commita60538bc456c107c806865f05fb09b8778b091a1 (patch)
tree9b5575b0d52327d88f504a839cb7551a4f24afa0
parent2ef5ffa59afaf9b1d30cc0c97e6b1ab2b7ab30f4 (diff)
parent6da12dff287ac08c1d8aa847794abb8e582d606c (diff)
Merge pull request #7143
6da12df qt: use QMetaObject::invokeMethod for cross-thread signaling in clientmodel (Wladimir J. van der Laan)
-rw-r--r--src/qt/clientmodel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index d36d129c1a..8149dfdf5a 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -253,7 +253,10 @@ static void BlockTipChanged(ClientModel *clientmodel, bool initialSync, const CB
// if we are in-sync, update the UI regardless of last update time
if (!initialSync || now - nLastBlockTipUpdateNotification > MODEL_UPDATE_DELAY) {
//pass a async signal to the UI thread
- Q_EMIT clientmodel->numBlocksChanged(pIndex->nHeight, QDateTime::fromTime_t(pIndex->GetBlockTime()), clientmodel->getVerificationProgress(pIndex));
+ QMetaObject::invokeMethod(clientmodel, "numBlocksChanged", Qt::QueuedConnection,
+ Q_ARG(int, pIndex->nHeight),
+ Q_ARG(QDateTime, QDateTime::fromTime_t(pIndex->GetBlockTime())),
+ Q_ARG(double, clientmodel->getVerificationProgress(pIndex)));
nLastBlockTipUpdateNotification = now;
}
}