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

Fix popup menu

parent e7f8eee7
......@@ -43,11 +43,14 @@ void InsertTemplateCommandPluginEditorInterface::createAction(KActionCollection
QToolButton *toolButton = new QToolButton;
toolButton->setText(i18n("Insert Template Command..."));
toolButton->setPopupMode(QToolButton::MenuButtonPopup);
mCommandAction->setDefaultWidget(toolButton);
ac->addAction(QStringLiteral("insert_template_command"), mCommandAction);
connect(mCommandAction, &TemplateParser::TemplatesInsertCommandAction::triggered, this, &InsertTemplateCommandPluginEditorInterface::slotOpenMenu);
connect(mCommandAction, &TemplateParser::TemplatesInsertCommandAction::insertCommand, this, &InsertTemplateCommandPluginEditorInterface::slotInsertCommand);
MessageComposer::PluginActionType type(mCommandAction, MessageComposer::PluginActionType::ToolBar);
setActionType(type);
toolButton->setMenu(mCommandAction->menu());
}
void InsertTemplateCommandPluginEditorInterface::slotOpenMenu()
......
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