Commit 2e5f25b7 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Adapt to new api

parent f1d17f7b
Pipeline #68035 canceled with stage
......@@ -73,7 +73,7 @@ set(LIBKLEO_LIB_VERSION "5.17.40")
set(AKONADI_LIB_VERSION "5.17.40")
set(INCIDENCEEDITOR_LIB_VERSION "5.17.40")
set(KTNEF_LIB_VERSION "5.17.40")
set(MESSAGELIB_LIB_VERSION "5.17.54")
set(MESSAGELIB_LIB_VERSION "5.17.55")
set(AKONADICALENDAR_LIB_VERSION "5.17.40")
set(CALENDAR_UTILS_VERSION "5.17.40")
set(KPIMTEXTEDIT_LIB_VERSION "5.17.40")
......
......@@ -15,7 +15,7 @@ ConfirmBeforeDeletingInterface::~ConfirmBeforeDeletingInterface()
{
}
bool ConfirmBeforeDeletingInterface::exec(Akonadi::Item::List &list)
Akonadi::Item::List ConfirmBeforeDeletingInterface::exec(const Akonadi::Item::List &list)
{
return ConfirmBeforeDeletingManager::self()->deletingNeedToConfirm(list);
}
......@@ -16,5 +16,5 @@ public:
explicit ConfirmBeforeDeletingInterface(QObject *parent = nullptr);
~ConfirmBeforeDeletingInterface() override;
Q_REQUIRED_RESULT bool exec(Akonadi::Item::List &list) override;
Q_REQUIRED_RESULT Akonadi::Item::List exec(const Akonadi::Item::List &list) override;
};
......@@ -31,15 +31,18 @@ void ConfirmBeforeDeletingManager::saveRules()
// TODO
}
bool ConfirmBeforeDeletingManager::deletingNeedToConfirm(const Akonadi::Item::List &list) const
Akonadi::Item::List ConfirmBeforeDeletingManager::deletingNeedToConfirm(const Akonadi::Item::List &list) const
{
Akonadi::Item::List lst;
for (const auto &item : list) {
for (const auto &r : qAsConst(mRules)) {
if (r.deletingNeedToConfirm(item)) {
// TODO show confirm dialog box
return true;
} else {
lst << item;
}
}
}
return false;
return lst;
}
......@@ -24,7 +24,7 @@ public:
void loadRules();
void saveRules();
Q_REQUIRED_RESULT bool deletingNeedToConfirm(const Akonadi::Item::List &list) const;
Q_REQUIRED_RESULT Akonadi::Item::List deletingNeedToConfirm(const Akonadi::Item::List &list) const;
private:
QVector<ConfirmBeforeDeletingRule> mRules;
......
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