From f2459a4ae81fed20194c2fa854dc7d9611dc0bf1 Mon Sep 17 00:00:00 2001 From: Patrick von Reth Date: Tue, 4 Feb 2014 15:24:25 +0100 Subject: [PATCH] only use pid in log filename if app name is not set --- src/core/log.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/log.cpp b/src/core/log.cpp index 5695bee..3ef5cd1 100644 --- a/src/core/log.cpp +++ b/src/core/log.cpp @@ -36,7 +36,7 @@ SnoreLog::SnoreLog(SnoreDebugLevels lvl): SnoreLog::~SnoreLog() { - static std::ofstream m_logg(QString("%1/libsnore/%2-%3-log.txt").arg(QDir::tempPath(), qApp->applicationName(), QString::number(qApp->applicationPid())).toUtf8().constData()); + static std::ofstream m_logg(QString("%1/libsnore/%2-log.txt").arg(QDir::tempPath(), qApp->applicationName().isEmpty()?QString::number(qApp->applicationPid()):qApp->applicationName()).toUtf8().constData()); static QMutex m_mutex; QMutexLocker lock(&m_mutex); if(debugLvl() >= m_lvl)