aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-09-06 15:21:00 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-09-06 15:19:56 -0400
commitfa7e9694e1ed5406036620d4bf0b72a2aa984578 (patch)
tree91cef228b064984748b7af293917e96417cc01f9 /src/qt
parentdd031e383975ae42b4cddd9a5bf6080ef5b46afa (diff)
qt: Also log and print messages or questions like bitcoind
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoin.cpp5
-rw-r--r--src/qt/bitcoingui.cpp6
2 files changed, 8 insertions, 3 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index f1d3074c2f..87282a961f 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -28,6 +28,7 @@
#include <interfaces/handler.h>
#include <interfaces/node.h>
+#include <noui.h>
#include <rpc/server.h>
#include <ui_interface.h>
#include <uint256.h>
@@ -71,9 +72,9 @@ Q_DECLARE_METATYPE(bool*)
Q_DECLARE_METATYPE(CAmount)
Q_DECLARE_METATYPE(uint256)
-static void InitMessage(const std::string &message)
+static void InitMessage(const std::string& message)
{
- LogPrintf("init message: %s\n", message);
+ noui_InitMessage(message);
}
/** Translate string to current locale using Qt. */
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 632ce0750a..51aff08c42 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -31,6 +31,7 @@
#include <chainparams.h>
#include <interfaces/handler.h>
#include <interfaces/node.h>
+#include <noui.h>
#include <ui_interface.h>
#include <util.h>
@@ -1217,8 +1218,11 @@ void BitcoinGUI::showModalOverlay()
modalOverlay->toggleVisibility();
}
-static bool ThreadSafeMessageBox(BitcoinGUI *gui, const std::string& message, const std::string& caption, unsigned int style)
+static bool ThreadSafeMessageBox(BitcoinGUI* gui, const std::string& message, const std::string& caption, unsigned int style)
{
+ // Redundantly log and print message in non-gui fashion
+ noui_ThreadSafeMessageBox(message, caption, style);
+
bool modal = (style & CClientUIInterface::MODAL);
// The SECURE flag has no effect in the Qt GUI.
// bool secure = (style & CClientUIInterface::SECURE);