diff --git a/src/device/vfio.c b/src/device/vfio.c index b5fc077b8..2217eb509 100644 --- a/src/device/vfio.c +++ b/src/device/vfio.c @@ -2664,7 +2664,7 @@ vfio_dev_init(vfio_device_t *dev) vfio_region_init(dev, ®, &dev->vga_mem); /* memory [A0000:BFFFF] */ /* Inform that a PCI VGA video card is attached if no video card is emulated. */ - if (gfxcard == VID_NONE) + if (gfxcard[0] == VID_NONE) video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_default); break; diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 229e9f788..08c001ff7 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -33,6 +33,8 @@ #include "qt_cgasettingsdialog.hpp" +#include "qt_defs.hpp" + extern "C" { #include <86box/86box.h> #include <86box/config.h> @@ -936,7 +938,7 @@ MainWindow::closeEvent(QCloseEvent *event) questionbox.setCheckBox(chkbox); chkbox->setChecked(!confirm_exit); - QObject::connect(chkbox, &QCheckBox::stateChanged, [](int state) { + QObject::connect(chkbox, &QCheckBox::CHECK_STATE_CHANGED, [](int state) { confirm_exit = (state == Qt::CheckState::Unchecked); }); questionbox.exec(); @@ -1221,7 +1223,7 @@ MainWindow::on_actionHard_Reset_triggered() questionbox.setCheckBox(chkbox); chkbox->setChecked(!confirm_reset); - QObject::connect(chkbox, &QCheckBox::stateChanged, [](int state) { + QObject::connect(chkbox, &QCheckBox::CHECK_STATE_CHANGED, [](int state) { confirm_reset = (state == Qt::CheckState::Unchecked); }); questionbox.exec(); diff --git a/src/qt/qt_settings.cpp b/src/qt/qt_settings.cpp index 3920aaeb2..312b48996 100644 --- a/src/qt/qt_settings.cpp +++ b/src/qt/qt_settings.cpp @@ -32,6 +32,7 @@ #include "qt_progsettings.hpp" #include "qt_harddrive_common.hpp" #include "qt_settings_bus_tracking.hpp" +#include "qt_defs.hpp" extern "C" { #include <86box/86box.h> @@ -228,7 +229,7 @@ Settings::accept() QCheckBox *chkbox = new QCheckBox(tr("Don't show this message again")); questionbox.setCheckBox(chkbox); chkbox->setChecked(!confirm_save); - QObject::connect(chkbox, &QCheckBox::stateChanged, [](int state) { confirm_save = (state == Qt::CheckState::Unchecked); }); + QObject::connect(chkbox, &QCheckBox::CHECK_STATE_CHANGED, [](int state) { confirm_save = (state == Qt::CheckState::Unchecked); }); questionbox.exec(); if (questionbox.result() == QMessageBox::Cancel) { confirm_save = true; diff --git a/src/qt/qt_vmmanager_details.cpp b/src/qt/qt_vmmanager_details.cpp index 40d0fb185..497f65660 100644 --- a/src/qt/qt_vmmanager_details.cpp +++ b/src/qt/qt_vmmanager_details.cpp @@ -23,6 +23,8 @@ extern "C" { #include "qt_progsettings.hpp" #include "qt_util.hpp" #include "qt_vmmanager_details.hpp" +#include "qt_defs.hpp" + #include "ui_qt_vmmanager_details.h" #define TOOLBUTTON_STYLESHEET_LIGHT "QToolButton {background: transparent; border: none; padding: 5px} QToolButton:hover {background: palette(midlight)} QToolButton:pressed {background: palette(mid)}" @@ -279,8 +281,8 @@ VMManagerDetails::updateData(VMManagerSystem *passed_sysconfig) ui->notesTextEdit->setPlainText(passed_sysconfig->notes); ui->notesTextEdit->setEnabled(true); - disconnect(sysconfig->process, &QProcess::stateChanged, this, &VMManagerDetails::updateProcessStatus); - connect(sysconfig->process, &QProcess::stateChanged, this, &VMManagerDetails::updateProcessStatus); + disconnect(sysconfig->process, &QProcess::CHECK_STATE_CHANGED, this, &VMManagerDetails::updateProcessStatus); + connect(sysconfig->process, &QProcess::CHECK_STATE_CHANGED, this, &VMManagerDetails::updateProcessStatus); disconnect(sysconfig, &VMManagerSystem::windowStatusChanged, this, &VMManagerDetails::updateWindowStatus); connect(sysconfig, &VMManagerSystem::windowStatusChanged, this, &VMManagerDetails::updateWindowStatus); diff --git a/src/qt/qt_vmmanager_main.cpp b/src/qt/qt_vmmanager_main.cpp index 317bd0f2b..c0b4deab3 100644 --- a/src/qt/qt_vmmanager_main.cpp +++ b/src/qt/qt_vmmanager_main.cpp @@ -34,6 +34,8 @@ #include "qt_vmmanager_model.hpp" #include "qt_vmmanager_addmachine.hpp" +#include "qt_defs.hpp" + extern VMManagerMainWindow *vmm_main_window; // https://stackoverflow.com/a/36460740 @@ -515,7 +517,7 @@ VMManagerMain::currentSelectionChanged(const QModelIndex ¤t, if (!current.isValid()) return; - disconnect(selected_sysconfig->process, &QProcess::stateChanged, this, &VMManagerMain::vmStateChange); + disconnect(selected_sysconfig->process, &QProcess::CHECK_STATE_CHANGED, this, &VMManagerMain::vmStateChange); disconnect(selected_sysconfig, &VMManagerSystem::windowStatusChanged, this, &VMManagerMain::vmStateChange); disconnect(selected_sysconfig, &VMManagerSystem::clientProcessStatusChanged, this, &VMManagerMain::vmStateChange); @@ -526,7 +528,7 @@ VMManagerMain::currentSelectionChanged(const QModelIndex ¤t, // Emit that the selection changed, include with the process state emit selectionOrStateChanged(selected_sysconfig); - connect(selected_sysconfig->process, &QProcess::stateChanged, this, &VMManagerMain::vmStateChange); + connect(selected_sysconfig->process, &QProcess::CHECK_STATE_CHANGED, this, &VMManagerMain::vmStateChange); connect(selected_sysconfig, &VMManagerSystem::windowStatusChanged, this, &VMManagerMain::vmStateChange); connect(selected_sysconfig, &VMManagerSystem::clientProcessStatusChanged, this, &VMManagerMain::vmStateChange); diff --git a/src/qt/qt_vmmanager_system.cpp b/src/qt/qt_vmmanager_system.cpp index eb91ef220..9d5058951 100644 --- a/src/qt/qt_vmmanager_system.cpp +++ b/src/qt/qt_vmmanager_system.cpp @@ -30,6 +30,8 @@ // #include "qt_vmmanager_details_section.hpp" #include "qt_vmmanager_detailsection.hpp" +#include "qt_defs.hpp" + #ifdef Q_OS_WINDOWS # include #endif @@ -101,7 +103,7 @@ VMManagerSystem::VMManagerSystem(const QString &sysconfig_file) find86BoxBinary(); platform = QApplication::platformName(); process = new QProcess(); - connect(process, &QProcess::stateChanged, this, &VMManagerSystem::processStatusChanged); + connect(process, &QProcess::CHECK_STATE_CHANGED, this, &VMManagerSystem::processStatusChanged); // Server type for this instance (Standard should always be used instead of Legacy) socket_server_type = VMManagerServerSocket::ServerType::Standard;