mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-18 16:50:05 +00:00
Merge pull request #4807 from FearlessTobi/port-2550
Port yuzu-emu/yuzu#2550: "yuzu/CMakeLists: Pass compilation flags that make it more difficult to cause bugs in Qt code"
This commit is contained in:
commit
5299678880
@ -228,6 +228,15 @@ target_compile_definitions(citra-qt PRIVATE
|
|||||||
# Use QStringBuilder for string concatenation to reduce
|
# Use QStringBuilder for string concatenation to reduce
|
||||||
# the overall number of temporary strings created.
|
# the overall number of temporary strings created.
|
||||||
-DQT_USE_QSTRINGBUILDER
|
-DQT_USE_QSTRINGBUILDER
|
||||||
|
|
||||||
|
# Disable implicit type narrowing in signal/slot connect() calls.
|
||||||
|
-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
|
||||||
|
|
||||||
|
# Disable unsafe overloads of QProcess' start() function.
|
||||||
|
-DQT_NO_PROCESS_COMBINED_ARGUMENT_START
|
||||||
|
|
||||||
|
# Disable implicit QString->QUrl conversions to enforce use of proper resolving functions.
|
||||||
|
-DQT_NO_URL_CAST_FROM_STRING
|
||||||
)
|
)
|
||||||
|
|
||||||
if (CITRA_ENABLE_COMPATIBILITY_REPORTING)
|
if (CITRA_ENABLE_COMPATIBILITY_REPORTING)
|
||||||
|
@ -21,11 +21,10 @@ ConfigureGraphics::ConfigureGraphics(QWidget* parent)
|
|||||||
ui->layoutBox->setEnabled(!Settings::values.custom_layout);
|
ui->layoutBox->setEnabled(!Settings::values.custom_layout);
|
||||||
|
|
||||||
ui->hw_renderer_group->setEnabled(ui->toggle_hw_renderer->isChecked());
|
ui->hw_renderer_group->setEnabled(ui->toggle_hw_renderer->isChecked());
|
||||||
connect(ui->toggle_hw_renderer, &QCheckBox::stateChanged, ui->hw_renderer_group,
|
connect(ui->toggle_hw_renderer, &QCheckBox::toggled, ui->hw_renderer_group,
|
||||||
&QWidget::setEnabled);
|
&QWidget::setEnabled);
|
||||||
ui->hw_shader_group->setEnabled(ui->toggle_hw_shader->isChecked());
|
ui->hw_shader_group->setEnabled(ui->toggle_hw_shader->isChecked());
|
||||||
connect(ui->toggle_hw_shader, &QCheckBox::stateChanged, ui->hw_shader_group,
|
connect(ui->toggle_hw_shader, &QCheckBox::toggled, ui->hw_shader_group, &QWidget::setEnabled);
|
||||||
&QWidget::setEnabled);
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
connect(ui->toggle_hw_shader, &QCheckBox::stateChanged, this, [this](int state) {
|
connect(ui->toggle_hw_shader, &QCheckBox::stateChanged, this, [this](int state) {
|
||||||
if (state == Qt::Checked) {
|
if (state == Qt::Checked) {
|
||||||
|
@ -425,7 +425,7 @@ void ChatRoom::PopupContextMenu(const QPoint& menu_location) {
|
|||||||
QAction* view_profile_action = context_menu.addAction(tr("View Profile"));
|
QAction* view_profile_action = context_menu.addAction(tr("View Profile"));
|
||||||
connect(view_profile_action, &QAction::triggered, [username] {
|
connect(view_profile_action, &QAction::triggered, [username] {
|
||||||
QDesktopServices::openUrl(
|
QDesktopServices::openUrl(
|
||||||
QString("https://community.citra-emu.org/u/%1").arg(username));
|
QUrl(QString("https://community.citra-emu.org/u/%1").arg(username)));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,9 +64,8 @@ Lobby::Lobby(QWidget* parent, QStandardItemModel* list,
|
|||||||
|
|
||||||
// UI Buttons
|
// UI Buttons
|
||||||
connect(ui->refresh_list, &QPushButton::pressed, this, &Lobby::RefreshLobby);
|
connect(ui->refresh_list, &QPushButton::pressed, this, &Lobby::RefreshLobby);
|
||||||
connect(ui->games_owned, &QCheckBox::stateChanged, proxy,
|
connect(ui->games_owned, &QCheckBox::toggled, proxy, &LobbyFilterProxyModel::SetFilterOwned);
|
||||||
&LobbyFilterProxyModel::SetFilterOwned);
|
connect(ui->hide_full, &QCheckBox::toggled, proxy, &LobbyFilterProxyModel::SetFilterFull);
|
||||||
connect(ui->hide_full, &QCheckBox::stateChanged, proxy, &LobbyFilterProxyModel::SetFilterFull);
|
|
||||||
connect(ui->search, &QLineEdit::textChanged, proxy, &LobbyFilterProxyModel::SetFilterSearch);
|
connect(ui->search, &QLineEdit::textChanged, proxy, &LobbyFilterProxyModel::SetFilterSearch);
|
||||||
connect(ui->room_list, &QTreeView::doubleClicked, this, &Lobby::OnJoinRoom);
|
connect(ui->room_list, &QTreeView::doubleClicked, this, &Lobby::OnJoinRoom);
|
||||||
connect(ui->room_list, &QTreeView::clicked, this, &Lobby::OnExpandRoom);
|
connect(ui->room_list, &QTreeView::clicked, this, &Lobby::OnExpandRoom);
|
||||||
|
Loading…
Reference in New Issue
Block a user