mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 18:53:23 -03:00
qt: Also log and print messages or questions like bitcoind
This commit is contained in:
parent
dd031e3839
commit
fa7e9694e1
2 changed files with 8 additions and 3 deletions
|
@ -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. */
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue