mirror of
https://github.com/KDE/latte-dock.git
synced 2025-02-02 21:47:22 +03:00
reduce kconfig.sync() calls
--improves startup times in some cases because it does not write to disk that often.
This commit is contained in:
parent
e83f7e551e
commit
381675ac57
@ -364,8 +364,6 @@ void AbstractLayout::saveConfig()
|
||||
m_layoutGroup.writeEntry("customTextColor", m_customTextColor);
|
||||
m_layoutGroup.writeEntry("lastUsedActivity", m_lastUsedActivity);
|
||||
m_layoutGroup.writeEntry("preferredForShortcutsTouched", m_preferredForShortcutsTouched);
|
||||
|
||||
m_layoutGroup.sync();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -50,9 +50,6 @@ CentralLayout::CentralLayout(QObject *parent, QString layoutFile, QString assign
|
||||
|
||||
CentralLayout::~CentralLayout()
|
||||
{
|
||||
if (!m_layoutFile.isEmpty()) {
|
||||
m_layoutGroup.sync();
|
||||
}
|
||||
}
|
||||
|
||||
void CentralLayout::unloadContainments()
|
||||
@ -256,8 +253,6 @@ void CentralLayout::saveConfig()
|
||||
m_layoutGroup.writeEntry("disableBordersForMaximizedWindows", m_disableBordersForMaximizedWindows);
|
||||
m_layoutGroup.writeEntry("sharedLayout", m_sharedLayoutName);
|
||||
m_layoutGroup.writeEntry("activities", m_activities);
|
||||
|
||||
m_layoutGroup.sync();
|
||||
}
|
||||
|
||||
//! OVERRIDES
|
||||
|
@ -158,7 +158,6 @@ void Storage::syncToLayoutFile(bool removeLayoutId)
|
||||
|
||||
KConfigGroup oldContainments = KConfigGroup(filePtr, "Containments");
|
||||
oldContainments.deleteGroup();
|
||||
oldContainments.sync();
|
||||
|
||||
qDebug() << " LAYOUT :: " << m_layout->name() << " is syncing its original file.";
|
||||
|
||||
|
@ -307,10 +307,6 @@ void Manager::cleanupOnStartup(QString path)
|
||||
for (const auto &cId : removeContaimentsList) {
|
||||
containmentGroups.group(cId).deleteGroup();
|
||||
}
|
||||
|
||||
|
||||
actionGroups.sync();
|
||||
containmentGroups.sync();
|
||||
}
|
||||
|
||||
|
||||
@ -332,8 +328,6 @@ void Manager::clearUnloadedContainmentsFromLinkedFile(QStringList containmentsId
|
||||
KConfigGroup containment = containments.group(conId);
|
||||
containment.deleteGroup();
|
||||
}
|
||||
|
||||
containments.sync();
|
||||
}
|
||||
|
||||
QString Manager::newLayout(QString layoutName, QString preset)
|
||||
|
@ -624,8 +624,6 @@ void Theme::loadConfig()
|
||||
void Theme::saveConfig()
|
||||
{
|
||||
m_themeGroup.writeEntry("outlineWidth", m_outlineWidth);
|
||||
|
||||
m_themeGroup.sync();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -507,8 +507,6 @@ void UniversalSettings::saveConfig()
|
||||
m_universalGroup.writeEntry("showInfoWindow", m_showInfoWindow);
|
||||
m_universalGroup.writeEntry("memoryUsage", (int)m_memoryUsage);
|
||||
m_universalGroup.writeEntry("mouseSensitivity", (int)m_sensitivity);
|
||||
|
||||
m_universalGroup.sync();
|
||||
}
|
||||
|
||||
void UniversalSettings::cleanupSettings()
|
||||
|
@ -439,8 +439,6 @@ void Indicator::saveConfig()
|
||||
config.writeEntry("customType", m_customType);
|
||||
config.writeEntry("enabled", m_enabled);
|
||||
config.writeEntry("type", m_type);
|
||||
|
||||
config.sync();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -778,7 +778,6 @@ void PrimaryConfigView::saveConfig()
|
||||
auto config = m_latteView->containment()->config();
|
||||
int complexity = m_inAdvancedMode ? 1 : 0;
|
||||
config.writeEntry("settingsComplexity", complexity);
|
||||
config.sync();
|
||||
}
|
||||
//!END configuration
|
||||
|
||||
|
@ -1548,7 +1548,6 @@ void View::saveConfig()
|
||||
config.writeEntry("byPassWM", byPassWM());
|
||||
config.writeEntry("isPreferredForShortcuts", isPreferredForShortcuts());
|
||||
config.writeEntry("viewType", (int)m_type);
|
||||
config.sync();
|
||||
}
|
||||
|
||||
void View::restoreConfig()
|
||||
|
Loading…
x
Reference in New Issue
Block a user