mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
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 a2aabfb749
laanwj:
ACK a2aabfb749198bce896c9e597082acd67d3b863e
fanquake:
ACK a2aabfb749198bce896c9e597082acd67d3b863e.
Tree-SHA512: b4df300c9c00a1705b0d3a10227e3deaac19a98b0a898bb60d5a88872cf450fb131eba150d9dd6c29e021566ee04b3b86b7d486bbe28bd894743c128d2309155
This commit is contained in:
parent
feafa02be2
commit
b2f9eef0d5
@ -344,7 +344,7 @@ void BitcoinApplication::initializeResult(bool success)
|
|||||||
if(success)
|
if(success)
|
||||||
{
|
{
|
||||||
// Log this only after AppInitMain finishes, as then logging setup is guaranteed complete
|
// Log this only after AppInitMain finishes, as then logging setup is guaranteed complete
|
||||||
qWarning() << "Platform customization:" << gArgs.GetArg("-uiplatform", BitcoinGUI::DEFAULT_UIPLATFORM).c_str();
|
qInfo() << "Platform customization:" << gArgs.GetArg("-uiplatform", BitcoinGUI::DEFAULT_UIPLATFORM).c_str();
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
m_wallet_controller = new WalletController(m_node, optionsModel, this);
|
m_wallet_controller = new WalletController(m_node, optionsModel, this);
|
||||||
#ifdef ENABLE_BIP70
|
#ifdef ENABLE_BIP70
|
||||||
|
@ -296,7 +296,7 @@ static void CopySettings(QSettings& dst, const QSettings& src)
|
|||||||
/** Back up a QSettings to an ini-formatted file. */
|
/** Back up a QSettings to an ini-formatted file. */
|
||||||
static void BackupSettings(const fs::path& filename, const QSettings& src)
|
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);
|
QSettings dst(GUIUtil::boostPathToQString(filename), QSettings::IniFormat);
|
||||||
dst.clear();
|
dst.clear();
|
||||||
CopySettings(dst, src);
|
CopySettings(dst, src);
|
||||||
|
@ -493,7 +493,7 @@ void PaymentServer::LoadRootCAs(X509_STORE* _store)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
qWarning() << "PaymentServer::LoadRootCAs: Loaded " << nRootCerts << " root certificates";
|
qInfo() << "PaymentServer::LoadRootCAs: Loaded " << nRootCerts << " root certificates";
|
||||||
|
|
||||||
// Project for another day:
|
// Project for another day:
|
||||||
// Fetch certificate revocation lists, and add them to certStore.
|
// Fetch certificate revocation lists, and add them to certStore.
|
||||||
|
@ -50,7 +50,7 @@ void WinShutdownMonitor::registerShutdownBlockReason(const QString& strReason, c
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (shutdownBRCreate(mainWinId, strReason.toStdWString().c_str()))
|
if (shutdownBRCreate(mainWinId, strReason.toStdWString().c_str()))
|
||||||
qWarning() << "registerShutdownBlockReason: Successfully registered: " + strReason;
|
qInfo() << "registerShutdownBlockReason: Successfully registered: " + strReason;
|
||||||
else
|
else
|
||||||
qWarning() << "registerShutdownBlockReason: Failed to register: " + strReason;
|
qWarning() << "registerShutdownBlockReason: Failed to register: " + strReason;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user