Skip to content

Commit 4bd9bd3

Browse files
committed
code cleanup
1 parent 8ed9a50 commit 4bd9bd3

File tree

2 files changed

+8
-18
lines changed

2 files changed

+8
-18
lines changed

main.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// SPDX-FileCopyrightText: Copyright 2024 BBLauncher Project
22
// SPDX-License-Identifier: GPL-3.0-or-later
33

4-
#include <filesystem>
54
#include <iostream>
65
#include <QApplication>
76
#include <QCommandLineParser>

modules/bblauncher.cpp

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -155,38 +155,29 @@ void BBLauncher::WIPButton_isPressed() {
155155
QMessageBox::warning(
156156
this, "On hold",
157157
"Work on trophy manager will be put on-hold until it's easier to dump trophy keys");
158-
UpdateSettingsList();
159158
}
160159

161160
void BBLauncher::ShadSelectButton_isPressed() {
162161

163-
std::string ShadLocString;
162+
QString ShadLoc;
164163
#if defined(__linux__)
165-
QString ShadLoc = QFileDialog::getOpenFileName(
164+
ShadLoc = QFileDialog::getOpenFileName(
166165
this,
167166
"Select ShadPS4 executable (ex. /usr/bin/shadps4, "
168167
"Shadps4-qt.AppImage, etc.)",
169168
QDir::homePath(),
170169
"QT AppImage (Shadps4-qt.AppImage);;SDL AppImage (Shadps4-sdl.AppImage);;"
171170
"non-AppImage (shadps4)",
172171
0, QFileDialog::DontUseNativeDialog);
173-
ShadLocString = ShadLoc.toStdString();
174-
if (ShadLocString != "")
175-
shadPs4Executable = std::filesystem::u8path(ShadLocString);
176172
#elif defined(__APPLE__)
177-
QString ShadLoc =
178-
QFileDialog::getOpenFileName(this, "Select ShadPS4 executable (ex. shadps4.app)",
179-
QDir::homePath(), "App Bundle (shadps4.app)");
180-
ShadLocString = ShadLoc.toStdString();
181-
if (ShadLocString != "")
182-
shadPs4Executable = std::filesystem::u8path(ShadLocString);
173+
ShadLoc = QFileDialog::getOpenFileName(this, "Select ShadPS4 executable (ex. shadps4.app)",
174+
QDir::homePath(), "App Bundle (shadps4.app)");
183175
#endif
184176

185-
if (ShadLocString != "") {
186-
SaveConfigPath("shadPath", PathToU8(shadPs4Executable));
187-
QString shadLabelString;
188-
PathToQString(shadLabelString, shadPs4Executable);
189-
ui->ShadLabel->setText(shadLabelString);
177+
if (ShadLoc != "") {
178+
shadPs4Executable = PathFromQString(ShadLoc);
179+
SaveConfigPath("shadPath", shadPs4Executable);
180+
ui->ShadLabel->setText(ShadLoc);
190181
}
191182
}
192183

0 commit comments

Comments
 (0)