@brief Forwards mouse-press events to the backing widget after offsetting for the line-number * gutter. */
| 710 | /** @brief Forwards mouse-press events to the backing widget after offsetting for the line-number |
| 711 | * gutter. */ |
| 712 | void DataModel::JsCodeEditor::mousePressEvent(QMouseEvent* event) |
| 713 | { |
| 714 | const auto lineNumWidth = m_widget.lineNumberArea()->sizeHint().width(); |
| 715 | QMouseEvent copy(event->type(), |
| 716 | event->position() - QPointF(lineNumWidth, 0), |
| 717 | event->globalPosition(), |
| 718 | event->button(), |
| 719 | event->buttons(), |
| 720 | event->modifiers(), |
| 721 | event->pointingDevice()); |
| 722 | QCoreApplication::sendEvent(m_widget.viewport(), ©); |
| 723 | forceActiveFocus(); |
| 724 | renderWidget(); |
| 725 | } |
| 726 | |
| 727 | /** @brief Forwards mouse-move events to the backing widget after offsetting for the line-number |
| 728 | * gutter. */ |
nothing calls this directly
no test coverage detected