From 8addc5d002b4c450d62da370a7f7f72818d5a1a9 Mon Sep 17 00:00:00 2001 From: sunerok Date: Wed, 8 Nov 2017 16:50:52 -0500 Subject: [PATCH] fix qt5 compiles for win. --- src/qt/bitcoin.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 47d65505d..7fe30c521 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -37,8 +37,8 @@ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin); #endif // Need a global reference for the notifications to find the GUI -static BitcoinGUI *guiref; -static QSplashScreen *splashref; +static BitcoinGUI *guiref = NULL; +static QSplashScreen *splashref = NULL; static void ThreadSafeMessageBox(const std::string& message, const std::string& caption, int style) { @@ -88,7 +88,11 @@ static void InitMessage(const std::string &message) { if(splashref) { - splashref->showMessage(QString::fromStdString(message), Qt::AlignVCenter|Qt::AlignHCenter, QColor(255,255,200)); + //splashref->showMessage(QString::fromStdString(message), Qt::AlignVCenter|Qt::AlignHCenter, QColor(255,255,200)); + QMetaObject::invokeMethod(splashref, "showMessage", GUIUtil::blockingGUIThreadConnection(), + Q_ARG(QString, QString::fromStdString(message)), + Q_ARG(int, Qt::AlignVCenter|Qt::AlignHCenter), + Q_ARG(const QColor &, QColor(255, 255, 200))); QApplication::instance()->processEvents(); } }