From e93159b0470f79c8f09fc3de1eb3c3e0b8a61992 Mon Sep 17 00:00:00 2001 From: crueter Date: Thu, 30 Oct 2025 11:03:08 +0100 Subject: [qt] clean up some orphaned_profiles bugs; add help (#2894) Some weird edge cases of "phantom" profiles that are actually needed for... reasons I guess Also, fixed some of the logic w.r.t empty checking, plus added a help page Signed-off-by: crueter Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2894 Reviewed-by: Lizzie Reviewed-by: Maufeat Reviewed-by: MaranBr --- src/qt_common/util/content.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'src/qt_common/util/content.cpp') diff --git a/src/qt_common/util/content.cpp b/src/qt_common/util/content.cpp index df4435f567..c190e11410 100644 --- a/src/qt_common/util/content.cpp +++ b/src/qt_common/util/content.cpp @@ -340,33 +340,34 @@ void FixProfiles() QString qorphaned; // max. of 8 orphaned profiles is fair, I think - // 33 = 32 (UUID) + 1 (\n) - qorphaned.reserve(8 * 33); + // 36 = 32 (UUID) + 4 (
) + qorphaned.reserve(8 * 36); for (const std::string& s : orphaned) { - qorphaned = qorphaned % QStringLiteral("\n") % QString::fromStdString(s); + qorphaned = qorphaned % QStringLiteral("
") % QString::fromStdString(s); } QString qgood; // max. of 8 good profiles is fair, I think - // 33 = 32 (UUID) + 1 (\n) - qgood.reserve(8 * 33); + // 36 = 32 (UUID) + 4 (
) + qgood.reserve(8 * 36); for (const std::string& s : good) { - qgood = qgood % QStringLiteral("\n") % QString::fromStdString(s); + qgood = qgood % QStringLiteral("
") % QString::fromStdString(s); } QtCommon::Frontend::Critical( tr("Orphaned Profiles Detected!"), - tr("UNEXPECTED BAD THINGS MAY HAPPEN IF YOU DON'T READ THIS!\n" - "Eden has detected the following save directories with no attached profile:\n" - "%1\n\n" - "The following profiles are valid:\n" - "%2\n\n" - "Click \"OK\" to open your save folder and fix up your profiles.\n" + tr("UNEXPECTED BAD THINGS MAY HAPPEN IF YOU DON'T READ THIS!
" + "Eden has detected the following save directories with no attached profile:
" + "%1

" + "The following profiles are valid:
" + "%2

" + "Click \"OK\" to open your save folder and fix up your profiles.
" "Hint: copy the contents of the largest or last-modified folder elsewhere, " - "delete all orphaned profiles, and move your copied contents to the good profile.") + "delete all orphaned profiles, and move your copied contents to the good profile.

" + "Still confused? See the help page.
") .arg(qorphaned, qgood)); QtCommon::Game::OpenSaveFolder(); -- cgit v1.2.3