From f870d03613feb45905e58a857b74ef37a214c489 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 30 Mar 2017 13:35:29 +0200 Subject: Implement --pvs option --- src/dialog.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/dialog.cpp') diff --git a/src/dialog.cpp b/src/dialog.cpp index 6d245bb..8c316b5 100644 --- a/src/dialog.cpp +++ b/src/dialog.cpp @@ -66,6 +66,8 @@ Dialog::Dialog(int defaultTab, bool examMode, QWidget *parent) this, SLOT(treeView_selectionChanged(const QModelIndex&, const QModelIndex&))); */ + ui->PVS_checkbox->setVisible(g_pvsEnabled); + if (examMode_) { ui->tabButtonLocal->setEnabled(false); this->onTabButtonChanged(TAB_ALL_VMS); @@ -121,10 +123,12 @@ void Dialog::on_treeView_doubleClicked(const QModelIndex& index) return; // These two are up here in case run-virt cares... - if (ui->PVS_checkbox->isChecked()) { - setenv("PVS_AUTO_CONNECT", "TRUE", 1); - } else { - setenv("PVS_AUTO_CONNECT", "FALSE", 1); + if (g_pvsEnabled) { + if (ui->PVS_checkbox->isChecked()) { + setenv("PVS_AUTO_CONNECT", "TRUE", 1); + } else { + setenv("PVS_AUTO_CONNECT", "FALSE", 1); + } } if (g_allowVmEdit && ui->chkAdminMode->isChecked()) { setenv("VMCHOOSER_ADMIN_MODE", "TRUE", 1); -- cgit v1.2.3-55-g7522