diff options
author | FearlessTobi <[email protected]> | 2022-07-25 17:08:20 +0200 |
---|---|---|
committer | FearlessTobi <[email protected]> | 2022-07-25 21:59:31 +0200 |
commit | 6a2dcc8b3d4ed0940e33d60fee701bcdb063eb6b (patch) | |
tree | b70962e3698930c5b06d777bd912caa89a912391 /src/yuzu/multiplayer | |
parent | 6b5667dfa55c2c0c9537a2f46537158e316d0508 (diff) | |
download | yuzu-mainline-6a2dcc8b3d4ed0940e33d60fee701bcdb063eb6b.tar.gz yuzu-mainline-6a2dcc8b3d4ed0940e33d60fee701bcdb063eb6b.zip |
network, yuzu: Improve variable naming and style consistency
Diffstat (limited to 'src/yuzu/multiplayer')
-rw-r--r-- | src/yuzu/multiplayer/host_room.cpp | 2 | ||||
-rw-r--r-- | src/yuzu/multiplayer/lobby.cpp | 8 | ||||
-rw-r--r-- | src/yuzu/multiplayer/lobby_p.h | 4 | ||||
-rw-r--r-- | src/yuzu/multiplayer/state.cpp | 12 |
4 files changed, 15 insertions, 11 deletions
diff --git a/src/yuzu/multiplayer/host_room.cpp b/src/yuzu/multiplayer/host_room.cpp index a48077544..f59c6a28d 100644 --- a/src/yuzu/multiplayer/host_room.cpp +++ b/src/yuzu/multiplayer/host_room.cpp @@ -163,7 +163,7 @@ void HostRoomWindow::Host() { // Start the announce session if they chose Public if (is_public) { if (auto session = announce_multiplayer_session.lock()) { - // Register the room first to ensure verify_UID is present when we connect + // Register the room first to ensure verify_uid is present when we connect WebService::WebResult result = session->Register(); if (result.result_code != WebService::WebResult::Code::Success) { QMessageBox::warning( diff --git a/src/yuzu/multiplayer/lobby.cpp b/src/yuzu/multiplayer/lobby.cpp index 0c6648ab5..6daef9712 100644 --- a/src/yuzu/multiplayer/lobby.cpp +++ b/src/yuzu/multiplayer/lobby.cpp @@ -149,11 +149,11 @@ void Lobby::OnJoinRoom(const QModelIndex& source) { const std::string ip = proxy->data(connection_index, LobbyItemHost::HostIPRole).toString().toStdString(); int port = proxy->data(connection_index, LobbyItemHost::HostPortRole).toInt(); - const std::string verify_UID = + const std::string verify_uid = proxy->data(connection_index, LobbyItemHost::HostVerifyUIDRole).toString().toStdString(); // attempt to connect in a different thread - QFuture<void> f = QtConcurrent::run([nickname, ip, port, password, verify_UID, this] { + QFuture<void> f = QtConcurrent::run([nickname, ip, port, password, verify_uid, this] { std::string token; #ifdef ENABLE_WEB_SERVICE if (!Settings::values.yuzu_username.GetValue().empty() && @@ -161,7 +161,7 @@ void Lobby::OnJoinRoom(const QModelIndex& source) { WebService::Client client(Settings::values.web_api_url.GetValue(), Settings::values.yuzu_username.GetValue(), Settings::values.yuzu_token.GetValue()); - token = client.GetExternalJWT(verify_UID).returned_data; + token = client.GetExternalJWT(verify_uid).returned_data; if (token.empty()) { LOG_ERROR(WebService, "Could not get external JWT, verification may fail"); } else { @@ -239,7 +239,7 @@ void Lobby::OnRefreshLobby() { smdh_icon), new LobbyItemHost(QString::fromStdString(room.information.host_username), QString::fromStdString(room.ip), room.information.port, - QString::fromStdString(room.verify_UID)), + QString::fromStdString(room.verify_uid)), new LobbyItemMemberList(members, room.information.member_slots), }); model->appendRow(row); diff --git a/src/yuzu/multiplayer/lobby_p.h b/src/yuzu/multiplayer/lobby_p.h index afb8b99dc..bb2de4af3 100644 --- a/src/yuzu/multiplayer/lobby_p.h +++ b/src/yuzu/multiplayer/lobby_p.h @@ -123,11 +123,11 @@ public: static const int HostVerifyUIDRole = Qt::UserRole + 4; LobbyItemHost() = default; - explicit LobbyItemHost(QString username, QString ip, u16 port, QString verify_UID) { + explicit LobbyItemHost(QString username, QString ip, u16 port, QString verify_uid) { setData(username, HostUsernameRole); setData(ip, HostIPRole); setData(port, HostPortRole); - setData(verify_UID, HostVerifyUIDRole); + setData(verify_uid, HostVerifyUIDRole); } QVariant data(int role) const override { diff --git a/src/yuzu/multiplayer/state.cpp b/src/yuzu/multiplayer/state.cpp index de25225dd..661a32b3e 100644 --- a/src/yuzu/multiplayer/state.cpp +++ b/src/yuzu/multiplayer/state.cpp @@ -98,14 +98,18 @@ void MultiplayerState::retranslateUi() { status_text->setText(tr("Not Connected")); } - if (lobby) + if (lobby) { lobby->RetranslateUi(); - if (host_room) + } + if (host_room) { host_room->RetranslateUi(); - if (client_room) + } + if (client_room) { client_room->RetranslateUi(); - if (direct_connect) + } + if (direct_connect) { direct_connect->RetranslateUi(); + } } void MultiplayerState::OnNetworkStateChanged(const Network::RoomMember::State& state) { |