From ff175e399e7cf34cf11047b6cd0fb5014ee8ecd8 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Fri, 24 Dec 2021 11:53:24 +0600 Subject: [PATCH] Fix screenshots --- src/qt/qt_platform.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index d33ba24ac..8d30ab5df 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -283,14 +284,9 @@ plat_tempfile(char *bufp, char *prefix, char *suffix) name.append(QString("%1-").arg(prefix)); } - name.append("XXXXXX"); - - if (suffix != nullptr) { - name.append(suffix); - } - QTemporaryFile temp(name); - QByteArray buf(bufp); - buf = temp.fileName().toUtf8(); + name.append(QDateTime::currentDateTime().toString("yyyyMMdd-hhmmss-zzzz")); + if (suffix) name.append(suffix); + sprintf(&bufp[strlen(bufp)], "%s", name.toUtf8().data()); } void plat_remove(char* path)