Takes the line number estimated from mouse position and converts it to the actual line in the file. Then sets the status message accordingly. emits lineClicked signal. */
| 647 | emits lineClicked signal. |
| 648 | */ |
| 649 | void DiffTextWindow::showStatusLine(const LineRef lineFromPos) |
| 650 | { |
| 651 | LineType d3lIdx = convertLineToDiff3LineIdx(lineFromPos); |
| 652 | |
| 653 | if(d->getDiff3LineVector() != nullptr && d3lIdx >= 0 && d3lIdx < (qint32)d->getDiff3LineVector()->size()) |
| 654 | { |
| 655 | const Diff3Line* pD3l = (*d->getDiff3LineVector())[d3lIdx]; |
| 656 | if(pD3l != nullptr) |
| 657 | { |
| 658 | LineRef actualLine = pD3l->getLineInFile(getWindowIndex()); |
| 659 | |
| 660 | QString message; |
| 661 | if(actualLine.isValid()) |
| 662 | message = i18n("File %1: Line %2", getFileName(), actualLine + 1); |
| 663 | else |
| 664 | message = i18n("File %1: Line not available", getFileName()); |
| 665 | Q_EMIT statusBarMessage(message); |
| 666 | |
| 667 | Q_EMIT lineClicked(getWindowIndex(), actualLine); |
| 668 | } |
| 669 | } |
| 670 | } |
| 671 | |
| 672 | void DiffTextWindow::scrollVertically(qint32 deltaY) |
| 673 | { |
nothing calls this directly
no test coverage detected