Commit d8ea350f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

const'ify method here

parent d0092780
......@@ -21,7 +21,6 @@
#include "widgets/formatcombobox.h"
#include "widgets/unitcombobox.h"
#include "MailCommon/FolderRequester"
#include <Collection>
#include <KLocalizedString>
......
......@@ -47,19 +47,19 @@ public:
MailCommon::BackupJob::ArchiveType archiveType() const;
void setRecursive(bool b);
bool recursive() const;
Q_REQUIRED_RESULT bool recursive() const;
void setSelectedFolder(const Akonadi::Collection &collection);
Akonadi::Collection selectedFolder() const;
QUrl path() const;
Q_REQUIRED_RESULT QUrl path() const;
void setPath(const QUrl &);
ArchiveMailInfo *info();
void setMaximumArchiveCount(int);
int maximumArchiveCount() const;
Q_REQUIRED_RESULT int maximumArchiveCount() const;
private:
void slotFolderChanged(const Akonadi::Collection &);
......
......@@ -135,12 +135,12 @@ void ArchiveMailAgent::resume()
}
}
QString ArchiveMailAgent::printArchiveListInfo()
QString ArchiveMailAgent::printArchiveListInfo() const
{
return mArchiveManager->printArchiveListInfo();
}
QString ArchiveMailAgent::printCurrentListInfo()
QString ArchiveMailAgent::printCurrentListInfo() const
{
return mArchiveManager->printCurrentListInfo();
}
......
......@@ -36,12 +36,12 @@ public:
explicit ArchiveMailAgent(const QString &id);
~ArchiveMailAgent() override;
QString printArchiveListInfo();
Q_REQUIRED_RESULT QString printArchiveListInfo() const;
void setEnableAgent(bool b);
bool enabledAgent() const;
Q_REQUIRED_RESULT bool enabledAgent() const;
QString printCurrentListInfo();
Q_REQUIRED_RESULT QString printCurrentListInfo() const;
void archiveFolder(const QString &path, Akonadi::Collection::Id collectionId);
Q_SIGNALS:
void archiveNow(ArchiveMailInfo *info);
......
......@@ -150,7 +150,7 @@ void ArchiveMailManager::resume()
mArchiveMailKernel->jobScheduler()->resume();
}
QString ArchiveMailManager::printCurrentListInfo()
QString ArchiveMailManager::printCurrentListInfo() const
{
QString infoStr;
if (mListArchiveInfo.isEmpty()) {
......@@ -177,7 +177,7 @@ QString ArchiveMailManager::infoToStr(ArchiveMailInfo *info) const
return infoStr;
}
QString ArchiveMailManager::printArchiveListInfo()
QString ArchiveMailManager::printArchiveListInfo() const
{
QString infoStr;
const QStringList collectionList = mConfig->groupList().filter(QRegularExpression(QStringLiteral("ArchiveMailCollection \\d+")));
......
......@@ -39,10 +39,10 @@ public:
void pause();
void resume();
QString printArchiveListInfo();
QString printArchiveListInfo() const;
void collectionDoesntExist(ArchiveMailInfo *info);
QString printCurrentListInfo();
QString printCurrentListInfo() const;
void archiveFolder(const QString &path, Akonadi::Collection::Id collectionId);
......
......@@ -116,7 +116,7 @@ void FollowUpReminderAgent::reload()
}
}
QString FollowUpReminderAgent::printDebugInfo()
QString FollowUpReminderAgent::printDebugInfo() const
{
return mManager->printDebugInfo();
}
......
......@@ -30,9 +30,9 @@ public:
~FollowUpReminderAgent() override;
void setEnableAgent(bool b);
bool enabledAgent() const;
Q_REQUIRED_RESULT bool enabledAgent() const;
QString printDebugInfo();
Q_REQUIRED_RESULT QString printDebugInfo() const;
public Q_SLOTS:
void reload();
......
......@@ -58,7 +58,7 @@ public:
bool save() const;
void load();
QList<qint32> listRemoveId() const;
Q_REQUIRED_RESULT QList<qint32> listRemoveId() const;
private:
void slotCustomContextMenuRequested(const QPoint &pos);
......
......@@ -164,7 +164,7 @@ void FollowUpReminderManager::answerReceived(const QString &from)
QStringLiteral("akonadi_followupreminder_agent"));
}
QString FollowUpReminderManager::printDebugInfo()
QString FollowUpReminderManager::printDebugInfo() const
{
QString infoStr;
if (mFollowUpReminderInfoList.isEmpty()) {
......@@ -180,7 +180,7 @@ QString FollowUpReminderManager::printDebugInfo()
return infoStr;
}
QString FollowUpReminderManager::infoToStr(FollowUpReminder::FollowUpReminderInfo *info)
QString FollowUpReminderManager::infoToStr(FollowUpReminder::FollowUpReminderInfo *info) const
{
QString infoStr = QStringLiteral("****************************************");
infoStr += QStringLiteral("Akonadi Item id :%1\n").arg(info->originalMessageItemId());
......
......@@ -38,7 +38,7 @@ public:
void load(bool forceReloadConfig = false);
void checkFollowUp(const Akonadi::Item &item, const Akonadi::Collection &col);
QString printDebugInfo();
Q_REQUIRED_RESULT QString printDebugInfo() const;
private:
Q_DISABLE_COPY(FollowUpReminderManager)
void slotCheckFollowUpFinished(const QString &messageId, Akonadi::Item::Id id);
......@@ -47,7 +47,7 @@ private:
void slotFinishTaskFailed();
void slotReparseConfiguration();
void answerReceived(const QString &from);
QString infoToStr(FollowUpReminder::FollowUpReminderInfo *info);
Q_REQUIRED_RESULT QString infoToStr(FollowUpReminder::FollowUpReminderInfo *info) const;
KSharedConfig::Ptr mConfig;
QList<FollowUpReminder::FollowUpReminderInfo *> mFollowUpReminderInfoList;
......
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