void initDebug()
{
- QDir(dataDir).mkdir("debuglog");
+ QDir(dataDir).mkpath("debuglog");
mylogFile=new QFile(dataDir+"/debuglog/log-"+QDateTime::currentDateTime().toString("yyyy-MM-dd_hh.mm.ss.zzz")+".txt");
if(mylogFile->open(QIODevice::WriteOnly|QIODevice::Append|QIODevice::Text)){
qInstallMsgHandler(mymsghandler);
qDebug("Failed to install debuglog.");
}
-}
\ No newline at end of file
+}
}
qDebug("Loading language %s",lang.toAscii().data());
QTranslator qttrans;
- qttrans.load("qt_"+lang);
+ bool ok=qttrans.load("qt_"+lang,QApplication::applicationDirPath());
+ qDebug("...loading qt_%s ...%s",lang.toAscii().data(),ok?"ok":"failed");
app.installTranslator(&qttrans);
QTranslator mstrans;
- mstrans.load("smoke_"+lang);
+ ok=mstrans.load("smoke_"+lang,QApplication::applicationDirPath());
+ qDebug("...loading smoke_%s ...%s",lang.toAscii().data(),ok?"ok":"failed");
app.installTranslator(&mstrans);
//try to find data dir