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 e7f8eee7 authored by Laurent Montel's avatar Laurent Montel 😁

Adapt to new api

parent d6d9abb1
......@@ -24,6 +24,7 @@
#include <KLocalizedString>
#include <KActionCollection>
#include <QAction>
#include <QWidgetAction>
#include <QMenu>
InsertTemplateCommandPluginEditorInterface::InsertTemplateCommandPluginEditorInterface(QObject *parent)
......@@ -38,7 +39,10 @@ InsertTemplateCommandPluginEditorInterface::~InsertTemplateCommandPluginEditorIn
void InsertTemplateCommandPluginEditorInterface::createAction(KActionCollection *ac)
{
mCommandAction = new TemplateParser::TemplatesInsertCommandAction(this);
mCommandAction->setText(i18n("Insert Template Command..."));
mCommandAction->setType(TemplateParser::TemplatesCommandMenu::CurrentMessage);
QToolButton *toolButton = new QToolButton;
toolButton->setText(i18n("Insert Template Command..."));
ac->addAction(QStringLiteral("insert_template_command"), mCommandAction);
connect(mCommandAction, &TemplateParser::TemplatesInsertCommandAction::triggered, this, &InsertTemplateCommandPluginEditorInterface::slotOpenMenu);
connect(mCommandAction, &TemplateParser::TemplatesInsertCommandAction::insertCommand, this, &InsertTemplateCommandPluginEditorInterface::slotInsertCommand);
......
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