summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show 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 821e386..940196e 100644
--- a/microkde/kconfig.cpp
+++ b/microkde/kconfig.cpp
@@ -20,97 +20,97 @@ KConfig::KConfig( const QString &fileName )
}
KConfig::~KConfig()
{
sync();
}
// we need the temp group for plugins on windows
void KConfig::setTempGroup( const QString &group )
{
mTempGroup = group;
if ( mTempGroup.right( 1 ) != "/" ) mTempGroup += "/";
}
QString KConfig::tempGroup() const {
return mTempGroup;
}
void KConfig::setGroup( const QString &group )
{
mGroup = group;
if ( mGroup.right( 1 ) != "/" ) mGroup += "/";
}
//US
QString KConfig::group() const {
return mGroup;
}
//US added method
QValueList<int> KConfig::readIntListEntry( const QString & key)
{
// qDebug("KConfig::readIntListEntry key=%s:", key.latin1());
QValueList<int> result;
QMap<QString,QString>::ConstIterator mit = mStringMap.find( mGroup + key );
if ( mit == mStringMap.end() ) {
return result;
}
- QStringList valuesAsStrings = QStringList::split(":@:", *mit );
+ QStringList valuesAsStrings = QStringList::split(":", *mit );
bool ok = false;
bool ok2 = true;
int val;
for ( QStringList::Iterator sit = valuesAsStrings.begin(); sit != valuesAsStrings.end(); ++sit ) {
val = (*sit).toInt(&ok);
result << val;
if (ok == false) {
//qDebug("KConfig::readIntListEntry str=%s , int=%n:", (*sit).latin1(), &val);
ok2 = false;
}
}
if (ok2 == false)
{
qDebug("KConfig::readIntListEntry: error while reading one of the intvalues.");
}
return result;
}
int KConfig::readNumEntry( const QString & key, int def )
{
QString res = readEntry(key, QString::number(def ) );
bool ok = false;
int result = res.toInt(&ok);
if ( ok )
return result;
return def;
}
QString KConfig::readEntry( const QString &key, const QString &def )
{
QMap<QString,QString>::ConstIterator it = mStringMap.find( mGroup + key );
if ( it == mStringMap.end() ) {
return def;
}
return QString::fromUtf8((*it).latin1());
}
QSize KConfig::readSizeEntry( const QString &key, QSize* def )
{
QValueList<int> intlist = readIntListEntry(key);
if (intlist.count() < 2)