mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-29 03:40:55 +00:00
Changed: Remove a profile
This commit is contained in:
parent
eb4a46798d
commit
913914f0cb
3 changed files with 11 additions and 1 deletions
|
@ -313,8 +313,14 @@ int CConfigFile::addProfile(const CProfile &profile)
|
|||
void CConfigFile::removeProfile(int i)
|
||||
{
|
||||
m_profiles.removeAt(i);
|
||||
}
|
||||
|
||||
// TODO: decalle all profiles and move files
|
||||
void CConfigFile::removeProfile(const QString &id)
|
||||
{
|
||||
for (int i = 0; i < m_profiles.size(); ++i)
|
||||
{
|
||||
if (m_profiles[i].id == id) removeProfile(i);
|
||||
}
|
||||
}
|
||||
|
||||
bool CConfigFile::has64bitsOS()
|
||||
|
|
|
@ -116,6 +116,7 @@ public:
|
|||
void setProfile(int i, const CProfile &profile);
|
||||
int addProfile(const CProfile &profile);
|
||||
void removeProfile(int i);
|
||||
void removeProfile(const QString &id);
|
||||
|
||||
int getDefaultServerIndex() const;
|
||||
void setDefaultServerIndex(int index);
|
||||
|
|
|
@ -766,6 +766,9 @@ void COperationDialog::deleteComponentsProfiles()
|
|||
emit fail(tr("Unable to delete files for profile %1").arg(profile.name));
|
||||
return;
|
||||
}
|
||||
|
||||
// delete profile
|
||||
config->removeProfile(profileId);
|
||||
}
|
||||
|
||||
emit success(m_components.servers.size());
|
||||
|
|
Loading…
Reference in a new issue