Skip to content
Snippets Groups Projects
Commit ac702392 authored by Kai Koehne's avatar Kai Koehne
Browse files

QmlDesigner: Move log files to /tmp (Mac OS X)

parent 2a0d9b2e
No related branches found
No related tags found
No related merge requests found
...@@ -67,17 +67,12 @@ ViewLogger::ViewLogger(QObject *parent) ...@@ -67,17 +67,12 @@ ViewLogger::ViewLogger(QObject *parent)
: AbstractView(parent) : AbstractView(parent)
{ {
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
const QLatin1String logPath("Library/Logs/Bauhaus"); const QString tempPath = "/tmp";
QDir logDir(QDir::homePath());
logDir.mkpath(logPath);
const QString tempPath = QDir::homePath() + QDir::separator() + logPath;
#else #else
const QString tempPath = QDir::tempPath(); const QString tempPath = QDir::tempPath();
#endif #endif
QTemporaryFile *temporaryFile = new QTemporaryFile(tempPath + QString("/bauhaus-logger-%1-XXXXXX.txt").arg(QDateTime::currentDateTime().toString(Qt::ISODate).replace(":", "-")), this); QTemporaryFile *temporaryFile = new QTemporaryFile(tempPath + QString("/bauhaus-logger-%1-XXXXXX.txt").arg(QDateTime::currentDateTime().toString(Qt::ISODate).replace(":", "-")), this);
QString tempFileName = tempPath + QString("/bauhaus-logger-%1-XXXXXX.txt").arg(QDateTime::currentDateTime().toString(Qt::ISODate).replace(':', '-'));
temporaryFile->setAutoRemove(false); temporaryFile->setAutoRemove(false);
if (temporaryFile->open()) { if (temporaryFile->open()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment