MCPcopy Create free account
hub / github.com/actuallyaridan/linux-devmgmt / uninstallCurrentDevice

Method uninstallCurrentDevice

src/ui/MainWindow.cpp:247–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247void 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
264void MainWindow::buildMenus() {
265 auto *fileMenu = menuBar()->addMenu("&File");

Callers

nothing calls this directly

Calls 2

dkmsRemoveFunction · 0.85
deviceFieldMethod · 0.80

Tested by

no test coverage detected