Lines 296-306
Link Here
|
296 |
if (d->bDirty && d->mBackend) { |
296 |
if (d->bDirty && d->mBackend) { |
297 |
const QByteArray utf8Locale(locale().toUtf8()); |
297 |
const QByteArray utf8Locale(locale().toUtf8()); |
298 |
|
298 |
|
299 |
// Check if we can write to the local file. |
299 |
// Create the containing dir, maybe it wasn't there |
300 |
if (!d->mBackend->isWritable()) { |
300 |
d->mBackend->createEnclosing(); |
301 |
// Create the containing dir, maybe it wasn't there |
|
|
302 |
d->mBackend->createEnclosing(); |
303 |
} |
304 |
|
301 |
|
305 |
// lock the local file |
302 |
// lock the local file |
306 |
if (d->configState == ReadWrite && !d->lockLocal()) { |
303 |
if (d->configState == ReadWrite && !d->lockLocal()) { |
Lines 409-415
Link Here
|
409 |
fileName = appName + QLatin1String("rc"); |
406 |
fileName = appName + QLatin1String("rc"); |
410 |
if (type && *type) |
407 |
if (type && *type) |
411 |
resourceType = type; // only change it if it's not empty |
408 |
resourceType = type; // only change it if it's not empty |
412 |
file = KStandardDirs::locateLocal(resourceType, fileName, componentData); |
409 |
file = KStandardDirs::locateLocal(resourceType, fileName, false, componentData); |
413 |
} |
410 |
} |
414 |
} else if (wantGlobals()) { // accessing "kdeglobals" |
411 |
} else if (wantGlobals()) { // accessing "kdeglobals" |
415 |
resourceType = "config"; |
412 |
resourceType = "config"; |
Lines 421-427
Link Here
|
421 |
else { |
418 |
else { |
422 |
if (type && *type) |
419 |
if (type && *type) |
423 |
resourceType = type; // only change it if it's not empty |
420 |
resourceType = type; // only change it if it's not empty |
424 |
file = KStandardDirs::locateLocal(resourceType, fileName, componentData); |
421 |
file = KStandardDirs::locateLocal(resourceType, fileName, false, componentData); |
425 |
|
422 |
|
426 |
if (fileName == QLatin1String("kdeglobals")) |
423 |
if (fileName == QLatin1String("kdeglobals")) |
427 |
openFlags |= KConfig::IncludeGlobals; |
424 |
openFlags |= KConfig::IncludeGlobals; |