added a new feature to delete existing version\profile
This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user