Use QStandardPaths::AppLocalDataLocation in the runtime to determine where to store runtime logs. Fixes #5414

This commit is contained in:
Dave Page
2020-07-11 16:32:08 +05:30
committed by Akshay Joshi
parent 29175d7ec4
commit 6855ac1d5e
4 changed files with 12 additions and 5 deletions

View File

@@ -27,7 +27,7 @@ Logger* Logger::GetLogger()
if (m_pThis == Q_NULLPTR)
{
m_pThis = new Logger();
m_sFileName = QDir::homePath() + (QString("/.%1.startup.log").arg(PGA_APP_NAME)).remove(" ");
m_sFileName = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + (QString("/.%1.startup.log").arg(PGA_APP_NAME)).remove(" ");
m_Logfile = new QFile;
m_Logfile->setFileName(m_sFileName);
m_Logfile->open(QIODevice::WriteOnly | QIODevice::Text);