summaryrefslogtreecommitdiffabout
path: root/microkde
authorzautrix <zautrix>2005-04-17 14:37:34 (UTC)
committer zautrix <zautrix>2005-04-17 14:37:34 (UTC)
commit02dc5d8173393d2069951a5f847db5bdf69137f6 (patch) (side-by-side diff)
treea72c700d0072ae0074efabdc5a0563f14fdbadcd /microkde
parentb411ec2d8961d07c3e2e9aefc9e04322b7851859 (diff)
downloadkdepimpi-02dc5d8173393d2069951a5f847db5bdf69137f6.zip
kdepimpi-02dc5d8173393d2069951a5f847db5bdf69137f6.tar.gz
kdepimpi-02dc5d8173393d2069951a5f847db5bdf69137f6.tar.bz2
qdebugcleanup
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 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(),