Commit 76b857e6 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Constify some pointer

parent 092799b0
Pipeline #193986 passed with stage
in 3 minutes and 9 seconds
......@@ -125,11 +125,7 @@ KOPrefsDialogColorsAndFonts::KOPrefsDialogColorsAndFonts(QWidget *parent, const
mResourceCombo = new Akonadi::CollectionComboBox(resourceGroup);
// mResourceCombo->addExcludedSpecialResources(Akonadi::Collection::SearchResource);
QStringList mimetypes;
mimetypes << KCalendarCore::Todo::todoMimeType();
mimetypes << KCalendarCore::Journal::journalMimeType();
mimetypes << KCalendarCore::Event::eventMimeType();
const QStringList mimetypes{KCalendarCore::Todo::todoMimeType(), KCalendarCore::Journal::journalMimeType(), KCalendarCore::Event::eventMimeType()};
mResourceCombo->setMimeTypeFilter(mimetypes);
mResourceCombo->setWhatsThis(i18nc("@info:whatsthis",
"Select the calendar you want to modify. "
......
......@@ -57,9 +57,11 @@ K_PLUGIN_CLASS_WITH_JSON(KOPrefsDialogPlugins, "korganizer_configplugins.json")
*/
KOPrefsDialogPlugins::KOPrefsDialogPlugins(QWidget *parent, const QVariantList &args)
: KPrefsModule(KOPrefs::instance(), parent, args)
, mTreeWidget(new QTreeWidget(this))
, mDescription(new QLabel(this))
, mPositioningGroupBox(new QGroupBox(i18nc("@title:group", "Position"), this))
{
auto topTopLayout = new QVBoxLayout(this);
mTreeWidget = new QTreeWidget(this);
mTreeWidget->setColumnCount(2);
mTreeWidget->setHeaderHidden(true);
mTreeWidget->setSelectionMode(QAbstractItemView::SingleSelection);
......@@ -68,7 +70,6 @@ KOPrefsDialogPlugins::KOPrefsDialogPlugins(QWidget *parent, const QVariantList &
mTreeWidget->header()->setStretchLastSection(false);
topTopLayout->addWidget(mTreeWidget);
mDescription = new QLabel(this);
mDescription->setAlignment(Qt::AlignVCenter);
mDescription->setWordWrap(true);
mDescription->setFrameShape(QLabel::Panel);
......@@ -81,7 +82,6 @@ KOPrefsDialogPlugins::KOPrefsDialogPlugins(QWidget *parent, const QVariantList &
mDescription->setSizePolicy(policy);
topTopLayout->addWidget(mDescription);
mPositioningGroupBox = new QGroupBox(i18nc("@title:group", "Position"), this);
// mPositionMonthTop = new QCheckBox(
// i18nc( "@option:check", "Show in the month view" ), mPositioningGroupBox );
mPositionAgendaTop = new QRadioButton(i18nc("@option:check", "Show at the top of the agenda views"), mPositioningGroupBox);
......
......@@ -33,10 +33,9 @@ protected Q_SLOTS:
void positioningChanged();
private:
QTreeWidget *mTreeWidget = nullptr;
QLabel *mDescription = nullptr;
QPushButton *mConfigureButton = nullptr;
QGroupBox *mPositioningGroupBox = nullptr;
QTreeWidget *const mTreeWidget;
QLabel *const mDescription;
QGroupBox *const mPositioningGroupBox;
QRadioButton *mPositionAgendaTop = nullptr;
QRadioButton *mPositionAgendaBottom = nullptr;
......
......@@ -23,6 +23,6 @@ protected:
void usrWriteConfig() override;
private:
KItemIconCheckCombo *mMonthIconComboBox;
KItemIconCheckCombo *mAgendaIconComboBox;
KItemIconCheckCombo *const mMonthIconComboBox;
KItemIconCheckCombo *const mAgendaIconComboBox;
};
Supports Markdown
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