mirror of
https://github.com/86Box/86Box.git
synced 2026-02-21 17:15:32 -07:00
Fix a warning in the VFIO code and attempt to use checkStateChanged instead of stateChanged when compiling with Qt 6.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
// #include "qt_vmmanager_details_section.hpp"
|
||||
#include "qt_vmmanager_detailsection.hpp"
|
||||
|
||||
#include "qt_defs.hpp"
|
||||
|
||||
#ifdef Q_OS_WINDOWS
|
||||
# include <windows.h>
|
||||
#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;
|
||||
|
||||
Reference in New Issue
Block a user