Warnings fixes (#541)

* Warnings fixes

* Warnings fixes
This commit is contained in:
¥IGA 2024-08-23 21:38:55 +02:00 committed by GitHub
parent fda2fdae69
commit 0c5b91e1fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 15 additions and 113 deletions

View file

@ -1,8 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <QHeaderView>
#include "elf_viewer.h"
ElfViewer::ElfViewer(QWidget* parent) : QTableWidget(parent) {

View file

@ -3,17 +3,7 @@
#pragma once
#include <ranges>
#include <QApplication>
#include <QFileDialog>
#include <QMainWindow>
#include <QMenuBar>
#include <QScrollBar>
#include <QTableWidget>
#include <QTextEdit>
#include <QTreeView>
#include <QVBoxLayout>
#include <QWidget>
#include "core/loader/elf.h"
#include "game_list_frame.h"

View file

@ -3,17 +3,7 @@
#pragma once
#include <QFutureWatcher>
#include <QGraphicsBlurEffect>
#include <QHeaderView>
#include <QLabel>
#include <QPixmap>
#include <QScrollBar>
#include <QStyleOptionViewItem>
#include <QTableWidget>
#include <QVBoxLayout>
#include <QWidget>
#include <QtConcurrent/QtConcurrent>
#include "common/config.h"
#include "game_info.h"

View file

@ -1,10 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <future>
#include <thread>
#include <QProgressDialog>
#include <QtConcurrent/QtConcurrent>
#include "game_info.h"

View file

@ -3,10 +3,8 @@
#pragma once
#include <QFuture>
#include <QObject>
#include <QPixmap>
#include <QtConcurrent/QtConcurrent>
#include <QFutureWatcher>
#include <QtConcurrent>
#include "common/config.h"
#include "core/file_format/psf.h"

View file

@ -3,19 +3,7 @@
#pragma once
#include <QFutureWatcher>
#include <QGraphicsBlurEffect>
#include <QHeaderView>
#include <QLabel>
#include <QMainWindow>
#include <QPixmap>
#include <QScrollBar>
#include <QStyleOptionViewItem>
#include <QTableWidget>
#include <QTableWidgetItem>
#include <QVBoxLayout>
#include <QWidget>
#include <QtConcurrent/QtConcurrent>
#include "game_info.h"
#include "game_list_utils.h"

View file

@ -3,11 +3,6 @@
#pragma once
#include <QDir>
#include <QDirIterator>
#include <QImage>
#include <QString>
struct GameInfo {
std::string path; // root path of game directory (normaly directory that contains eboot.bin)
std::string icon_path; // path of icon0.png

View file

@ -4,17 +4,9 @@
#pragma once
#include <QClipboard>
#include <QCoreApplication>
#include <QDesktopServices>
#include <QFile>
#include <QHeaderView>
#include <QImage>
#include <QMenu>
#include <QMessageBox>
#include <QPixmap>
#include <QStandardPaths>
#include <QTableWidget>
#include <QTextStream>
#include <QTreeWidget>
#include <QTreeWidgetItem>
@ -84,7 +76,7 @@ public:
QTableWidget* tableWidget = new QTableWidget(rows, 2);
tableWidget->setAttribute(Qt::WA_DeleteOnClose);
connect(widget->parent(), &QWidget::destroyed, tableWidget,
[widget, tableWidget]() { tableWidget->deleteLater(); });
[tableWidget]() { tableWidget->deleteLater(); });
tableWidget->verticalHeader()->setVisible(false); // Hide vertical header
int row = 0;
@ -135,7 +127,7 @@ public:
TrophyViewer* trophyViewer = new TrophyViewer(trophyPath, gameTrpPath);
trophyViewer->show();
connect(widget->parent(), &QWidget::destroyed, trophyViewer,
[widget, trophyViewer]() { trophyViewer->deleteLater(); });
[trophyViewer]() { trophyViewer->deleteLater(); });
}
if (selected == &createShortcut) {

View file

@ -1,14 +1,11 @@
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <QtWidgets/QApplication>
#include <fmt/core.h>
#include "common/config.h"
#include "core/file_sys/fs.h"
#include "emulator.h"
#include "qt_gui/game_install_dialog.h"
#include "qt_gui/main_window.h"
#include "game_install_dialog.h"
#include "main_window.h"
// Custom message handler to ignore Qt logs
void customMessageHandler(QtMsgType, const QMessageLogContext&, const QString&) {}

View file

@ -1,13 +1,8 @@
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <QDir>
#include <QDockWidget>
#include <QFileDialog>
#include <QMessageBox>
#include <QProgressDialog>
#include <QStatusBar>
#include <QtConcurrent>
#include "about_dialog.h"
#include "common/io_file.h"

View file

@ -3,13 +3,8 @@
#pragma once
#include <QAbstractButton>
#include <QActionGroup>
#include <QDragEnterEvent>
#include <QMainWindow>
#include <QMimeData>
#include <QScopedPointer>
#include <fmt/core.h>
#include "common/config.h"
#include "common/path_util.h"

View file

@ -1,29 +1,11 @@
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
/********************************************************************************
** Form generated from reading UI file 'main_window.ui'
**
** Created by: Qt User Interface Compiler version 6.6.1
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#pragma once
#ifndef MAIN_WINDOW_UI_H
#define MAIN_WINDOW_UI_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QMenu>
#include <QtWidgets/QMenuBar>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSlider>
#include <QtWidgets/QToolBar>
#include <QtWidgets/QWidget>
#include <QMenuBar>
#include <QPushButton>
#include <QToolBar>
QT_BEGIN_NAMESPACE
@ -369,6 +351,4 @@ namespace Ui {
class MainWindow : public Ui_MainWindow {};
} // namespace Ui
QT_END_NAMESPACE
#endif // MAIN_WINDOW_UI_H
QT_END_NAMESPACE

View file

@ -1,9 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <QHeaderView>
#include <QWidget>
#include "pkg_viewer.h"
PKGViewer::PKGViewer(std::shared_ptr<GameInfoClass> game_info_get, QWidget* parent,
@ -54,7 +51,7 @@ PKGViewer::PKGViewer(std::shared_ptr<GameInfoClass> game_info_get, QWidget* pare
InstallDragDropPkg);
});
connect(parent, &QWidget::destroyed, this, [parent, this]() { this->deleteLater(); });
connect(parent, &QWidget::destroyed, this, [this]() { this->deleteLater(); });
}
PKGViewer::~PKGViewer() {}

View file

@ -3,18 +3,9 @@
#pragma once
#include <filesystem>
#include <string>
#include <unordered_map>
#include <vector>
#include <QFileDialog>
#include <QMainWindow>
#include <QMenu>
#include <QMenuBar>
#include <QStatusBar>
#include <QTreeWidget>
#include <QTreeWidgetItem>
#include <QtConcurrent/QtConcurrent>
#include "common/io_file.h"
#include "core/file_format/pkg.h"

View file

@ -2,6 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include <QCompleter>
#include "settings_dialog.h"
#include "ui_settings_dialog.h"
@ -86,7 +87,7 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices, QWidge
[](const QString& text) { Config::setUserName(text.toStdString()); });
connect(ui->consoleLanguageComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, [this](int index) {
this, [](int index) {
if (index >= 0 && index < languageIndexes.size()) {
int languageCode = languageIndexes[index];
Config::setLanguage(languageCode);

View file

@ -10,11 +10,9 @@
#include <QHeaderView>
#include <QLabel>
#include <QMainWindow>
#include <QStyleOptionViewItem>
#include <QTableWidget>
#include <QTableWidgetItem>
#include <QVBoxLayout>
#include <QWidget>
#include <QXmlStreamReader>
#include "common/types.h"

View file

@ -124,7 +124,7 @@ private:
using FuncReturn = typename std::invoke_result<Func, ImageId, Image&>::type;
static constexpr bool BOOL_BREAK = std::is_same_v<FuncReturn, bool>;
boost::container::small_vector<ImageId, 32> images;
ForEachPage(cpu_addr, size, [this, &images, cpu_addr, size, func](u64 page) {
ForEachPage(cpu_addr, size, [this, &images, func](u64 page) {
const auto it = page_table.find(page);
if (it == nullptr) {
if constexpr (BOOL_BREAK) {