called after word wrap is complete
| 554 | |
| 555 | // called after word wrap is complete |
| 556 | void KDiff3App::slotFinishMainInit() |
| 557 | { |
| 558 | assert(m_pDiffTextWindow1 != nullptr && DiffTextWindow::mVScrollBar != nullptr && m_pOverview != nullptr); |
| 559 | |
| 560 | setHScrollBarRange(); |
| 561 | |
| 562 | LineType lineCount = m_pDiffTextWindow1->getNofVisibleLines(); |
| 563 | /*qint32 newWidth = m_pDiffTextWindow1->getNofVisibleColumns();*/ |
| 564 | m_DTWHeight = lineCount; |
| 565 | |
| 566 | DiffTextWindow::mVScrollBar->setRange(0, std::max(0, m_neededLines + 1 - lineCount)); |
| 567 | DiffTextWindow::mVScrollBar->setPageStep(lineCount); |
| 568 | m_pOverview->setRange(DiffTextWindow::mVScrollBar->value(), lineCount); |
| 569 | |
| 570 | qint32 d3l = -1; |
| 571 | if(!m_manualDiffHelpList.empty()) |
| 572 | d3l = m_manualDiffHelpList.front().calcManualDiffFirstDiff3LineIdx(mDiff3LineVector); |
| 573 | |
| 574 | setUpdatesEnabled(true); |
| 575 | |
| 576 | if(d3l >= 0) |
| 577 | { |
| 578 | qint32 line = m_pDiffTextWindow1->convertDiff3LineIdxToLine(d3l); |
| 579 | DiffTextWindow::mVScrollBar->setValue(std::max(0, line - 1)); |
| 580 | } |
| 581 | else |
| 582 | { |
| 583 | m_pMergeResultWindow->slotGoTop(); |
| 584 | if(!m_outputFilename.isEmpty() && !m_pMergeResultWindow->isUnsolvedConflictAtCurrent()) |
| 585 | m_pMergeResultWindow->slotGoNextUnsolvedConflict(); |
| 586 | } |
| 587 | |
| 588 | if(m_pCornerWidget) |
| 589 | m_pCornerWidget->setFixedSize(DiffTextWindow::mVScrollBar->width(), m_pHScrollBar->height()); |
| 590 | |
| 591 | Q_EMIT updateAvailabilities(); |
| 592 | bool bVisibleMergeResultWindow = !m_outputFilename.isEmpty(); |
| 593 | |
| 594 | if(m_bLoadFiles) |
| 595 | { |
| 596 | if(bVisibleMergeResultWindow) |
| 597 | m_pMergeResultWindow->showNumberOfConflicts(!m_bAutoFlag); |
| 598 | else if( |
| 599 | // Avoid showing this message during startup without parameters. |
| 600 | !(m_sd1->getAliasName().isEmpty() && m_sd2->getAliasName().isEmpty() && m_sd3->getAliasName().isEmpty()) && |
| 601 | (m_sd1->isValid() && m_sd2->isValid() && m_sd3->isValid())) |
| 602 | { |
| 603 | QString totalInfo; |
| 604 | if(m_totalDiffStatus->isBinaryEqualAB() && m_totalDiffStatus->isBinaryEqualAC()) |
| 605 | totalInfo += i18n("All input files are binary equal."); |
| 606 | else if(m_totalDiffStatus->isTextEqualAB() && m_totalDiffStatus->isTextEqualAC()) |
| 607 | totalInfo += i18n("All input files contain the same text, but are not binary equal."); |
| 608 | else |
| 609 | { |
| 610 | if(m_totalDiffStatus->isBinaryEqualAB()) |
| 611 | totalInfo += i18n("Files %1 and %2 are binary equal.\n", QStringLiteral("A"), QStringLiteral("B")); |
| 612 | else if(m_totalDiffStatus->isTextEqualAB()) |
| 613 | totalInfo += i18n("Files %1 and %2 have equal text, but are not binary equal. \n", QStringLiteral("A"), QStringLiteral("B")); |
nothing calls this directly
no test coverage detected