| 315 | } |
| 316 | |
| 317 | void MainWindow::saveTargetState(QSettings *settings) const |
| 318 | { |
| 319 | // When closing/quitting the client main window, this is triggered but the connection is already closed |
| 320 | if (Endpoint::instance()->isConnected()) { |
| 321 | const QModelIndex toolIndex = ui->toolSelector->selectionModel()->selectedRows().value(0); |
| 322 | const QString toolId = toolIndex.data(ToolModelRole::ToolId).toString(); |
| 323 | settings->setValue("selectedToolId", toolId); |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | void MainWindow::restoreTargetState(QSettings *settings) |
| 328 | { |
nothing calls this directly
no test coverage detected