Skip to content

Commit c8fee67

Browse files
committed
Merge #16263: qt: Use qInfo() if no error occurs
a2aabfb 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: - bitcoin/bitcoin#16118 (comment) - bitcoin/bitcoin#16254 (comment) 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 bitcoin/bitcoin@a2aabfb laanwj: ACK a2aabfb fanquake: ACK a2aabfb. Tree-SHA512: b4df300c9c00a1705b0d3a10227e3deaac19a98b0a898bb60d5a88872cf450fb131eba150d9dd6c29e021566ee04b3b86b7d486bbe28bd894743c128d2309155
2 parents c1bab50 + a2aabfb commit c8fee67

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/qt/bitcoin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ void BitcoinApplication::initializeResult(bool success)
330330
if(success)
331331
{
332332
// Log this only after AppInitMain finishes, as then logging setup is guaranteed complete
333-
qWarning() << "Platform customization:" << platformStyle->getName();
333+
qInfo() << "Platform customization:" << platformStyle->getName();
334334
#ifdef ENABLE_WALLET
335335
m_wallet_controller = new WalletController(m_node, platformStyle, optionsModel, this);
336336
#ifdef ENABLE_BIP70

src/qt/optionsmodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ static void CopySettings(QSettings& dst, const QSettings& src)
172172
/** Back up a QSettings to an ini-formatted file. */
173173
static void BackupSettings(const fs::path& filename, const QSettings& src)
174174
{
175-
qWarning() << "Backing up GUI settings to" << GUIUtil::boostPathToQString(filename);
175+
qInfo() << "Backing up GUI settings to" << GUIUtil::boostPathToQString(filename);
176176
QSettings dst(GUIUtil::boostPathToQString(filename), QSettings::IniFormat);
177177
dst.clear();
178178
CopySettings(dst, src);

src/qt/paymentserver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ void PaymentServer::LoadRootCAs(X509_STORE* _store)
488488
continue;
489489
}
490490
}
491-
qWarning() << "PaymentServer::LoadRootCAs: Loaded " << nRootCerts << " root certificates";
491+
qInfo() << "PaymentServer::LoadRootCAs: Loaded " << nRootCerts << " root certificates";
492492

493493
// Project for another day:
494494
// Fetch certificate revocation lists, and add them to certStore.

src/qt/winshutdownmonitor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void WinShutdownMonitor::registerShutdownBlockReason(const QString& strReason, c
6363
}
6464

6565
if (shutdownBRCreate(mainWinId, strReason.toStdWString().c_str()))
66-
qWarning() << "registerShutdownBlockReason: Successfully registered: " + strReason;
66+
qInfo() << "registerShutdownBlockReason: Successfully registered: " + strReason;
6767
else
6868
qWarning() << "registerShutdownBlockReason: Failed to register: " + strReason;
6969
}

0 commit comments

Comments
 (0)