1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-23 21:07:45 +00:00

Set default profile name on first launch, write uuid without braces

This commit is contained in:
redstrate 2021-11-09 13:26:59 -05:00
parent 083d8a970c
commit 68b92429fa

View file

@ -122,7 +122,7 @@ void LauncherWindow::readInitialInformation() {
// create the Default profile if it doesnt exist // create the Default profile if it doesnt exist
if(profiles.empty()) if(profiles.empty())
profiles.append(QUuid::createUuid().toString()); profiles.append(QUuid::createUuid().toString(QUuid::StringFormat::WithoutBraces));
profileSettings.resize(profiles.size()); profileSettings.resize(profiles.size());
@ -132,7 +132,7 @@ void LauncherWindow::readInitialInformation() {
settings.beginGroup(uuid); settings.beginGroup(uuid);
profile.name = settings.value("name").toString(); profile.name = settings.value("name", "Default").toString();
profile.wineVersion = settings.value("wineVersion", 0).toInt(); profile.wineVersion = settings.value("wineVersion", 0).toInt();
#if defined(Q_OS_MAC) #if defined(Q_OS_MAC)
@ -398,7 +398,7 @@ void LauncherWindow::saveSettings() {
for(int i = 0; i < profileSettings.size(); i++) { for(int i = 0; i < profileSettings.size(); i++) {
const auto& profile = profileSettings[i]; const auto& profile = profileSettings[i];
settings.beginGroup(profile.uuid.toString()); settings.beginGroup(profile.uuid.toString(QUuid::StringFormat::WithoutBraces));
settings.setValue("name", profile.name); settings.setValue("name", profile.name);
settings.setValue("index", i); settings.setValue("index", i);