| 203 | } |
| 204 | |
| 205 | void LineNumArea::mousePressEvent(QMouseEvent *e) |
| 206 | { |
| 207 | auto pos = e->pos(); |
| 208 | auto r = rect(); |
| 209 | r.setLeft(lineNumAreaWidth()); |
| 210 | if (!r.contains(pos)) { |
| 211 | QWidget::mousePressEvent(e); |
| 212 | return; |
| 213 | } |
| 214 | |
| 215 | int block = textEdit->cursorForPosition(pos).block().blockNumber(); |
| 216 | if (textEdit->isHunkLine(block)) { |
| 217 | textEdit->toggleFoldHunk(block); |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | void LineNumArea::wheelEvent(QWheelEvent *e) |
| 222 | { |
nothing calls this directly
no test coverage detected