-rw-r--r-- | microkde/kconfig.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/microkde/kconfig.cpp b/microkde/kconfig.cpp index 9598274..e0b6e99 100644 --- a/microkde/kconfig.cpp +++ b/microkde/kconfig.cpp @@ -53,49 +53,49 @@ QString KConfig::group() const { } //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 ); 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); + //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 ) @@ -248,49 +248,49 @@ void KConfig::writeEntry( const QString & e, const QSize & s ) 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 ); } void KConfig::load() { QFile f( mFileName ); if ( !f.open( IO_ReadOnly ) ) { - qDebug("KConfig: could not open file %s ",mFileName.latin1() ); + //qDebug("KConfig: could not open file %s ",mFileName.latin1() ); return; } mBoolMap.clear(); mStringMap.clear(); QTextStream t( &f ); t.setEncoding( QTextStream::Latin1 ); QString line = t.readLine(); while ( !line.isNull() ) { QStringList tokens = QStringList::split( ",", line ); if ( tokens[0] == "bool" ) { bool value = false; if ( tokens[2] == "1" ) value = true; mBoolMap.insert( tokens[1], value ); } else if ( tokens[0] == "QString" ) { QString value = tokens[2]; mStringMap.insert( tokens[1], value ); } else if ( tokens[0] == "QDateTime" ) { #if 0 int year = tokens[2].toInt(); QDateTime dt( QDate( year, tokens[3].toInt(), |