summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Rettberg2019-06-12 12:54:54 +0200
committerSimon Rettberg2019-06-12 12:54:54 +0200
commit666b399974f2bf7c7cea5c1132854cc5f476a99c (patch)
tree7b0452e98185580f283a927213c9a8585a2e0bf2 /src
parentDon't group by type in "recent" tab (diff)
downloadvmchooser2-666b399974f2bf7c7cea5c1132854cc5f476a99c.tar.gz
vmchooser2-666b399974f2bf7c7cea5c1132854cc5f476a99c.tar.xz
vmchooser2-666b399974f2bf7c7cea5c1132854cc5f476a99c.zip
Gray out all VBox VMs if no VTx is available
Diffstat (limited to 'src')
-rw-r--r--src/vsession.cpp8
-rw-r--r--src/vsession.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/vsession.cpp b/src/vsession.cpp
index fec9fad..92cc9c4 100644
--- a/src/vsession.cpp
+++ b/src/vsession.cpp
@@ -254,7 +254,7 @@ bool VSession::run() const {
qDebug() << "Sarting session " << this->getAttribute("short_description", "param") << " ...";
}
- if (g_noVtx && is64Bit()) {
+ if (g_noVtx && needsVtx()) {
QMessageBox::warning(nullptr, QObject::trUtf8("Warning"),
QObject::trUtf8("The selected session is based on a 64 bit operating system,"
" but this computer doesn't seem to support this (VT-x/AMD-V not"
@@ -364,15 +364,15 @@ QList<Session*> VSession::readXmlFile(const QString& filepath) {
return sessionList;
}
-bool VSession::is64Bit() const {
+bool VSession::needsVtx() const {
ImgType type = imgtype();
return (type == VMWARE && getAttribute("os").endsWith("-64"))
- || (type == VBOX && getAttribute("os").endsWith("_64"));
+ || (type == VBOX /* && getAttribute("os").endsWith("_64") */); // Vbox 6.x doesn't seem to support 32bit VMs without VTx any more...
// TODO: qemu-kvm, ...
}
QVariant VSession::foregroundRole() const {
- if (!g_noVtx || !is64Bit())
+ if (!g_noVtx || !needsVtx())
return Session::foregroundRole();
return QColor(180, 180, 180);
}
diff --git a/src/vsession.h b/src/vsession.h
index 18d5c38..6c48ce4 100644
--- a/src/vsession.h
+++ b/src/vsession.h
@@ -65,7 +65,7 @@ class VSession : public Session {
return SECTION_GENERIC;
}
- bool is64Bit() const;
+ bool needsVtx() const;
QVariant foregroundRole() const;
QString getAttribute(const QString& nodeName,