diff --git a/vendor/DOtherSide/lib/include/DOtherSide/DOtherSide.h b/vendor/DOtherSide/lib/include/DOtherSide/DOtherSide.h index 2a0d43fb17..e9536be676 100644 --- a/vendor/DOtherSide/lib/include/DOtherSide/DOtherSide.h +++ b/vendor/DOtherSide/lib/include/DOtherSide/DOtherSide.h @@ -105,7 +105,7 @@ DOS_API DosQNetworkConfigurationManager *DOS_CALL dos_qncm_create(); DOS_API void DOS_CALL dos_qncm_delete(DosQNetworkConfigurationManager *vptr); -DOS_API char * DOS_CALL dos_image_resizer(char* imagePath, int maxSize); +DOS_API char * DOS_CALL dos_image_resizer(char* imagePath, int maxSize, char* tmpDirPath); /// \brief Sets the application icon DOS_API void DOS_CALL dos_qapplication_icon(const char *filename); diff --git a/vendor/DOtherSide/lib/src/DOtherSide.cpp b/vendor/DOtherSide/lib/src/DOtherSide.cpp index 78bf03209b..c31198388e 100644 --- a/vendor/DOtherSide/lib/src/DOtherSide.cpp +++ b/vendor/DOtherSide/lib/src/DOtherSide.cpp @@ -1117,9 +1117,7 @@ void dos_qncm_delete(::DosQNetworkConfigurationManager *vptr) delete ncm; } -#include "DOtherSide.moc" - -char *dos_image_resizer(char* imagePath, int maxSize) +char *dos_image_resizer(char* imagePath, int maxSize, char* tmpDirPath) { QImage img(imagePath); img.setColorSpace(QColorSpace::SRgb); @@ -1129,7 +1127,7 @@ char *dos_image_resizer(char* imagePath, int maxSize) QPixmap pixmap; pixmap = pixmap.fromImage(img.scaled(maxSize < w ? maxSize : w, maxSize < h ? maxSize : h, Qt::KeepAspectRatio, Qt::SmoothTransformation)); - auto newFilePath = QDir::tempPath() + "/" + QUuid::createUuid().toString() + ".jpg"; + auto newFilePath = tmpDirPath + QUuid::createUuid().toString(QUuid::WithoutBraces) + ".jpg"; QFile file(newFilePath); file.open(QIODevice::WriteOnly);