Changeset View
Changeset View
Standalone View
Standalone View
src/quickaddons/managedconfigmodule.cpp
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Line(s) | 104 | for (auto skeleton : qAsConst(_skeletons)) { | |||
---|---|---|---|---|---|
106 | 106 | | |||
107 | const auto items = skeleton->items(); | 107 | const auto items = skeleton->items(); | ||
108 | for (auto item : items) { | 108 | for (auto item : items) { | ||
109 | auto signallingItem = dynamic_cast<KConfigCompilerSignallingItem*>(item); | 109 | auto signallingItem = dynamic_cast<KConfigCompilerSignallingItem*>(item); | ||
110 | if (!signallingItem) { | 110 | if (!signallingItem) { | ||
111 | continue; | 111 | continue; | ||
112 | } | 112 | } | ||
113 | 113 | | |||
114 | QString name = signallingItem->name(); | ||||
115 | if (name.at(0).isUpper()) | ||||
116 | name[0] = name[0].toLower(); | ||||
117 | | ||||
114 | const auto metaObject = skeleton->metaObject(); | 118 | const auto metaObject = skeleton->metaObject(); | ||
115 | const auto propertyIndex = metaObject->indexOfProperty(signallingItem->name().toUtf8().constData()); | 119 | const auto propertyIndex = metaObject->indexOfProperty(name.toUtf8().constData()); | ||
116 | const auto property = skeleton->metaObject()->property(propertyIndex); | 120 | const auto property = metaObject->property(propertyIndex); | ||
117 | if (!property.hasNotifySignal()) { | 121 | if (!property.hasNotifySignal()) { | ||
118 | continue; | 122 | continue; | ||
119 | } | 123 | } | ||
120 | 124 | | |||
121 | const auto changedSignal = property.notifySignal(); | 125 | const auto changedSignal = property.notifySignal(); | ||
122 | QObject::connect(skeleton, changedSignal, _q, settingsChangedSlot); | 126 | QObject::connect(skeleton, changedSignal, _q, settingsChangedSlot); | ||
123 | } | 127 | } | ||
124 | } | 128 | } | ||
Show All 29 Lines |