Commit 0180165e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Const'ify variable/pointer

parent 3241e03c
Pipeline #36780 passed with stage
in 39 minutes and 55 seconds
......@@ -24,6 +24,7 @@
ArchiveMailAgent::ArchiveMailAgent(const QString &id)
: Akonadi::AgentBase(id)
, mArchiveManager(new ArchiveMailManager(this))
{
Kdelibs4ConfigMigrator migrate(QStringLiteral("archivemailagent"));
migrate.setConfigFiles(QStringList() << QStringLiteral("akonadi_archivemail_agentrc") << QStringLiteral("akonadi_archivemail_agent.notifyrc"));
......@@ -31,7 +32,6 @@ ArchiveMailAgent::ArchiveMailAgent(const QString &id)
connect(this, &Akonadi::AgentBase::reloadConfiguration, this, &ArchiveMailAgent::reload);
mArchiveManager = new ArchiveMailManager(this);
connect(mArchiveManager, &ArchiveMailManager::needUpdateConfigDialogBox, this, &ArchiveMailAgent::needUpdateConfigDialogBox);
Akonadi::Monitor *collectionMonitor = new Akonadi::Monitor(this);
......
......@@ -45,7 +45,7 @@ protected:
private:
void mailCollectionRemoved(const Akonadi::Collection &collection);
QTimer *mTimer = nullptr;
ArchiveMailManager *mArchiveManager = nullptr;
ArchiveMailManager *const mArchiveManager;
};
#endif /* ARCHIVEMAILAGENT_H */
......@@ -27,6 +27,7 @@
FollowUpReminderAgent::FollowUpReminderAgent(const QString &id)
: Akonadi::AgentBase(id)
, mManager(new FollowUpReminderManager(this))
{
Kdelibs4ConfigMigrator migrate(QStringLiteral("followupreminderagent"));
migrate.setConfigFiles(QStringList() << QStringLiteral("akonadi_followupreminder_agentrc") << QStringLiteral("akonadi_followupreminder_agent.notifyrc"));
......@@ -36,7 +37,6 @@ FollowUpReminderAgent::FollowUpReminderAgent(const QString &id)
QDBusConnection::sessionBus().registerObject(QStringLiteral("/FollowUpReminder"), this, QDBusConnection::ExportAdaptors);
const QString service = Akonadi::ServerManager::self()->agentServiceName(Akonadi::ServerManager::Agent, QStringLiteral("akonadi_followupreminder_agent"));
QDBusConnection::sessionBus().registerService(service);
mManager = new FollowUpReminderManager(this);
setNeedsNetwork(true);
changeRecorder()->setMimeTypeMonitored(KMime::Message::mimeType());
......
......@@ -29,7 +29,7 @@ protected:
void itemAdded(const Akonadi::Item &item, const Akonadi::Collection &collection) override;
private:
FollowUpReminderManager *mManager = nullptr;
FollowUpReminderManager *const mManager;
QTimer *mTimer = nullptr;
};
......
......@@ -28,7 +28,7 @@ private:
void slotItemFetchJobDone(KJob *job);
void slotItemModifiedResult(KJob *job);
void closeTodo();
Akonadi::Item::Id mTodoId;
const Akonadi::Item::Id mTodoId;
};
#endif // FOLLOWUPREMINDERFINISHTASKJOB_H
......@@ -21,7 +21,7 @@ public:
private:
Q_DISABLE_COPY(FollowUpReminderShowMessageJob)
Akonadi::Item::Id mId;
const Akonadi::Item::Id mId;
};
#endif // FOLLOWUPREMINDERSHOWMESSAGEJOB_H
......@@ -102,9 +102,6 @@ FilterLogDialog::FilterLogDialog(QWidget *parent)
mLogPatternDescBox->setChecked(
FilterLog::instance()->isContentTypeEnabled(FilterLog::PatternDescription));
connect(mLogPatternDescBox, &QCheckBox::clicked, this, &FilterLogDialog::slotChangeLogDetail);
// TODO
//QWhatsThis::add( mLogPatternDescBox,
// i18n( "" ) );
mLogRuleEvaluationBox = new QCheckBox(i18n("Log filter &rule evaluation"));
layout->addWidget(mLogRuleEvaluationBox);
......
......@@ -35,12 +35,12 @@
SendLaterAgent::SendLaterAgent(const QString &id)
: Akonadi::AgentBase(id)
, mManager(new SendLaterManager(this))
{
Kdelibs4ConfigMigrator migrate(QStringLiteral("sendlateragent"));
migrate.setConfigFiles(QStringList() << QStringLiteral("akonadi_sendlater_agentrc") << QStringLiteral("akonadi_sendlater_agent.notifyrc"));
migrate.migrate();
mManager = new SendLaterManager(this);
connect(mManager, &SendLaterManager::needUpdateConfigDialogBox, this, &SendLaterAgent::needUpdateConfigDialogBox);
new SendLaterAgentAdaptor(this);
QDBusConnection::sessionBus().registerObject(QStringLiteral("/SendLaterAgent"), this, QDBusConnection::ExportAdaptors);
......
......@@ -45,7 +45,7 @@ private:
void slotSendNow(Akonadi::Item::Id id);
void slotStartAgent();
bool mAgentInitialized = false;
SendLaterManager *mManager = nullptr;
SendLaterManager *const mManager;
};
#endif // SENDLATERAGENT_H
......@@ -20,6 +20,7 @@
SendLaterConfigureDialog::SendLaterConfigureDialog(QWidget *parent)
: QDialog(parent)
, mWidget(new SendLaterWidget(this))
{
setWindowTitle(i18nc("@title:window", "Configure"));
setWindowIcon(QIcon::fromTheme(QStringLiteral("kmail")));
......@@ -30,7 +31,6 @@ SendLaterConfigureDialog::SendLaterConfigureDialog(QWidget *parent)
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, &QDialogButtonBox::rejected, this, &SendLaterConfigureDialog::reject);
mWidget = new SendLaterWidget(this);
mWidget->setObjectName(QStringLiteral("sendlaterwidget"));
connect(mWidget, &SendLaterWidget::sendNow, this, &SendLaterConfigureDialog::sendNow);
mainLayout->addWidget(mWidget);
......
......@@ -29,7 +29,7 @@ private:
void slotSave();
void readConfig();
void writeConfig();
SendLaterWidget *mWidget = nullptr;
SendLaterWidget *const mWidget;
};
#endif // SENDLATERCONFIGUREDIALOG_H
......@@ -25,7 +25,7 @@ private:
Q_DISABLE_COPY(SendLaterRemoveMessageJob)
void slotItemDeleteDone(KJob *job);
void deleteItem();
QVector<Akonadi::Item::Id> mListItems;
const QVector<Akonadi::Item::Id> mListItems;
int mIndex = 0;
};
......
......@@ -32,7 +32,7 @@ private:
QStandardItemModel *mBoxModel = nullptr;
UnifiedMailboxManager &mBoxManager;
MailKernel *const mKernel;
KSharedConfigPtr mConfig;
const KSharedConfigPtr mConfig;
};
#endif
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