aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2019-06-24 09:15:38 +0800
committerfanquake <fanquake@gmail.com>2019-06-24 09:28:14 +0800
commitc8fee6769a106bb5fbcdd3674fd0444b01d3391c (patch)
tree79d11ba49c502e2fb16d33cd0426873dade57429
parentc1bab5052a2b3e30387edd05d7f1f4a45e24e905 (diff)
parenta2aabfb749198bce896c9e597082acd67d3b863e (diff)
downloadbitcoin-c8fee6769a106bb5fbcdd3674fd0444b01d3391c.tar.xz
Merge #16263: qt: Use qInfo() if no error occurs
a2aabfb749198bce896c9e597082acd67d3b863e Use qInfo() if no error occurs (Hennadii Stepanov) Pull request description: [Warning and Debugging Messages](https://doc.qt.io/qt-5/debug.html#warning-and-debugging-messages): > - `qInfo()` is used for informational messages. > - `qWarning()` is used to report warnings and recoverable errors in your application. > > If the `QT_FATAL_WARNINGS` environment variable is set, `qWarning()` exits after printing the warning message. This makes it easy to obtain a backtrace in the debugger. [`qWarning()`](https://doc.qt.io/qt-5/qtglobal.html#qWarning): > Calls the message handler with the warning message message... This function does nothing if `QT_NO_WARNING_OUTPUT` was defined during compilation; it exits if at the nth warning corresponding to the counter in environment variable `QT_FATAL_WARNINGS`. This PR allows more productive debugging using the environment variable `QT_FATAL_WARNINGS`. Examples: - https://github.com/bitcoin/bitcoin/pull/16118#issuecomment-503184695 - https://github.com/bitcoin/bitcoin/pull/16254#issuecomment-504223404 The behavior, when option `-debug=qt` is set/unset, remains unchanged. ACKs for commit a2aabf: promag: ACK a2aabfb, I also have this change locally. Empact: ACK https://github.com/bitcoin/bitcoin/pull/16263/commits/a2aabfb749198bce896c9e597082acd67d3b863e laanwj: ACK a2aabfb749198bce896c9e597082acd67d3b863e fanquake: ACK a2aabfb749198bce896c9e597082acd67d3b863e. Tree-SHA512: b4df300c9c00a1705b0d3a10227e3deaac19a98b0a898bb60d5a88872cf450fb131eba150d9dd6c29e021566ee04b3b86b7d486bbe28bd894743c128d2309155
-rw-r--r--src/qt/bitcoin.cpp2
-rw-r--r--src/qt/optionsmodel.cpp2
-rw-r--r--src/qt/paymentserver.cpp2
-rw-r--r--src/qt/winshutdownmonitor.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 0c232f89fe..f6ed88a1e6 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -330,7 +330,7 @@ void BitcoinApplication::initializeResult(bool success)
if(success)
{
// Log this only after AppInitMain finishes, as then logging setup is guaranteed complete
- qWarning() << "Platform customization:" << platformStyle->getName();
+ qInfo() << "Platform customization:" << platformStyle->getName();
#ifdef ENABLE_WALLET
m_wallet_controller = new WalletController(m_node, platformStyle, optionsModel, this);
#ifdef ENABLE_BIP70
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index 5b4fb4cc18..f3974b1c85 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -172,7 +172,7 @@ static void CopySettings(QSettings& dst, const QSettings& src)
/** Back up a QSettings to an ini-formatted file. */
static void BackupSettings(const fs::path& filename, const QSettings& src)
{
- qWarning() << "Backing up GUI settings to" << GUIUtil::boostPathToQString(filename);
+ qInfo() << "Backing up GUI settings to" << GUIUtil::boostPathToQString(filename);
QSettings dst(GUIUtil::boostPathToQString(filename), QSettings::IniFormat);
dst.clear();
CopySettings(dst, src);
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 43dccec4ea..c99515fe1c 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -488,7 +488,7 @@ void PaymentServer::LoadRootCAs(X509_STORE* _store)
continue;
}
}
- qWarning() << "PaymentServer::LoadRootCAs: Loaded " << nRootCerts << " root certificates";
+ qInfo() << "PaymentServer::LoadRootCAs: Loaded " << nRootCerts << " root certificates";
// Project for another day:
// Fetch certificate revocation lists, and add them to certStore.
diff --git a/src/qt/winshutdownmonitor.cpp b/src/qt/winshutdownmonitor.cpp
index 08cae76add..b177b22b3f 100644
--- a/src/qt/winshutdownmonitor.cpp
+++ b/src/qt/winshutdownmonitor.cpp
@@ -63,7 +63,7 @@ void WinShutdownMonitor::registerShutdownBlockReason(const QString& strReason, c
}
if (shutdownBRCreate(mainWinId, strReason.toStdWString().c_str()))
- qWarning() << "registerShutdownBlockReason: Successfully registered: " + strReason;
+ qInfo() << "registerShutdownBlockReason: Successfully registered: " + strReason;
else
qWarning() << "registerShutdownBlockReason: Failed to register: " + strReason;
}