Commit 85d1a145 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use auto

parent d12e3787
Pipeline #40228 canceled with stage
......@@ -30,7 +30,7 @@ FilterEditDialog::FilterEditDialog(QList<KCalendarCore::CalFilter *> *filters, Q
setWindowTitle(i18nc("@title::window", "Edit Calendar Filters"));
auto *mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(
auto *buttonBox = new QDialogButtonBox(
QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Apply, this);
mOkButton = buttonBox->button(QDialogButtonBox::Ok);
mApplyButton = buttonBox->button(QDialogButtonBox::Apply);
......
......@@ -31,7 +31,7 @@ KOEventViewerDialog::KOEventViewerDialog(Akonadi::ETMCalendar *calendar, QWidget
{
setWindowTitle(i18nc("@title:window", "Event Viewer"));
auto *mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, this);
auto *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, this);
mUser1Button = new QPushButton(this);
buttonBox->addButton(mUser1Button, QDialogButtonBox::ActionRole);
auto *user2Button = new QPushButton(this);
......
......@@ -50,7 +50,7 @@ SearchDialog::SearchDialog(CalendarView *calendarview)
layout->addWidget(listView);
m_ui->listViewFrame->setLayout(layout);
QDialogButtonBox *buttonBox = new QDialogButtonBox(
auto *buttonBox = new QDialogButtonBox(
QDialogButtonBox::Close | QDialogButtonBox::Help, this);
mainLayout->addWidget(mainWidget);
mUser1Button = new QPushButton;
......
......@@ -32,7 +32,7 @@ Quickview::Quickview(const Akonadi::Collection &col)
, mUi(new Ui_quickview)
, mCollection(col)
{
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, this);
auto *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, this);
QWidget *mainWidget = new QWidget(this);
auto *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(mainWidget);
......
......@@ -314,7 +314,7 @@ MultiAgendaViewConfigDialog::MultiAgendaViewConfigDialog(QAbstractItemModel *bas
auto *mainLayout = new QVBoxLayout(this);
QWidget *widget = new QWidget;
d->ui.setupUi(widget);
QDialogButtonBox *buttonBox = new QDialogButtonBox(
auto *buttonBox = new QDialogButtonBox(
QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment