Hallo Gunther,
yes there seems to be a problem with the variable% {saveddate}, strange% {savedtime} ... works
//title block variables should be updated after file save dialog is confirmed, before file is saved.
m_project_properties.addValue(
"saveddate",
QDate::currentDate().toString(
QLocale::system().toString(
QLocale::ShortFormat)));
m_project_properties.addValue("savedtime", QDateTime::currentDateTime().toString("HH:mm"));
m_project_properties.addValue("savedfilename", QFileInfo(filePath()).baseName());
m_project_properties.addValue("savedfilepath", filePath());
qetproject.cpp
//title block variables should be updated after file save as dialog is confirmed, before file is saved.
m_project_properties.addValue("saveddate", QDate::currentDate().toString("yyyy-MM-dd"));
m_project_properties.addValue("savedtime", QDateTime::currentDateTime().toString("HH:mm"));
m_project_properties.addValue("savedfilename", QFileInfo(filePath()).baseName());
m_project_properties.addValue("savedfilepath", filePath());
Edit :
If I change to it 's work
--- sources/qetproject.cpp
+++ sources/qetproject.cpp
@@ -33,6 +33,7 @@
#include "assignvariables.h"
#include <QTimer>
+#include <QDate>
#include <QStandardPaths>
#include <utility>
#include <QtConcurrent>
@@ -940,9 +941,7 @@ QETResult QETProject::write()
//title block variables should be updated after file save dialog is confirmed, before file is saved.
m_project_properties.addValue(
"saveddate",
- QDate::currentDate().toString(
- QLocale::system().toString(
- QLocale::ShortFormat)));
+ QDate::currentDate().toString("yyyy-MM-dd"));
m_project_properties.addValue("savedtime", QDateTime::currentDateTime().toString("HH:mm"));
m_project_properties.addValue("savedfilename", QFileInfo(filePath()).baseName());
m_project_properties.addValue("savedfilepath", filePath());
Strange QLocale::system().toString(
QLocale::ShortFormat))); return 1 ...
"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."