From 0ff1d215c81bda45e84c45d0dddb1f7ffb81f7b1 Mon Sep 17 00:00:00 2001 From: crueter Date: Tue, 10 Mar 2026 05:37:45 +0100 Subject: [desktop] Port some QtCommon changes from QML branch (#3703) - Linker now resolves implementation differences - Remove unneeded ifdefs - Better abstractions overall Signed-off-by: crueter Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3703 Reviewed-by: Lizzie Reviewed-by: CamilleLaVey --- src/qt_common/util/path.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'src/qt_common/util/path.cpp') diff --git a/src/qt_common/util/path.cpp b/src/qt_common/util/path.cpp index 73689058c6..a99d3b03ea 100644 --- a/src/qt_common/util/path.cpp +++ b/src/qt_common/util/path.cpp @@ -1,28 +1,24 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later -#include "qt_common/util/path.h" #include #include #include +#include #include "common/fs/fs.h" #include "common/fs/path_util.h" #include "qt_common/abstract/frontend.h" -#include +#include "qt_common/util/path.h" namespace QtCommon::Path { -bool OpenShaderCache(u64 program_id, QObject *parent) -{ +bool OpenShaderCache(u64 program_id, QObject* parent) { const auto shader_cache_dir = Common::FS::GetEdenPath(Common::FS::EdenPath::ShaderDir); const auto shader_cache_folder_path{shader_cache_dir / fmt::format("{:016x}", program_id)}; if (!Common::FS::CreateDirs(shader_cache_folder_path)) { - QtCommon::Frontend::ShowMessage(QMessageBox::Warning, - tr("Error Opening Shader Cache"), - tr("Failed to create or open shader cache for this title, " - "ensure your app data directory has write permissions."), - QMessageBox::Ok, - parent); + QtCommon::Frontend::Warning(tr("Error Opening Shader Cache"), + tr("Failed to create or open shader cache for this title, " + "ensure your app data directory has write permissions.")); } const auto shader_path_string{Common::FS::PathToUTF8String(shader_cache_folder_path)}; @@ -30,4 +26,4 @@ bool OpenShaderCache(u64 program_id, QObject *parent) return QDesktopServices::openUrl(QUrl::fromLocalFile(qt_shader_cache_path)); } -} +} // namespace QtCommon::Path -- cgit v1.2.3