Changeset View
Changeset View
Standalone View
Standalone View
kcm/src/kcm_kscreen.cpp
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Line(s) | |||||
112 | void KCMKScreen::save() | 112 | void KCMKScreen::save() | ||
113 | { | 113 | { | ||
114 | qCDebug(KSCREEN_KCM) << "Saving."; | 114 | qCDebug(KSCREEN_KCM) << "Saving."; | ||
115 | 115 | | |||
116 | if (!mKScreenWidget) { | 116 | if (!mKScreenWidget) { | ||
117 | return; | 117 | return; | ||
118 | } | 118 | } | ||
119 | 119 | | |||
120 | mKScreenWidget->save(); | ||||
121 | | ||||
120 | const KScreen::ConfigPtr &config = mKScreenWidget->currentConfig(); | 122 | const KScreen::ConfigPtr &config = mKScreenWidget->currentConfig(); | ||
121 | 123 | | |||
122 | bool atLeastOneEnabledOutput = false; | 124 | bool atLeastOneEnabledOutput = false; | ||
123 | Q_FOREACH(const KScreen::OutputPtr &output, config->outputs()) { | 125 | Q_FOREACH(const KScreen::OutputPtr &output, config->outputs()) { | ||
124 | KScreen::ModePtr mode = output->currentMode(); | 126 | KScreen::ModePtr mode = output->currentMode(); | ||
125 | 127 | | |||
126 | if (output->isEnabled()) { | 128 | if (output->isEnabled()) { | ||
127 | atLeastOneEnabledOutput = true; | 129 | atLeastOneEnabledOutput = true; | ||
▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | 177 | { | |||
177 | load(); | 179 | load(); | ||
178 | } | 180 | } | ||
179 | 181 | | |||
180 | void KCMKScreen::load() | 182 | void KCMKScreen::load() | ||
181 | { | 183 | { | ||
182 | qCDebug(KSCREEN_KCM) << "LOAD"; | 184 | qCDebug(KSCREEN_KCM) << "LOAD"; | ||
183 | connect(new GetConfigOperation(), &GetConfigOperation::finished, | 185 | connect(new GetConfigOperation(), &GetConfigOperation::finished, | ||
184 | this, &KCMKScreen::configReady); | 186 | this, &KCMKScreen::configReady); | ||
187 | if (!mKScreenWidget) { | ||||
188 | return; | ||||
189 | } | ||||
190 | | ||||
191 | mKScreenWidget->load(); | ||||
185 | } | 192 | } | ||
186 | 193 | | |||
187 | #include "kcm_kscreen.moc" | 194 | #include "kcm_kscreen.moc" |