|
|
@ -401,11 +401,8 @@ void ExportDataDir(FrontendCommon::DataManager::DataDir data_dir, |
|
|
tr("Exporting data. This may take a while..."), tr("Cancel"), 0, 100); |
|
|
tr("Exporting data. This may take a while..."), tr("Cancel"), 0, 100); |
|
|
|
|
|
|
|
|
progress->setTitle(tr("Exporting")); |
|
|
progress->setTitle(tr("Exporting")); |
|
|
progress->setWindowModality(Qt::WindowModal); |
|
|
|
|
|
progress->show(); |
|
|
progress->show(); |
|
|
|
|
|
|
|
|
QGuiApplication::processEvents(); |
|
|
|
|
|
|
|
|
|
|
|
auto progress_callback = [=](size_t total_size, size_t processed_size) { |
|
|
auto progress_callback = [=](size_t total_size, size_t processed_size) { |
|
|
QMetaObject::invokeMethod(progress, |
|
|
QMetaObject::invokeMethod(progress, |
|
|
"setValue", |
|
|
"setValue", |
|
|
@ -473,11 +470,8 @@ void ImportDataDir(FrontendCommon::DataManager::DataDir data_dir, |
|
|
tr("Importing data. This may take a while..."), tr("Cancel"), 0, 100); |
|
|
tr("Importing data. This may take a while..."), tr("Cancel"), 0, 100); |
|
|
|
|
|
|
|
|
progress->setTitle(tr("Importing")); |
|
|
progress->setTitle(tr("Importing")); |
|
|
progress->setWindowModality(Qt::WindowModal); |
|
|
|
|
|
progress->show(); |
|
|
progress->show(); |
|
|
|
|
|
|
|
|
QGuiApplication::processEvents(); |
|
|
|
|
|
|
|
|
|
|
|
// to prevent GUI mangling we have to run this in a thread as well
|
|
|
// to prevent GUI mangling we have to run this in a thread as well
|
|
|
QFuture<bool> delete_future = QtConcurrent::run([=]() { |
|
|
QFuture<bool> delete_future = QtConcurrent::run([=]() { |
|
|
FrontendCommon::DataManager::ClearDir(data_dir, user_id); |
|
|
FrontendCommon::DataManager::ClearDir(data_dir, user_id); |
|
|
|