From 0d8e807f87cf6fdaff3ad0d5105dfef1bf5f7be4 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Mon, 5 May 2025 16:18:19 -0400 Subject: [PATCH] Use better default profile names Instead of "New Profile" for every new profile, they are now named as follows: * The first profile is "Default", because most users will most likely only have one. * Every subsequent profile is "New Profile (N)" where N is the number of profiles. --- launcher/src/profilemanager.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/launcher/src/profilemanager.cpp b/launcher/src/profilemanager.cpp index 8d3ba82..d26f434 100644 --- a/launcher/src/profilemanager.cpp +++ b/launcher/src/profilemanager.cpp @@ -5,6 +5,7 @@ #include "astra_log.h" #include "profileconfig.h" +#include #include #include #include @@ -43,8 +44,15 @@ Profile *ProfileManager::getProfileByUUID(const QString &uuid) Profile *ProfileManager::addProfile() { + QString newProfileName; + if (m_profiles.size() == 0) { + newProfileName = i18n("Default"); + } else { + newProfileName = i18n("New Profile (%1)", m_profiles.size()); + } + const auto newProfile = new Profile(QUuid::createUuid().toString(), this); - newProfile->config()->setName(QStringLiteral("New Profile")); + newProfile->config()->setName(newProfileName); newProfile->config()->save(); insertProfile(newProfile);