Fix screenshots
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QTemporaryFile>
|
#include <QTemporaryFile>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
#include <QDateTime>
|
||||||
|
|
||||||
#include <QLibrary>
|
#include <QLibrary>
|
||||||
#include <QElapsedTimer>
|
#include <QElapsedTimer>
|
||||||
@@ -283,14 +284,9 @@ plat_tempfile(char *bufp, char *prefix, char *suffix)
|
|||||||
name.append(QString("%1-").arg(prefix));
|
name.append(QString("%1-").arg(prefix));
|
||||||
}
|
}
|
||||||
|
|
||||||
name.append("XXXXXX");
|
name.append(QDateTime::currentDateTime().toString("yyyyMMdd-hhmmss-zzzz"));
|
||||||
|
if (suffix) name.append(suffix);
|
||||||
if (suffix != nullptr) {
|
sprintf(&bufp[strlen(bufp)], "%s", name.toUtf8().data());
|
||||||
name.append(suffix);
|
|
||||||
}
|
|
||||||
QTemporaryFile temp(name);
|
|
||||||
QByteArray buf(bufp);
|
|
||||||
buf = temp.fileName().toUtf8();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void plat_remove(char* path)
|
void plat_remove(char* path)
|
||||||
|
Reference in New Issue
Block a user