Commit d372cb57 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port deprecated methods

parent 07b5175b
......@@ -84,7 +84,11 @@ MergeContactWidget::MergeContactWidget(QWidget *parent)
mCollectionCombobox->setMinimumWidth(250);
mCollectionCombobox->setMimeTypeFilter(QStringList() << KContacts::Addressee::mimeType());
mCollectionCombobox->setObjectName(QStringLiteral("akonadicombobox"));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(mCollectionCombobox, qOverload<int>(&Akonadi::CollectionComboBox::currentIndexChanged), this, &MergeContactWidget::slotUpdateMergeButton);
#else
connect(mCollectionCombobox, qOverload<int, const QString &>(&Akonadi::CollectionComboBox::currentIndexChanged), this, &MergeContactWidget::slotUpdateMergeButton);
#endif
connect(mCollectionCombobox, qOverload<int>(&Akonadi::CollectionComboBox::activated), this, &MergeContactWidget::slotUpdateMergeButton);
hbox->addWidget(mCollectionCombobox);
......
......@@ -73,7 +73,11 @@ SearchDuplicateResultWidget::SearchDuplicateResultWidget(QWidget *parent)
mCollectionCombobox->setMinimumWidth(250);
mCollectionCombobox->setMimeTypeFilter(QStringList() << KContacts::Addressee::mimeType());
mCollectionCombobox->setObjectName(QStringLiteral("akonadicombobox"));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(mCollectionCombobox, qOverload<int>(&Akonadi::CollectionComboBox::currentIndexChanged), this, &SearchDuplicateResultWidget::slotUpdateMergeButton);
#else
connect(mCollectionCombobox, qOverload<int, const QString &>(&Akonadi::CollectionComboBox::currentIndexChanged), this, &SearchDuplicateResultWidget::slotUpdateMergeButton);
#endif
connect(mCollectionCombobox, qOverload<int>(&Akonadi::CollectionComboBox::activated), this, &SearchDuplicateResultWidget::slotUpdateMergeButton);
mergeLayout->addWidget(mCollectionCombobox);
......
......@@ -60,7 +60,11 @@ AutomaticAddContactsTabWidget::AutomaticAddContactsTabWidget(QWidget *parent, QA
mCollectionCombobox->setObjectName(QStringLiteral("akonadicombobox"));
hlay->addWidget(mCollectionCombobox);
hlay->addStretch(1);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(mCollectionCombobox, qOverload<int>(&Akonadi::CollectionComboBox::currentIndexChanged), this, &AutomaticAddContactsTabWidget::configureChanged);
#else
connect(mCollectionCombobox, qOverload<int, const QString &>(&Akonadi::CollectionComboBox::currentIndexChanged), this, &AutomaticAddContactsTabWidget::configureChanged);
#endif
connect(mCollectionCombobox, qOverload<int>(&Akonadi::CollectionComboBox::activated), this, &AutomaticAddContactsTabWidget::configureChanged);
mainLayout->addStretch(1);
......
......@@ -100,7 +100,8 @@ bool ApplicationPGPKeyFormatter::render(const MimeTreeParser::MessagePartPtr &ms
const auto key = mp->key();
block.setProperty("uid", mp->userID());
block.setProperty("fingerprint", mp->fingerprint());
block.setProperty("created", mp->keyDate().toString(Qt::SystemLocaleDate));
QLocale l;
block.setProperty("created", l.toString(mp->keyDate(), QLocale::ShortFormat));
if (!key.isNull()) {
block.setProperty("keyUrl", QStringLiteral("kmail:showCertificate#GpgME ### gpgme ### %1").arg(QString::fromLatin1(key.keyID())));
}
......
......@@ -83,8 +83,13 @@ EventEdit::EventEdit(QWidget *parent)
#endif
mCollectionCombobox->setToolTip(i18n("Calendar where the new event will be stored"));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(mCollectionCombobox, qOverload<int>(&Akonadi::CollectionComboBox::currentIndexChanged), this, &EventEdit::slotCollectionChanged);
#else
connect(mCollectionCombobox, qOverload<int, const QString &>(&Akonadi::CollectionComboBox::currentIndexChanged), this, &EventEdit::slotCollectionChanged);
#endif
connect(mCollectionCombobox, qOverload<int>(&Akonadi::CollectionComboBox::activated), this, &EventEdit::slotCollectionChanged);
connect(mCollectionCombobox->model(), &QAbstractItemModel::rowsInserted, this, &EventEdit::comboboxRowInserted);
hbox->addWidget(mCollectionCombobox);
......
......@@ -75,8 +75,11 @@ NoteEdit::NoteEdit(QWidget *parent)
mCollectionCombobox->setAccessibleDescription(i18n("Calendar where the new event will be stored."));
#endif
mCollectionCombobox->setToolTip(i18n("Calendar where the new event will be stored"));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(mCollectionCombobox, qOverload<int>(&Akonadi::CollectionComboBox::currentIndexChanged), this, &NoteEdit::slotCollectionChanged);
#else
connect(mCollectionCombobox, qOverload<int, const QString &>(&Akonadi::CollectionComboBox::currentIndexChanged), this, &NoteEdit::slotCollectionChanged);
#endif
connect(mCollectionCombobox, qOverload<int>(&Akonadi::CollectionComboBox::activated), this, &NoteEdit::slotCollectionChanged);
hbox->addWidget(mCollectionCombobox);
......
......@@ -91,7 +91,11 @@ TodoEdit::TodoEdit(QWidget *parent)
mCollectionCombobox->setAccessibleDescription(i18n("Todo list where the new task will be stored."));
#endif
mCollectionCombobox->setToolTip(i18n("Todo list where the new task will be stored"));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(mCollectionCombobox, qOverload<int>(&Akonadi::CollectionComboBox::currentIndexChanged), this, &TodoEdit::slotCollectionChanged);
#else
connect(mCollectionCombobox, qOverload<int, const QString &>(&Akonadi::CollectionComboBox::currentIndexChanged), this, &TodoEdit::slotCollectionChanged);
#endif
connect(mCollectionCombobox, qOverload<int>(&Akonadi::CollectionComboBox::activated), this, &TodoEdit::slotCollectionChanged);
hbox->addWidget(mCollectionCombobox);
......
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