comparison base/Debug.cpp @ 980:6e6da0636e5e tonioni

Merge from default branch
author Chris Cannam
date Tue, 09 Sep 2014 16:36:21 +0100
parents d002827b5896
children e8e6c4e7437b
comparison
equal deleted inserted replaced
954:35b05cac32d0 980:6e6da0636e5e
43 QDir logdir(QString("%1/%2").arg(pfx).arg("log")); 43 QDir logdir(QString("%1/%2").arg(pfx).arg("log"));
44 44
45 if (!prefix) { 45 if (!prefix) {
46 prefix = new char[20]; 46 prefix = new char[20];
47 sprintf(prefix, "[%lu]", (unsigned long)QCoreApplication::applicationPid()); 47 sprintf(prefix, "[%lu]", (unsigned long)QCoreApplication::applicationPid());
48 //!!! what to do if mkpath fails?
48 if (!logdir.exists()) logdir.mkpath(logdir.path()); 49 if (!logdir.exists()) logdir.mkpath(logdir.path());
49 } 50 }
50 51
51 if (!debugs.hasLocalData()) { 52 if (!debugs.hasLocalData()) {
52 QFile *logFile = new QFile(logdir.path() + "/sv-debug.log"); 53 QFile *logFile = new QFile(logdir.path() + "/sv-debug.log");