Changeset View
Changeset View
Standalone View
Standalone View
src/script/katescriptaction.cpp
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Line(s) | 99 | { | |||
---|---|---|---|---|---|
103 | if (viewFactory) { | 103 | if (viewFactory) { | ||
104 | viewFactory->removeClient(m_view); | 104 | viewFactory->removeClient(m_view); | ||
105 | } | 105 | } | ||
106 | 106 | | |||
107 | // remove existing menu actions | 107 | // remove existing menu actions | ||
108 | cleanup(); | 108 | cleanup(); | ||
109 | 109 | | |||
110 | // now add all command line script commands | 110 | // now add all command line script commands | ||
111 | QVector<KateCommandLineScript *> scripts = | 111 | const QVector<KateCommandLineScript *> scripts = | ||
112 | KTextEditor::EditorPrivate::self()->scriptManager()->commandLineScripts(); | 112 | KTextEditor::EditorPrivate::self()->scriptManager()->commandLineScripts(); | ||
113 | 113 | | |||
114 | QHash<QString, QMenu *> menus; | 114 | QHash<QString, QMenu *> menus; | ||
115 | 115 | | |||
116 | foreach (KateCommandLineScript *script, scripts) { | 116 | for (KateCommandLineScript *script : scripts) { | ||
117 | /** | 117 | /** | ||
118 | * traverse actions | 118 | * traverse actions | ||
119 | */ | 119 | */ | ||
120 | const QJsonArray &actions = script->commandHeader().actions(); | 120 | const QJsonArray &actions = script->commandHeader().actions(); | ||
121 | Q_FOREACH (const QJsonValue value, actions) { | 121 | Q_FOREACH (const QJsonValue value, actions) { | ||
122 | /** | 122 | /** | ||
123 | * action is a value | 123 | * action is a value | ||
124 | */ | 124 | */ | ||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |