added a new feature to delete existing version\profile

This commit is contained in:
2026-06-15 00:22:27 +03:00
parent 4bf16a183f
commit 2d35c613a9
5 changed files with 74 additions and 2 deletions
+18
View File
@@ -46,6 +46,24 @@ void LauncherBackend::addVersion(const QString &name, const QString &serverUrl)
emit versionsChanged();
}
void LauncherBackend::removeProfile(int index)
{
if (index < 0 || index >= m_profiles.size())
return;
m_profiles.removeAt(index);
saveProfiles();
emit profilesChanged();
}
void LauncherBackend::removeVersion(int index)
{
if (index < 0 || index >= m_versions.size())
return;
m_versions.removeAt(index);
saveVersions();
emit versionsChanged();
}
void LauncherBackend::launchGame(int profileIndex, int versionIndex)
{
if (profileIndex < 0 || profileIndex >= m_profiles.size()) {