MCPcopy Create free account
hub / github.com/KDAB/GammaRay / foreach

Function foreach

ui/codeeditor/codeeditor.cpp:113–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111 QMenu *hlSubMenu = nullptr;
112 QString currentGroup;
113 foreach (const auto &def, s_repository->definitions()) {
114 if (def.isHidden() || def.section().isEmpty())
115 continue;
116
117 if (currentGroup != def.section()) {
118 currentGroup = def.section();
119 hlSubMenu = hlGroupMenu->addMenu(def.translatedSection());
120 }
121
122 Q_ASSERT(hlSubMenu);
123 if (hlSubMenu) {
124 auto action = hlSubMenu->addAction(def.translatedName());
125 action->setCheckable(true);
126 action->setData(def.name());
127 hlActionGroup->addAction(action);
128 if (def.name() == m_highlighter->definition().name()) {
129 action->setChecked(true);
130 }
131 }
132 }
133 connect(hlActionGroup, &QActionGroup::triggered, this, &CodeEditor::syntaxSelected);
134#endif
135

Callers

nothing calls this directly

Calls 5

isHiddenMethod · 0.45
isEmptyMethod · 0.45
setDataMethod · 0.45
nameMethod · 0.45
definitionMethod · 0.45

Tested by

no test coverage detected