Commit 0e8effc6 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile against qt5.15

parent f59be616
......@@ -74,7 +74,7 @@ GPGHelper::~GPGHelper()
auto env = gpgshutdown.processEnvironment();
env.insert(QStringLiteral("GNUPGHOME"), gnupgHome());
gpgshutdown.setProcessEnvironment(env);
gpgshutdown.start(QStringLiteral("gpg-connect-agent"));
gpgshutdown.start(QStringLiteral("gpg-connect-agent"), QStringList());
QVERIFY(gpgshutdown.waitForStarted());
gpgshutdown.write("KILLAGENT");
gpgshutdown.closeWriteChannel();
......
......@@ -31,7 +31,11 @@ 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,8 +101,11 @@ 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,8 +52,11 @@ 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,8 +140,11 @@ 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()));
......@@ -191,7 +194,11 @@ void FilterActionAddToAddressBook::applyParamWidgetValue(QWidget *paramWidget)
// we use the previously 'stored' value from the 'collectionId' property
if (collection.isValid()) {
mCollectionId = collection.id();
connect(collectionComboBox, QOverload< int>::of(&Akonadi::CollectionComboBox::currentIndexChanged), this, &FilterActionAddToAddressBook::filterActionModified);
#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,8 +124,11 @@ 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,8 +50,11 @@ 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,8 +147,11 @@ 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,8 +106,11 @@ 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,9 +40,11 @@ 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,8 +36,11 @@ 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;
}
......
......@@ -73,8 +73,11 @@ 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;
});
......
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