From fb222b7a7b8e3a430312533ed1a9ec13f29ace4f Mon Sep 17 00:00:00 2001 From: faith Date: Thu, 5 Dec 2024 17:43:46 +0800 Subject: [PATCH] fix clang-format --- src/qt_gui/compatibility_info.cpp | 6 ++--- src/qt_gui/compatibility_info.h | 3 +-- src/qt_gui/game_list_frame.cpp | 45 ++++++++++++++++--------------- src/qt_gui/main_window.h | 2 +- 4 files changed, 29 insertions(+), 27 deletions(-) diff --git a/src/qt_gui/compatibility_info.cpp b/src/qt_gui/compatibility_info.cpp index 6cd7510377..a9b3edcc5b 100644 --- a/src/qt_gui/compatibility_info.cpp +++ b/src/qt_gui/compatibility_info.cpp @@ -1,12 +1,12 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include -#include -#include #include #include "common/path_util.h" #include "compatibility_info.h" +#include +#include +#include CompatibilityInfoClass::CompatibilityInfoClass() : m_network_manager(new QNetworkAccessManager(this)) { diff --git a/src/qt_gui/compatibility_info.h b/src/qt_gui/compatibility_info.h index ca2e7b328a..c7184bdc30 100644 --- a/src/qt_gui/compatibility_info.h +++ b/src/qt_gui/compatibility_info.h @@ -69,8 +69,7 @@ class CompatibilityInfoClass : public QObject { {OSType::LinuxOS, QStringLiteral("os-linux")}, {OSType::macOS, QStringLiteral("os-macOS")}, {OSType::Win32OS, QStringLiteral("os-windows")}, - {OSType::UnknownOS, QStringLiteral("os-unknown")} - }; + {OSType::UnknownOS, QStringLiteral("os-unknown")}}; CompatibilityInfoClass(); ~CompatibilityInfoClass(); diff --git a/src/qt_gui/game_list_frame.cpp b/src/qt_gui/game_list_frame.cpp index 808dd743c7..67aec14181 100644 --- a/src/qt_gui/game_list_frame.cpp +++ b/src/qt_gui/game_list_frame.cpp @@ -7,7 +7,9 @@ #include "game_list_frame.h" #include "game_list_utils.h" -GameListFrame::GameListFrame(std::shared_ptr game_info_get, std::shared_ptr compat_info_get, QWidget* parent) +GameListFrame::GameListFrame(std::shared_ptr game_info_get, + std::shared_ptr compat_info_get, + QWidget* parent) : QTableWidget(parent), m_game_info(game_info_get), m_compat_info(compat_info_get) { icon_size = Config::getIconSize(); this->setShowGrid(false); @@ -105,7 +107,8 @@ void GameListFrame::PopulateGameList() { SetTableItem(i, 6, QString::fromStdString(m_game_info->m_games[i].size)); SetTableItem(i, 7, QString::fromStdString(m_game_info->m_games[i].version)); - m_game_info->m_games[i].compatibility_status = m_compat_info->GetCompatibilityStatus(m_game_info->m_games[i].serial); + m_game_info->m_games[i].compatibility_status = + m_compat_info->GetCompatibilityStatus(m_game_info->m_games[i].serial); SetCompatibilityItem(i, 2, m_game_info->m_games[i].compatibility_status); QString playTime = GetPlayTime(m_game_info->m_games[i].serial); @@ -217,24 +220,24 @@ void GameListFrame::SetCompatibilityItem(int row, int column, CompatibilityStatu QColor color; switch (status) { - case Unknown: - color = QStringLiteral("#000000"); - break; - case Nothing: - color = QStringLiteral("#212121"); - break; - case Boots: - color = QStringLiteral("#828282"); - break; - case Menus: - color = QStringLiteral("#FF0000"); - break; - case Ingame: - color = QStringLiteral("#F2D624"); - break; - case Playable: - color = QStringLiteral("#47D35C"); - break; + case Unknown: + color = QStringLiteral("#000000"); + break; + case Nothing: + color = QStringLiteral("#212121"); + break; + case Boots: + color = QStringLiteral("#828282"); + break; + case Menus: + color = QStringLiteral("#FF0000"); + break; + case Ingame: + color = QStringLiteral("#F2D624"); + break; + case Playable: + color = QStringLiteral("#47D35C"); + break; } QPixmap circle_pixmap(16, 16); @@ -261,7 +264,7 @@ void GameListFrame::SetCompatibilityItem(int row, int column, CompatibilityStatu label->setGraphicsEffect(shadowEffect); // Apply shadow effect to the QLabel layout->addWidget(dotLabel, 0, 0, -1, 4); - layout->addWidget(label, 0,4,-1,4); + layout->addWidget(label, 0, 4, -1, 4); layout->setAlignment(Qt::AlignLeft); widget->setLayout(layout); this->setItem(row, column, item); diff --git a/src/qt_gui/main_window.h b/src/qt_gui/main_window.h index 21a99670ea..a14c7d6574 100644 --- a/src/qt_gui/main_window.h +++ b/src/qt_gui/main_window.h @@ -10,13 +10,13 @@ #include "background_music_player.h" #include "common/config.h" #include "common/path_util.h" +#include "compatibility_info.h" #include "core/file_format/psf.h" #include "core/file_sys/fs.h" #include "elf_viewer.h" #include "emulator.h" #include "game_grid_frame.h" #include "game_info.h" -#include "compatibility_info.h" #include "game_list_frame.h" #include "game_list_utils.h" #include "main_window_themes.h"