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

Method mouseReleaseEvent

ui/codeeditor/codeeditorsidebar.cpp:41–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void CodeEditorSidebar::mouseReleaseEvent(QMouseEvent *event)
42{
43 if (event->pos().x() >= width() - m_codeEditor->foldingBarWidth()) {
44 auto block = m_codeEditor->blockAtPosition(event->pos().y());
45 if (!block.isValid() || !m_codeEditor->isFoldable(block))
46 return;
47 m_codeEditor->toggleFold(block);
48 }
49 QWidget::mouseReleaseEvent(event);
50}

Callers

nothing calls this directly

Calls 6

foldingBarWidthMethod · 0.80
blockAtPositionMethod · 0.80
isFoldableMethod · 0.80
toggleFoldMethod · 0.80
posMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected