author | zautrix <zautrix> | 2004-11-06 14:30:14 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-11-06 14:30:14 (UTC) |
commit | f8841c92d5251f713eb7a025af8fdee52de45b3d (patch) (unidiff) | |
tree | 29c3c48e5da5b5ce05126da46475de1a0a845428 /microkde | |
parent | 71eeea80d9c449bd1983c1a9207c7123e919b55f (diff) | |
download | kdepimpi-f8841c92d5251f713eb7a025af8fdee52de45b3d.zip kdepimpi-f8841c92d5251f713eb7a025af8fdee52de45b3d.tar.gz kdepimpi-f8841c92d5251f713eb7a025af8fdee52de45b3d.tar.bz2 |
category utf8 fixes
-rw-r--r-- | microkde/kconfig.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/microkde/kconfig.cpp b/microkde/kconfig.cpp index 5b685d3..862166d 100644 --- a/microkde/kconfig.cpp +++ b/microkde/kconfig.cpp | |||
@@ -97,25 +97,25 @@ int KConfig::readNumEntry( const QString & key, int def ) | |||
97 | return result; | 97 | return result; |
98 | return def; | 98 | return def; |
99 | } | 99 | } |
100 | 100 | ||
101 | QString KConfig::readEntry( const QString &key, const QString &def ) | 101 | QString KConfig::readEntry( const QString &key, const QString &def ) |
102 | { | 102 | { |
103 | QMap<QString,QString>::ConstIterator it = mStringMap.find( mGroup + key ); | 103 | QMap<QString,QString>::ConstIterator it = mStringMap.find( mGroup + key ); |
104 | 104 | ||
105 | if ( it == mStringMap.end() ) { | 105 | if ( it == mStringMap.end() ) { |
106 | return def; | 106 | return def; |
107 | } | 107 | } |
108 | 108 | ||
109 | return *it; | 109 | return QString::fromUtf8((*it).latin1()); |
110 | } | 110 | } |
111 | 111 | ||
112 | QSize KConfig::readSizeEntry( const QString &key, QSize* def ) | 112 | QSize KConfig::readSizeEntry( const QString &key, QSize* def ) |
113 | { | 113 | { |
114 | QValueList<int> intlist = readIntListEntry(key); | 114 | QValueList<int> intlist = readIntListEntry(key); |
115 | 115 | ||
116 | if (intlist.count() < 2) | 116 | if (intlist.count() < 2) |
117 | { | 117 | { |
118 | if (def) | 118 | if (def) |
119 | return *def; | 119 | return *def; |
120 | else | 120 | else |
121 | return QSize(); | 121 | return QSize(); |
@@ -126,25 +126,25 @@ QSize KConfig::readSizeEntry( const QString &key, QSize* def ) | |||
126 | ret.setHeight(intlist[1]); | 126 | ret.setHeight(intlist[1]); |
127 | 127 | ||
128 | return ret; | 128 | return ret; |
129 | } | 129 | } |
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(":", *it ); | 138 | return QStringList::split(":", QString::fromUtf8((*it).latin1())); |
139 | 139 | ||
140 | } | 140 | } |
141 | 141 | ||
142 | bool KConfig::readBoolEntry( const QString &key, bool def ) | 142 | bool KConfig::readBoolEntry( const QString &key, bool def ) |
143 | { | 143 | { |
144 | QMap<QString,bool>::ConstIterator it = mBoolMap.find( mGroup + key ); | 144 | QMap<QString,bool>::ConstIterator it = mBoolMap.find( mGroup + key ); |
145 | 145 | ||
146 | if ( it == mBoolMap.end() ) { | 146 | if ( it == mBoolMap.end() ) { |
147 | return def; | 147 | return def; |
148 | } | 148 | } |
149 | 149 | ||
150 | return *it; | 150 | return *it; |
@@ -204,32 +204,32 @@ void KConfig::writeEntry( const QString &key, const QValueList<int> &value) | |||
204 | 204 | ||
205 | mStringMap.insert( mGroup + key, valuesAsStrings.join(":") ); | 205 | mStringMap.insert( mGroup + key, valuesAsStrings.join(":") ); |
206 | mDirty = true; | 206 | mDirty = true; |
207 | } | 207 | } |
208 | 208 | ||
209 | void KConfig::writeEntry( const QString & key , int num ) | 209 | void KConfig::writeEntry( const QString & key , int num ) |
210 | { | 210 | { |
211 | writeEntry( key, QString::number ( num ) ); | 211 | writeEntry( key, QString::number ( num ) ); |
212 | } | 212 | } |
213 | 213 | ||
214 | void KConfig::writeEntry( const QString &key, const QString &value ) | 214 | void KConfig::writeEntry( const QString &key, const QString &value ) |
215 | { | 215 | { |
216 | mStringMap.insert( mGroup + key, value ); | 216 | mStringMap.insert( mGroup + key, value.utf8() ); |
217 | 217 | ||
218 | mDirty = true; | 218 | mDirty = true; |
219 | } | 219 | } |
220 | 220 | ||
221 | void KConfig::writeEntry( const QString &key, const QStringList &value ) | 221 | void KConfig::writeEntry( const QString &key, const QStringList &value ) |
222 | { | 222 | { |
223 | mStringMap.insert( mGroup + key, value.join(":") ); | 223 | mStringMap.insert( mGroup + key, value.join(":").utf8() ); |
224 | 224 | ||
225 | mDirty = true; | 225 | mDirty = true; |
226 | } | 226 | } |
227 | 227 | ||
228 | void KConfig::writeEntry( const QString &key, bool value) | 228 | void KConfig::writeEntry( const QString &key, bool value) |
229 | { | 229 | { |
230 | mBoolMap.insert( mGroup + key, value ); | 230 | mBoolMap.insert( mGroup + key, value ); |
231 | 231 | ||
232 | mDirty = true; | 232 | mDirty = true; |
233 | } | 233 | } |
234 | 234 | ||
235 | void KConfig::writeEntry( const QString & e, const QColor & c ) | 235 | void KConfig::writeEntry( const QString & e, const QColor & c ) |