mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-20 16:08:44 +00:00
Changed: Remove a profile
--HG-- branch : develop
This commit is contained in:
parent
d6400c9d4e
commit
f36c00cd00
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