Permalink
Browse files

One more fix

  • Loading branch information...
1 parent 59478b4 commit 3482d484e1e39fdfe293aaa9ed9a6b3bb7b1cfe0 @chchwy chchwy committed Jan 11, 2017
Showing with 4 additions and 0 deletions.
  1. +4 −0 app/mainwindow2.cpp
View
@@ -575,7 +575,11 @@ bool MainWindow2::saveObject( QString strSavedFileName )
{
QDateTime dt = QDateTime::currentDateTime();
dt.setTimeSpec( Qt::UTC );
+#if QT_VERSION >= 0x050400
QDir errorLogFolder( QStandardPaths::writableLocation( QStandardPaths::AppLocalDataLocation ) );
+#else
+ QDir errorLogFolder( QStandardPaths::writableLocation( QStandardPaths::DataLocation ) );
+#endif
errorLogFolder.mkpath( "./logs" );
errorLogFolder.cd( "logs" );
QFile eLog( errorLogFolder.absoluteFilePath( QString( "error-%1.txt" ).arg( dt.toString( Qt::ISODate ) ) ) );

0 comments on commit 3482d48

Please sign in to comment.