aboutsummaryrefslogtreecommitdiff
path: root/src/qt/splashscreen.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2019-07-09 11:47:55 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2019-07-09 11:48:01 +0200
commit8046a3e0befeea641b6309bc0c742b7481e681d9 (patch)
tree3b5f07c033ea26fffcc2878def904d4b293efcbb /src/qt/splashscreen.cpp
parentc799976c86e2d65f129d106724fbefbf665d63d4 (diff)
parent64fee489448c62319e77941c30152084695b5a5d (diff)
downloadbitcoin-8046a3e0befeea641b6309bc0c742b7481e681d9.tar.xz
Merge #16348: qt: Assert QMetaObject::invokeMethod result
64fee489448c62319e77941c30152084695b5a5d qt: Assert QMetaObject::invokeMethod result (João Barbosa) f27bd96b5fdc2921d93c44bbf422bff0e979c4de gui: Fix missing qRegisterMetaType(WalletModel*) (João Barbosa) Pull request description: Invalid/wrong dynamic calls aren't verified by the compiler. This PR asserts those dynamic calls. Once we bump Qt to at least 5.10 these can be refactored to use the `invokeMethod` overload that allows connecting to lambdas or member pointers, which are compile checked. For reference, one of the overloaded versions is https://doc.qt.io/qt-5/qmetaobject.html#invokeMethod-5. ACKs for top commit: laanwj: ACK 64fee489448c62319e77941c30152084695b5a5d Tree-SHA512: d332e5d7eb2c7be5d3fe90e2e4ff20a67800b9664f6637c122a23647a964f7915703d3f086e2de440f695cfe14de268ff581d0092b7736e911952a4f4d248e25
Diffstat (limited to 'src/qt/splashscreen.cpp')
-rw-r--r--src/qt/splashscreen.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index dcb9d1923f..98eeee1a47 100644
--- a/src/qt/splashscreen.cpp
+++ b/src/qt/splashscreen.cpp
@@ -156,11 +156,12 @@ void SplashScreen::finish()
static void InitMessage(SplashScreen *splash, const std::string &message)
{
- QMetaObject::invokeMethod(splash, "showMessage",
+ bool invoked = QMetaObject::invokeMethod(splash, "showMessage",
Qt::QueuedConnection,
Q_ARG(QString, QString::fromStdString(message)),
Q_ARG(int, Qt::AlignBottom|Qt::AlignHCenter),
Q_ARG(QColor, QColor(55,55,55)));
+ assert(invoked);
}
static void ShowProgress(SplashScreen *splash, const std::string &title, int nProgress, bool resume_possible)