| 123 | } |
| 124 | |
| 125 | void MainWindow::onScanComplete(const QString &hostName, |
| 126 | const QVector<DeviceCategory> &categories) { |
| 127 | QSet<QString> expanded = saveExpandedState(); |
| 128 | m_model->setCategories(hostName, categories); |
| 129 | |
| 130 | if (expanded.isEmpty()) { |
| 131 | m_tree->expandToDepth(0); |
| 132 | } else { |
| 133 | restoreExpandedState(expanded); |
| 134 | } |
| 135 | |
| 136 | statusBar()->showMessage("Ready"); |
| 137 | updateActionStates(); |
| 138 | |
| 139 | if (!m_pendingReopenName.isEmpty()) { |
| 140 | QModelIndex idx = findDevice(m_pendingReopenName, m_pendingReopenDriver); |
| 141 | m_pendingReopenName.clear(); |
| 142 | m_pendingReopenDriver.clear(); |
| 143 | if (idx.isValid()) { |
| 144 | m_tree->setCurrentIndex(idx); |
| 145 | showProperties(); |
| 146 | } |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | void MainWindow::onSelectionChanged() { |
| 151 | updateActionStates(); |
nothing calls this directly
no test coverage detected