diff options
author | Alexandru Ionut Tripon <alexandru.tripon97@gmail.com> | 2023-08-12 12:42:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-12 12:42:30 +0300 |
commit | b3b2e9df35222209b4920202d86091eeeb87f03f (patch) | |
tree | ce44c3877ee36c21279d142b2af1c393e7b87780 /launcher/ui/pagedialog/PageDialog.cpp | |
parent | ca061080c13042642fb3bd49a29a863756f45866 (diff) | |
parent | 3aba7f8fec45c7c87be486d8f6b5c96f69facf93 (diff) | |
download | PrismLauncher-b3b2e9df35222209b4920202d86091eeeb87f03f.tar.gz PrismLauncher-b3b2e9df35222209b4920202d86091eeeb87f03f.tar.bz2 PrismLauncher-b3b2e9df35222209b4920202d86091eeeb87f03f.zip |
Merge branch 'develop' into feat/acknowledge_release_type
Signed-off-by: Alexandru Ionut Tripon <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/ui/pagedialog/PageDialog.cpp')
-rw-r--r-- | launcher/ui/pagedialog/PageDialog.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/launcher/ui/pagedialog/PageDialog.cpp b/launcher/ui/pagedialog/PageDialog.cpp index 18d61dc2..6514217c 100644 --- a/launcher/ui/pagedialog/PageDialog.cpp +++ b/launcher/ui/pagedialog/PageDialog.cpp @@ -16,9 +16,9 @@ #include "PageDialog.h" #include <QDialogButtonBox> +#include <QKeyEvent> #include <QPushButton> #include <QVBoxLayout> -#include <QKeyEvent> #include "Application.h" #include "settings/SettingsObject.h" @@ -26,19 +26,18 @@ #include "ui/widgets/IconLabel.h" #include "ui/widgets/PageContainer.h" -PageDialog::PageDialog(BasePageProvider *pageProvider, QString defaultId, QWidget *parent) - : QDialog(parent) +PageDialog::PageDialog(BasePageProvider* pageProvider, QString defaultId, QWidget* parent) : QDialog(parent) { setWindowTitle(pageProvider->dialogTitle()); m_container = new PageContainer(pageProvider, defaultId, this); - QVBoxLayout *mainLayout = new QVBoxLayout; + QVBoxLayout* mainLayout = new QVBoxLayout; mainLayout->addWidget(m_container); mainLayout->setSpacing(0); mainLayout->setContentsMargins(0, 0, 0, 0); setLayout(mainLayout); - QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Help | QDialogButtonBox::Close); + QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Help | QDialogButtonBox::Close); buttons->button(QDialogButtonBox::Close)->setDefault(true); buttons->setContentsMargins(6, 0, 6, 0); m_container->addButtons(buttons); @@ -49,11 +48,10 @@ PageDialog::PageDialog(BasePageProvider *pageProvider, QString defaultId, QWidge restoreGeometry(QByteArray::fromBase64(APPLICATION->settings()->get("PagedGeometry").toByteArray())); } -void PageDialog::closeEvent(QCloseEvent *event) +void PageDialog::closeEvent(QCloseEvent* event) { qDebug() << "Paged dialog close requested"; - if (m_container->prepareToClose()) - { + if (m_container->prepareToClose()) { qDebug() << "Paged dialog close approved"; APPLICATION->settings()->set("PagedGeometry", saveGeometry().toBase64()); qDebug() << "Paged dialog geometry saved"; |