Changeset ad60ca84 in subsurface


Ignore:
Timestamp:
Jan 31, 2015, 10:15:12 AM (3 years ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
Mtest, android_test, dcDownload, foratdotde, gitMerge, gitdebug, gitpictures, ios, master, mergeKirigamiPort, pictimeshift, resolutionIndependence, spinner, testTomaz, testing, v4.4-branch, v4.5-branch
Children:
66c4529
Parents:
b01f14e
git-author:
Gehad elrobey <gehadelrobey@…> (01/30/15 11:42:33)
git-committer:
Dirk Hohndel <dirk@…> (01/31/15 10:15:12)
Message:

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@…>
Signed-off-by: Dirk Hohndel <dirk@…>

Location:
qt-ui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • qt-ui/divelogexportdialog.cpp

    r6b3e361 rad60ca84  
    22#include <QShortcut>
    33#include <QSettings>
     4#include <QtConcurrent>
    45
    56#include "divelogexportdialog.h"
     
    311312                // the non XSLT exports are called directly above, the XSLT based ons are called here
    312313                if (!stylesheet.isEmpty())
    313                         export_dives_xslt(filename.toUtf8(), ui->exportSelected->isChecked(), ui->CSVUnits_2->currentIndex(), stylesheet.toUtf8());
     314                        future = QtConcurrent::run(export_dives_xslt, filename.toUtf8(), ui->exportSelected->isChecked(), ui->CSVUnits_2->currentIndex(), stylesheet.toUtf8());
    314315        }
    315316}
  • qt-ui/divelogexportdialog.h

    r2282035a rad60ca84  
    44#include <QDialog>
    55#include <QTextStream>
     6#include <QFuture>
    67#include "helpers.h"
    78#include "statistics.h"
     
    2829
    2930private:
     31        QFuture<int> future;
    3032        Ui::DiveLogExportDialog *ui;
    3133        void showExplanation();
Note: See TracChangeset for help on using the changeset viewer.