comparison debug.cpp @ 60:73073f34a5ee

* win32 build fixes
author Chris Cannam
date Tue, 16 Nov 2010 19:53:14 +0000
parents f583e44d9d31
children 68aebc316898
comparison
equal deleted inserted replaced
59:4557da8bdee6 60:73073f34a5ee
35 static QMutex mutex; 35 static QMutex mutex;
36 static char *prefix; 36 static char *prefix;
37 mutex.lock(); 37 mutex.lock();
38 if (!debug) { 38 if (!debug) {
39 prefix = new char[20]; 39 prefix = new char[20];
40 sprintf(prefix, "[%lu]", (unsigned long)getpid()); 40 sprintf(prefix, "[%lu]", (unsigned long)QCoreApplication::applicationPid());
41 logFile = new QFile(QDir::homePath() + "/.easyhg.log"); 41 logFile = new QFile(QDir::homePath() + "/.easyhg.log");
42 if (logFile->open(QIODevice::WriteOnly | QIODevice::Append)) { 42 if (logFile->open(QIODevice::WriteOnly | QIODevice::Append)) {
43 QDebug(QtDebugMsg) << (const char *)prefix 43 QDebug(QtDebugMsg) << (const char *)prefix
44 << "Opened debug log file " 44 << "Opened debug log file "
45 << logFile->fileName(); 45 << logFile->fileName();