citra_qt: Switch all strings to multiarg

This commit is contained in:
GPUCode
2022-10-03 00:00:53 +03:00
parent 2c30889fdc
commit a6e2bcd986
6 changed files with 21 additions and 24 deletions

View File

@ -37,7 +37,7 @@ CheatDialog::CheatDialog(QWidget* parent)
connect(ui->textNotes, &QPlainTextEdit::textChanged, this, &CheatDialog::OnTextEdited); connect(ui->textNotes, &QPlainTextEdit::textChanged, this, &CheatDialog::OnTextEdited);
connect(ui->textCode, &QPlainTextEdit::textChanged, this, &CheatDialog::OnTextEdited); connect(ui->textCode, &QPlainTextEdit::textChanged, this, &CheatDialog::OnTextEdited);
connect(ui->buttonSave, &QPushButton::clicked, connect(ui->buttonSave, &QPushButton::clicked, this,
[this] { SaveCheat(ui->tableCheats->currentRow()); }); [this] { SaveCheat(ui->tableCheats->currentRow()); });
connect(ui->buttonDelete, &QPushButton::clicked, this, &CheatDialog::OnDeleteCheat); connect(ui->buttonDelete, &QPushButton::clicked, this, &CheatDialog::OnDeleteCheat);

View File

@ -508,7 +508,7 @@ void TouchScreenPreview::mouseMoveEvent(QMouseEvent* event) {
} }
const auto pos = MapToDeviceCoords(event->x(), event->y()); const auto pos = MapToDeviceCoords(event->x(), event->y());
if (pos) { if (pos) {
coord_label->setText(QStringLiteral("X: %1, Y: %2").arg(pos->x()).arg(pos->y())); coord_label->setText(QStringLiteral("X: %1, Y: %2").arg(pos->x(), pos->y()));
} else { } else {
coord_label->clear(); coord_label->clear();
} }
@ -568,7 +568,7 @@ bool TouchScreenPreview::eventFilter(QObject* obj, QEvent* event) {
emit DotMoved(drag_state.dot->property(PropId).toInt(), *device_coord); emit DotMoved(drag_state.dot->property(PropId).toInt(), *device_coord);
if (coord_label) { if (coord_label) {
coord_label->setText( coord_label->setText(
QStringLiteral("X: %1, Y: %2").arg(device_coord->x()).arg(device_coord->y())); QStringLiteral("X: %1, Y: %2").arg(device_coord->x(), device_coord->y()));
} }
} }
return true; return true;

View File

@ -114,7 +114,7 @@ void OptionSetDialog::InitializeUI(const std::string& initial_value) {
ui->formatLabel->text().append(QStringLiteral("\n")); ui->formatLabel->text().append(QStringLiteral("\n"));
} }
ui->formatLabel->setText( ui->formatLabel->setText(
ui->formatLabel->text().append(tr("Range: %1 - %2").arg(option.min).arg(option.max))); ui->formatLabel->text().append(tr("Range: %1 - %2").arg(option.min, option.max)));
} }
// Decide and initialize layout // Decide and initialize layout

View File

@ -511,42 +511,42 @@ void GameList::AddGamePopup(QMenu& context_menu, const QString& path, u64 progra
navigate_to_gamedb_entry->setVisible(it != compatibility_list.end()); navigate_to_gamedb_entry->setVisible(it != compatibility_list.end());
connect(open_save_location, &QAction::triggered, [this, program_id] { connect(open_save_location, &QAction::triggered, this, [this, program_id] {
emit OpenFolderRequested(program_id, GameListOpenTarget::SAVE_DATA); emit OpenFolderRequested(program_id, GameListOpenTarget::SAVE_DATA);
}); });
connect(open_extdata_location, &QAction::triggered, [this, extdata_id] { connect(open_extdata_location, &QAction::triggered, this, [this, extdata_id] {
emit OpenFolderRequested(extdata_id, GameListOpenTarget::EXT_DATA); emit OpenFolderRequested(extdata_id, GameListOpenTarget::EXT_DATA);
}); });
connect(open_application_location, &QAction::triggered, [this, program_id] { connect(open_application_location, &QAction::triggered, this, [this, program_id] {
emit OpenFolderRequested(program_id, GameListOpenTarget::APPLICATION); emit OpenFolderRequested(program_id, GameListOpenTarget::APPLICATION);
}); });
connect(open_update_location, &QAction::triggered, [this, program_id] { connect(open_update_location, &QAction::triggered, this, [this, program_id] {
emit OpenFolderRequested(program_id, GameListOpenTarget::UPDATE_DATA); emit OpenFolderRequested(program_id, GameListOpenTarget::UPDATE_DATA);
}); });
connect(open_texture_dump_location, &QAction::triggered, [this, program_id] { connect(open_texture_dump_location, &QAction::triggered, this, [this, program_id] {
if (FileUtil::CreateFullPath(fmt::format("{}textures/{:016X}/", if (FileUtil::CreateFullPath(fmt::format("{}textures/{:016X}/",
FileUtil::GetUserPath(FileUtil::UserPath::DumpDir), FileUtil::GetUserPath(FileUtil::UserPath::DumpDir),
program_id))) { program_id))) {
emit OpenFolderRequested(program_id, GameListOpenTarget::TEXTURE_DUMP); emit OpenFolderRequested(program_id, GameListOpenTarget::TEXTURE_DUMP);
} }
}); });
connect(open_texture_load_location, &QAction::triggered, [this, program_id] { connect(open_texture_load_location, &QAction::triggered, this, [this, program_id] {
if (FileUtil::CreateFullPath(fmt::format("{}textures/{:016X}/", if (FileUtil::CreateFullPath(fmt::format("{}textures/{:016X}/",
FileUtil::GetUserPath(FileUtil::UserPath::LoadDir), FileUtil::GetUserPath(FileUtil::UserPath::LoadDir),
program_id))) { program_id))) {
emit OpenFolderRequested(program_id, GameListOpenTarget::TEXTURE_LOAD); emit OpenFolderRequested(program_id, GameListOpenTarget::TEXTURE_LOAD);
} }
}); });
connect(open_mods_location, &QAction::triggered, [this, program_id] { connect(open_mods_location, &QAction::triggered, this, [this, program_id] {
if (FileUtil::CreateFullPath(fmt::format("{}mods/{:016X}/", if (FileUtil::CreateFullPath(fmt::format("{}mods/{:016X}/",
FileUtil::GetUserPath(FileUtil::UserPath::LoadDir), FileUtil::GetUserPath(FileUtil::UserPath::LoadDir),
program_id))) { program_id))) {
emit OpenFolderRequested(program_id, GameListOpenTarget::MODS); emit OpenFolderRequested(program_id, GameListOpenTarget::MODS);
} }
}); });
connect(dump_romfs, &QAction::triggered, connect(dump_romfs, &QAction::triggered, this,
[this, path, program_id] { emit DumpRomFSRequested(path, program_id); }); [this, path, program_id] { emit DumpRomFSRequested(path, program_id); });
connect(navigate_to_gamedb_entry, &QAction::triggered, [this, program_id]() { connect(navigate_to_gamedb_entry, &QAction::triggered, this, [this, program_id]() {
emit NavigateToGamedbEntryRequested(program_id, compatibility_list); emit NavigateToGamedbEntryRequested(program_id, compatibility_list);
}); });
}; };
@ -561,11 +561,11 @@ void GameList::AddCustomDirPopup(QMenu& context_menu, QModelIndex selected) {
deep_scan->setCheckable(true); deep_scan->setCheckable(true);
deep_scan->setChecked(game_dir.deep_scan); deep_scan->setChecked(game_dir.deep_scan);
connect(deep_scan, &QAction::triggered, [this, &game_dir] { connect(deep_scan, &QAction::triggered, this, [this, &game_dir] {
game_dir.deep_scan = !game_dir.deep_scan; game_dir.deep_scan = !game_dir.deep_scan;
PopulateAsync(UISettings::values.game_dirs); PopulateAsync(UISettings::values.game_dirs);
}); });
connect(delete_dir, &QAction::triggered, [this, &game_dir, selected] { connect(delete_dir, &QAction::triggered, this, [this, &game_dir, selected] {
UISettings::values.game_dirs.removeOne(game_dir); UISettings::values.game_dirs.removeOne(game_dir);
item_model->invisibleRootItem()->removeRow(selected.row()); item_model->invisibleRootItem()->removeRow(selected.row());
}); });
@ -583,7 +583,7 @@ void GameList::AddPermDirPopup(QMenu& context_menu, QModelIndex selected) {
move_up->setEnabled(row > 0); move_up->setEnabled(row > 0);
move_down->setEnabled(row < item_model->rowCount() - 2); move_down->setEnabled(row < item_model->rowCount() - 2);
connect(move_up, &QAction::triggered, [this, selected, row, game_dir_index] { connect(move_up, &QAction::triggered, this, [this, selected, row, game_dir_index] {
const int other_index = selected.sibling(row - 1, 0).data(GameListDir::GameDirRole).toInt(); const int other_index = selected.sibling(row - 1, 0).data(GameListDir::GameDirRole).toInt();
// swap the items in the settings // swap the items in the settings
std::swap(UISettings::values.game_dirs[game_dir_index], std::swap(UISettings::values.game_dirs[game_dir_index],
@ -598,7 +598,7 @@ void GameList::AddPermDirPopup(QMenu& context_menu, QModelIndex selected) {
tree_view->setExpanded(selected, UISettings::values.game_dirs[game_dir_index].expanded); tree_view->setExpanded(selected, UISettings::values.game_dirs[game_dir_index].expanded);
}); });
connect(move_down, &QAction::triggered, [this, selected, row, game_dir_index] { connect(move_down, &QAction::triggered, this, [this, selected, row, game_dir_index] {
const int other_index = selected.sibling(row + 1, 0).data(GameListDir::GameDirRole).toInt(); const int other_index = selected.sibling(row + 1, 0).data(GameListDir::GameDirRole).toInt();
// swap the items in the settings // swap the items in the settings
std::swap(UISettings::values.game_dirs[game_dir_index], std::swap(UISettings::values.game_dirs[game_dir_index],
@ -613,7 +613,7 @@ void GameList::AddPermDirPopup(QMenu& context_menu, QModelIndex selected) {
tree_view->setExpanded(selected, UISettings::values.game_dirs[game_dir_index].expanded); tree_view->setExpanded(selected, UISettings::values.game_dirs[game_dir_index].expanded);
}); });
connect(open_directory_location, &QAction::triggered, [this, game_dir_index] { connect(open_directory_location, &QAction::triggered, this, [this, game_dir_index] {
emit OpenDirectory(UISettings::values.game_dirs[game_dir_index].path); emit OpenDirectory(UISettings::values.game_dirs[game_dir_index].path);
}); });
} }
@ -640,7 +640,7 @@ void GameList::LoadCompatibilityList() {
const QJsonDocument json = QJsonDocument::fromJson(content); const QJsonDocument json = QJsonDocument::fromJson(content);
const QJsonArray arr = json.array(); const QJsonArray arr = json.array();
for (const QJsonValue value : arr) { for (const QJsonValue& value : arr) {
const QJsonObject game = value.toObject(); const QJsonObject game = value.toObject();
const QString compatibility_key = QStringLiteral("compatibility"); const QString compatibility_key = QStringLiteral("compatibility");
@ -652,7 +652,7 @@ void GameList::LoadCompatibilityList() {
const QString directory = game[QStringLiteral("directory")].toString(); const QString directory = game[QStringLiteral("directory")].toString();
const QJsonArray ids = game[QStringLiteral("releases")].toArray(); const QJsonArray ids = game[QStringLiteral("releases")].toArray();
for (const QJsonValue id_ref : ids) { for (const QJsonValue& id_ref : ids) {
const QJsonObject id_object = id_ref.toObject(); const QJsonObject id_object = id_ref.toObject();
const QString id = id_object[QStringLiteral("id")].toString(); const QString id = id_object[QStringLiteral("id")].toString();

View File

@ -11,7 +11,6 @@
#include <QFutureWatcher> #include <QFutureWatcher>
#include <QLabel> #include <QLabel>
#include <QMessageBox> #include <QMessageBox>
#include <QOpenGLFunctions_4_3_Core>
#include <QSysInfo> #include <QSysInfo>
#include <QtConcurrent/QtConcurrentRun> #include <QtConcurrent/QtConcurrentRun>
#include <QtGui> #include <QtGui>
@ -2033,7 +2032,7 @@ void GMainWindow::UpdateStatusBar() {
message_label_used_for_movie = true; message_label_used_for_movie = true;
ui->action_Save_Movie->setEnabled(true); ui->action_Save_Movie->setEnabled(true);
} else if (play_mode == Core::Movie::PlayMode::Playing) { } else if (play_mode == Core::Movie::PlayMode::Playing) {
message_label->setText(tr("Playing %1 / %2").arg(current).arg(total)); message_label->setText(tr("Playing %1 / %2").arg(current, total));
message_label->setVisible(true); message_label->setVisible(true);
message_label_used_for_movie = true; message_label_used_for_movie = true;
ui->action_Save_Movie->setEnabled(false); ui->action_Save_Movie->setEnabled(false);

View File

@ -8,9 +8,7 @@
#include "common/microprofile.h" #include "common/microprofile.h"
#include "common/swap.h" #include "common/swap.h"
#include "core/core.h" #include "core/core.h"
#include "core/hle/ipc.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/handle_table.h"
#include "core/hle/kernel/shared_memory.h" #include "core/hle/kernel/shared_memory.h"
#include "core/hle/kernel/shared_page.h" #include "core/hle/kernel/shared_page.h"
#include "core/hle/result.h" #include "core/hle/result.h"