added special sauce (ise some internal QF3 classes) when compiling into QF3 widget library! ... Basically we use QuickFit's native QFTemporaryFile instead of the QT standard QTemporary file. This allows to change the temporary file folder!

This commit is contained in:
kriegerj 2015-08-04 17:38:29 +02:00
parent 6bb09bf212
commit d29c9da003

View File

@ -45,6 +45,9 @@
#include <QFileDialog> #include <QFileDialog>
#include <QInputDialog> #include <QInputDialog>
#include <QVBoxLayout> #include <QVBoxLayout>
#ifdef QFWIDLIB_LIBRARY
# include "qftools.h"
#endif
static QString globalUserSettigsFilename=""; static QString globalUserSettigsFilename="";
static QString globalUserSettigsPrefix=""; static QString globalUserSettigsPrefix="";
@ -2851,7 +2854,11 @@ void JKQtBasePlotter::saveImage(QString filename, bool displayPreview) {
} else if (isWithSpecialDeviceAdapter && adapterID>=0 && adapterID<jkqtpPaintDeviceAdapters.size()) { } else if (isWithSpecialDeviceAdapter && adapterID>=0 && adapterID<jkqtpPaintDeviceAdapters.size()) {
QString tempFM=""; QString tempFM="";
if (QFile::exists(fn)) { if (QFile::exists(fn)) {
#ifdef QFWIDLIB_LIBRARY
QFTemporaryFile* tf=new QFTemporaryFile();
#else
QTemporaryFile* tf=new QTemporaryFile(); QTemporaryFile* tf=new QTemporaryFile();
#endif
tf->open(); tf->open();
tempFM=tf->fileName(); tempFM=tf->fileName();
tf->close(); tf->close();
@ -3079,7 +3086,11 @@ void JKQtBasePlotter::saveAsSVG(QString filename, bool displayPreview) {
if (!fn.isEmpty()) { if (!fn.isEmpty()) {
QString tempFM=""; QString tempFM="";
if (QFile::exists(fn)) { if (QFile::exists(fn)) {
#ifdef QFWIDLIB_LIBRARY
QFTemporaryFile* tf=new QFTemporaryFile();
#else
QTemporaryFile* tf=new QTemporaryFile(); QTemporaryFile* tf=new QTemporaryFile();
#endif
tf->open(); tf->open();
tempFM=tf->fileName(); tempFM=tf->fileName();
tf->close(); tf->close();