From 5e5c9c07291f6b09623d31c92b1fb61c4ede576e Mon Sep 17 00:00:00 2001 From: Sandro Jäckel Date: Thu, 22 Feb 2018 16:54:34 +0100 Subject: Applied clang-format on source --- src/lockeddialog.cpp | 64 ++++++++++++++++++++-------------------------------- 1 file changed, 25 insertions(+), 39 deletions(-) (limited to 'src/lockeddialog.cpp') diff --git a/src/lockeddialog.cpp b/src/lockeddialog.cpp index 143d5838..8883cd56 100644 --- a/src/lockeddialog.cpp +++ b/src/lockeddialog.cpp @@ -23,49 +23,35 @@ along with Mod Organizer. If not, see . #include #include #include -#include // for Qt::FramelessWindowHint, etc - -LockedDialog::LockedDialog(QWidget *parent, bool unlockByButton) - : LockedDialogBase(parent, !unlockByButton) - , ui(new Ui::LockedDialog) -{ - ui->setupUi(this); - - // Supposedly the Qt::CustomizeWindowHint should use a customized window - // allowing us to select if there is a close button. In practice this doesn't - // seem to work. We will ignore pressing the close button if unlockByButton == true - Qt::WindowFlags flags = - this->windowFlags() | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowMinimizeButtonHint; - if (m_allowClose) - flags |= Qt::WindowCloseButtonHint; - this->setWindowFlags(flags); - - if (!unlockByButton) - { - ui->unlockButton->hide(); - ui->verticalLayout->addItem( - new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding)); - } +#include // for Qt::FramelessWindowHint, etc + +LockedDialog::LockedDialog(QWidget* parent, bool unlockByButton) + : LockedDialogBase(parent, !unlockByButton), ui(new Ui::LockedDialog) { + ui->setupUi(this); + + // Supposedly the Qt::CustomizeWindowHint should use a customized window + // allowing us to select if there is a close button. In practice this doesn't + // seem to work. We will ignore pressing the close button if unlockByButton == true + Qt::WindowFlags flags = + this->windowFlags() | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowMinimizeButtonHint; + if (m_allowClose) + flags |= Qt::WindowCloseButtonHint; + this->setWindowFlags(flags); + + if (!unlockByButton) { + ui->unlockButton->hide(); + ui->verticalLayout->addItem(new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding)); + } } -LockedDialog::~LockedDialog() -{ - delete ui; -} +LockedDialog::~LockedDialog() { delete ui; } +void LockedDialog::setProcessName(const QString& name) { ui->processLabel->setText(name); } -void LockedDialog::setProcessName(const QString &name) -{ - ui->processLabel->setText(name); -} - -void LockedDialog::on_unlockButton_clicked() -{ - unlock(); -} +void LockedDialog::on_unlockButton_clicked() { unlock(); } void LockedDialog::unlock() { - LockedDialogBase::unlock(); - ui->label->setText("unlocking may take a few seconds"); - ui->unlockButton->setEnabled(false); + LockedDialogBase::unlock(); + ui->label->setText("unlocking may take a few seconds"); + ui->unlockButton->setEnabled(false); } -- cgit v1.3.1