mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 09:04:53 -07:00
Clang-format (#3028)
* 1/3 Add .clang-format file and travis compilation check * 2/3 Run clang-format * 3/3 Fix compilation problems due to include reordering * 3bis/3 AfterControlStatement: false
This commit is contained in:
parent
8dbdd24c8e
commit
b29bd9e070
272 changed files with 13378 additions and 9535 deletions
|
|
@ -4,17 +4,16 @@
|
|||
#include <QLabel>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "settingscache.h"
|
||||
#include "dlg_edit_password.h"
|
||||
#include "settingscache.h"
|
||||
|
||||
DlgEditPassword::DlgEditPassword(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
DlgEditPassword::DlgEditPassword(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
|
||||
oldPasswordLabel = new QLabel(tr("Old password:"));
|
||||
oldPasswordEdit = new QLineEdit();
|
||||
|
||||
if(settingsCache->servers().getSavePassword())
|
||||
if (settingsCache->servers().getSavePassword())
|
||||
oldPasswordEdit->setText(settingsCache->servers().getPassword());
|
||||
|
||||
oldPasswordLabel->setBuddy(oldPasswordEdit);
|
||||
|
|
@ -29,7 +28,7 @@ DlgEditPassword::DlgEditPassword(QWidget *parent)
|
|||
newPasswordEdit2 = new QLineEdit();
|
||||
newPasswordLabel2->setBuddy(newPasswordLabel2);
|
||||
newPasswordEdit2->setEchoMode(QLineEdit::Password);
|
||||
|
||||
|
||||
QGridLayout *grid = new QGridLayout;
|
||||
grid->addWidget(oldPasswordLabel, 0, 0);
|
||||
grid->addWidget(oldPasswordEdit, 0, 1);
|
||||
|
|
@ -37,11 +36,11 @@ DlgEditPassword::DlgEditPassword(QWidget *parent)
|
|||
grid->addWidget(newPasswordEdit, 1, 1);
|
||||
grid->addWidget(newPasswordLabel2, 2, 0);
|
||||
grid->addWidget(newPasswordEdit2, 2, 1);
|
||||
|
||||
|
||||
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||
connect(buttonBox, SIGNAL(accepted()), this, SLOT(actOk()));
|
||||
connect(buttonBox, SIGNAL(rejected()), this, SLOT(actCancel()));
|
||||
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout;
|
||||
mainLayout->addLayout(grid);
|
||||
mainLayout->addWidget(buttonBox);
|
||||
|
|
@ -54,8 +53,7 @@ DlgEditPassword::DlgEditPassword(QWidget *parent)
|
|||
|
||||
void DlgEditPassword::actOk()
|
||||
{
|
||||
if(newPasswordEdit->text() != newPasswordEdit2->text())
|
||||
{
|
||||
if (newPasswordEdit->text() != newPasswordEdit2->text()) {
|
||||
QMessageBox::warning(this, tr("Error"), tr("The new passwords don't match."));
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue