| 1379 | } |
| 1380 | |
| 1381 | void MergeResultWindow::timerEvent(QTimerEvent*) |
| 1382 | { |
| 1383 | killTimer(m_delayedDrawTimer); |
| 1384 | m_delayedDrawTimer = 0; |
| 1385 | |
| 1386 | if(m_bMyUpdate) |
| 1387 | { |
| 1388 | update(); |
| 1389 | m_bMyUpdate = false; |
| 1390 | } |
| 1391 | |
| 1392 | if(m_scrollDeltaX != 0 || m_scrollDeltaY != 0) |
| 1393 | { |
| 1394 | qsizetype newPos = m_selection.getLastPos() + m_scrollDeltaX; |
| 1395 | try |
| 1396 | { |
| 1397 | LineRef newLine = m_selection.getLastLine() + m_scrollDeltaY; |
| 1398 | m_selection.end(newLine, newPos > 0 ? newPos : 0); |
| 1399 | } |
| 1400 | catch(const std::system_error&) |
| 1401 | { |
| 1402 | m_selection.end(LineRef::invalid, newPos > 0 ? newPos : 0); |
| 1403 | } |
| 1404 | |
| 1405 | Q_EMIT scrollMergeResultWindow(m_scrollDeltaX, m_scrollDeltaY); |
| 1406 | killTimer(m_delayedDrawTimer); |
| 1407 | m_delayedDrawTimer = startTimer(50); |
| 1408 | } |
| 1409 | } |
| 1410 | |
| 1411 | QVector<QTextLayout::FormatRange> MergeResultWindow::getTextLayoutForLine(LineRef line, const QString& str, QTextLayout& textLayout) |
| 1412 | { |
nothing calls this directly
no test coverage detected