[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdecore/config
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2010-06-04 17:15:18
Message-ID: 20100604171518.69272AC8C9 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1134601 by aseigo:
make anonymous (aka "in-memory") kconfig objects actually work
M +8 -1 kconfig.cpp
--- trunk/KDE/kdelibs/kdecore/config/kconfig.cpp #1134600:1134601
@@ -285,7 +285,10 @@
{
Q_D(KConfig);
- Q_ASSERT(!isImmutable() && !name().isEmpty()); // can't write to an immutable or anonymous file.
+ if (isImmutable() || name().isEmpty()) {
+ // can't write to an immutable or anonymous file.
+ return;
+ }
if (d->bDirty && d->mBackend) {
const QByteArray utf8Locale(locale().toUtf8());
@@ -438,6 +441,10 @@
void KConfig::reparseConfiguration()
{
Q_D(KConfig);
+ if (d->fileName.isEmpty()) {
+ return;
+ }
+
// Don't lose pending changes
if (!d->isReadOnly() && d->bDirty)
sync();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic