chore(cpn): Increase number of profiles that can be created (#4373)
This commit is contained in:
@@ -304,6 +304,11 @@ Profile::Profile() : CompStoreObj(), index(-1)
|
||||
CompStoreObj::addObjectMapping(propertyGroup(), this);
|
||||
}
|
||||
|
||||
Profile::Profile(const Profile & rhs) : CompStoreObj(), index(-1)
|
||||
{
|
||||
*this = rhs;
|
||||
}
|
||||
|
||||
// The default copy operator can not be used since the index variable would be destroyed
|
||||
Profile & Profile::operator= (const Profile & rhs)
|
||||
{
|
||||
@@ -661,6 +666,18 @@ QMap<int, QString> AppData::getActiveProfiles() const
|
||||
return active;
|
||||
}
|
||||
|
||||
void AppData::moveCurrentProfileToTop()
|
||||
{
|
||||
if (g.sortProfiles() && m_sessionId > 0) {
|
||||
Profile tmpProfile(g.profile[m_sessionId]);
|
||||
for (int i = m_sessionId; i > 0; i -= 1) {
|
||||
g.profile[i] = g.profile[i - 1];
|
||||
}
|
||||
g.profile[0] = tmpProfile;
|
||||
id(0);
|
||||
}
|
||||
}
|
||||
|
||||
void AppData::convertSettings(QSettings & settings)
|
||||
{
|
||||
quint32 savedVer = settings.value(SETTINGS_VERSION_KEY, 0).toUInt();
|
||||
|
||||
Reference in New Issue
Block a user