Changeset View
Changeset View
Standalone View
Standalone View
krusader/Konfigurator/kgdependencies.cpp
Show First 20 Lines • Show All 139 Lines • ▼ Show 20 Line(s) | 125 | { | |||
---|---|---|---|---|---|
140 | KonfiguratorURLRequester *fullPath = | 140 | KonfiguratorURLRequester *fullPath = | ||
141 | createURLRequester("Dependencies", name, defaultValue, parent, false, page); | 141 | createURLRequester("Dependencies", name, defaultValue, parent, false, page); | ||
142 | connect(fullPath->extension(), &KonfiguratorExtension::applyManually, this, &KgDependencies::slotApply); | 142 | connect(fullPath->extension(), &KonfiguratorExtension::applyManually, this, &KgDependencies::slotApply); | ||
143 | grid->addWidget(fullPath, row, 1); | 143 | grid->addWidget(fullPath, row, 1); | ||
144 | } | 144 | } | ||
145 | 145 | | |||
146 | void KgDependencies::slotApply(QObject *obj, const QString& configGroup, const QString& name) | 146 | void KgDependencies::slotApply(QObject *obj, const QString& configGroup, const QString& name) | ||
147 | { | 147 | { | ||
148 | auto *urlRequester = (KonfiguratorURLRequester *) obj; | 148 | auto *urlRequester = dynamic_cast<KonfiguratorURLRequester *>( obj); | ||
149 | 149 | | |||
150 | KConfigGroup group(krConfig, configGroup); | 150 | KConfigGroup group(krConfig, configGroup); | ||
151 | group.writeEntry(name, urlRequester->url().toDisplayString(QUrl::PreferLocalFile)); | 151 | group.writeEntry(name, urlRequester->url().toDisplayString(QUrl::PreferLocalFile)); | ||
152 | 152 | | |||
153 | QString usedPath = KrServices::fullPathName(name); | 153 | QString usedPath = KrServices::fullPathName(name); | ||
154 | 154 | | |||
155 | if (urlRequester->url().toDisplayString(QUrl::PreferLocalFile) != usedPath) { | 155 | if (urlRequester->url().toDisplayString(QUrl::PreferLocalFile) != usedPath) { | ||
156 | group.writeEntry(name, usedPath); | 156 | group.writeEntry(name, usedPath); | ||
Show All 16 Lines |