summaryrefslogtreecommitdiff
path: root/src/updatedialog.cpp
diff options
context:
space:
mode:
authorMikaƫl Capelle <capelle.mikael@gmail.com>2023-07-09 17:36:03 +0200
committerGitHub <noreply@github.com>2023-07-09 17:36:03 +0200
commitef94aee28464039672b277243a0181ae93550d6c (patch)
tree0575a68af5f154e9d6d0738edbaefb16a11d6f5c /src/updatedialog.cpp
parent7d6cb8528d20e36a4cee822263865ee2f7f32481 (diff)
parent3de050e9c03e553f7ae3f780f6bd080a30ae123e (diff)
Merge pull request #1839 from Holt59/ci/initial-gh-action-for-build
Clang-Format + Github Workflow
Diffstat (limited to 'src/updatedialog.cpp')
-rw-r--r--src/updatedialog.cpp30
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));
}