diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-01-01 19:21:58 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-01-01 19:21:58 +0100 |
commit | 0e78d34d4cbed0ceb913ee70e89f36462bfe1dc6 (patch) | |
tree | 93a26eb1fa534984230e871253faaf3ec142f373 /gui/MainWindow.cpp | |
parent | cf7335186d1aa3d99a32adb04a55c066161760c3 (diff) | |
download | MultiMC-0e78d34d4cbed0ceb913ee70e89f36462bfe1dc6.tar MultiMC-0e78d34d4cbed0ceb913ee70e89f36462bfe1dc6.tar.gz MultiMC-0e78d34d4cbed0ceb913ee70e89f36462bfe1dc6.tar.lz MultiMC-0e78d34d4cbed0ceb913ee70e89f36462bfe1dc6.tar.xz MultiMC-0e78d34d4cbed0ceb913ee70e89f36462bfe1dc6.zip |
ThreadTask for all your ThreadNeeds
Use only when absolutely required.
Diffstat (limited to 'gui/MainWindow.cpp')
-rw-r--r-- | gui/MainWindow.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index 42470bb0..b55be903 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -90,6 +90,7 @@ #include "logic/assets/AssetsUtils.h" #include "logic/assets/AssetsMigrateTask.h" #include <logic/updater/UpdateChecker.h> +#include <logic/tasks/ThreadTask.h> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { @@ -1169,14 +1170,17 @@ void MainWindow::checkMigrateLegacyAssets() { ProgressDialog migrateDlg(this); AssetsMigrateTask migrateTask(legacyAssets, &migrateDlg); - - if (migrateDlg.exec(&migrateTask)) { - QLOG_INFO() << "Assets migration task completed successfully"; - } - else - { - QLOG_INFO() << "Assets migration task reported failure"; + ThreadTask threadTask(&migrateTask); + + if (migrateDlg.exec(&threadTask)) + { + QLOG_INFO() << "Assets migration task completed successfully"; + } + else + { + QLOG_INFO() << "Assets migration task reported failure"; + } } } else |