summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kconfig.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/microkde/kconfig.cpp b/microkde/kconfig.cpp
index e0b6e99..821e386 100644
--- a/microkde/kconfig.cpp
+++ b/microkde/kconfig.cpp
@@ -60,17 +60,17 @@ QValueList<int> KConfig::readIntListEntry( const QString & key)
QValueList<int> result;
QMap<QString,QString>::ConstIterator mit = mStringMap.find( mGroup + key );
if ( mit == mStringMap.end() ) {
return result;
}
- QStringList valuesAsStrings = QStringList::split(":", *mit );
+ QStringList valuesAsStrings = QStringList::split(":@:", *mit );
bool ok = false;
bool ok2 = true;
int val;
for ( QStringList::Iterator sit = valuesAsStrings.begin(); sit != valuesAsStrings.end(); ++sit ) {
val = (*sit).toInt(&ok);
result << val;
if (ok == false) {
@@ -130,17 +130,20 @@ QSize KConfig::readSizeEntry( const QString &key, QSize* def )
QStringList KConfig::readListEntry( const QString &key )
{
QMap<QString,QString>::ConstIterator it = mStringMap.find( mGroup + key );
if ( it == mStringMap.end() ) {
return QStringList();
}
- return QStringList::split(":", QString::fromUtf8((*it).latin1()));
+ QStringList temp = QStringList::split(":@:", QString::fromUtf8((*it).latin1()));
+ if ( temp.count() == 1 )
+ return QStringList::split(":", QString::fromUtf8((*it).latin1()));
+ return temp;
}
bool KConfig::readBoolEntry( const QString &key, bool def )
{
QMap<QString,bool>::ConstIterator it = mBoolMap.find( mGroup + key );
if ( it == mBoolMap.end() ) {
@@ -215,17 +218,17 @@ void KConfig::writeEntry( const QString &key, const QString &value )
{
mStringMap.insert( mGroup + key, value.utf8() );
mDirty = true;
}
void KConfig::writeEntry( const QString &key, const QStringList &value )
{
- mStringMap.insert( mGroup + key, value.join(":").utf8() );
+ mStringMap.insert( mGroup + key, value.join(":@:").utf8() );
mDirty = true;
}
void KConfig::writeEntry( const QString &key, bool value)
{
mBoolMap.insert( mGroup + key, value );