diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-07-01 16:15:57 -0400 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-07-10 00:38:28 -0400 |
commit | 7f4d96d87332824643d7a8d3ff0fab7ea771b798 (patch) | |
tree | 2d1febc79d0411df29625e2d0d3fc0d0b2954a17 /src/yuzu/install_dialog.cpp | |
parent | 4c269e5ced47765f35dbb58afa9fcac8138a1f7c (diff) |
Refactor batch installing files
Key issues fixed:
- Progress dialog showing up as white/hanging/getting stuck/unresponsive.
Key changes:
- Progress dialog now shows progress as a function of all files instead of per nca within a file.
- Overwrite existing files will overwrite all files in the selection.
Diffstat (limited to 'src/yuzu/install_dialog.cpp')
-rw-r--r-- | src/yuzu/install_dialog.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/yuzu/install_dialog.cpp b/src/yuzu/install_dialog.cpp index fac158c25..5f3b4c963 100644 --- a/src/yuzu/install_dialog.cpp +++ b/src/yuzu/install_dialog.cpp @@ -22,7 +22,7 @@ InstallDialog::InstallDialog(QWidget* parent, const QStringList& files) : QDialo item->setCheckState(Qt::Checked); } - file_list->setMinimumWidth((file_list->sizeHintForColumn(0) * 6) / 5); + file_list->setMinimumWidth((file_list->sizeHintForColumn(0) * 10) / 9); vbox_layout = new QVBoxLayout; @@ -54,19 +54,23 @@ InstallDialog::InstallDialog(QWidget* parent, const QStringList& files) : QDialo InstallDialog::~InstallDialog() = default; -QStringList InstallDialog::GetFilenames() const { - QStringList filenames; +QStringList InstallDialog::GetFiles() const { + QStringList files; for (int i = 0; i < file_list->count(); ++i) { const QListWidgetItem* item = file_list->item(i); if (item->checkState() == Qt::Checked) { - filenames.append(item->data(Qt::UserRole).toString()); + files.append(item->data(Qt::UserRole).toString()); } } - return filenames; + return files; } bool InstallDialog::ShouldOverwriteFiles() const { return overwrite_files->isChecked(); -}
\ No newline at end of file +} + +int InstallDialog::GetMinimumWidth() const { + return file_list->width(); +} |