author | ulf69 <ulf69> | 2004-09-15 17:48:36 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-09-15 17:48:36 (UTC) |
commit | 0af70ae5fee7b71aecf5ac742fdd65e31237eb5a (patch) (unidiff) | |
tree | 08a51756744591056fd74f3658afe940f5823265 /microkde/kconfig.cpp | |
parent | c151151ccaffe54510e58731dc6d8f9d441bd31c (diff) | |
download | kdepimpi-0af70ae5fee7b71aecf5ac742fdd65e31237eb5a.zip kdepimpi-0af70ae5fee7b71aecf5ac742fdd65e31237eb5a.tar.gz kdepimpi-0af70ae5fee7b71aecf5ac742fdd65e31237eb5a.tar.bz2 |
small changes to accommodate pwManager
-rw-r--r-- | microkde/kconfig.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/microkde/kconfig.cpp b/microkde/kconfig.cpp index 4cbec94..ba41f6c 100644 --- a/microkde/kconfig.cpp +++ b/microkde/kconfig.cpp | |||
@@ -111,2 +111,21 @@ QString KConfig::readEntry( const QString &key, const QString &def ) | |||
111 | 111 | ||
112 | QSize KConfig::readSizeEntry( const QString &key, QSize* def ) | ||
113 | { | ||
114 | QValueList<int> intlist = readIntListEntry(key); | ||
115 | |||
116 | if (intlist.count() < 2) | ||
117 | { | ||
118 | if (def) | ||
119 | return *def; | ||
120 | else | ||
121 | return QSize(); | ||
122 | } | ||
123 | |||
124 | QSize ret; | ||
125 | ret.setWidth(intlist[0]); | ||
126 | ret.setHeight(intlist[1]); | ||
127 | |||
128 | return ret; | ||
129 | } | ||
130 | |||
112 | QStringList KConfig::readListEntry( const QString &key ) | 131 | QStringList KConfig::readListEntry( const QString &key ) |
@@ -224,2 +243,9 @@ void KConfig::writeEntry( const QString & e, const QColor & c ) | |||
224 | 243 | ||
244 | void KConfig::writeEntry( const QString & e, const QSize & s ) | ||
245 | { | ||
246 | QValueList<int> intlist; | ||
247 | intlist << s.width() << s.height(); | ||
248 | writeEntry( e, intlist ); | ||
249 | } | ||
250 | |||
225 | void KConfig::writeEntry( const QString & e , const QFont & f ) | 251 | void KConfig::writeEntry( const QString & e , const QFont & f ) |