diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2022-05-17 11:47:01 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2023-07-09 17:20:40 +0200 |
| commit | d13f6bb870cdda71257f665367be8ef9fca86255 (patch) | |
| tree | 52e214718478f1e52856572f5aa1a2ac58537f9f /src/updatedialog.cpp | |
| parent | 86bb01ba9eac879d3685c439ac9da0028bc4bc80 (diff) | |
Apply clang-format.
Diffstat (limited to 'src/updatedialog.cpp')
| -rw-r--r-- | src/updatedialog.cpp | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/updatedialog.cpp b/src/updatedialog.cpp index d3336e93..41e0801b 100644 --- a/src/updatedialog.cpp +++ b/src/updatedialog.cpp @@ -1,21 +1,26 @@ #include "updatedialog.h" #include "ui_updatedialog.h" -#include "lootdialog.h" // for MarkdownPage +#include "lootdialog.h" // for MarkdownPage #include <QWebChannel> using namespace MOBase; -UpdateDialog::UpdateDialog(QWidget* parent) : - QDialog(parent, Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint), ui(new Ui::UpdateDialog) +UpdateDialog::UpdateDialog(QWidget* parent) + : QDialog(parent, Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint), + ui(new Ui::UpdateDialog) { // Basic UI stuff ui->setupUi(this); - connect(ui->installButton, &QPushButton::pressed, this, [&]{ done(QDialog::Accepted); }); - connect(ui->cancelButton, &QPushButton::pressed, this, [&]{ done(QDialog::Rejected); }); + connect(ui->installButton, &QPushButton::pressed, this, [&] { + done(QDialog::Accepted); + }); + connect(ui->cancelButton, &QPushButton::pressed, this, [&] { + done(QDialog::Rejected); + }); // Replace a label with an icon - QIcon icon = style()->standardIcon(QStyle::SP_MessageBoxQuestion); + QIcon icon = style()->standardIcon(QStyle::SP_MessageBoxQuestion); QPixmap pixmap = icon.pixmap(QSize(32, 32)); ui->iconLabel->setPixmap(pixmap); ui->iconLabel->setScaledContents(true); @@ -44,7 +49,9 @@ UpdateDialog::UpdateDialog(QWidget* parent) : // Setting up the expander m_expander.set(ui->detailsButton, ui->detailsWidget); - connect(&m_expander, &ExpanderWidget::toggled, this, [&]{ adjustSize(); }); + connect(&m_expander, &ExpanderWidget::toggled, this, [&] { + adjustSize(); + }); // Adjust sizes after the expander hides stuff adjustSize(); @@ -59,9 +66,8 @@ void UpdateDialog::setChangeLogs(const QString& text) void UpdateDialog::setVersions(const QString& oldVersion, const QString& newVersion) { - ui->updateLabel->setText( - tr("Mod Organizer %1 is available. The current version is %2. Updating will not affect your mods or profiles.") - .arg(newVersion) - .arg(oldVersion) - ); + ui->updateLabel->setText(tr("Mod Organizer %1 is available. The current version is " + "%2. Updating will not affect your mods or profiles.") + .arg(newVersion) + .arg(oldVersion)); } |
