mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-14 04:48:59 +02:00
[qt] clarify orphaned profiles by showing GOOD uuids (#2850)
Shows what profile UUIDs are actually good so the user knows which one to copy their saves to. Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2850 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
parent
c713d44c88
commit
903faacaab
3 changed files with 24 additions and 3 deletions
|
|
@ -330,6 +330,7 @@ void FixProfiles()
|
|||
// TODO: better solution
|
||||
system->GetProfileManager().ResetUserSaveFile();
|
||||
std::vector<std::string> orphaned = system->GetProfileManager().FindOrphanedProfiles();
|
||||
std::vector<std::string> good = system->GetProfileManager().FindGoodProfiles();
|
||||
|
||||
// no orphaned dirs--all good :)
|
||||
if (orphaned.empty())
|
||||
|
|
@ -346,15 +347,27 @@ void FixProfiles()
|
|||
qorphaned = qorphaned % QStringLiteral("\n") % QString::fromStdString(s);
|
||||
}
|
||||
|
||||
QString qgood;
|
||||
|
||||
// max. of 8 good profiles is fair, I think
|
||||
// 33 = 32 (UUID) + 1 (\n)
|
||||
qgood.reserve(8 * 33);
|
||||
|
||||
for (const std::string& s : good) {
|
||||
qgood = qgood % QStringLiteral("\n") % 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"
|
||||
"Hint: copy the contents of the largest or last-modified folder elsewhere, "
|
||||
"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.")
|
||||
.arg(qorphaned));
|
||||
.arg(qorphaned, qgood));
|
||||
|
||||
QtCommon::Game::OpenSaveFolder();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue