diff --git a/CMakeLists.txt b/CMakeLists.txt index 6260e9a..11157ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,24 +29,24 @@ include(ECMAddTests) set(QT_REQUIRED_VERSION "5.12.0") set(MAILCOMMON_LIB_VERSION ${PIM_VERSION}) -set(AKONADIMIME_LIB_VERSION "5.13.80") -set(MESSAGELIB_LIB_VERSION "5.13.80") -set(KMIME_LIB_VERSION "5.13.80") -set(KMAILTRANSPORT_LIB_VERSION "5.13.80") -set(MAILIMPORTER_LIB_VERSION "5.13.80") -set(LIBKDEPIM_LIB_VERSION "5.13.80") -set(PIMCOMMON_LIB_VERSION "5.13.80") - -set(AKONADI_VERSION "5.13.80") -set(AKONADIMIME_LIB_VERSION "5.13.80") -set(MESSAGELIB_LIB_VERSION "5.13.80") -set(KMIME_LIB_VERSION "5.13.80") -set(KMAILTRANSPORT_LIB_VERSION "5.13.80") -set(MAILIMPORTER_LIB_VERSION "5.13.80") -set(LIBKDEPIM_LIB_VERSION "5.13.80") -set(PIMCOMMON_LIB_VERSION "5.13.80") +set(AKONADIMIME_LIB_VERSION "5.13.90") +set(MESSAGELIB_LIB_VERSION "5.13.90") +set(KMIME_LIB_VERSION "5.13.90") +set(KMAILTRANSPORT_LIB_VERSION "5.13.90") +set(MAILIMPORTER_LIB_VERSION "5.13.90") +set(LIBKDEPIM_LIB_VERSION "5.13.90") +set(PIMCOMMON_LIB_VERSION "5.13.90") + +set(AKONADI_VERSION "5.13.90") +set(AKONADIMIME_LIB_VERSION "5.13.90") +set(MESSAGELIB_LIB_VERSION "5.13.90") +set(KMIME_LIB_VERSION "5.13.90") +set(KMAILTRANSPORT_LIB_VERSION "5.13.90") +set(MAILIMPORTER_LIB_VERSION "5.13.90") +set(LIBKDEPIM_LIB_VERSION "5.13.90") +set(PIMCOMMON_LIB_VERSION "5.13.90") set(PHONON_LIB_VERSION "4.10.60") -set(AKONADI_VERSION "5.13.80") +set(AKONADI_VERSION "5.13.90") find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets DBus Test Xml) diff --git a/src/filter/autotests/filteractiondecrypttest.cpp b/src/filter/autotests/filteractiondecrypttest.cpp index 9cafd98..4d021bd 100644 --- a/src/filter/autotests/filteractiondecrypttest.cpp +++ b/src/filter/autotests/filteractiondecrypttest.cpp @@ -91,7 +91,7 @@ void FilterActionDecryptTest::shouldDecrypt() auto decrypted = newMsg->encodedContent(); KMime::Message decryptedContent; - decryptedContent.setContent(newMsg->encodedContent()); + decryptedContent.setContent(decrypted); decryptedContent.parse(); KMime::Message expectedContent; expectedContent.setContent(content); diff --git a/src/filter/dialog/selectthunderbirdfilterfileswidget.cpp b/src/filter/dialog/selectthunderbirdfilterfileswidget.cpp index 006013f..b36db76 100644 --- a/src/filter/dialog/selectthunderbirdfilterfileswidget.cpp +++ b/src/filter/dialog/selectthunderbirdfilterfileswidget.cpp @@ -31,11 +31,7 @@ SelectThunderbirdFilterFilesWidget::SelectThunderbirdFilterFilesWidget(const QSt { ui->setupUi(this); connect(ui->buttonGroup, QOverload::of(&QButtonGroup::buttonClicked), this, &SelectThunderbirdFilterFilesWidget::slotButtonClicked); -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) connect(ui->profiles, QOverload::of(&KComboBox::currentIndexChanged), this, &SelectThunderbirdFilterFilesWidget::slotProfileChanged); -#else - connect(ui->profiles, QOverload::of(&KComboBox::currentIndexChanged), this, &SelectThunderbirdFilterFilesWidget::slotProfileChanged); -#endif ui->listFiles->setSelectionMode(QAbstractItemView::MultiSelection); QString defaultProfile; diff --git a/src/filter/filteractions/filteractionaddheader.cpp b/src/filter/filteractions/filteractionaddheader.cpp index 936621a..031550c 100644 --- a/src/filter/filteractions/filteractionaddheader.cpp +++ b/src/filter/filteractions/filteractionaddheader.cpp @@ -101,11 +101,7 @@ QWidget *FilterActionAddHeader::createParamWidget(QWidget *parent) const layout->addWidget(lineEdit, 1); setParamWidgetValue(widget); -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) connect(comboBox, QOverload::of(&KComboBox::currentIndexChanged), this, &FilterActionAddHeader::filterActionModified); -#else - connect(comboBox, QOverload::of(&KComboBox::currentIndexChanged), this, &FilterActionAddHeader::filterActionModified); -#endif connect(comboBox->lineEdit(), &QLineEdit::textChanged, this, &FilterAction::filterActionModified); connect(lineEdit, &QLineEdit::textChanged, this, &FilterActionAddHeader::filterActionModified); diff --git a/src/filter/filteractions/filteractionaddtag.cpp b/src/filter/filteractions/filteractionaddtag.cpp index 82068c0..ac0d3ac 100644 --- a/src/filter/filteractions/filteractionaddtag.cpp +++ b/src/filter/filteractions/filteractionaddtag.cpp @@ -52,11 +52,7 @@ QWidget *FilterActionAddTag::createParamWidget(QWidget *parent) const } setParamWidgetValue(mComboBox); -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) connect(mComboBox, QOverload::of(&QComboBox::currentIndexChanged), this, &FilterActionAddTag::filterActionModified); -#else - connect(mComboBox, QOverload::of(&QComboBox::currentIndexChanged), this, &FilterActionAddTag::filterActionModified); -#endif return mComboBox; } diff --git a/src/filter/filteractions/filteractionaddtoaddressbook.cpp b/src/filter/filteractions/filteractionaddtoaddressbook.cpp index ec68f3b..3f6ab9b 100644 --- a/src/filter/filteractions/filteractionaddtoaddressbook.cpp +++ b/src/filter/filteractions/filteractionaddtoaddressbook.cpp @@ -140,11 +140,7 @@ QWidget *FilterActionAddToAddressBook::createParamWidget(QWidget *parent) const collectionComboBox->setToolTip(i18n("This defines the preferred address book.\n" "If it is not accessible, the filter will fallback to the default address book.")); layout->addWidget(collectionComboBox, 1, 2); -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) connect(headerCombo, QOverload::of(&KComboBox::currentIndexChanged), this, &FilterActionAddToAddressBook::filterActionModified); -#else - connect(headerCombo, QOverload::of(&KComboBox::currentIndexChanged), this, &FilterActionAddToAddressBook::filterActionModified); -#endif connect(collectionComboBox, QOverload::of(&Akonadi::CollectionComboBox::activated), this, &FilterActionAddToAddressBook::filterActionModified); connect(categoryEdit, SIGNAL(selectionChanged(QStringList)), this, SIGNAL(filterActionModified())); @@ -194,11 +190,7 @@ void FilterActionAddToAddressBook::applyParamWidgetValue(QWidget *paramWidget) // we use the previously 'stored' value from the 'collectionId' property if (collection.isValid()) { mCollectionId = collection.id(); -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) connect(collectionComboBox, QOverload::of(&Akonadi::CollectionComboBox::currentIndexChanged), this, &FilterActionAddToAddressBook::filterActionModified); -#else - connect(collectionComboBox, QOverload::of(&Akonadi::CollectionComboBox::currentIndexChanged), this, &FilterActionAddToAddressBook::filterActionModified); -#endif } else { const QVariant value = collectionComboBox->property("collectionId"); if (value.isValid()) { diff --git a/src/filter/filteractions/filteractionforward.cpp b/src/filter/filteractions/filteractionforward.cpp index 70e0f24..f821e13 100644 --- a/src/filter/filteractions/filteractionforward.cpp +++ b/src/filter/filteractions/filteractionforward.cpp @@ -124,11 +124,7 @@ QWidget *FilterActionForward::createParamWidget(QWidget *parent) const templateCombo->setEnabled(templateCombo->count() > 1); templateCombo->setToolTip(i18n("The template used when forwarding")); templateCombo->setWhatsThis(i18n("Set the forwarding template that will be used with this filter.")); -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) connect(templateCombo, QOverload::of(&KComboBox::currentIndexChanged), this, &FilterActionForward::filterActionModified); -#else - connect(templateCombo, QOverload::of(&KComboBox::currentIndexChanged), this, &FilterActionForward::filterActionModified); -#endif connect(addressRequester, &Akonadi::EmailAddressRequester::textChanged, this, &FilterActionForward::filterActionModified); return addressAndTemplate; diff --git a/src/filter/filteractions/filteractionremoveheader.cpp b/src/filter/filteractions/filteractionremoveheader.cpp index 99bbfb3..614e294 100644 --- a/src/filter/filteractions/filteractionremoveheader.cpp +++ b/src/filter/filteractions/filteractionremoveheader.cpp @@ -50,11 +50,7 @@ QWidget *FilterActionRemoveHeader::createParamWidget(QWidget *parent) const comboBox->setMinimumWidth(50); comboBox->setInsertPolicy(QComboBox::InsertAtBottom); setParamWidgetValue(comboBox); -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) connect(comboBox, QOverload::of(&KComboBox::currentIndexChanged), this, &FilterActionRemoveHeader::filterActionModified); -#else - connect(comboBox, QOverload::of(&KComboBox::currentIndexChanged), this, &FilterActionRemoveHeader::filterActionModified); -#endif connect(comboBox->lineEdit(), &QLineEdit::textChanged, this, &FilterAction::filterActionModified); diff --git a/src/filter/filteractions/filteractionrewriteheader.cpp b/src/filter/filteractions/filteractionrewriteheader.cpp index 84fdd86..716d390 100644 --- a/src/filter/filteractions/filteractionrewriteheader.cpp +++ b/src/filter/filteractions/filteractionrewriteheader.cpp @@ -147,11 +147,7 @@ QWidget *FilterActionRewriteHeader::createParamWidget(QWidget *parent) const layout->addWidget(lineEdit, 1); setParamWidgetValue(widget); -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) connect(comboBox, QOverload::of(&KComboBox::currentIndexChanged), this, &FilterActionRewriteHeader::filterActionModified); -#else - connect(comboBox, QOverload::of(&KComboBox::currentIndexChanged), this, &FilterActionRewriteHeader::filterActionModified); -#endif connect(comboBox->lineEdit(), &QLineEdit::textChanged, this, &FilterAction::filterActionModified); connect(regExpLineEdit, &KLineEdit::textChanged, this, &FilterActionRewriteHeader::filterActionModified); diff --git a/src/filter/filteractions/filteractionsetidentity.cpp b/src/filter/filteractions/filteractionsetidentity.cpp index d3c98d1..348f4b0 100644 --- a/src/filter/filteractions/filteractionsetidentity.cpp +++ b/src/filter/filteractions/filteractionsetidentity.cpp @@ -106,11 +106,7 @@ QWidget *FilterActionSetIdentity::createParamWidget(QWidget *parent) const comboBox->setObjectName(QStringLiteral("identitycombobox")); comboBox->setCurrentIdentity(mParameter); -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) connect(comboBox, QOverload::of(&KIdentityManagement::IdentityCombo::currentIndexChanged), this, &FilterActionSetIdentity::filterActionModified); -#else - connect(comboBox, QOverload::of(&KIdentityManagement::IdentityCombo::currentIndexChanged), this, &FilterActionSetIdentity::filterActionModified); -#endif return comboBox; } diff --git a/src/filter/filteractions/filteractionsettransport.cpp b/src/filter/filteractions/filteractionsettransport.cpp index c9be64c..96903eb 100644 --- a/src/filter/filteractions/filteractionsettransport.cpp +++ b/src/filter/filteractions/filteractionsettransport.cpp @@ -40,11 +40,7 @@ QWidget *FilterActionSetTransport::createParamWidget(QWidget *parent) const MailTransport::TransportComboBox *transportCombobox = new MailTransport::TransportComboBox(parent); transportCombobox->setObjectName(QStringLiteral("transportcombobox")); setParamWidgetValue(transportCombobox); -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) connect(transportCombobox, QOverload::of(&MailTransport::TransportComboBox::currentIndexChanged), this, &FilterActionSetTransport::filterActionModified); -#else - connect(transportCombobox, QOverload::of(&MailTransport::TransportComboBox::currentIndexChanged), this, &FilterActionSetTransport::filterActionModified); -#endif return transportCombobox; } diff --git a/src/filter/filteractions/filteractionwithstringlist.cpp b/src/filter/filteractions/filteractionwithstringlist.cpp index e61b8bc..7d616d1 100644 --- a/src/filter/filteractions/filteractionwithstringlist.cpp +++ b/src/filter/filteractions/filteractionwithstringlist.cpp @@ -36,11 +36,7 @@ QWidget *FilterActionWithStringList::createParamWidget(QWidget *parent) const comboBox->setEditable(false); comboBox->addItems(mParameterList); setParamWidgetValue(comboBox); -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) connect(comboBox, QOverload::of(&QComboBox::currentIndexChanged), this, &FilterActionWithStringList::filterActionModified); -#else - connect(comboBox, QOverload::of(&QComboBox::currentIndexChanged), this, &FilterActionWithStringList::filterActionModified); -#endif return comboBox; } diff --git a/src/filter/mailfilter.cpp b/src/filter/mailfilter.cpp index 0e3c112..2667afc 100644 --- a/src/filter/mailfilter.cpp +++ b/src/filter/mailfilter.cpp @@ -137,8 +137,6 @@ QString MailFilter::name() const MailFilter::ReturnCode MailFilter::execActions(ItemContext &context, bool &stopIt, bool applyOnOutbound) const { - ReturnCode status = NoResult; - QVector::const_iterator it(mActions.constBegin()); QVector::const_iterator end(mActions.constEnd()); for (; it != end; ++it) { @@ -148,7 +146,7 @@ MailFilter::ReturnCode MailFilter::execActions(ItemContext &context, bool &stopI FilterLog::instance()->add(logText, FilterLog::AppliedAction); } - FilterAction::ReturnCode result = (*it)->process(context, applyOnOutbound); + const FilterAction::ReturnCode result = (*it)->process(context, applyOnOutbound); switch (result) { case FilterAction::CriticalError: @@ -171,13 +169,9 @@ MailFilter::ReturnCode MailFilter::execActions(ItemContext &context, bool &stopI } } - if (status == NoResult) { // No filters matched, keep copy of message - status = GoOn; - } - stopIt = stopProcessingHere(); - return status; + return GoOn; } QVector *MailFilter::actions() diff --git a/src/folder/foldersettings.cpp b/src/folder/foldersettings.cpp index ee34a39..0961b7d 100644 --- a/src/folder/foldersettings.cpp +++ b/src/folder/foldersettings.cpp @@ -291,9 +291,7 @@ void FolderSettings::writeConfig() const void FolderSettings::setShortcut(const QKeySequence &sc) { - if (mShortcut != sc) { - mShortcut = sc; - } + mShortcut = sc; } const QKeySequence &FolderSettings::shortcut() const diff --git a/src/job/expirejob.cpp b/src/job/expirejob.cpp index 461f095..336f0cc 100644 --- a/src/job/expirejob.cpp +++ b/src/job/expirejob.cpp @@ -80,10 +80,10 @@ void ExpireJob::execute() { mMaxUnreadTime = 0; mMaxReadTime = 0; - int unreadDays, readDays; const MailCommon::ExpireCollectionAttribute *expirationAttribute = mSrcFolder.attribute(); if (expirationAttribute) { + int unreadDays, readDays; expirationAttribute->daysToExpire(unreadDays, readDays); if (unreadDays > 0) { diff --git a/src/search/searchrule/searchrulestring.cpp b/src/search/searchrule/searchrulestring.cpp index ece1f65..55fe51e 100644 --- a/src/search/searchrule/searchrulestring.cpp +++ b/src/search/searchrule/searchrulestring.cpp @@ -178,13 +178,13 @@ bool SearchRuleString::matches(const Akonadi::Item &item) const bool rc = matchesInternal(msgContents); if (FilterLog::instance()->isLogging()) { - QString msg = (rc ? QStringLiteral("1 = ") : QStringLiteral("0 = ")); - msg += FilterLog::recode(asString()); + QString msgStr = (rc ? QStringLiteral("1 = ") : QStringLiteral("0 = ")); + msgStr += FilterLog::recode(asString()); // only log headers because messages and bodies can be pretty large if (logContents) { - msg += QLatin1String(" (") + FilterLog::recode(msgContents) + QLatin1String(")"); + msgStr += QLatin1String(" (") + FilterLog::recode(msgContents) + QLatin1String(")"); } - FilterLog::instance()->add(msg, FilterLog::RuleResult); + FilterLog::instance()->add(msgStr, FilterLog::RuleResult); } return rc; } diff --git a/src/snippets/snippetwidget.cpp b/src/snippets/snippetwidget.cpp index 0253197..a8646b8 100644 --- a/src/snippets/snippetwidget.cpp +++ b/src/snippets/snippetwidget.cpp @@ -73,11 +73,7 @@ SnippetWidget::SnippetWidget(QWidget *parent) Q_EMIT textChanged(str); d->wasChanged = true; }); -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) connect(d->mUi.groupBox, QOverload::of(&QComboBox::currentIndexChanged), this, [this](int index) { -#else - connect(d->mUi.groupBox, QOverload::of(&QComboBox::currentIndexChanged), this, [this](int index) { -#endif Q_EMIT groupChanged(index); d->wasChanged = true; });