Skip to content

Commit c715ff5

Browse files
committed
ui: Replace some LogPrintfs with qDebug()
These are relatively unimportant messages, so don't need to be logged without -debug=ui.
1 parent 96ff9d6 commit c715ff5

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/qt/bitcoin.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
#include <boost/filesystem/operations.hpp>
3636
#include <QApplication>
37+
#include <QDebug>
3738
#include <QLibraryInfo>
3839
#include <QLocale>
3940
#include <QMessageBox>
@@ -237,7 +238,7 @@ void BitcoinCore::initialize()
237238
{
238239
try
239240
{
240-
LogPrintf("Running AppInit2 in thread\n");
241+
qDebug() << __func__ << ": Running AppInit2 in thread";
241242
int rv = AppInit2(threadGroup);
242243
if(rv)
243244
{
@@ -258,11 +259,11 @@ void BitcoinCore::shutdown()
258259
{
259260
try
260261
{
261-
LogPrintf("Running Shutdown in thread\n");
262+
qDebug() << __func__ << ": Running Shutdown in thread";
262263
threadGroup.interrupt_all();
263264
threadGroup.join_all();
264265
Shutdown();
265-
LogPrintf("Shutdown finished\n");
266+
qDebug() << __func__ << ": Shutdown finished";
266267
emit shutdownResult(1);
267268
} catch (std::exception& e) {
268269
handleRunawayException(&e);
@@ -290,10 +291,10 @@ BitcoinApplication::BitcoinApplication(int &argc, char **argv):
290291

291292
BitcoinApplication::~BitcoinApplication()
292293
{
293-
LogPrintf("Stopping thread\n");
294+
qDebug() << __func__ << ": Stopping thread";
294295
emit stopThread();
295296
coreThread->wait();
296-
LogPrintf("Stopped thread\n");
297+
qDebug() << __func__ << ": Stopped thread";
297298

298299
delete window;
299300
window = 0;
@@ -355,13 +356,13 @@ void BitcoinApplication::startThread()
355356

356357
void BitcoinApplication::requestInitialize()
357358
{
358-
LogPrintf("Requesting initialize\n");
359+
qDebug() << __func__ << ": Requesting initialize";
359360
emit requestedInitialize();
360361
}
361362

362363
void BitcoinApplication::requestShutdown()
363364
{
364-
LogPrintf("Requesting shutdown\n");
365+
qDebug() << __func__ << ": Requesting shutdown";
365366
window->hide();
366367
window->setClientModel(0);
367368
pollShutdownTimer->stop();
@@ -383,7 +384,7 @@ void BitcoinApplication::requestShutdown()
383384

384385
void BitcoinApplication::initializeResult(int retval)
385386
{
386-
LogPrintf("Initialization result: %i\n", retval);
387+
qDebug() << __func__ << ": Initialization result: " << retval;
387388
// Set exit result: 0 if successful, 1 if failure
388389
returnValue = retval ? 0 : 1;
389390
if(retval)
@@ -438,7 +439,7 @@ void BitcoinApplication::initializeResult(int retval)
438439

439440
void BitcoinApplication::shutdownResult(int retval)
440441
{
441-
LogPrintf("Shutdown result: %i\n", retval);
442+
qDebug() << __func__ << ": Shutdown result: " << retval;
442443
quit(); // Exit main loop after shutdown finished
443444
}
444445

0 commit comments

Comments
 (0)