summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-02-03 21:05:00 +0100
committerLaurent Montel <[email protected]>2018-02-03 21:05:00 +0100
commit686e02e48340ac8bffba11227b389650fc113ff8 (patch)
tree38ab157be4a57b0a735c1725c14332b2df54eb3c
parent2e6c209d8bb9e0b1351d595592211decfb7b48d4 (diff)
Start to split class
-rw-r--r--templateparser/src/templatesinsertcommandpushbutton.cpp12
-rw-r--r--templateparser/src/templatesinsertcommandpushbutton.h1
2 files changed, 10 insertions, 3 deletions
diff --git a/templateparser/src/templatesinsertcommandpushbutton.cpp b/templateparser/src/templatesinsertcommandpushbutton.cpp
index 4b31486..e0866d4 100644
--- a/templateparser/src/templatesinsertcommandpushbutton.cpp
+++ b/templateparser/src/templatesinsertcommandpushbutton.cpp
@@ -412,6 +412,15 @@ TemplatesInsertCommandPushButton::TemplatesInsertCommandPushButton(QWidget *pare
setObjectName(name);
setText(i18n("&Insert Command"));
+ fillMenu();
+}
+
+TemplatesInsertCommandPushButton::~TemplatesInsertCommandPushButton()
+{
+}
+
+void TemplatesInsertCommandPushButton::fillMenu()
+{
QMap< QString, Command > commandMap;
@@ -472,9 +481,6 @@ TemplatesInsertCommandPushButton::TemplatesInsertCommandPushButton(QWidget *pare
setMenu(mMenu->menu());
}
-TemplatesInsertCommandPushButton::~TemplatesInsertCommandPushButton()
-{
-}
void TemplatesInsertCommandPushButton::slotInsertCommand(TemplatesInsertCommandPushButton::Command cmd)
{
diff --git a/templateparser/src/templatesinsertcommandpushbutton.h b/templateparser/src/templatesinsertcommandpushbutton.h
index 5df0bae..cba0342 100644
--- a/templateparser/src/templatesinsertcommandpushbutton.h
+++ b/templateparser/src/templatesinsertcommandpushbutton.h
@@ -116,6 +116,7 @@ protected:
KActionMenu *mMenu = nullptr;
private:
+ void fillMenu();
void fillMenuFromActionMap(const QMap<QString, TemplatesInsertCommandPushButton::Command> &map, KActionMenu *menu);
};
}