Commit 4a4ce8de authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Const'ify more pointer

parent 666c8439
Pipeline #77619 failed with stage
in 5 minutes and 13 seconds
......@@ -27,11 +27,11 @@
KOEventViewerDialog::KOEventViewerDialog(Akonadi::ETMCalendar *calendar, QWidget *parent)
: QDialog(parent)
, mUser1Button(new QPushButton(this))
{
setWindowTitle(i18nc("@title:window", "Event Viewer"));
auto mainLayout = new QVBoxLayout(this);
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, this);
mUser1Button = new QPushButton(this);
buttonBox->addButton(mUser1Button, QDialogButtonBox::ActionRole);
auto user2Button = new QPushButton(this);
buttonBox->addButton(user2Button, QDialogButtonBox::ActionRole);
......
......@@ -45,6 +45,6 @@ private:
void showIncidenceContext();
void delayedDestruct();
CalendarSupport::IncidenceViewer *mEventViewer = nullptr;
QPushButton *mUser1Button = nullptr;
QPushButton *const mUser1Button;
};
......@@ -18,6 +18,8 @@
NavigatorBar::NavigatorBar(QWidget *parent)
: QWidget(parent)
, mMonth(new QToolButton(this))
, mYear(new QToolButton(this))
{
QFont tfont = font();
tfont.setPointSize(10);
......@@ -46,14 +48,12 @@ NavigatorBar::NavigatorBar(QWidget *parent)
"same approximate day of the next year"));
// Create month name button
mMonth = new QToolButton(this);
mMonth->setPopupMode(QToolButton::InstantPopup);
mMonth->setAutoRaise(true);
mMonth->setFont(tfont);
mMonth->setToolTip(i18n("Select a month"));
// Create year button
mYear = new QToolButton(this);
mYear->setPopupMode(QToolButton::InstantPopup);
mYear->setAutoRaise(true);
mYear->setFont(tfont);
......
......@@ -45,8 +45,8 @@ private:
QToolButton *mPrevYear = nullptr;
QToolButton *mPrevMonth = nullptr;
QToolButton *mMonth = nullptr;
QToolButton *mYear = nullptr;
QToolButton *const mMonth;
QToolButton *const mYear;
QToolButton *mNextMonth = nullptr;
QToolButton *mNextYear = nullptr;
};
......
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