more RDR 2-awareness, some code rework
This commit is contained in:
parent
e7721404b6
commit
259e785165
10 changed files with 185 additions and 210 deletions
|
@ -36,7 +36,7 @@
|
|||
#include <QDesktopWidget>
|
||||
#endif
|
||||
|
||||
ExportThread::ExportThread(QMap<ProfileWidget*,QString> profileMap, QString exportDirectory, bool pictureCopyEnabled, bool pictureExportEnabled, int exportCount, QObject *parent) : QThread(parent),
|
||||
ExportThread::ExportThread(QHash<ProfileWidget*,QString> profileMap, QString exportDirectory, bool pictureCopyEnabled, bool pictureExportEnabled, int exportCount, QObject *parent) : QThread(parent),
|
||||
profileMap(profileMap), exportDirectory(exportDirectory), pictureCopyEnabled(pictureCopyEnabled), pictureExportEnabled(pictureExportEnabled), exportCount(exportCount)
|
||||
{
|
||||
}
|
||||
|
@ -59,9 +59,12 @@ void ExportThread::run()
|
|||
emit exportStringUpdate(ProfileInterface::tr("Export file %1 of %2 files").arg(QString::number(intExportProgress), QString::number(exportCount)));
|
||||
emit exportProgressUpdate(intExportProgress);
|
||||
|
||||
bool isSaved = false;
|
||||
QSaveFile exportFile(exportDirectory % "/" % exportFileName);
|
||||
exportFile.write(picture->getPictureStream());
|
||||
bool isSaved = exportFile.commit();
|
||||
if (exportFile.open(QIODevice::WriteOnly)) {
|
||||
exportFile.write(picture->getPictureStream());
|
||||
isSaved = exportFile.commit();
|
||||
}
|
||||
|
||||
if (!isSaved)
|
||||
failedExportPictures += exportFileName;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue