diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-04-16 19:18:25 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-04-16 19:18:25 +0200 |
commit | 249984f4f93fe6fae81391f474e4d64ad9df3d6d (patch) | |
tree | 27762badaed1e1bee8293ae04e85d30270f4866e /src/qt/walletcontroller.cpp | |
parent | d1b3dfb275fd98e37cfe8a0f7cea7d03595af2e8 (diff) | |
download | bitcoin-249984f4f93fe6fae81391f474e4d64ad9df3d6d.tar.xz |
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.
Diffstat (limited to 'src/qt/walletcontroller.cpp')
-rw-r--r-- | src/qt/walletcontroller.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qt/walletcontroller.cpp b/src/qt/walletcontroller.cpp index b025bb367c..d27ddf1aba 100644 --- a/src/qt/walletcontroller.cpp +++ b/src/qt/walletcontroller.cpp @@ -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()); |