- Bugfix:
- Avoid unnecesary font reaload - Avoid innecesary counter process - Log now make one file per execution
This commit is contained in:
parent
5b47c73cce
commit
e6c0768e51
5 changed files with 285 additions and 271 deletions
16
src/main.cpp
16
src/main.cpp
|
@ -43,13 +43,21 @@ void MessageHandler(QtMsgType type, const char *msg)
|
|||
}
|
||||
if (!initMessageHandler)
|
||||
{
|
||||
QDir dir;
|
||||
if (!dir.exists("log"))
|
||||
{
|
||||
if (!dir.mkdir("log"))
|
||||
{
|
||||
qDebug()<<"MessageHandler: Can not create log folder";
|
||||
return;
|
||||
}
|
||||
}
|
||||
QString filename;
|
||||
QDate date = QDate::currentDate();
|
||||
QTime time = QTime::currentTime();
|
||||
filename.append("./logs/log_");
|
||||
filename.append(date.toString("dd_MM_yy-"));
|
||||
filename.append(time.toString("hh-mm-ss"));
|
||||
filename.append(".txt");
|
||||
filename.append("./log/log_");
|
||||
filename.append(date.toString("ddMMyy-"));
|
||||
filename.append(time.toString("hhmmss.txt"));
|
||||
outFile.setFileName(filename);
|
||||
if (!outFile.open(QIODevice::WriteOnly | QIODevice::Append))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue