diff options
author | Gehad elrobey <gehadelrobey@gmail.com> | 2015-01-30 21:42:33 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-31 10:15:12 -0800 |
commit | ad60ca84eea1e3a89b18293d101cb44e7041c9cd (patch) | |
tree | 6d4667c69d65244905d4ca4ca6f26e6a099e13bc /qt-ui/divelogexportdialog.cpp | |
parent | b01f14efab664ea66e07be95f38511a69dcaf8b7 (diff) | |
download | subsurface-ad60ca84eea1e3a89b18293d101cb44e7041c9cd.tar.gz |
Export the XSLT based exports in a new thread.
The XSLT based exports can consume long time while applying the xml format.
This time can make the GUI unresponsive. Simply call the export functions
in a new Thread.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelogexportdialog.cpp')
-rw-r--r-- | qt-ui/divelogexportdialog.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/divelogexportdialog.cpp b/qt-ui/divelogexportdialog.cpp index cb7d6a02e..aff0265de 100644 --- a/qt-ui/divelogexportdialog.cpp +++ b/qt-ui/divelogexportdialog.cpp @@ -1,6 +1,7 @@ #include <QFileDialog> #include <QShortcut> #include <QSettings> +#include <QtConcurrent> #include "divelogexportdialog.h" #include "diveshareexportdialog.h" @@ -310,7 +311,7 @@ void DiveLogExportDialog::on_buttonBox_accepted() settings.endGroup(); // the non XSLT exports are called directly above, the XSLT based ons are called here if (!stylesheet.isEmpty()) - export_dives_xslt(filename.toUtf8(), ui->exportSelected->isChecked(), ui->CSVUnits_2->currentIndex(), stylesheet.toUtf8()); + future = QtConcurrent::run(export_dives_xslt, filename.toUtf8(), ui->exportSelected->isChecked(), ui->CSVUnits_2->currentIndex(), stylesheet.toUtf8()); } } |