diff options
author | Johann Latocha | 2010-09-01 01:02:39 +0200 |
---|---|---|
committer | Johann Latocha | 2010-09-01 01:02:39 +0200 |
commit | f6fca1c3c5279c820be3860b0074831f920219d6 (patch) | |
tree | 66c9568114734b8a4e7fa55c1e1626f2ccefa243 /src/util | |
parent | Missing return statement (diff) | |
download | pvs-f6fca1c3c5279c820be3860b0074831f920219d6.tar.gz pvs-f6fca1c3c5279c820be3860b0074831f920219d6.tar.xz pvs-f6fca1c3c5279c820be3860b0074831f920219d6.zip |
All printf() replaced with qDebug()
Diffstat (limited to 'src/util')
-rwxr-xr-x | src/util/consoleLogger.cpp | 2 | ||||
-rw-r--r-- | src/util/consoleLogger.h | 2 | ||||
-rwxr-xr-x | src/util/util.cpp | 6 |
3 files changed, 5 insertions, 5 deletions
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; } |