added date/time to attachment file names, so the images are sorted correctly
This commit is contained in:
@@ -215,9 +215,12 @@ class Screenshot: public Command {
|
|||||||
throw DirectoryCannotBeCreated(target);
|
throw DirectoryCannotBeCreated(target);
|
||||||
QCoreApplication::processEvents();
|
QCoreApplication::processEvents();
|
||||||
QString filename(target+QDir::separator()+
|
QString filename(target+QDir::separator()+
|
||||||
QString("%1-%2-%3.html")
|
QString("%4-%1-%2-%3.html")
|
||||||
.arg(base)
|
.arg(base)
|
||||||
.arg(line, 4, 10, QChar('0')).arg(name));
|
.arg(line, 4, 10, QChar('0'))
|
||||||
|
.arg(name)
|
||||||
|
.arg(QDateTime::currentDateTime()
|
||||||
|
.toString("yyyyMMddHHmmss")));
|
||||||
QFile file(filename);
|
QFile file(filename);
|
||||||
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
|
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
|
||||||
throw CannotWriteSouceHTML(filename);
|
throw CannotWriteSouceHTML(filename);
|
||||||
@@ -240,9 +243,12 @@ class Screenshot: public Command {
|
|||||||
throw DirectoryCannotBeCreated(target);
|
throw DirectoryCannotBeCreated(target);
|
||||||
QCoreApplication::processEvents();
|
QCoreApplication::processEvents();
|
||||||
QString filename(target+QDir::separator()+
|
QString filename(target+QDir::separator()+
|
||||||
QString("%1-%2-%3.png")
|
QString("%4-%1-%2-%3.png")
|
||||||
.arg(base)
|
.arg(base)
|
||||||
.arg(line, 4, 10, QChar('0')).arg(name));
|
.arg(line, 4, 10, QChar('0'))
|
||||||
|
.arg(name)
|
||||||
|
.arg(QDateTime::currentDateTime()
|
||||||
|
.toString("yyyyMMddHHmmss")));
|
||||||
if (!image.save(filename)) throw CannotWriteScreenshot(filename);
|
if (!image.save(filename)) throw CannotWriteScreenshot(filename);
|
||||||
return QDir(filename).absolutePath();
|
return QDir(filename).absolutePath();
|
||||||
}
|
}
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="_url">
|
<widget class="QLineEdit" name="_url">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>http://web9t.int.swisssign.net/joomla</string>
|
<string>https://</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Reference in New Issue
Block a user