mirror of
https://github.com/azahar-emu/azahar
synced 2025-11-06 23:19:57 +01:00
citra_qt: Build fixes for QT 6.8 (#441)
* citra_qt: Build fixes for QT 6.8 Replace deprecated `stateChanged` function with `checkStateChanged` that was first introduced in QT 6.7. * citra_qt: Use macros to detect QT version * citra_qt: Group QT macro version checks together
This commit is contained in:
parent
ec14c621ff
commit
19eeb949a1
@ -1,4 +1,4 @@
|
||||
// Copyright 2018 Citra Emulator Project
|
||||
// Copyright Citra Emulator Project / Lime3DS Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2018 Citra Emulator Project
|
||||
// Copyright Citra Emulator Project / Lime3DS Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
// Copyright 2019 Citra Emulator Project
|
||||
// Copyright Citra Emulator Project / Lime3DS Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <QColorDialog>
|
||||
#include <QtGlobal>
|
||||
#include "citra_qt/configuration/configuration_shared.h"
|
||||
#include "citra_qt/configuration/configure_layout.h"
|
||||
#include "common/settings.h"
|
||||
@ -57,6 +58,8 @@ ConfigureLayout::ConfigureLayout(QWidget* parent)
|
||||
});
|
||||
|
||||
ui->screen_top_leftright_padding->setEnabled(Settings::values.screen_top_stretch.GetValue());
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0)
|
||||
connect(ui->screen_top_stretch, static_cast<void (QCheckBox::*)(int)>(&QCheckBox::stateChanged),
|
||||
this,
|
||||
[this](bool checkState) { ui->screen_top_leftright_padding->setEnabled(checkState); });
|
||||
@ -76,6 +79,23 @@ ConfigureLayout::ConfigureLayout(QWidget* parent)
|
||||
ui->screen_bottom_stretch, static_cast<void (QCheckBox::*)(int)>(&QCheckBox::stateChanged),
|
||||
this,
|
||||
[this](bool checkState) { ui->screen_bottom_topbottom_padding->setEnabled(checkState); });
|
||||
#else
|
||||
connect(ui->screen_top_stretch, &QCheckBox::checkStateChanged, this,
|
||||
[this](bool checkState) { ui->screen_top_leftright_padding->setEnabled(checkState); });
|
||||
ui->screen_top_topbottom_padding->setEnabled(Settings::values.screen_top_stretch.GetValue());
|
||||
connect(ui->screen_top_stretch, &QCheckBox::checkStateChanged, this,
|
||||
[this](bool checkState) { ui->screen_top_topbottom_padding->setEnabled(checkState); });
|
||||
ui->screen_bottom_leftright_padding->setEnabled(
|
||||
Settings::values.screen_bottom_topbottom_padding.GetValue());
|
||||
connect(
|
||||
ui->screen_bottom_stretch, &QCheckBox::checkStateChanged, this,
|
||||
[this](bool checkState) { ui->screen_bottom_leftright_padding->setEnabled(checkState); });
|
||||
ui->screen_bottom_topbottom_padding->setEnabled(
|
||||
Settings::values.screen_bottom_topbottom_padding.GetValue());
|
||||
connect(
|
||||
ui->screen_bottom_stretch, &QCheckBox::checkStateChanged, this,
|
||||
[this](bool checkState) { ui->screen_bottom_topbottom_padding->setEnabled(checkState); });
|
||||
#endif
|
||||
|
||||
connect(ui->bg_button, &QPushButton::clicked, this, [this] {
|
||||
const QColor new_bg_color = QColorDialog::getColor(bg_color);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2019 Citra Emulator Project
|
||||
// Copyright Citra Emulator Project / Lime3DS Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user