summaryrefslogtreecommitdiffabout
path: root/microkde/kconfig.cpp
Unidiff
Diffstat (limited to 'microkde/kconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kconfig.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/microkde/kconfig.cpp b/microkde/kconfig.cpp
index 71db891..737b3f2 100644
--- a/microkde/kconfig.cpp
+++ b/microkde/kconfig.cpp
@@ -114,65 +114,65 @@ bool KConfig::readBoolEntry( const QString &key, bool def )
114 114
115 if ( it == mBoolMap.end() ) { 115 if ( it == mBoolMap.end() ) {
116 return def; 116 return def;
117 } 117 }
118 118
119 return *it; 119 return *it;
120} 120}
121 121
122QColor KConfig::readColorEntry( const QString & e, QColor *def ) 122QColor KConfig::readColorEntry( const QString & e, QColor *def )
123{ 123{
124 124
125 QStringList l; 125 QStringList l;
126 l = readListEntry( e ); 126 l = readListEntry( e );
127 if (l.count() != 3 ) { 127 if (l.count() != 3 ) {
128 if ( def ) 128 if ( def )
129 return *def; 129 return *def;
130 else 130 else
131 return QColor(); 131 return QColor();
132 } 132 }
133 QColor c ( l[0].toInt(), l[1].toInt(), l[2].toInt() ); 133 QColor c ( l[0].toInt(), l[1].toInt(), l[2].toInt() );
134 return c; 134 return c;
135} 135}
136 136
137QFont KConfig::readFontEntry( const QString & e, QFont *def ) 137QFont KConfig::readFontEntry( const QString & e, QFont *def )
138{ 138{
139 QStringList font = readListEntry( e ); 139 QStringList font = readListEntry( e );
140 if ( font.isEmpty() ) 140 if ( font.isEmpty() )
141 return *def; 141 return *def;
142 QFont f; 142 QFont f;
143 f.setFamily( font[0]); 143 f.setFamily( font[0]);
144 f.setBold ( font[1] == "bold"); 144 f.setBold ( font[1] == "bold");
145 f.setPointSize ( font[2].toInt()); 145 f.setPointSize ( font[2].toInt());
146 f.setItalic( font[1] == "italic" ); 146 f.setItalic( font[3] == "italic" );
147 return f; 147 return f;
148} 148}
149 149
150QDateTime KConfig::readDateTimeEntry( const QString &key, const QDateTime *def ) 150QDateTime KConfig::readDateTimeEntry( const QString &key, const QDateTime *def )
151{ 151{
152 QMap<QString,QDateTime>::ConstIterator it = mDateTimeMap.find( mGroup + key ); 152 QMap<QString,QDateTime>::ConstIterator it = mDateTimeMap.find( mGroup + key );
153 153
154 if ( it == mDateTimeMap.end() ) { 154 if ( it == mDateTimeMap.end() ) {
155 if ( def ) return *def; 155 if ( def ) return *def;
156 else return QDateTime(); 156 else return QDateTime();
157 } 157 }
158 158
159 return *it; 159 return *it;
160} 160}
161 161
162//US added method 162//US added method
163void KConfig::writeEntry( const QString &key, const QValueList<int> &value) 163void KConfig::writeEntry( const QString &key, const QValueList<int> &value)
164{ 164{
165 QStringList valuesAsStrings; 165 QStringList valuesAsStrings;
166 166
167 QValueList<int>::ConstIterator it; 167 QValueList<int>::ConstIterator it;
168 168
169 for( it = value.begin(); it != value.end(); ++it ) 169 for( it = value.begin(); it != value.end(); ++it )
170 { 170 {
171 valuesAsStrings << QString::number(*it); 171 valuesAsStrings << QString::number(*it);
172 } 172 }
173 173
174 mStringMap.insert( mGroup + key, valuesAsStrings.join(":") ); 174 mStringMap.insert( mGroup + key, valuesAsStrings.join(":") );
175 mDirty = true; 175 mDirty = true;
176} 176}
177 177
178void KConfig::writeEntry( const QString & key , int num ) 178void KConfig::writeEntry( const QString & key , int num )