mirror of
https://github.com/Dark98/threeSD.git
synced 2026-07-02 16:49:04 +00:00
Move setWindowFlags to DPIAwareDialog
And use new helper in Utilites
This commit is contained in:
@@ -16,7 +16,6 @@ CIABuildDialog::CIABuildDialog(QWidget* parent, bool is_dir_, bool is_nand, bool
|
||||
is_dir(is_dir_) {
|
||||
|
||||
ui->setupUi(this);
|
||||
setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint));
|
||||
|
||||
if (is_dir) {
|
||||
setWindowTitle(tr("Batch Build CIA"));
|
||||
|
||||
@@ -8,7 +8,10 @@
|
||||
#include "frontend/helpers/dpi_aware_dialog.h"
|
||||
|
||||
DPIAwareDialog::DPIAwareDialog(QWidget* parent, int width, int height)
|
||||
: QDialog(parent), original_width(width), original_height(height) {}
|
||||
: QDialog(parent), original_width(width), original_height(height) {
|
||||
|
||||
setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint));
|
||||
}
|
||||
|
||||
DPIAwareDialog::~DPIAwareDialog() = default;
|
||||
|
||||
|
||||
@@ -157,7 +157,6 @@ ImportDialog::ImportDialog(QWidget* parent, const Core::Config& config_)
|
||||
qRegisterMetaType<Core::ContentSpecifier>();
|
||||
|
||||
ui->setupUi(this);
|
||||
setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint));
|
||||
|
||||
RelistContent();
|
||||
UpdateSizeDisplay();
|
||||
|
||||
@@ -35,7 +35,6 @@ MainDialog::MainDialog(QWidget* parent)
|
||||
: DPIAwareDialog(parent, 640, 256), ui(std::make_unique<Ui::MainDialog>()) {
|
||||
|
||||
ui->setupUi(this);
|
||||
setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint));
|
||||
|
||||
ui->buttonBox->button(QDialogButtonBox::StandardButton::Ok)->setEnabled(false);
|
||||
ui->buttonBox->button(QDialogButtonBox::StandardButton::Reset)->setText(tr("Refresh"));
|
||||
|
||||
@@ -13,7 +13,6 @@ SelectFilesDialog::SelectFilesDialog(QWidget* parent, bool source_is_dir_, bool
|
||||
source_is_dir(source_is_dir_), destination_is_dir(destination_is_dir_) {
|
||||
|
||||
ui->setupUi(this);
|
||||
setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint));
|
||||
|
||||
connect(ui->buttonBox, &QDialogButtonBox::accepted, [this] {
|
||||
if (ui->source->text().isEmpty() || ui->destination->text().isEmpty()) {
|
||||
|
||||
@@ -24,7 +24,6 @@ TitleInfoDialog::TitleInfoDialog(QWidget* parent, Core::SDMCImporter& importer_,
|
||||
importer(importer_), specifier(std::move(specifier_)) {
|
||||
|
||||
ui->setupUi(this);
|
||||
setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint));
|
||||
|
||||
LoadInfo();
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include <QFileDialog>
|
||||
#include <QFutureWatcher>
|
||||
#include <QMessageBox>
|
||||
#include <QProgressDialog>
|
||||
#include <QtConcurrent/QtConcurrentRun>
|
||||
#include "core/file_sys/data/data_container.h"
|
||||
#include "core/file_sys/data/extdata.h"
|
||||
@@ -14,6 +13,7 @@
|
||||
#include "core/file_sys/ncch_container.h"
|
||||
#include "core/key/key.h"
|
||||
#include "core/sdmc_decryptor.h"
|
||||
#include "frontend/helpers/rate_limited_progress_dialog.h"
|
||||
#include "frontend/select_files_dialog.h"
|
||||
#include "frontend/utilities.h"
|
||||
#include "ui_utilities.h"
|
||||
@@ -22,7 +22,6 @@ UtilitiesDialog::UtilitiesDialog(QWidget* parent)
|
||||
: DPIAwareDialog(parent, 640, 384), ui(std::make_unique<Ui::UtilitiesDialog>()) {
|
||||
|
||||
ui->setupUi(this);
|
||||
setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint));
|
||||
|
||||
connect(ui->useSdDecryption, &QCheckBox::clicked, [this] {
|
||||
const bool checked = ui->useSdDecryption->isChecked();
|
||||
@@ -121,12 +120,8 @@ bool UtilitiesDialog::LoadSDKeys() {
|
||||
}
|
||||
|
||||
void UtilitiesDialog::ShowProgressDialog(std::function<bool()> operation) {
|
||||
auto* dialog = new QProgressDialog(tr("Processing..."), tr("Cancel"), 0, 0, this);
|
||||
dialog->setWindowFlags(dialog->windowFlags() & (~Qt::WindowContextHelpButtonHint));
|
||||
dialog->setWindowModality(Qt::WindowModal);
|
||||
auto* dialog = new RateLimitedProgressDialog(tr("Processing..."), tr("Cancel"), 0, 0, this);
|
||||
dialog->setCancelButton(nullptr);
|
||||
dialog->setMinimumDuration(0);
|
||||
dialog->setValue(0);
|
||||
|
||||
using FutureWatcher = QFutureWatcher<void>;
|
||||
auto* future_watcher = new FutureWatcher(this);
|
||||
|
||||
Reference in New Issue
Block a user