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

Fix install menu

parent f59c81ae
......@@ -84,6 +84,7 @@ ecm_generate_headers(TemplateParser_CamelCase_HEADERS
TemplatesTextEdit
TemplatesUtil
TemplatesInsertCommandPushButton
TemplatesCommandMenu
TemplatesInsertCommandAction
TemplateParserJob
TemplateParserExtractHtmlInfoResult
......
......@@ -26,7 +26,7 @@
class KActionMenu;
class QMenu;
namespace TemplateParser {
class TEMPLATEPARSER_TESTS_EXPORT TemplatesCommandMenu : public QObject
class TEMPLATEPARSER_EXPORT TemplatesCommandMenu : public QObject
{
Q_OBJECT
public:
......
......@@ -18,12 +18,12 @@
*/
#include "templatescommandmenu.h"
#include "templatesinsertcommandaction.h"
using namespace TemplateParser;
TemplatesInsertCommandAction::TemplatesInsertCommandAction(QObject *parent)
: QAction(parent)
: QWidgetAction(parent)
{
mMenuCommand = new TemplatesCommandMenu(this);
mMenuCommand->fillMenu();
......@@ -38,3 +38,13 @@ TemplatesInsertCommandAction::~TemplatesInsertCommandAction()
{
}
TemplatesCommandMenu::MenuTypes TemplatesInsertCommandAction::type() const
{
return mMenuCommand->type();
}
void TemplatesInsertCommandAction::setType(TemplatesCommandMenu::MenuTypes type)
{
mMenuCommand->setType(type);
}
......@@ -21,20 +21,24 @@
#ifndef TEMPLATESINSERTCOMMANDACTION_H
#define TEMPLATESINSERTCOMMANDACTION_H
#include <QAction>
#include <QWidgetAction>
#include <TemplateParser/TemplatesCommandMenu>
#include "templateparser_export.h"
namespace TemplateParser {
class TemplatesCommandMenu;
class TEMPLATEPARSER_EXPORT TemplatesInsertCommandAction : public QAction
class TEMPLATEPARSER_EXPORT TemplatesInsertCommandAction : public QWidgetAction
{
Q_OBJECT
public:
explicit TemplatesInsertCommandAction(QObject *parent = nullptr);
~TemplatesInsertCommandAction();
TemplatesCommandMenu::MenuTypes type() const;
void setType(TemplatesCommandMenu::MenuTypes type);
Q_SIGNALS:
void insertCommand(const QString &cmd, int adjustCursor);
private:
TemplatesCommandMenu *mMenuCommand = nullptr;
};
......
......@@ -22,7 +22,7 @@
#include <QPushButton>
#include "templateparser_export.h"
#include "templatescommandmenu.h"
#include <TemplateParser/TemplatesCommandMenu>
class KActionMenu;
......
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