mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
kemu: attempt to modprobe only on Linux
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
51401039ae
commit
f02ee100af
1 changed files with 5 additions and 3 deletions
|
@ -115,17 +115,19 @@ KEmuMainWindow::KEmuMainWindow(QWidget *parent, Qt::WindowFlags flags)
|
|||
|
||||
QFileInfo kvmDev("/dev/kvm");
|
||||
if (!kvmDev.exists()) {
|
||||
#ifdef Q_OS_LINUX
|
||||
const QString modprobeBin = KStandardDirs::findRootExe("modprobe");
|
||||
if (!modprobeBin.isEmpty()) {
|
||||
QProcess modprobe(this);
|
||||
modprobe.start(modprobeBin, QStringList() << "-b" << "kvm");
|
||||
modprobe.waitForFinished();
|
||||
if (!kvmDev.exists()) {
|
||||
QMessageBox::warning(this, i18n("KVM not available"), i18n("KVM not available"));
|
||||
}
|
||||
} else {
|
||||
kDebug() << "modprobe not found";
|
||||
}
|
||||
#endif
|
||||
if (!kvmDev.exists()) {
|
||||
QMessageBox::warning(this, i18n("KVM not available"), i18n("KVM not available"));
|
||||
}
|
||||
}
|
||||
|
||||
connect(m_kemuui->CDROMInput, SIGNAL(textChanged(QString)), this, SLOT(machineSave(QString)));
|
||||
|
|
Loading…
Add table
Reference in a new issue