mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
qt: Replace GUIUtil::ObjectInvoke() with QMetaObject::invokeMethod()
The `GUIUtil::ObjectInvoke()` template function was a replacement of the `QMetaObject::invokeMethod()` functor overload which is available in Qt 5.10+. No behavior change.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <QApplication>
|
||||
#include <QMessageBox>
|
||||
#include <QMetaObject>
|
||||
#include <QMutexLocker>
|
||||
#include <QThread>
|
||||
#include <QTimer>
|
||||
@@ -135,7 +136,7 @@ WalletModel* WalletController::getOrCreateWallet(std::unique_ptr<interfaces::Wal
|
||||
// handled on the GUI event loop.
|
||||
wallet_model->moveToThread(thread());
|
||||
// setParent(parent) must be called in the thread which created the parent object. More details in #18948.
|
||||
GUIUtil::ObjectInvoke(this, [wallet_model, this] {
|
||||
QMetaObject::invokeMethod(this, [wallet_model, this] {
|
||||
wallet_model->setParent(this);
|
||||
}, GUIUtil::blockingGUIThreadConnection());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user