Merge pull request #2205 from ts-korhonen/fix-warnings
qt: fix multiple compiler warnings
This commit is contained in:
@@ -358,7 +358,7 @@ void MachineStatus::refresh(QStatusBar* sbar) {
|
|||||||
if (cassette_enable) {
|
if (cassette_enable) {
|
||||||
d->cassette.label = std::make_unique<ClickableLabel>();
|
d->cassette.label = std::make_unique<ClickableLabel>();
|
||||||
d->cassette.setEmpty(QString(cassette_fname).isEmpty());
|
d->cassette.setEmpty(QString(cassette_fname).isEmpty());
|
||||||
connect((ClickableLabel*)d->cassette.label.get(), &ClickableLabel::clicked, [this](QPoint pos) {
|
connect((ClickableLabel*)d->cassette.label.get(), &ClickableLabel::clicked, [](QPoint pos) {
|
||||||
MediaMenu::ptr->cassetteMenu->popup(pos - QPoint(0, MediaMenu::ptr->cassetteMenu->sizeHint().height()));
|
MediaMenu::ptr->cassetteMenu->popup(pos - QPoint(0, MediaMenu::ptr->cassetteMenu->sizeHint().height()));
|
||||||
});
|
});
|
||||||
d->cassette.label->setToolTip(MediaMenu::ptr->cassetteMenu->title());
|
d->cassette.label->setToolTip(MediaMenu::ptr->cassetteMenu->title());
|
||||||
@@ -369,7 +369,7 @@ void MachineStatus::refresh(QStatusBar* sbar) {
|
|||||||
for (int i = 0; i < 2; ++i) {
|
for (int i = 0; i < 2; ++i) {
|
||||||
d->cartridge[i].label = std::make_unique<ClickableLabel>();
|
d->cartridge[i].label = std::make_unique<ClickableLabel>();
|
||||||
d->cartridge[i].setEmpty(QString(cart_fns[i]).isEmpty());
|
d->cartridge[i].setEmpty(QString(cart_fns[i]).isEmpty());
|
||||||
connect((ClickableLabel*)d->cartridge[i].label.get(), &ClickableLabel::clicked, [this, i](QPoint pos) {
|
connect((ClickableLabel*)d->cartridge[i].label.get(), &ClickableLabel::clicked, [i](QPoint pos) {
|
||||||
MediaMenu::ptr->cartridgeMenus[i]->popup(pos - QPoint(0, MediaMenu::ptr->cartridgeMenus[i]->sizeHint().height()));
|
MediaMenu::ptr->cartridgeMenus[i]->popup(pos - QPoint(0, MediaMenu::ptr->cartridgeMenus[i]->sizeHint().height()));
|
||||||
});
|
});
|
||||||
d->cartridge[i].label->setToolTip(MediaMenu::ptr->cartridgeMenus[i]->title());
|
d->cartridge[i].label->setToolTip(MediaMenu::ptr->cartridgeMenus[i]->title());
|
||||||
@@ -389,7 +389,7 @@ void MachineStatus::refresh(QStatusBar* sbar) {
|
|||||||
d->fdd[i].label = std::make_unique<ClickableLabel>();
|
d->fdd[i].label = std::make_unique<ClickableLabel>();
|
||||||
d->fdd[i].setEmpty(QString(floppyfns[i]).isEmpty());
|
d->fdd[i].setEmpty(QString(floppyfns[i]).isEmpty());
|
||||||
d->fdd[i].setActive(false);
|
d->fdd[i].setActive(false);
|
||||||
connect((ClickableLabel*)d->fdd[i].label.get(), &ClickableLabel::clicked, [this, i](QPoint pos) {
|
connect((ClickableLabel*)d->fdd[i].label.get(), &ClickableLabel::clicked, [i](QPoint pos) {
|
||||||
MediaMenu::ptr->floppyMenus[i]->popup(pos - QPoint(0, MediaMenu::ptr->floppyMenus[i]->sizeHint().height()));
|
MediaMenu::ptr->floppyMenus[i]->popup(pos - QPoint(0, MediaMenu::ptr->floppyMenus[i]->sizeHint().height()));
|
||||||
});
|
});
|
||||||
d->fdd[i].label->setToolTip(MediaMenu::ptr->floppyMenus[i]->title());
|
d->fdd[i].label->setToolTip(MediaMenu::ptr->floppyMenus[i]->title());
|
||||||
@@ -400,7 +400,7 @@ void MachineStatus::refresh(QStatusBar* sbar) {
|
|||||||
d->cdrom[i].label = std::make_unique<ClickableLabel>();
|
d->cdrom[i].label = std::make_unique<ClickableLabel>();
|
||||||
d->cdrom[i].setEmpty(cdrom[i].host_drive != 200 || QString(cdrom[i].image_path).isEmpty());
|
d->cdrom[i].setEmpty(cdrom[i].host_drive != 200 || QString(cdrom[i].image_path).isEmpty());
|
||||||
d->cdrom[i].setActive(false);
|
d->cdrom[i].setActive(false);
|
||||||
connect((ClickableLabel*)d->cdrom[i].label.get(), &ClickableLabel::clicked, [this, i](QPoint pos) {
|
connect((ClickableLabel*)d->cdrom[i].label.get(), &ClickableLabel::clicked, [i](QPoint pos) {
|
||||||
MediaMenu::ptr->cdromMenus[i]->popup(pos - QPoint(0, MediaMenu::ptr->cdromMenus[i]->sizeHint().height()));
|
MediaMenu::ptr->cdromMenus[i]->popup(pos - QPoint(0, MediaMenu::ptr->cdromMenus[i]->sizeHint().height()));
|
||||||
});
|
});
|
||||||
d->cdrom[i].label->setToolTip(MediaMenu::ptr->cdromMenus[i]->title());
|
d->cdrom[i].label->setToolTip(MediaMenu::ptr->cdromMenus[i]->title());
|
||||||
@@ -411,7 +411,7 @@ void MachineStatus::refresh(QStatusBar* sbar) {
|
|||||||
d->zip[i].label = std::make_unique<ClickableLabel>();
|
d->zip[i].label = std::make_unique<ClickableLabel>();
|
||||||
d->zip[i].setEmpty(QString(zip_drives[i].image_path).isEmpty());
|
d->zip[i].setEmpty(QString(zip_drives[i].image_path).isEmpty());
|
||||||
d->zip[i].setActive(false);
|
d->zip[i].setActive(false);
|
||||||
connect((ClickableLabel*)d->zip[i].label.get(), &ClickableLabel::clicked, [this, i](QPoint pos) {
|
connect((ClickableLabel*)d->zip[i].label.get(), &ClickableLabel::clicked, [i](QPoint pos) {
|
||||||
MediaMenu::ptr->zipMenus[i]->popup(pos - QPoint(0, MediaMenu::ptr->zipMenus[i]->sizeHint().height()));
|
MediaMenu::ptr->zipMenus[i]->popup(pos - QPoint(0, MediaMenu::ptr->zipMenus[i]->sizeHint().height()));
|
||||||
});
|
});
|
||||||
d->zip[i].label->setToolTip(MediaMenu::ptr->zipMenus[i]->title());
|
d->zip[i].label->setToolTip(MediaMenu::ptr->zipMenus[i]->title());
|
||||||
@@ -422,7 +422,7 @@ void MachineStatus::refresh(QStatusBar* sbar) {
|
|||||||
d->mo[i].label = std::make_unique<ClickableLabel>();
|
d->mo[i].label = std::make_unique<ClickableLabel>();
|
||||||
d->mo[i].setEmpty(QString(mo_drives[i].image_path).isEmpty());
|
d->mo[i].setEmpty(QString(mo_drives[i].image_path).isEmpty());
|
||||||
d->mo[i].setActive(false);
|
d->mo[i].setActive(false);
|
||||||
connect((ClickableLabel*)d->mo[i].label.get(), &ClickableLabel::clicked, [this, i](QPoint pos) {
|
connect((ClickableLabel*)d->mo[i].label.get(), &ClickableLabel::clicked, [i](QPoint pos) {
|
||||||
MediaMenu::ptr->moMenus[i]->popup(pos - QPoint(0, MediaMenu::ptr->moMenus[i]->sizeHint().height()));
|
MediaMenu::ptr->moMenus[i]->popup(pos - QPoint(0, MediaMenu::ptr->moMenus[i]->sizeHint().height()));
|
||||||
});
|
});
|
||||||
d->mo[i].label->setToolTip(MediaMenu::ptr->moMenus[i]->title());
|
d->mo[i].label->setToolTip(MediaMenu::ptr->moMenus[i]->title());
|
||||||
@@ -471,7 +471,7 @@ void MachineStatus::refresh(QStatusBar* sbar) {
|
|||||||
d->sound = std::make_unique<ClickableLabel>();
|
d->sound = std::make_unique<ClickableLabel>();
|
||||||
d->sound->setPixmap(d->pixmaps.sound);
|
d->sound->setPixmap(d->pixmaps.sound);
|
||||||
|
|
||||||
connect(d->sound.get(), &ClickableLabel::doubleClicked, d->sound.get(), [this](QPoint pos) {
|
connect(d->sound.get(), &ClickableLabel::doubleClicked, d->sound.get(), [](QPoint pos) {
|
||||||
SoundGain gain(main_window);
|
SoundGain gain(main_window);
|
||||||
gain.exec();
|
gain.exec();
|
||||||
});
|
});
|
||||||
|
@@ -339,6 +339,11 @@ bool NewFloppyDialog::create86f(const QString& filename, const disk_size_t& disk
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Ignore false positive warning caused by a bug on gcc */
|
||||||
|
#if __GNUC__ >= 11
|
||||||
|
#pragma GCC diagnostic ignored "-Wstringop-overflow"
|
||||||
|
#endif
|
||||||
|
|
||||||
bool NewFloppyDialog::createSectorImage(const QString &filename, const disk_size_t& disk_size, FileType type)
|
bool NewFloppyDialog::createSectorImage(const QString &filename, const disk_size_t& disk_size, FileType type)
|
||||||
{
|
{
|
||||||
uint32_t total_size = 0;
|
uint32_t total_size = 0;
|
||||||
|
@@ -74,11 +74,13 @@ private:
|
|||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#ifdef Q_OS_WINDOWS
|
#ifdef Q_OS_WINDOWS
|
||||||
#define NOMINMAX
|
# ifndef NOMINMAX
|
||||||
#include <windows.h>
|
# define NOMINMAX
|
||||||
#include <86box/win.h>
|
# endif
|
||||||
|
# include <windows.h>
|
||||||
|
# include <86box/win.h>
|
||||||
#else
|
#else
|
||||||
#include <strings.h>
|
# include <strings.h>
|
||||||
#endif
|
#endif
|
||||||
#include <86box/86box.h>
|
#include <86box/86box.h>
|
||||||
#include <86box/device.h>
|
#include <86box/device.h>
|
||||||
|
@@ -218,9 +218,8 @@ SettingsBusTracking::scsi_bus_full()
|
|||||||
void
|
void
|
||||||
SettingsBusTracking::device_track(int set, uint8_t dev_type, int bus, int channel)
|
SettingsBusTracking::device_track(int set, uint8_t dev_type, int bus, int channel)
|
||||||
{
|
{
|
||||||
int i, element;
|
int element;
|
||||||
uint64_t mask;
|
uint64_t mask;
|
||||||
uint8_t count = 0;
|
|
||||||
|
|
||||||
switch (bus) {
|
switch (bus) {
|
||||||
case HDD_BUS_MFM:
|
case HDD_BUS_MFM:
|
||||||
|
@@ -54,7 +54,6 @@ void SettingsInput::onCurrentMachineChanged(int machineId) {
|
|||||||
// win_settings_video_proc, WM_INITDIALOG
|
// win_settings_video_proc, WM_INITDIALOG
|
||||||
this->machineId = machineId;
|
this->machineId = machineId;
|
||||||
|
|
||||||
const auto* machine = &machines[machineId];
|
|
||||||
auto* mouseModel = ui->comboBoxMouse->model();
|
auto* mouseModel = ui->comboBoxMouse->model();
|
||||||
auto removeRows = mouseModel->rowCount();
|
auto removeRows = mouseModel->rowCount();
|
||||||
|
|
||||||
|
@@ -80,7 +80,6 @@ void SettingsNetwork::save() {
|
|||||||
|
|
||||||
void SettingsNetwork::onCurrentMachineChanged(int machineId) {
|
void SettingsNetwork::onCurrentMachineChanged(int machineId) {
|
||||||
this->machineId = machineId;
|
this->machineId = machineId;
|
||||||
auto* machine = &machines[machineId];
|
|
||||||
|
|
||||||
auto* model = ui->comboBoxAdapter->model();
|
auto* model = ui->comboBoxAdapter->model();
|
||||||
auto removeRows = model->rowCount();
|
auto removeRows = model->rowCount();
|
||||||
|
@@ -64,7 +64,6 @@ void SettingsStorageControllers::save() {
|
|||||||
|
|
||||||
void SettingsStorageControllers::onCurrentMachineChanged(int machineId) {
|
void SettingsStorageControllers::onCurrentMachineChanged(int machineId) {
|
||||||
this->machineId = machineId;
|
this->machineId = machineId;
|
||||||
auto* machine = &machines[machineId];
|
|
||||||
|
|
||||||
/*HD controller config*/
|
/*HD controller config*/
|
||||||
auto* model = ui->comboBoxHD->model();
|
auto* model = ui->comboBoxHD->model();
|
||||||
|
Reference in New Issue
Block a user