优化内核编号获取方式

This commit is contained in:
2024-04-24 21:28:32 +08:00
parent 70e0e04e4c
commit 8a362b0548

View File

@@ -62,8 +62,11 @@ void MainWindow::on_m_installButton_clicked()
QMessageBox::critical(this, tr("Error"), tr("Nothing to choose"));
return;
}
// 获取 ID
QModelIndex index = ui->m_kernelShow->model()->index(row, 0);
int id = ui->m_kernelShow->model()->data(index).toUInt();
// 获取选中行
KernelInstaller *installer = new KernelInstaller(kernelInformation->get_pkgName(row));
KernelInstaller *installer = new KernelInstaller(kernelInformation->get_pkgName(id));
installer->show();
}