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)