Commit 2a8bd530 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix cppcheck warning

parent 82a92995
......@@ -161,8 +161,8 @@ void ArchiveMailWidget::load()
const QStringList collectionList = config()->groupList().filter(QRegularExpression(archiveMailCollectionPattern()));
const int numberOfCollection = collectionList.count();
for (int i = 0; i < numberOfCollection; ++i) {
KConfigGroup group = config()->group(collectionList.at(i));
ArchiveMailInfo *info = new ArchiveMailInfo(group);
KConfigGroup collectionGroup = config()->group(collectionList.at(i));
ArchiveMailInfo *info = new ArchiveMailInfo(collectionGroup);
if (info->isValid()) {
createOrUpdateItem(info);
} else {
......
......@@ -147,9 +147,9 @@ void UnifiedMailboxAgent::retrieveCollections()
topLevel.setParentCollection(Akonadi::Collection::root());
topLevel.setContentMimeTypes({Akonadi::Collection::mimeType()});
topLevel.setRights(Akonadi::Collection::ReadOnly);
auto displayAttr = topLevel.attribute<Akonadi::EntityDisplayAttribute>(Akonadi::Collection::AddIfMissing);
displayAttr->setDisplayName(i18n("Unified Mailboxes"));
displayAttr->setActiveIconName(QStringLiteral("globe"));
auto topLevelDisplayAttr = topLevel.attribute<Akonadi::EntityDisplayAttribute>(Akonadi::Collection::AddIfMissing);
topLevelDisplayAttr->setDisplayName(i18n("Unified Mailboxes"));
topLevelDisplayAttr->setActiveIconName(QStringLiteral("globe"));
collections.push_back(topLevel);
for (const auto &boxIt : mBoxManager) {
......
......@@ -165,7 +165,7 @@ QHash<MessageComposer::PluginActionType::Type, QList<QAction *> > KMailPluginEdi
if (interface->plugin()->hasPopupMenuSupport()) {
type = MessageComposer::PluginActionType::PopupMenu;
if (currentAction) {
QList<QAction *> lst = mActionHash.value(type);
lst = mActionHash.value(type);
if (!lst.isEmpty()) {
QAction *act = new QAction(this);
act->setSeparator(true);
......@@ -178,7 +178,7 @@ QHash<MessageComposer::PluginActionType::Type, QList<QAction *> > KMailPluginEdi
}
if (interface->plugin()->hasToolBarSupport()) {
type = MessageComposer::PluginActionType::ToolBar;
QList<QAction *> lst = mActionHash.value(type);
lst = mActionHash.value(type);
if (!lst.isEmpty()) {
QAction *act = new QAction(this);
act->setSeparator(true);
......
......@@ -167,7 +167,7 @@ QHash<MessageComposer::PluginActionType::Type, QList<QAction *> > KMailPluginEdi
}
if (interface->plugin()->hasPopupMenuSupport()) {
type = MessageComposer::PluginActionType::PopupMenu;
QList<QAction *> lst = mActionHash.value(type);
lst = mActionHash.value(type);
if (!lst.isEmpty()) {
QAction *act = new QAction(this);
act->setSeparator(true);
......@@ -179,7 +179,7 @@ QHash<MessageComposer::PluginActionType::Type, QList<QAction *> > KMailPluginEdi
}
if (interface->plugin()->hasToolBarSupport()) {
type = MessageComposer::PluginActionType::ToolBar;
QList<QAction *> lst = mActionHash.value(type);
lst = mActionHash.value(type);
if (!lst.isEmpty()) {
QAction *act = new QAction(this);
act->setSeparator(true);
......
......@@ -1296,8 +1296,8 @@ void KMSetTagCommand::setTags()
KConfigGroup tag(KMKernel::self()->config(), "MessageListView");
const QString oldTagList = tag.readEntry("TagSelected");
QStringList lst = oldTagList.split(QLatin1Char(','));
for (const Akonadi::Tag &tag : qAsConst(mCreatedTags)) {
const QString url = tag.url().url();
for (const Akonadi::Tag &createdTag : qAsConst(mCreatedTags)) {
const QString url = createdTag.url().url();
if (!lst.contains(url)) {
lst.append(url);
}
......
......@@ -769,9 +769,6 @@ void KMReaderMainWin::showMessagePopup(const Akonadi::Item &msg, const QUrl &url
menu->addAction(mReaderWin->toggleMimePartTreeAction());
}
}
if (msg.isValid()) {
menu->addAction(mMsgActions->addFollowupReminderAction());
}
if (msg.isValid()) {
menu->addSeparator();
menu->addAction(mMsgActions->addFollowupReminderAction());
......
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