Merge remote-tracking branch 'origin/release/20.04'

wilder
Laurent Montel 6 years ago
commit 025779cdc7
  1. 34
      CMakeLists.txt
  2. 2
      src/filter/autotests/filteractiondecrypttest.cpp
  3. 4
      src/filter/dialog/selectthunderbirdfilterfileswidget.cpp
  4. 4
      src/filter/filteractions/filteractionaddheader.cpp
  5. 4
      src/filter/filteractions/filteractionaddtag.cpp
  6. 8
      src/filter/filteractions/filteractionaddtoaddressbook.cpp
  7. 4
      src/filter/filteractions/filteractionforward.cpp
  8. 4
      src/filter/filteractions/filteractionremoveheader.cpp
  9. 4
      src/filter/filteractions/filteractionrewriteheader.cpp
  10. 4
      src/filter/filteractions/filteractionsetidentity.cpp
  11. 4
      src/filter/filteractions/filteractionsettransport.cpp
  12. 4
      src/filter/filteractions/filteractionwithstringlist.cpp
  13. 10
      src/filter/mailfilter.cpp
  14. 4
      src/folder/foldersettings.cpp
  15. 2
      src/job/expirejob.cpp
  16. 8
      src/search/searchrule/searchrulestring.cpp
  17. 4
      src/snippets/snippetwidget.cpp

@ -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)

@ -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);

@ -31,11 +31,7 @@ SelectThunderbirdFilterFilesWidget::SelectThunderbirdFilterFilesWidget(const QSt
{
ui->setupUi(this);
connect(ui->buttonGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked), this, &SelectThunderbirdFilterFilesWidget::slotButtonClicked);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(ui->profiles, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &SelectThunderbirdFilterFilesWidget::slotProfileChanged);
#else
connect(ui->profiles, QOverload<int, const QString &>::of(&KComboBox::currentIndexChanged), this, &SelectThunderbirdFilterFilesWidget::slotProfileChanged);
#endif
ui->listFiles->setSelectionMode(QAbstractItemView::MultiSelection);
QString defaultProfile;

@ -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<int>::of(&KComboBox::currentIndexChanged), this, &FilterActionAddHeader::filterActionModified);
#else
connect(comboBox, QOverload<int, const QString &>::of(&KComboBox::currentIndexChanged), this, &FilterActionAddHeader::filterActionModified);
#endif
connect(comboBox->lineEdit(), &QLineEdit::textChanged,
this, &FilterAction::filterActionModified);
connect(lineEdit, &QLineEdit::textChanged, this, &FilterActionAddHeader::filterActionModified);

@ -52,11 +52,7 @@ QWidget *FilterActionAddTag::createParamWidget(QWidget *parent) const
}
setParamWidgetValue(mComboBox);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(mComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &FilterActionAddTag::filterActionModified);
#else
connect(mComboBox, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, &FilterActionAddTag::filterActionModified);
#endif
return mComboBox;
}

@ -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<int>::of(&KComboBox::currentIndexChanged), this, &FilterActionAddToAddressBook::filterActionModified);
#else
connect(headerCombo, QOverload<int, const QString &>::of(&KComboBox::currentIndexChanged), this, &FilterActionAddToAddressBook::filterActionModified);
#endif
connect(collectionComboBox, QOverload<int>::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<int>::of(&Akonadi::CollectionComboBox::currentIndexChanged), this, &FilterActionAddToAddressBook::filterActionModified);
#else
connect(collectionComboBox, QOverload<int, const QString &>::of(&Akonadi::CollectionComboBox::currentIndexChanged), this, &FilterActionAddToAddressBook::filterActionModified);
#endif
} else {
const QVariant value = collectionComboBox->property("collectionId");
if (value.isValid()) {

@ -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<int>::of(&KComboBox::currentIndexChanged), this, &FilterActionForward::filterActionModified);
#else
connect(templateCombo, QOverload<int, const QString &>::of(&KComboBox::currentIndexChanged), this, &FilterActionForward::filterActionModified);
#endif
connect(addressRequester, &Akonadi::EmailAddressRequester::textChanged, this, &FilterActionForward::filterActionModified);
return addressAndTemplate;

@ -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<int>::of(&KComboBox::currentIndexChanged), this, &FilterActionRemoveHeader::filterActionModified);
#else
connect(comboBox, QOverload<int, const QString &>::of(&KComboBox::currentIndexChanged), this, &FilterActionRemoveHeader::filterActionModified);
#endif
connect(comboBox->lineEdit(), &QLineEdit::textChanged,
this, &FilterAction::filterActionModified);

@ -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<int>::of(&KComboBox::currentIndexChanged), this, &FilterActionRewriteHeader::filterActionModified);
#else
connect(comboBox, QOverload<int, const QString &>::of(&KComboBox::currentIndexChanged), this, &FilterActionRewriteHeader::filterActionModified);
#endif
connect(comboBox->lineEdit(), &QLineEdit::textChanged,
this, &FilterAction::filterActionModified);
connect(regExpLineEdit, &KLineEdit::textChanged, this, &FilterActionRewriteHeader::filterActionModified);

@ -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<int>::of(&KIdentityManagement::IdentityCombo::currentIndexChanged), this, &FilterActionSetIdentity::filterActionModified);
#else
connect(comboBox, QOverload<int, const QString &>::of(&KIdentityManagement::IdentityCombo::currentIndexChanged), this, &FilterActionSetIdentity::filterActionModified);
#endif
return comboBox;
}

@ -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<int>::of(&MailTransport::TransportComboBox::currentIndexChanged), this, &FilterActionSetTransport::filterActionModified);
#else
connect(transportCombobox, QOverload<int, const QString &>::of(&MailTransport::TransportComboBox::currentIndexChanged), this, &FilterActionSetTransport::filterActionModified);
#endif
return transportCombobox;
}

@ -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<int>::of(&QComboBox::currentIndexChanged), this, &FilterActionWithStringList::filterActionModified);
#else
connect(comboBox, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, &FilterActionWithStringList::filterActionModified);
#endif
return comboBox;
}

@ -137,8 +137,6 @@ QString MailFilter::name() const
MailFilter::ReturnCode MailFilter::execActions(ItemContext &context, bool &stopIt, bool applyOnOutbound) const
{
ReturnCode status = NoResult;
QVector<FilterAction *>::const_iterator it(mActions.constBegin());
QVector<FilterAction *>::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<FilterAction *> *MailFilter::actions()

@ -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

@ -80,10 +80,10 @@ void ExpireJob::execute()
{
mMaxUnreadTime = 0;
mMaxReadTime = 0;
int unreadDays, readDays;
const MailCommon::ExpireCollectionAttribute *expirationAttribute = mSrcFolder.attribute<MailCommon::ExpireCollectionAttribute>();
if (expirationAttribute) {
int unreadDays, readDays;
expirationAttribute->daysToExpire(unreadDays, readDays);
if (unreadDays > 0) {

@ -178,13 +178,13 @@ bool SearchRuleString::matches(const Akonadi::Item &item) const
bool rc = matchesInternal(msgContents);
if (FilterLog::instance()->isLogging()) {
QString msg = (rc ? QStringLiteral("<font color=#00FF00>1 = </font>") : QStringLiteral("<font color=#FF0000>0 = </font>"));
msg += FilterLog::recode(asString());
QString msgStr = (rc ? QStringLiteral("<font color=#00FF00>1 = </font>") : QStringLiteral("<font color=#FF0000>0 = </font>"));
msgStr += FilterLog::recode(asString());
// only log headers because messages and bodies can be pretty large
if (logContents) {
msg += QLatin1String(" (<i>") + FilterLog::recode(msgContents) + QLatin1String("</i>)");
msgStr += QLatin1String(" (<i>") + FilterLog::recode(msgContents) + QLatin1String("</i>)");
}
FilterLog::instance()->add(msg, FilterLog::RuleResult);
FilterLog::instance()->add(msgStr, FilterLog::RuleResult);
}
return rc;
}

@ -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<int>::of(&QComboBox::currentIndexChanged), this, [this](int index) {
#else
connect(d->mUi.groupBox, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged), this, [this](int index) {
#endif
Q_EMIT groupChanged(index);
d->wasChanged = true;
});

Loading…
Cancel
Save