| 228 | } |
| 229 | |
| 230 | QPair<KTextEditor::MovingRange*, KompareDiff2::Difference*> |
| 231 | PatchHighlighter::rangeForMark(const KTextEditor::Mark& mark) const |
| 232 | { |
| 233 | if (!m_applying) { |
| 234 | for (auto it = m_ranges.constBegin(); it != m_ranges.constEnd(); ++it) { |
| 235 | if (it.value() && it.key()->start().line() <= mark.line && mark.line <= it.key()->end().line()) { |
| 236 | return qMakePair(it.key(), it.value()); |
| 237 | } |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | return qMakePair(nullptr, nullptr); |
| 242 | } |
| 243 | |
| 244 | void PatchHighlighter::markToolTipRequested( KTextEditor::Document*, const KTextEditor::Mark& mark, QPoint pos, bool& handled ) { |
| 245 | if( handled ) |