Commit 6d391637 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use configure signal

parent c5900676
Pipeline #76213 canceled with stage
......@@ -73,7 +73,7 @@ set(LIBKLEO_LIB_VERSION "5.18.40")
set(AKONADI_LIB_VERSION "5.18.40")
set(INCIDENCEEDITOR_LIB_VERSION "5.18.40")
set(KTNEF_LIB_VERSION "5.18.40")
set(MESSAGELIB_LIB_VERSION "5.18.40")
set(MESSAGELIB_LIB_VERSION "5.18.42")
set(AKONADICALENDAR_LIB_VERSION "5.18.40")
set(CALENDAR_UTILS_VERSION "5.18.40")
set(KPIMTEXTEDIT_LIB_VERSION "5.18.40")
......
......@@ -34,13 +34,18 @@ void ConfirmBeforeDeletingInterface::createActions(KActionCollection *ac)
auto mainMenu = new QAction(i18n("External Script"), this);
auto menu = new QMenu;
auto act = new QAction(QIcon::fromTheme(QStringLiteral("settings-configure")), i18n("Configure"), menu);
// TODO connect(act, &QAction::triggered, this, &ConfirmBeforeDeletingInterface::slotConfigure);
connect(act, &QAction::triggered, this, &ConfirmBeforeDeletingInterface::slotConfigure);
menu->addAction(act);
mainMenu->setMenu(menu);
mAction << mainMenu;
}
}
void ConfirmBeforeDeletingInterface::slotConfigure()
{
Q_EMIT configure(parentWidget());
}
Akonadi::Item::List ConfirmBeforeDeletingInterface::exec(const Akonadi::Item::List &list)
{
Akonadi::Item::List lst;
......
......@@ -21,6 +21,7 @@ public:
Q_REQUIRED_RESULT QList<QAction *> actions() const override;
private:
void slotConfigure();
void createActions(KActionCollection *ac);
QList<QAction *> mAction;
};
......@@ -28,6 +28,8 @@ void ConfirmBeforeDeletingPlugin::showConfigureDialog(QWidget *parent)
MessageViewer::MessageViewerCheckBeforeDeletingInterface *ConfirmBeforeDeletingPlugin::createInterface(QObject *parent)
{
auto interface = new ConfirmBeforeDeletingInterface(parent);
connect(interface, &ConfirmBeforeDeletingInterface::configure, this, &ConfirmBeforeDeletingPlugin::showConfigureDialog);
return new ConfirmBeforeDeletingInterface(parent);
}
......
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