summaryrefslogtreecommitdiffabout
path: root/microkde
Side-by-side diff
Diffstat (limited to 'microkde') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kconfig.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/microkde/kconfig.cpp b/microkde/kconfig.cpp
index 862166d..b9cf2f1 100644
--- a/microkde/kconfig.cpp
+++ b/microkde/kconfig.cpp
@@ -133,49 +133,49 @@ 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()));
}
bool KConfig::readBoolEntry( const QString &key, bool def )
{
QMap<QString,bool>::ConstIterator it = mBoolMap.find( mGroup + key );
if ( it == mBoolMap.end() ) {
return def;
}
return *it;
}
QColor KConfig::readColorEntry( const QString & e, QColor *def )
{
QStringList l;
- l = readListEntry( e );
+ l = readListEntry( e.utf8() );
if (l.count() != 3 ) {
if ( def )
return *def;
else
return QColor();
}
QColor c ( l[0].toInt(), l[1].toInt(), l[2].toInt() );
return c;
}
QFont KConfig::readFontEntry( const QString & e, QFont *def )
{
QStringList font = readListEntry( e );
if ( font.isEmpty() )
return *def;
QFont f;
f.setFamily( font[0]);
f.setBold ( font[1] == "bold");
f.setPointSize ( font[2].toInt());
f.setItalic( font[3] == "italic" );
return f;
}
QDateTime KConfig::readDateTimeEntry( const QString &key, const QDateTime *def )
@@ -217,49 +217,49 @@ void KConfig::writeEntry( const QString &key, const QString &value )
mDirty = true;
}
void KConfig::writeEntry( const QString &key, const QStringList &value )
{
mStringMap.insert( mGroup + key, value.join(":").utf8() );
mDirty = true;
}
void KConfig::writeEntry( const QString &key, bool value)
{
mBoolMap.insert( mGroup + key, value );
mDirty = true;
}
void KConfig::writeEntry( const QString & e, const QColor & c )
{
QStringList l;
l.append( QString::number ( c.red() ) );
l.append( QString::number ( c.green() ) );
l.append( QString::number ( c.blue() ) );
- writeEntry( e, l );
+ writeEntry( e.utf8(), l );
}
void KConfig::writeEntry( const QString & e, const QSize & s )
{
QValueList<int> intlist;
intlist << s.width() << s.height();
writeEntry( e, intlist );
}
void KConfig::writeEntry( const QString & e , const QFont & f )
{
QStringList font;
font.append( f.family());
font.append( (!f.bold ()?"nonbold":"bold") );
font.append( QString::number ( f.pointSize () ) );
font.append( !f.italic ()?"nonitalic":"italic" );
writeEntry( e, font );
}
void KConfig::writeEntry( const QString &key, const QDateTime &dt )
{
mDateTimeMap.insert( mGroup + key, dt );
}