| 444 | } |
| 445 | |
| 446 | void MainWindow::onSplitterMoved(const int pos, const int index) |
| 447 | { |
| 448 | (void)pos; |
| 449 | (void)index; |
| 450 | |
| 451 | SConfig::getInstance().setSplitterState(m_splitter->saveState()); |
| 452 | |
| 453 | const QList<int> currentSizes{m_splitter->sizes()}; |
| 454 | const int totalSize{std::accumulate(currentSizes.begin(), currentSizes.end(), 0)}; |
| 455 | const double scannerSize{static_cast<double>(currentSizes[0])}; |
| 456 | const bool scannerVisible{scannerSize > 0}; |
| 457 | if (scannerVisible) |
| 458 | { |
| 459 | const double scannerFactor{scannerSize / static_cast<double>(totalSize)}; |
| 460 | m_splitter->setProperty("previous_scanner_factor", scannerFactor); |
| 461 | } |
| 462 | |
| 463 | { |
| 464 | QSignalBlocker signalBlocker(m_actScanner); |
| 465 | m_actScanner->setChecked(scannerVisible); |
| 466 | } |
| 467 | } |
| 468 | |
| 469 | void MainWindow::onOpenWatchFile() |
| 470 | { |
nothing calls this directly
no test coverage detected