| 39 | } |
| 40 | |
| 41 | void 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 | } |
nothing calls this directly
no test coverage detected