Changeset View
Changeset View
Standalone View
Standalone View
kcms/componentchooser/componentchooser.cpp
Show First 20 Lines • Show All 184 Lines • ▼ Show 20 Line(s) | 178 | void ComponentChooser::slotServiceSelected(QListWidgetItem* it) { | |||
---|---|---|---|---|---|
185 | KConfig cfg(service, KConfig::SimpleConfig); | 185 | KConfig cfg(service, KConfig::SimpleConfig); | ||
186 | 186 | | |||
187 | ComponentDescription->setText(cfg.group(QByteArray()).readEntry("Comment",i18n("No description available"))); | 187 | ComponentDescription->setText(cfg.group(QByteArray()).readEntry("Comment",i18n("No description available"))); | ||
188 | ComponentDescription->setMinimumSize(ComponentDescription->sizeHint()); | 188 | ComponentDescription->setMinimumSize(ComponentDescription->sizeHint()); | ||
189 | 189 | | |||
190 | configWidget = configWidgetMap.value(service); | 190 | configWidget = configWidgetMap.value(service); | ||
191 | if (configWidget) { | 191 | if (configWidget) { | ||
192 | configContainer->setCurrentWidget(configWidget); | 192 | configContainer->setCurrentWidget(configWidget); | ||
193 | dynamic_cast<CfgPlugin*>(configWidget)->load(&cfg); | 193 | const auto plugin = dynamic_cast<CfgPlugin*>(configWidget); | ||
194 | plugin->load(&cfg); | ||||
195 | emit defaulted(plugin->isDefaults()); | ||||
194 | } | 196 | } | ||
195 | 197 | | |||
196 | emitChanged(false); | 198 | emitChanged(false); | ||
197 | latestEditedService = service; | 199 | latestEditedService = service; | ||
198 | } | 200 | } | ||
199 | 201 | | |||
200 | 202 | | |||
201 | void ComponentChooser::emitChanged(bool val) { | 203 | void ComponentChooser::emitChanged(bool val) { | ||
202 | somethingChanged=val; | 204 | somethingChanged=val; | ||
203 | emit changed(val); | 205 | emit changed(val); | ||
206 | | ||||
207 | CfgPlugin * plugin = dynamic_cast<CfgPlugin*>( configWidget ); | ||||
ervin: No spaces between the parenthesis, no space after * | |||||
208 | emit defaulted(plugin->isDefaults()); | ||||
204 | } | 209 | } | ||
205 | 210 | | |||
206 | 211 | | |||
207 | ComponentChooser::~ComponentChooser() | 212 | ComponentChooser::~ComponentChooser() | ||
208 | { | 213 | { | ||
209 | for (QWidget *configWidget : configWidgetMap) { | 214 | for (QWidget *configWidget : configWidgetMap) { | ||
210 | delete configWidget; | 215 | delete configWidget; | ||
211 | } | 216 | } | ||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |
No spaces between the parenthesis, no space after *