Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 97bfce9b authored by Laurent Montel's avatar Laurent Montel 😁

Use new connect api

parent 1b919579
......@@ -394,7 +394,7 @@ void FilterManager::filter(const Akonadi::Item &item, FilterManager::FilterSet s
}
job->fetchScope().setAncestorRetrieval(Akonadi::ItemFetchScope::Parent);
connect(job, SIGNAL(result(KJob *)), SLOT(itemFetchJobForFilterDone(KJob *)));
connect(job, &Akonadi::ItemFetchJob::result, this, [this](KJob *job) { d->itemFetchJobForFilterDone(job); });
}
void FilterManager::filter(const Akonadi::Item &item, const QString &filterId, const QString &resourceId)
......@@ -413,7 +413,7 @@ void FilterManager::filter(const Akonadi::Item &item, const QString &filterId, c
job->fetchScope().setAncestorRetrieval(Akonadi::ItemFetchScope::Parent);
connect(job, SIGNAL(result(KJob *)), SLOT(itemFetchJobForFilterDone(KJob *)));
connect(job, &Akonadi::ItemFetchJob::result, this, [this](KJob *job) { d->itemFetchJobForFilterDone(job);} );
}
bool FilterManager::process(const Akonadi::Item &item, bool needsFullPayload, const MailFilter *filter)
......@@ -464,7 +464,7 @@ bool FilterManager::processContextItem(ItemContext context)
if (context.deleteItem()) {
if (itemCanDelete) {
Akonadi::ItemDeleteJob *deleteJob = new Akonadi::ItemDeleteJob(context.item(), this);
connect(deleteJob, SIGNAL(result(KJob *)), SLOT(deleteJobResult(KJob *)));
connect(deleteJob, &Akonadi::ItemDeleteJob::result, this, [this](KJob *job) { d->deleteJobResult(job); });
} else {
return false;
}
......@@ -472,7 +472,7 @@ bool FilterManager::processContextItem(ItemContext context)
if (context.moveTargetCollection().isValid() && context.item().storageCollectionId() != context.moveTargetCollection().id()) {
if (itemCanDelete) {
Akonadi::ItemMoveJob *moveJob = new Akonadi::ItemMoveJob(context.item(), context.moveTargetCollection(), this);
connect(moveJob, SIGNAL(result(KJob *)), SLOT(moveJobResult(KJob *)));
connect(moveJob, &Akonadi::ItemMoveJob::result, this, [this](KJob *job) {d->moveJobResult(job); });
} else {
return false;
}
......@@ -489,7 +489,7 @@ bool FilterManager::processContextItem(ItemContext context)
//The below is a safety check to ignore modifying payloads if it was not requested,
//as in that case we might change the payload to an invalid one
modifyJob->setIgnorePayload(!context.needsFullPayload());
connect(modifyJob, SIGNAL(result(KJob *)), SLOT(modifyJobResult(KJob *)));
connect(modifyJob, &Akonadi::ItemModifyJob::result, this, [this](KJob *job) { d->modifyJobResult(job);});
}
}
......@@ -618,10 +618,8 @@ void FilterManager::applySpecificFilters(const Akonadi::Item::List &selectedMess
itemFetchJob->setProperty("filterSet", QVariant::fromValue(static_cast<int>(filterSet)));
itemFetchJob->setProperty("needsFullPayload", requiredPart != SearchRule::Envelope);
connect(itemFetchJob, SIGNAL(itemsReceived(Akonadi::Item::List)),
this, SLOT(slotItemsFetchedForFilter(Akonadi::Item::List)));
connect(itemFetchJob, SIGNAL(result(KJob *)),
SLOT(itemsFetchJobForFilterDone(KJob *)));
connect(itemFetchJob, &Akonadi::ItemFetchJob::itemsReceived, this, [this](const Akonadi::Item::List &lst) {d->slotItemsFetchedForFilter(lst); });
connect(itemFetchJob, &Akonadi::ItemFetchJob::result, this, [this](KJob *job) { d->itemsFetchJobForFilterDone(job); });
}
void FilterManager::applyFilters(const Akonadi::Item::List &selectedMessages, FilterSet filterSet)
......@@ -644,10 +642,9 @@ void FilterManager::applyFilters(const Akonadi::Item::List &selectedMessages, Fi
itemFetchJob->setProperty("filterSet", QVariant::fromValue(static_cast<int>(filterSet)));
itemFetchJob->setProperty("needsFullPayload", requiredParts != SearchRule::Envelope);
connect(itemFetchJob, SIGNAL(itemsReceived(Akonadi::Item::List)),
this, SLOT(slotItemsFetchedForFilter(Akonadi::Item::List)));
connect(itemFetchJob, SIGNAL(result(KJob *)),
SLOT(itemsFetchJobForFilterDone(KJob *)));
connect(itemFetchJob, &Akonadi::ItemFetchJob::itemsReceived, this, [this](const Akonadi::Item::List &lst) {d->slotItemsFetchedForFilter(lst); });
connect(itemFetchJob, &Akonadi::ItemFetchJob::result, this, [this](KJob *job) { d->itemsFetchJobForFilterDone(job); });
}
bool FilterManager::hasAllFoldersFilter() const
......
......@@ -156,13 +156,6 @@ private:
//@cond PRIVATE
class Private;
Private *d;
Q_PRIVATE_SLOT(d, void itemsFetchJobForFilterDone(KJob *))
Q_PRIVATE_SLOT(d, void itemFetchJobForFilterDone(KJob *))
Q_PRIVATE_SLOT(d, void moveJobResult(KJob *))
Q_PRIVATE_SLOT(d, void modifyJobResult(KJob *))
Q_PRIVATE_SLOT(d, void deleteJobResult(KJob *))
Q_PRIVATE_SLOT(d, void slotItemsFetchedForFilter(const Akonadi::Item::List &))
//@endcond
};
......
......@@ -3286,8 +3286,6 @@ void KMMainWidget::setupActions()
}
// ----- Standard Actions
// KStandardAction::configureNotifications(this, SLOT(slotEditNotifications()), actionCollection());
{
QAction *action = new QAction(QIcon::fromTheme(QStringLiteral("preferences-desktop-notification")),
i18n("Configure &Notifications..."), this);
......
......@@ -436,8 +436,8 @@ void SummaryViewPart::slotConfigure()
QStringList modules = configModules();
modules.prepend(QStringLiteral("kcmkontactsummary.desktop"));
connect(dlg.data(), SIGNAL(configCommitted()),
this, SLOT(updateWidgets()));
connect(dlg.data(), QOverload<>::of(&KCMultiDialog::configCommitted),
this, &SummaryViewPart::updateWidgets);
QStringList::ConstIterator strIt;
QStringList::ConstIterator end(modules.constEnd());
......
......@@ -141,8 +141,8 @@ SearchWindow::SearchWindow(KMMainWidget *widget, const Akonadi::Collection &coll
connect(mUi.mLbxMatches, &Akonadi::EntityTreeView::customContextMenuRequested, this, &SearchWindow::slotContextMenuRequested);
connect(mUi.mLbxMatches, QOverload<const Akonadi::Item &>::of(&Akonadi::EntityTreeView::doubleClicked),
this, &SearchWindow::slotViewMsg);
connect(mUi.mLbxMatches, SIGNAL(currentChanged(Akonadi::Item)),
this, SLOT(slotCurrentChanged(Akonadi::Item)));
connect(mUi.mLbxMatches, QOverload<const Akonadi::Item &>::of(&Akonadi::EntityTreeView::currentChanged),
this, &SearchWindow::slotCurrentChanged);
connect(mUi.selectMultipleFolders, &QPushButton::clicked, this, &SearchWindow::slotSelectMultipleFolders);
connect(KMKernel::self()->folderCollectionMonitor(), &Akonadi::Monitor::collectionStatisticsChanged, this, &SearchWindow::updateCollectionStatistic);
......
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