Changeset View
Changeset View
Standalone View
Standalone View
kcms/colors/colors.cpp
Show First 20 Lines • Show All 333 Lines • ▼ Show 20 Line(s) | 315 | { | |||
---|---|---|---|---|---|
334 | } | 334 | } | ||
335 | 335 | | |||
336 | { | 336 | { | ||
337 | KConfig cfg(QStringLiteral("kcmdisplayrc"), KConfig::NoGlobals); | 337 | KConfig cfg(QStringLiteral("kcmdisplayrc"), KConfig::NoGlobals); | ||
338 | KConfigGroup group(m_config, "General"); | 338 | KConfigGroup group(m_config, "General"); | ||
339 | group = KConfigGroup(&cfg, "X11"); | 339 | group = KConfigGroup(&cfg, "X11"); | ||
340 | m_applyToAlien = group.readEntry("exportKDEColors", true); | 340 | m_applyToAlien = group.readEntry("exportKDEColors", true); | ||
341 | } | 341 | } | ||
342 | | ||||
343 | // If need save is true at the end of load() function, it will stay disabled forever. | ||||
344 | // setSelectedScheme() call due to unexisting scheme name in kdeglobals will trigger a need to save. | ||||
345 | // this following call ensure the apply button will work properly. | ||||
346 | setNeedsSave(false); | ||||
342 | } | 347 | } | ||
343 | 348 | | |||
344 | void KCMColors::save() | 349 | void KCMColors::save() | ||
345 | { | 350 | { | ||
346 | ManagedConfigModule::save(); | 351 | ManagedConfigModule::save(); | ||
347 | if (m_selectedSchemeDirty) { | 352 | if (m_selectedSchemeDirty) { | ||
348 | saveColors(); | 353 | saveColors(); | ||
349 | } | 354 | } | ||
▲ Show 20 Lines • Show All 136 Lines • Show Last 20 Lines |