Fix #18835, I hope :)
qt: Fix OpenWalletActivity::open() #18883
pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:200505-fix-win changing 2 files +2 −2-
hebasto commented at 8:54 AM on May 5, 2020: member
-
qt: Fix OpenWalletActivity::open() a6b7248949
- fanquake added the label GUI on May 5, 2020
-
in src/qt/walletcontroller.cpp:311 in a6b7248949
307 | @@ -308,6 +308,6 @@ void OpenWalletActivity::open(const std::string& path) 308 | 309 | if (wallet) m_wallet_model = m_wallet_controller->getOrCreateWallet(std::move(wallet)); 310 | 311 | - QTimer::singleShot(0, this, &OpenWalletActivity::finish); 312 | + QMetaObject::invokeMethod(this, "finish", Qt::QueuedConnection);
promag commented at 9:48 AM on May 5, 2020:What is the idea? AFAIK
singleShotdoes a queued connection too.
hebasto commented at 9:52 AM on May 5, 2020:What is the idea? AFAIK
singleShotdoes a queued connection too.I thought so too. But careful reading https://doc.qt.io/qt-5/qtimer.html didn't point a such statement.
hebasto commented at 9:54 AM on May 5, 2020:Also I'm curious why only windows reveals this bug?
promag commented at 1:49 PM on May 5, 2020: memberConcept ACK. This will go away once we use latest
invokeMethodthat support pointer to member or lambda.Looks like
QTimer::singleShotchanged after 5.9.7:- https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/kernel/qtimer.cpp?h=v5.9.7#n342
- https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/kernel/qtimer.cpp#n344
The change in this PR does what latest
singleShotdoes so I'd say this should fix the problem.I'd improve this PR by
- assert
invokeMethodresult; - do the same in
CreateWalletActivity::createWallet().
hebasto closed this on May 11, 2020hebasto deleted the branch on May 11, 2020DrahtBot locked this on Feb 15, 2022
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 06:14 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 06:14 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me