Restore and show mainWindow.
| 571 | |
| 572 | // Restore and show mainWindow. |
| 573 | void KDiff3App::showMainWindow() |
| 574 | { |
| 575 | if(!m_pKDiff3Shell->isVisible() && !restoreWindow(KSharedConfig::openConfig())) |
| 576 | { |
| 577 | /* |
| 578 | Set default state/geometry from config file. |
| 579 | This will no longer be updated but serves as a fallback. |
| 580 | Qt's restoreState/saveState can handle multiple screens this won't. |
| 581 | */ |
| 582 | if(gOptions->isFullScreen()) |
| 583 | m_pKDiff3Shell->showFullScreen(); |
| 584 | else if(gOptions->isMaximized()) |
| 585 | m_pKDiff3Shell->showMaximized(); |
| 586 | |
| 587 | QSize size = gOptions->getGeometry(); |
| 588 | QPoint pos = gOptions->getPosition(); |
| 589 | |
| 590 | if(!size.isEmpty()) |
| 591 | { |
| 592 | m_pKDiff3Shell->resize(size); |
| 593 | |
| 594 | QRect visibleRect = QRect(pos, size) & m_pKDiff3Shell->screen()->availableGeometry(); |
| 595 | if(visibleRect.width() > 100 && visibleRect.height() > 100) |
| 596 | m_pKDiff3Shell->move(pos); |
| 597 | } |
| 598 | } |
| 599 | |
| 600 | m_pKDiff3Shell->show(); |
| 601 | } |
| 602 | |
| 603 | // Do file comparision. |
| 604 | void KDiff3App::doFileCompare() |
nothing calls this directly
no test coverage detected