| 1716 | } |
| 1717 | |
| 1718 | LineRef MergeResultWindow::convertToLine(qint32 y) |
| 1719 | { |
| 1720 | const QFontMetrics& fm = fontMetrics(); |
| 1721 | const qint32 fontHeight = fm.lineSpacing(); |
| 1722 | constexpr qint32 topLineYOffset = 0; |
| 1723 | |
| 1724 | qint32 yOffset = topLineYOffset - m_firstLine * fontHeight; |
| 1725 | if(yOffset > y) |
| 1726 | return LineRef::invalid; |
| 1727 | |
| 1728 | const LineRef line = std::min((y - yOffset) / fontHeight, m_nofLines - 1); |
| 1729 | return line; |
| 1730 | } |
| 1731 | |
| 1732 | void MergeResultWindow::mousePressEvent(QMouseEvent* e) |
| 1733 | { |
nothing calls this directly
no outgoing calls
no test coverage detected