diff --git a/.gitignore b/.gitignore index 376b525..de8ccce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ src/mainwindow.cpp.autosave -/QtSerialMonitor/src/QtSerialMonitor.pro.user +src/QtSerialMonitor.pro.user +src/QtSerialMonitor.pro.user.* /build/* /build* diff --git a/src/QtSerialMonitor.pro.user.73d0443 b/src/QtSerialMonitor.pro.user.73d0443 deleted file mode 100755 index e43cf19..0000000 --- a/src/QtSerialMonitor.pro.user.73d0443 +++ /dev/null @@ -1,317 +0,0 @@ - - - - - - EnvironmentId - {73d0443f-203e-4f58-b978-acb355f8bc3d} - - - ProjectExplorer.Project.ActiveTarget - 0 - - - ProjectExplorer.Project.EditorSettings - - true - false - true - - Cpp - - CppGlobal - - - - QmlJS - - QmlJSGlobal - - - 2 - UTF-8 - false - 4 - false - 80 - true - true - 1 - true - false - 0 - true - true - 0 - 8 - true - 1 - true - true - true - false - - - - ProjectExplorer.Project.PluginSettings - - - true - - - - ProjectExplorer.Project.Target.0 - - Desktop Qt 5.13.2 GCC 64bit - Desktop Qt 5.13.2 GCC 64bit - qt.qt5.5132.gcc_64_kit - 1 - 0 - 0 - - /home/michal/Pulpit/Projekty/Software/Software [Qt]/Build - - - true - QtProjectManager.QMakeBuildStep - true - - false - false - false - - - true - Qt4ProjectManager.MakeStep - - false - - - false - - 2 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - true - Qt4ProjectManager.MakeStep - - true - clean - - false - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - Debug - Qt4ProjectManager.Qt4BuildConfiguration - 2 - - - /home/michal/Pulpit/Projekty/Software/Software [Qt]/Build - - - true - QtProjectManager.QMakeBuildStep - false - - false - false - true - - - true - Qt4ProjectManager.MakeStep - - false - - - false - - 2 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - true - Qt4ProjectManager.MakeStep - - true - clean - - false - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - Release - Qt4ProjectManager.Qt4BuildConfiguration - 0 - - - /home/michal/Pulpit/Projekty/Software/Software [Qt]/Git/QtSerialMonitor/build-QtSerialMonitor-Desktop_Qt_5_13_2_GCC_64bit-Profile - - - true - QtProjectManager.QMakeBuildStep - true - - false - true - true - - - true - Qt4ProjectManager.MakeStep - - false - - - false - - 2 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - true - Qt4ProjectManager.MakeStep - - true - clean - - false - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - Profilowanie - Qt4ProjectManager.Qt4BuildConfiguration - 0 - - 3 - - - 0 - Deploy - Deploy - ProjectExplorer.BuildSteps.Deploy - - 1 - ProjectExplorer.DefaultDeployConfiguration - - 1 - - - dwarf - - cpu-cycles - - - 250 - - -e - cpu-cycles - --call-graph - dwarf,4096 - -F - 250 - - -F - true - 4096 - false - false - 1000 - - true - - false - false - false - false - true - 0.01 - 10 - true - kcachegrind - 1 - 25 - - 1 - true - false - true - valgrind - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - - 2 - - Qt4ProjectManager.Qt4RunConfiguration:/home/michal/Pulpit/Projekty/Software/Software [Qt]/Git/QtSerialMonitor/src/QtSerialMonitor.pro - /home/michal/Pulpit/Projekty/Software/Software [Qt]/Git/QtSerialMonitor/src/QtSerialMonitor.pro - - false - - false - true - true - false - false - true - - /home/michal/Pulpit/Projekty/Software/Software [Qt]/Build - - 1 - - - - ProjectExplorer.Project.TargetCount - 1 - - - ProjectExplorer.Project.Updater.FileVersion - 22 - - - Version - 22 - - diff --git a/src/QtSerialMonitor.pro.user.883ae79 b/src/QtSerialMonitor.pro.user.883ae79 deleted file mode 100755 index dfa9f26..0000000 --- a/src/QtSerialMonitor.pro.user.883ae79 +++ /dev/null @@ -1,267 +0,0 @@ - - - - - - EnvironmentId - {883ae798-f6ef-4967-af11-49efb492c293} - - - ProjectExplorer.Project.ActiveTarget - 0 - - - ProjectExplorer.Project.EditorSettings - - true - false - true - - Cpp - - CppGlobal - - - - QmlJS - - QmlJSGlobal - - - 2 - UTF-8 - false - 4 - false - 80 - true - true - 1 - false - true - false - 0 - true - true - 0 - 8 - true - false - 1 - true - true - true - *.md, *.MD, Makefile - false - true - - - - ProjectExplorer.Project.PluginSettings - - - true - false - true - true - true - true - - - 0 - true - - true - Builtin.Questionable - - false - true - Builtin.DefaultTidyAndClazy - 4 - - - - true - - - - - ProjectExplorer.Project.Target.0 - - Desktop - Desktop - Desktop - {e6abe754-0836-40a0-9873-aba543b0bebe} - 0 - 0 - 0 - - 0 - /home/michal/Pulpit/Projekty/Git/QtSerialMonitor/build - /home/michal/Pulpit/Projekty/Git/QtSerialMonitor/build - - - true - QtProjectManager.QMakeBuildStep - false - - - - true - Qt4ProjectManager.MakeStep - - 2 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - true - Qt4ProjectManager.MakeStep - clean - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - - Debug - Qt4ProjectManager.Qt4BuildConfiguration - 2 - - - /home/michal/Pulpit/Projekty/Git/BUILD/Release - /home/michal/Pulpit/Projekty/Git/BUILD/Release - - - true - QtProjectManager.QMakeBuildStep - false - - - - true - Qt4ProjectManager.MakeStep - - 2 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - true - Qt4ProjectManager.MakeStep - clean - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - - Release - Qt4ProjectManager.Qt4BuildConfiguration - 0 - 0 - - - 0 - /home/michal/Pulpit/Projekty/Git/QtSerialMonitor/QtSerialMonitor/build-QtSerialMonitor-Desktop-Profile - /home/michal/Pulpit/Projekty/Git/QtSerialMonitor/QtSerialMonitor/build-QtSerialMonitor-Desktop-Profile - - - true - QtProjectManager.QMakeBuildStep - true - - - - true - Qt4ProjectManager.MakeStep - - 2 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - true - Qt4ProjectManager.MakeStep - clean - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - - Profile - Qt4ProjectManager.Qt4BuildConfiguration - 0 - 0 - 0 - - 3 - - - 0 - Deploy - Deploy - ProjectExplorer.BuildSteps.Deploy - - 1 - - false - ProjectExplorer.DefaultDeployConfiguration - - 1 - - dwarf - - cpu-cycles - - -F - true - true - true - - 2 - - Qt4ProjectManager.Qt4RunConfiguration:/home/michal/Pulpit/Projekty/Git/QtSerialMonitor/QtSerialMonitor/src/QtSerialMonitor.pro - /home/michal/Pulpit/Projekty/Git/QtSerialMonitor/QtSerialMonitor/src/QtSerialMonitor.pro - false - true - true - false - true - /home/michal/Pulpit/Projekty/Git/QtSerialMonitor/build - - 1 - - - - ProjectExplorer.Project.TargetCount - 1 - - - ProjectExplorer.Project.Updater.FileVersion - 22 - - - Version - 22 - - diff --git a/src/QtSerialMonitor.pro.user.a02a82f b/src/QtSerialMonitor.pro.user.a02a82f deleted file mode 100755 index 404c56f..0000000 --- a/src/QtSerialMonitor.pro.user.a02a82f +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - EnvironmentId - {a02a82f4-189a-4916-9134-7c21f7697eac} - - - ProjectExplorer.Project.ActiveTarget - 0 - - - ProjectExplorer.Project.EditorSettings - - false - false - true - - Cpp - - CppGlobal - - - - QmlJS - - QmlJSGlobal - - - 2 - UTF-8 - false - 4 - false - 80 - true - true - 1 - false - true - false - 0 - true - true - 0 - 8 - true - false - 1 - true - true - true - *.md, *.MD, Makefile - true - true - - - - ProjectExplorer.Project.PluginSettings - - - true - false - true - true - true - true - - - 0 - true - - true - Builtin.BuildSystem - - true - true - Builtin.DefaultTidyAndClazy - 6 - - - - true - - - - - ProjectExplorer.Project.Target.0 - - Desktop - Desktop - Desktop - {d0c4e711-5606-4382-96df-42e87f923a13} - 0 - 0 - 0 - - 0 - /home/michal/Pulpit/Projekty/Programy [Qt]/Git/BUILD - /home/michal/Pulpit/Projekty/Programy [Qt]/Git/BUILD - - - true - QtProjectManager.QMakeBuildStep - false - - - - true - Qt4ProjectManager.MakeStep - - 2 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - true - Qt4ProjectManager.MakeStep - clean - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - - Debug - Qt4ProjectManager.Qt4BuildConfiguration - 2 - - - /home/michal/Pulpit/Projekty/Programy [Qt]/Git/QtSerialMonitor/build-QtSerialMonitor-Desktop-Release - /home/michal/Pulpit/Projekty/Programy [Qt]/Git/QtSerialMonitor/build-QtSerialMonitor-Desktop-Release - - - true - QtProjectManager.QMakeBuildStep - false - - - - true - Qt4ProjectManager.MakeStep - - 2 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - true - Qt4ProjectManager.MakeStep - clean - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - - Release - Qt4ProjectManager.Qt4BuildConfiguration - 0 - 0 - - - 0 - /home/michal/Pulpit/Projekty/Programy [Qt]/Git/QtSerialMonitor/build-QtSerialMonitor-Desktop-Profile - /home/michal/Pulpit/Projekty/Programy [Qt]/Git/QtSerialMonitor/build-QtSerialMonitor-Desktop-Profile - - - true - QtProjectManager.QMakeBuildStep - false - - - - true - Qt4ProjectManager.MakeStep - - 2 - Build - Build - ProjectExplorer.BuildSteps.Build - - - - true - Qt4ProjectManager.MakeStep - clean - - 1 - Clean - Clean - ProjectExplorer.BuildSteps.Clean - - 2 - false - - - Profile - Qt4ProjectManager.Qt4BuildConfiguration - 0 - 0 - 0 - - 3 - - - 0 - Deploy - Deploy - ProjectExplorer.BuildSteps.Deploy - - 1 - - false - ProjectExplorer.DefaultDeployConfiguration - - 1 - - true - true - true - - 2 - - Qt4ProjectManager.Qt4RunConfiguration:/home/michal/Pulpit/Projekty/Programy [Qt]/Git/QtSerialMonitor/src/QtSerialMonitor.pro - /home/michal/Pulpit/Projekty/Programy [Qt]/Git/QtSerialMonitor/src/QtSerialMonitor.pro - false - true - true - false - true - /home/michal/Pulpit/Projekty/Programy [Qt]/Git/BUILD - - 1 - - - - ProjectExplorer.Project.TargetCount - 1 - - - ProjectExplorer.Project.Updater.FileVersion - 22 - - - Version - 22 - - diff --git a/src/logger.cpp b/src/logger.cpp index efd8f20..946f0d7 100755 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -43,7 +43,7 @@ bool Logger::beginLog(QString path, bool autoLogging, QString fileName, bool tru qDebug() << "File open"; if (autoLogging) - openFile(path + "/" + QDateTime::currentDateTime().toString("dd.MM.yyyy_hh.mm.ss.zzz_") + "Log" + fileName.right(fileName.length() - fileName.lastIndexOf('.')), truncateFile); + openFile(path + "/" + QDateTime::currentDateTimeUtc().toString("dd.MM.yyyy_hh.mm.ss.zzzZ_") + "Log" + fileName.right(fileName.length() - fileName.lastIndexOf('.')), truncateFile); else openFile(path + "/" + fileName, truncateFile); @@ -76,7 +76,7 @@ void Logger::writeLogTXTLine(QString lineToAppend, bool simplifyText) if (simplifyText) text = text.simplified(); - text = QDateTime::currentDateTime().toString("hh:mm:ss:zzz ") + text; + text = QDateTime::currentDateTimeUtc().toString("yyyy-MM-ddTHH:MM:ss.zzzZ ") + text; if (logFile != nullptr) { @@ -98,7 +98,7 @@ void Logger::writeLogTXTParsedData(QStringList labelList, QList dataList text = text.simplified(); - text = QDateTime::currentDateTime().toString("hh:mm:ss:zzz ") + text; + text = QDateTime::currentDateTimeUtc().toString("yyyy-MM-ddTHH:MM:ss.zzzZ ") + text; if (logFile != nullptr) { @@ -169,7 +169,7 @@ void Logger::writeLogCSV(QStringList labelList, QList dataList, bool add if (index >= 0 && index < dataList.count()) out << QString::number(dataList[index], 'f') + ','; else if (csvLabelsBuffer[i] == "time") - out << QTime::currentTime().toString("hh:mm:ss:zzz") + ','; + out << QDateTime::currentDateTimeUtc().toString("yyyy-MM-ddTHH:MM:ss.zzzZ") + ','; } out << "\n";