mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-29 20:30:54 +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)
|
void CConfigFile::removeProfile(int i)
|
||||||
{
|
{
|
||||||
m_profiles.removeAt(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()
|
bool CConfigFile::has64bitsOS()
|
||||||
|
|
|
@ -116,6 +116,7 @@ public:
|
||||||
void setProfile(int i, const CProfile &profile);
|
void setProfile(int i, const CProfile &profile);
|
||||||
int addProfile(const CProfile &profile);
|
int addProfile(const CProfile &profile);
|
||||||
void removeProfile(int i);
|
void removeProfile(int i);
|
||||||
|
void removeProfile(const QString &id);
|
||||||
|
|
||||||
int getDefaultServerIndex() const;
|
int getDefaultServerIndex() const;
|
||||||
void setDefaultServerIndex(int index);
|
void setDefaultServerIndex(int index);
|
||||||
|
|
|
@ -766,6 +766,9 @@ void COperationDialog::deleteComponentsProfiles()
|
||||||
emit fail(tr("Unable to delete files for profile %1").arg(profile.name));
|
emit fail(tr("Unable to delete files for profile %1").arg(profile.name));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// delete profile
|
||||||
|
config->removeProfile(profileId);
|
||||||
}
|
}
|
||||||
|
|
||||||
emit success(m_components.servers.size());
|
emit success(m_components.servers.size());
|
||||||
|
|
Loading…
Reference in a new issue