summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--backend-shared/exportfuncs.cpp4
-rw-r--r--backend-shared/exportfuncs.h3
-rw-r--r--desktop-widgets/divelogexportdialog.cpp7
3 files changed, 7 insertions, 7 deletions
diff --git a/backend-shared/exportfuncs.cpp b/backend-shared/exportfuncs.cpp
index 839c0bf1d..eea20ef5b 100644
--- a/backend-shared/exportfuncs.cpp
+++ b/backend-shared/exportfuncs.cpp
@@ -311,8 +311,8 @@ std::vector<const dive_site *> exportFuncs::getDiveSitesToExport(bool selectedOn
return res;
}
-void exportFuncs::exportUsingStyleSheet(QString filename, bool doExport, int units,
+QFuture<int> exportFuncs::exportUsingStyleSheet(QString filename, bool doExport, int units,
QString stylesheet, bool anonymize)
{
- future = QtConcurrent::run(export_dives_xslt, filename.toUtf8(), doExport, units, stylesheet.toUtf8(), anonymize);
+ return QtConcurrent::run(export_dives_xslt, filename.toUtf8(), doExport, units, stylesheet.toUtf8(), anonymize);
}
diff --git a/backend-shared/exportfuncs.h b/backend-shared/exportfuncs.h
index a378e152d..530cde7e0 100644
--- a/backend-shared/exportfuncs.h
+++ b/backend-shared/exportfuncs.h
@@ -16,9 +16,8 @@ public:
void export_TeX(const char *filename, const bool selected_only, bool plain);
void export_depths(const char *filename, const bool selected_only);
std::vector<const dive_site *> getDiveSitesToExport(bool selectedOnly);
- void exportUsingStyleSheet(QString filename, bool doExport, int units,
+ QFuture<int> exportUsingStyleSheet(QString filename, bool doExport, int units,
QString stylesheet, bool anonymize);
- QFuture<int> future;
// prepareDivesForUploadDiveLog
// prepareDivesForUploadDiveShare
diff --git a/desktop-widgets/divelogexportdialog.cpp b/desktop-widgets/divelogexportdialog.cpp
index dc0928e8f..0e85bc6bd 100644
--- a/desktop-widgets/divelogexportdialog.cpp
+++ b/desktop-widgets/divelogexportdialog.cpp
@@ -214,9 +214,10 @@ void DiveLogExportDialog::on_buttonBox_accepted()
qPrefDisplay::set_lastDir(fileInfo.dir().path());
// the non XSLT exports are called directly above, the XSLT based ons are called here
if (!stylesheet.isEmpty()) {
- exportFuncs::instance()->exportUsingStyleSheet(filename, ui->exportSelected->isChecked(), ui->CSVUnits_2->currentIndex(), stylesheet.toUtf8(), ui->anonymize->isChecked());
- MainWindow::instance()->getNotificationWidget()->showNotification(tr("Please wait, exporting..."), KMessageWidget::Information);
- MainWindow::instance()->getNotificationWidget()->setFuture(exportFuncs::instance()->future);
+ QFuture<void> future = exportFuncs::instance()->exportUsingStyleSheet(filename, ui->exportSelected->isChecked(),
+ ui->CSVUnits_2->currentIndex(), stylesheet.toUtf8(), ui->anonymize->isChecked());
+ MainWindow::instance()->getNotificationWidget()->showNotification(tr("Please wait, exporting..."), KMessageWidget::Information);
+ MainWindow::instance()->getNotificationWidget()->setFuture(future);
}
}
}