author | zautrix <zautrix> | 2005-07-02 16:10:28 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-02 16:10:28 (UTC) |
commit | 20c9e9cb71ad64aebfa27157bb152ece4e34c00a (patch) (unidiff) | |
tree | 6ecd2ce2136875d974d5d361f611b39f5ad86a00 /microkde | |
parent | 7b7c582bbb9908ec65c778b70baa6b2c2aa457fc (diff) | |
download | kdepimpi-20c9e9cb71ad64aebfa27157bb152ece4e34c00a.zip kdepimpi-20c9e9cb71ad64aebfa27157bb152ece4e34c00a.tar.gz kdepimpi-20c9e9cb71ad64aebfa27157bb152ece4e34c00a.tar.bz2 |
fixxxx
-rw-r--r-- | microkde/kconfig.cpp | 9 |
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) | |||
60 | QValueList<int> result; | 60 | QValueList<int> result; |
61 | 61 | ||
62 | QMap<QString,QString>::ConstIterator mit = mStringMap.find( mGroup + key ); | 62 | QMap<QString,QString>::ConstIterator mit = mStringMap.find( mGroup + key ); |
63 | 63 | ||
64 | if ( mit == mStringMap.end() ) { | 64 | if ( mit == mStringMap.end() ) { |
65 | return result; | 65 | return result; |
66 | } | 66 | } |
67 | 67 | ||
68 | QStringList valuesAsStrings = QStringList::split(":", *mit ); | 68 | QStringList valuesAsStrings = QStringList::split(":@:", *mit ); |
69 | bool ok = false; | 69 | bool ok = false; |
70 | bool ok2 = true; | 70 | bool ok2 = true; |
71 | int val; | 71 | int val; |
72 | 72 | ||
73 | for ( QStringList::Iterator sit = valuesAsStrings.begin(); sit != valuesAsStrings.end(); ++sit ) { | 73 | for ( QStringList::Iterator sit = valuesAsStrings.begin(); sit != valuesAsStrings.end(); ++sit ) { |
74 | val = (*sit).toInt(&ok); | 74 | val = (*sit).toInt(&ok); |
75 | result << val; | 75 | result << val; |
76 | if (ok == false) { | 76 | if (ok == false) { |
@@ -130,17 +130,20 @@ QSize KConfig::readSizeEntry( const QString &key, QSize* def ) | |||
130 | 130 | ||
131 | QStringList KConfig::readListEntry( const QString &key ) | 131 | QStringList KConfig::readListEntry( const QString &key ) |
132 | { | 132 | { |
133 | QMap<QString,QString>::ConstIterator it = mStringMap.find( mGroup + key ); | 133 | QMap<QString,QString>::ConstIterator it = mStringMap.find( mGroup + key ); |
134 | 134 | ||
135 | if ( it == mStringMap.end() ) { | 135 | if ( it == mStringMap.end() ) { |
136 | return QStringList(); | 136 | return QStringList(); |
137 | } | 137 | } |
138 | return QStringList::split(":", QString::fromUtf8((*it).latin1())); | 138 | QStringList temp = QStringList::split(":@:", QString::fromUtf8((*it).latin1())); |
139 | if ( temp.count() == 1 ) | ||
140 | return QStringList::split(":", QString::fromUtf8((*it).latin1())); | ||
141 | return temp; | ||
139 | 142 | ||
140 | } | 143 | } |
141 | 144 | ||
142 | bool KConfig::readBoolEntry( const QString &key, bool def ) | 145 | bool KConfig::readBoolEntry( const QString &key, bool def ) |
143 | { | 146 | { |
144 | QMap<QString,bool>::ConstIterator it = mBoolMap.find( mGroup + key ); | 147 | QMap<QString,bool>::ConstIterator it = mBoolMap.find( mGroup + key ); |
145 | 148 | ||
146 | if ( it == mBoolMap.end() ) { | 149 | if ( it == mBoolMap.end() ) { |
@@ -215,17 +218,17 @@ void KConfig::writeEntry( const QString &key, const QString &value ) | |||
215 | { | 218 | { |
216 | mStringMap.insert( mGroup + key, value.utf8() ); | 219 | mStringMap.insert( mGroup + key, value.utf8() ); |
217 | 220 | ||
218 | mDirty = true; | 221 | mDirty = true; |
219 | } | 222 | } |
220 | 223 | ||
221 | void KConfig::writeEntry( const QString &key, const QStringList &value ) | 224 | void KConfig::writeEntry( const QString &key, const QStringList &value ) |
222 | { | 225 | { |
223 | mStringMap.insert( mGroup + key, value.join(":").utf8() ); | 226 | mStringMap.insert( mGroup + key, value.join(":@:").utf8() ); |
224 | 227 | ||
225 | mDirty = true; | 228 | mDirty = true; |
226 | } | 229 | } |
227 | 230 | ||
228 | void KConfig::writeEntry( const QString &key, bool value) | 231 | void KConfig::writeEntry( const QString &key, bool value) |
229 | { | 232 | { |
230 | mBoolMap.insert( mGroup + key, value ); | 233 | mBoolMap.insert( mGroup + key, value ); |
231 | 234 | ||