diff options
| author | crueter <crueter@eden-emu.dev> | 2025-10-30 11:03:08 +0100 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2025-10-30 11:03:08 +0100 |
| commit | e93159b0470f79c8f09fc3de1eb3c3e0b8a61992 (patch) | |
| tree | f61484206571bd70351eebbb6060a776a6932873 /src/qt_common/util/content.cpp | |
| parent | d98916604420f0b703060f615400bf755c7ff042 (diff) | |
[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 <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2894
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Diffstat (limited to 'src/qt_common/util/content.cpp')
| -rw-r--r-- | src/qt_common/util/content.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
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 (<br>) + qorphaned.reserve(8 * 36); for (const std::string& s : orphaned) { - qorphaned = qorphaned % QStringLiteral("\n") % QString::fromStdString(s); + qorphaned = qorphaned % QStringLiteral("<br>") % 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 (<br>) + qgood.reserve(8 * 36); for (const std::string& s : good) { - qgood = qgood % QStringLiteral("\n") % QString::fromStdString(s); + qgood = qgood % QStringLiteral("<br>") % 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!<br>" + "Eden has detected the following save directories with no attached profile:<br>" + "%1<br><br>" + "The following profiles are valid:<br>" + "%2<br><br>" + "Click \"OK\" to open your save folder and fix up your profiles.<br>" "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.<br><br>" + "Still confused? See the <a href='https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/user/Orphaned.md'>help page</a>.<br>") .arg(qorphaned, qgood)); QtCommon::Game::OpenSaveFolder(); |
