From 82a929958980733ffc4e2195485054343a9aed7f Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Sat, 21 Mar 2020 12:18:23 +0100 Subject: [PATCH 1/3] GIT_SILENT: Prepare 5.14.0 rc --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e0f71488a..213891c7f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.5) -set(KDEPIM_VERSION_NUMBER "5.13.80") +set(KDEPIM_VERSION_NUMBER "5.13.90") project(kmail VERSION ${KDEPIM_VERSION_NUMBER}) @@ -32,8 +32,8 @@ include(ECMAddAppIcon) include(ECMQtDeclareLoggingCategory) # Do NOT add quote -set(KDEPIM_DEV_VERSION beta1) -set(RELEASE_SERVICE_VERSION "20.03.80") +set(KDEPIM_DEV_VERSION rc) +set(RELEASE_SERVICE_VERSION "20.03.90") # add an extra space if(DEFINED KDEPIM_DEV_VERSION) From 2a8bd5308c5082820a5428a614101482892163ff Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Tue, 24 Mar 2020 07:01:29 +0100 Subject: [PATCH 2/3] Fix cppcheck warning --- agents/archivemailagent/archivemailwidget.cpp | 4 ++-- agents/unifiedmailboxagent/unifiedmailboxagent.cpp | 6 +++--- .../kmailplugineditorconverttextmanagerinterface.cpp | 4 ++-- .../plugininterface/kmailplugineditormanagerinterface.cpp | 4 ++-- src/kmcommands.cpp | 4 ++-- src/kmreadermainwin.cpp | 3 --- 6 files changed, 11 insertions(+), 14 deletions(-) diff --git a/agents/archivemailagent/archivemailwidget.cpp b/agents/archivemailagent/archivemailwidget.cpp index 73ff45d5b..82ba5377b 100644 --- a/agents/archivemailagent/archivemailwidget.cpp +++ b/agents/archivemailagent/archivemailwidget.cpp @@ -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 { diff --git a/agents/unifiedmailboxagent/unifiedmailboxagent.cpp b/agents/unifiedmailboxagent/unifiedmailboxagent.cpp index 7369851d4..aeffa515f 100644 --- a/agents/unifiedmailboxagent/unifiedmailboxagent.cpp +++ b/agents/unifiedmailboxagent/unifiedmailboxagent.cpp @@ -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::Collection::AddIfMissing); - displayAttr->setDisplayName(i18n("Unified Mailboxes")); - displayAttr->setActiveIconName(QStringLiteral("globe")); + auto topLevelDisplayAttr = topLevel.attribute(Akonadi::Collection::AddIfMissing); + topLevelDisplayAttr->setDisplayName(i18n("Unified Mailboxes")); + topLevelDisplayAttr->setActiveIconName(QStringLiteral("globe")); collections.push_back(topLevel); for (const auto &boxIt : mBoxManager) { diff --git a/src/editor/plugininterface/kmailplugineditorconverttextmanagerinterface.cpp b/src/editor/plugininterface/kmailplugineditorconverttextmanagerinterface.cpp index 4d507064a..0bf70e1f1 100644 --- a/src/editor/plugininterface/kmailplugineditorconverttextmanagerinterface.cpp +++ b/src/editor/plugininterface/kmailplugineditorconverttextmanagerinterface.cpp @@ -165,7 +165,7 @@ QHash > KMailPluginEdi if (interface->plugin()->hasPopupMenuSupport()) { type = MessageComposer::PluginActionType::PopupMenu; if (currentAction) { - QList lst = mActionHash.value(type); + lst = mActionHash.value(type); if (!lst.isEmpty()) { QAction *act = new QAction(this); act->setSeparator(true); @@ -178,7 +178,7 @@ QHash > KMailPluginEdi } if (interface->plugin()->hasToolBarSupport()) { type = MessageComposer::PluginActionType::ToolBar; - QList lst = mActionHash.value(type); + lst = mActionHash.value(type); if (!lst.isEmpty()) { QAction *act = new QAction(this); act->setSeparator(true); diff --git a/src/editor/plugininterface/kmailplugineditormanagerinterface.cpp b/src/editor/plugininterface/kmailplugineditormanagerinterface.cpp index 53a70eb99..cdeeb0d09 100644 --- a/src/editor/plugininterface/kmailplugineditormanagerinterface.cpp +++ b/src/editor/plugininterface/kmailplugineditormanagerinterface.cpp @@ -167,7 +167,7 @@ QHash > KMailPluginEdi } if (interface->plugin()->hasPopupMenuSupport()) { type = MessageComposer::PluginActionType::PopupMenu; - QList lst = mActionHash.value(type); + lst = mActionHash.value(type); if (!lst.isEmpty()) { QAction *act = new QAction(this); act->setSeparator(true); @@ -179,7 +179,7 @@ QHash > KMailPluginEdi } if (interface->plugin()->hasToolBarSupport()) { type = MessageComposer::PluginActionType::ToolBar; - QList lst = mActionHash.value(type); + lst = mActionHash.value(type); if (!lst.isEmpty()) { QAction *act = new QAction(this); act->setSeparator(true); diff --git a/src/kmcommands.cpp b/src/kmcommands.cpp index dc6f706f6..bdb3fdd31 100644 --- a/src/kmcommands.cpp +++ b/src/kmcommands.cpp @@ -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); } diff --git a/src/kmreadermainwin.cpp b/src/kmreadermainwin.cpp index 0c82a2a29..d56ea5ad8 100644 --- a/src/kmreadermainwin.cpp +++ b/src/kmreadermainwin.cpp @@ -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()); From 8de0619511e08c76856bc122b133755cf287e7c9 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Tue, 24 Mar 2020 07:28:53 +0100 Subject: [PATCH 3/3] Fix clazy warning --- src/editor/kmcomposerwin.cpp | 6 +++--- src/editor/kmcomposerwin.h | 2 +- src/kmkernel.cpp | 3 ++- src/kmreaderwin.cpp | 6 +++--- src/searchdialog/kmsearchmessagemodel.cpp | 6 +++--- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/editor/kmcomposerwin.cpp b/src/editor/kmcomposerwin.cpp index 684e37aaa..63b9148fb 100644 --- a/src/editor/kmcomposerwin.cpp +++ b/src/editor/kmcomposerwin.cpp @@ -454,7 +454,7 @@ KMComposerWin::KMComposerWin(const KMime::Message::Ptr &aMsg, bool lastSignState applyMainWindowSettings(KMKernel::self()->config()->group("Composer")); mUpdateWindowTitleConnection = connect(mEdtSubject, &PimCommon::LineEditWithAutoCorrection::textChanged, this, &KMComposerWin::slotUpdateWindowTitle); - mIdentityConnection = connect(identity, &KIdentityManagement::IdentityCombo::identityChanged, [this](uint val) { + mIdentityConnection = connect(identity, &KIdentityManagement::IdentityCombo::identityChanged, this, [this](uint val) { slotIdentityChanged(val); }); connect(kmkernel->identityManager(), qOverload(&KIdentityManagement::IdentityManager::changed), this, [this](uint val) { @@ -642,7 +642,7 @@ void KMComposerWin::addAttachmentsAndSend(const QList &urls, const QString send(how); } -void KMComposerWin::addAttachment(const QList &infos, bool showWarning) +void KMComposerWin::addAttachment(const QList &infos, bool showWarning) { QStringList lst; for (const AttachmentInfo &info : infos) { @@ -1661,7 +1661,7 @@ void KMComposerWin::setMessage(const KMime::Message::Ptr &newMsg, bool lastSignS // load the mId into the gui, sticky or not, without emitting mComposerBase->identityCombo()->setCurrentIdentity(mId); - mIdentityConnection = connect(mComposerBase->identityCombo(), &KIdentityManagement::IdentityCombo::identityChanged, [this](uint val) { + mIdentityConnection = connect(mComposerBase->identityCombo(), &KIdentityManagement::IdentityCombo::identityChanged, this, [this](uint val) { slotIdentityChanged(val); }); diff --git a/src/editor/kmcomposerwin.h b/src/editor/kmcomposerwin.h index 4fa3bc312..3c8756207 100644 --- a/src/editor/kmcomposerwin.h +++ b/src/editor/kmcomposerwin.h @@ -144,7 +144,7 @@ public Q_SLOTS: void addAttachmentsAndSend(const QList &urls, const QString &comment, int how) override; - void addAttachment(const QList &infos, bool showWarning) override; + void addAttachment(const QList &infos, bool showWarning) override; void addAttachment(const QString &name, KMime::Headers::contentEncoding cte, const QString &charset, const QByteArray &data, const QByteArray &mimeType) override; diff --git a/src/kmkernel.cpp b/src/kmkernel.cpp index 04339c0c9..d1660a8fe 100644 --- a/src/kmkernel.cpp +++ b/src/kmkernel.cpp @@ -426,7 +426,8 @@ bool KMKernel::handleCommandLine(bool noArgsOpensReader, const QStringList &args if (!calledWithSession) { // only read additional command line arguments if kmail/kontact is // not called with "-session foo" - for (const QString &arg : parser.positionalArguments()) { + const QStringList lstPositionalArguments = parser.positionalArguments(); + for (const QString &arg : lstPositionalArguments) { if (arg.startsWith(QLatin1String("mailto:"), Qt::CaseInsensitive)) { const QUrl urlDecoded(QUrl::fromPercentEncoding(arg.toUtf8())); const QVector > values = MessageCore::StringUtil::parseMailtoUrl(urlDecoded); diff --git a/src/kmreaderwin.cpp b/src/kmreaderwin.cpp index 3e9d396ac..50d7f47a0 100644 --- a/src/kmreaderwin.cpp +++ b/src/kmreaderwin.cpp @@ -302,13 +302,13 @@ QString KMReaderWin::newFeaturesMD5() void KMReaderWin::displaySplashPage(const QString &templateName, const QVariantHash &_data) { QVariantHash data = _data; - if (!data.contains(QLatin1String("icon"))) { + if (!data.contains(QStringLiteral("icon"))) { data[QStringLiteral("icon")] = QStringLiteral("kmail"); } - if (!data.contains(QLatin1String("name"))) { + if (!data.contains(QStringLiteral("name"))) { data[QStringLiteral("name")] = i18n("KMail"); } - if (!data.contains(QLatin1String("subtitle"))) { + if (!data.contains(QStringLiteral("subtitle"))) { data[QStringLiteral("subtitle")] = i18n("The KDE Mail Client"); } diff --git a/src/searchdialog/kmsearchmessagemodel.cpp b/src/searchdialog/kmsearchmessagemodel.cpp index bc8438ebe..5a4fa3b35 100644 --- a/src/searchdialog/kmsearchmessagemodel.cpp +++ b/src/searchdialog/kmsearchmessagemodel.cpp @@ -109,9 +109,9 @@ static QString toolTip(const Akonadi::Item &item) tip += htmlCodeForStandardRow.arg(i18n("Preview"), content.replace(QLatin1Char('\n'), QStringLiteral("
"))); } } else { - tip += htmlCodeForStandardRow.arg(msg->from()->displayString()).arg(i18n("From")); - tip += htmlCodeForStandardRow.arg(msg->to()->displayString()).arg(i18nc("Receiver of the email", "To")); - tip += htmlCodeForStandardRow.arg(QLocale().toString(msg->date()->dateTime())).arg(i18n("Date")); + tip += htmlCodeForStandardRow.arg(msg->from()->displayString(), i18n("From")); + tip += htmlCodeForStandardRow.arg(msg->to()->displayString(), i18nc("Receiver of the email", "To")); + tip += htmlCodeForStandardRow.arg(QLocale().toString(msg->date()->dateTime()), i18n("Date")); if (!content.isEmpty()) { tip += htmlCodeForStandardRow.arg(content.replace(QLatin1Char('\n'), QStringLiteral("
")), i18n("Preview")); }