From f6fca1c3c5279c820be3860b0074831f920219d6 Mon Sep 17 00:00:00 2001 From: Johann Latocha Date: Wed, 1 Sep 2010 01:02:39 +0200 Subject: All printf() replaced with qDebug() --- src/util/consoleLogger.cpp | 2 +- src/util/consoleLogger.h | 2 +- src/util/util.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/util') diff --git a/src/util/consoleLogger.cpp b/src/util/consoleLogger.cpp index 5d07dbe..9189543 100755 --- a/src/util/consoleLogger.cpp +++ b/src/util/consoleLogger.cpp @@ -235,7 +235,7 @@ void ConsoleLogger::_prepareLog() if (_logFile.good()) _logFileGood = true; else - printf("ERROR: Logfile ( %s ) not accessible/found. Logs will not be available.\n", _logPath.toUtf8().data()); + qDebug("ERROR: Logfile ( %s ) not accessible/found. Logs will not be available.", qPrintable(_logPath)); _logFile.close(); } diff --git a/src/util/consoleLogger.h b/src/util/consoleLogger.h index 3a0950d..e4cb291 100644 --- a/src/util/consoleLogger.h +++ b/src/util/consoleLogger.h @@ -116,7 +116,7 @@ public: _line.push_back('\n'); // add an explicit newline char, so it looks better in the logfile //#ifndef as_daemon if (_level == LOG_TERMINAL) // may look strange here, but its quite central :-) - printf("%s\n", _line.toUtf8().data()); + qDebug("%s", qPrintable(_line)); //#endif }; LOG_LEVEL getLevel() diff --git a/src/util/util.cpp b/src/util/util.cpp index 8b25b12..05a209f 100755 --- a/src/util/util.cpp +++ b/src/util/util.cpp @@ -213,7 +213,7 @@ QString getUserName() #endif //#ifdef __WIN32__ if (username.isEmpty()) { - printf("USERNAME COULDNT BE RETRIEVED!\n"); + qDebug("USERNAME COULDNT BE RETRIEVED!"); username = QString("USERNAMEERROR"); } return username; @@ -323,7 +323,7 @@ QString readPassFromPassFile() } bool getAllowed() { - printf("Checking %s\n", getPolicyFilePath(QString(".allow")).toUtf8().data()); + qDebug("Checking %s", qPrintable(getPolicyFilePath(QString(".allow")))); TextFile file(getPolicyFilePath(".allow")); if (file.good()) // should have been checked via exists before, but better be safe { @@ -338,7 +338,7 @@ bool getAllowed() (allowed.compare(QString("TRUE")) == 0) ) return true; } - printf("...negative\n"); + qDebug("...negative"); return false; } -- cgit v1.2.3-55-g7522