MCPcopy Create free account
hub / github.com/Murmele/Gittyup / addNodeToMenu

Function addNodeToMenu

src/ui/DoubleTreeWidget.cpp:314–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312}
313
314static void addNodeToMenu(const git::Index &index, QStringList &files,
315 const Node *node, bool staged, bool statusDiff) {
316 Debug("DoubleTreeWidgetr addNodeToMenu()" << node->name());
317
318 if (node->hasChildren()) {
319 for (auto child : node->children()) {
320 addNodeToMenu(index, files, child, staged, statusDiff);
321 }
322
323 } else {
324 auto path = node->path(true);
325
326 auto stageState = index.isStaged(path);
327
328 if ((staged && stageState != git::Index::Unstaged) ||
329 (!staged && stageState != git::Index::Staged) || !statusDiff) {
330 files.append(path);
331 }
332 }
333}
334
335void DoubleTreeWidget::showFileContextMenu(const QPoint &pos, RepoView *view,
336 QTreeView *tree, bool staged) {

Callers 2

foreachFunction · 0.85
openExternalDiffToolMethod · 0.85

Calls 6

isStagedMethod · 0.80
appendMethod · 0.80
nameMethod · 0.45
hasChildrenMethod · 0.45
childrenMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected