formatting

This commit is contained in:
DanielSvoboda 2023-10-11 16:04:53 -03:00 committed by GitHub
commit 2c592f9d3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2872,8 +2872,8 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga
std::filesystem::path target_directory{};
// Determine target directory for shortcut
if (target == GameListShortcutTarget::Desktop) {
// Determine target directory for shortcut
if (target == GameListShortcutTarget::Desktop) {
QString desktopPath = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
target_directory = desktopPath.toUtf8().toStdString();
QDir dir(QString::fromStdString(target_directory.generic_string()));
@ -2885,8 +2885,8 @@ if (target == GameListShortcutTarget::Desktop) {
QMessageBox::StandardButton::Ok);
return;
}
} else if (target == GameListShortcutTarget::Applications) {
#if defined(__linux__)
} else if (target == GameListShortcutTarget::Applications) {
#if defined(__linux__)
QString applicationsPath =
QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation);
target_directory = applicationsPath.toUtf8().toStdString();
@ -2900,8 +2900,8 @@ if (target == GameListShortcutTarget::Desktop) {
QMessageBox::StandardButton::Ok);
return;
}
#endif
}
#endif
}
const std::string game_file_name = std::filesystem::path(game_path).filename().string();
// Determine full paths for icon and shortcut