Commit 5a9035db authored by Laurent Montel's avatar Laurent Montel 😁

Add dbus method for removing item

parent d0ceed36
cmake_minimum_required(VERSION 3.5)
set(PIM_VERSION "5.12.40")
set(PIM_VERSION "5.12.41")
project(kdepim-apps-lib VERSION ${PIM_VERSION})
set(KF5_MIN_VERSION "5.63.0")
......
......@@ -145,6 +145,19 @@ void SendLater::SendLaterUtil::reload()
}
}
void SendLater::SendLaterUtil::removeItem(qint64 item)
{
qCDebug(LIBSENDLATER_LOG) << " void SendLater::SendLaterUtil::removeItem()" << item;
QDBusInterface interface(serviceName(), dbusPath());
if (interface.isValid()) {
interface.call(QStringLiteral("reload"), item);
} else {
qCDebug(LIBSENDLATER_LOG) << " Can not remove item";
}
}
QString SendLater::SendLaterUtil::sendLaterPattern()
{
return QStringLiteral("SendLaterItem %1");
......
......@@ -44,6 +44,7 @@ SENDLATER_EXPORT void changeRecurrentDate(SendLater::SendLaterInfo *info);
SENDLATER_EXPORT void forceReparseConfiguration();
Q_REQUIRED_RESULT SENDLATER_EXPORT QString sendLaterPattern();
Q_REQUIRED_RESULT SENDLATER_EXPORT void removeItem(qint64 item);
}
}
#endif // SENDLATERUTIL_H
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