Commit c11b2b99 authored by Laurent Montel's avatar Laurent Montel 😁

const(ify pointer

parent e66851e0
Pipeline #36667 canceled with stage
in 28 minutes and 41 seconds
......@@ -74,13 +74,13 @@ public:
f.close();
}
if (!buf.isEmpty()) {
KCalendarCore::MemoryCalendar::Ptr cl(
const KCalendarCore::MemoryCalendar::Ptr cl(
new KCalendarCore::MemoryCalendar(QTimeZone::systemTimeZone()));
KCalUtils::InvitationFormatterHelper helper;
const QString invite = KTnef::formatTNEFInvitation(buf, cl, &helper);
KCalendarCore::ICalFormat format;
KCalendarCore::Incidence::Ptr inc = format.fromString(invite);
KCalendarCore::Event::Ptr event = inc.dynamicCast<KCalendarCore::Event>();
const KCalendarCore::Incidence::Ptr inc = format.fromString(invite);
const KCalendarCore::Event::Ptr event = inc.dynamicCast<KCalendarCore::Event>();
if (event && event->hasEndDate()) {
// no enddate => not a valid invitation
inviteStr = KCalUtils::IncidenceFormatter::extensiveDisplayStr(cl, inc);
......
......@@ -11,12 +11,12 @@
DKIMAuthenticationVerifiedServerWidget::DKIMAuthenticationVerifiedServerWidget(QWidget *parent)
: QWidget(parent)
, mSelector(new DKIMAuthenticationVerifiedServerSelectorWidget(this))
{
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainLayout"));
mainLayout->setContentsMargins({});
mSelector = new DKIMAuthenticationVerifiedServerSelectorWidget(this);
mSelector->setObjectName(QStringLiteral("mSelector"));
mainLayout->addWidget(mSelector);
}
......
......@@ -28,7 +28,7 @@ public:
void loadSettings();
void saveSettings();
private:
DKIMAuthenticationVerifiedServerSelectorWidget *mSelector = nullptr;
DKIMAuthenticationVerifiedServerSelectorWidget *const mSelector;
};
#endif // DKIMAUTHENTICATIONVERIFIEDSERVERWIDGET_H
......@@ -17,12 +17,12 @@
DKIMConfigureTab::DKIMConfigureTab(QWidget *parent)
: QWidget(parent)
, mTabWidget(new QTabWidget(this))
{
QHBoxLayout *mainLayout = new QHBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mainLayout->setContentsMargins({});
mTabWidget = new QTabWidget(this);
mTabWidget->setObjectName(QStringLiteral("tabwidget"));
mainLayout->addWidget(mTabWidget);
initTab();
......
......@@ -32,7 +32,7 @@ private:
DKIMKeyRecordWidget *mRecordWidget = nullptr;
DKIMAdvancedWidget *mAdvancedWidget = nullptr;
DKIMPolicyWidget *mPolicyWidget = nullptr;
QTabWidget *mTabWidget = nullptr;
QTabWidget *const mTabWidget;
};
#endif // DKIMCONFIGURETAB_H
......@@ -11,12 +11,12 @@
DKIMConfigureWidget::DKIMConfigureWidget(QWidget *parent)
: QWidget(parent)
, mTabWidget(new DKIMConfigureTab(this))
{
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainLayout"));
mainLayout->setContentsMargins({});
mTabWidget = new DKIMConfigureTab(this);
mTabWidget->setObjectName(QStringLiteral("tabwidget"));
mainLayout->addWidget(mTabWidget);
}
......
......@@ -22,7 +22,7 @@ public:
void saveSettings();
void resetSettings();
private:
DKIMConfigureTab *mTabWidget = nullptr;
DKIMConfigureTab *const mTabWidget;
};
#endif // DKIMCONFIGUREWIDGET_H
......@@ -16,12 +16,12 @@ static const char myConfigGroupName[] = "DKIMKeyRecordWidget";
DKIMKeyRecordWidget::DKIMKeyRecordWidget(QWidget *parent)
: QWidget(parent)
, mManagerKeyWidget(new MessageViewer::DKIMManagerKeyWidget(this))
{
QHBoxLayout *mainLayout = new QHBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainLayout"));
mainLayout->setContentsMargins({});
mManagerKeyWidget = new MessageViewer::DKIMManagerKeyWidget(this);
mManagerKeyWidget->setObjectName(QStringLiteral("mManagerKeyWidget"));
mainLayout->addWidget(mManagerKeyWidget);
readConfig();
......
......@@ -24,7 +24,7 @@ public:
private:
void readConfig();
void writeConfig();
MessageViewer::DKIMManagerKeyWidget *mManagerKeyWidget = nullptr;
MessageViewer::DKIMManagerKeyWidget *const mManagerKeyWidget;
};
#endif // DKIMKEYRECORDWIDGET_H
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