| 245 | } |
| 246 | |
| 247 | void MainWindow::uninstallCurrentDevice() { |
| 248 | auto idx = m_tree->currentIndex(); |
| 249 | if (!idx.isValid()) return; |
| 250 | QString name = m_model->deviceField(idx, "name").toString(); |
| 251 | QString driver = m_model->deviceField(idx, "driver").toString(); |
| 252 | if (name.isEmpty()) return; |
| 253 | |
| 254 | if (QMessageBox::question(this, "Uninstall device", |
| 255 | QString("This will remove the driver for %1.\n\nAre you sure?") |
| 256 | .arg(name.toHtmlEscaped())) |
| 257 | != QMessageBox::Yes) |
| 258 | return; |
| 259 | |
| 260 | if (dkmsRemove(driver, this)) |
| 261 | refresh(); |
| 262 | } |
| 263 | |
| 264 | void MainWindow::buildMenus() { |
| 265 | auto *fileMenu = menuBar()->addMenu("&File"); |
nothing calls this directly
no test coverage detected