-rw-r--r-- | microkde/kconfig.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/microkde/kconfig.cpp b/microkde/kconfig.cpp index 940196e..12063ca 100644 --- a/microkde/kconfig.cpp +++ b/microkde/kconfig.cpp @@ -1,5 +1,7 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qwidget.h> +//Added by qt3to4: +#include <Q3ValueList> #include "kdebug.h" @@ -54,9 +56,9 @@ QString KConfig::group() const { //US added method -QValueList<int> KConfig::readIntListEntry( const QString & key) +Q3ValueList<int> KConfig::readIntListEntry( const QString & key) { // qDebug("KConfig::readIntListEntry key=%s:", key.latin1()); - QValueList<int> result; + Q3ValueList<int> result; QMap<QString,QString>::ConstIterator mit = mStringMap.find( mGroup + key ); @@ -112,5 +114,5 @@ QString KConfig::readEntry( const QString &key, const QString &def ) QSize KConfig::readSizeEntry( const QString &key, QSize* def ) { - QValueList<int> intlist = readIntListEntry(key); + Q3ValueList<int> intlist = readIntListEntry(key); if (intlist.count() < 2) @@ -195,9 +197,9 @@ QDateTime KConfig::readDateTimeEntry( const QString &key, const QDateTime *def ) //US added method -void KConfig::writeEntry( const QString &key, const QValueList<int> &value) +void KConfig::writeEntry( const QString &key, const Q3ValueList<int> &value) { QStringList valuesAsStrings; - QValueList<int>::ConstIterator it; + Q3ValueList<int>::ConstIterator it; for( it = value.begin(); it != value.end(); ++it ) @@ -247,5 +249,5 @@ void KConfig::writeEntry( const QString & e, const QColor & c ) void KConfig::writeEntry( const QString & e, const QSize & s ) { - QValueList<int> intlist; + Q3ValueList<int> intlist; intlist << s.width() << s.height(); writeEntry( e, intlist ); @@ -272,5 +274,5 @@ void KConfig::load() QFile f( mFileName ); - if ( !f.open( IO_ReadOnly ) ) { + if ( !f.open( QIODevice::ReadOnly ) ) { //qDebug("KConfig: could not open file %s ",mFileName.latin1() ); return; @@ -280,10 +282,10 @@ void KConfig::load() mStringMap.clear(); - QTextStream t( &f ); - t.setEncoding( QTextStream::Latin1 ); + Q3TextStream t( &f ); + t.setEncoding( Q3TextStream::Latin1 ); QString line = t.readLine(); while ( !line.isNull() ) { - QStringList tokens = QStringList::split( ",", line ); + QStringList tokens = line.split(','); if ( tokens[0] == "bool" ) { bool value = false; @@ -324,5 +326,5 @@ void KConfig::sync() QFile f( mFileName ); - if ( !f.open( IO_WriteOnly ) ) { + if ( !f.open( QIODevice::WriteOnly ) ) { qDebug("KConfig::sync() Can't open file %s ",mFileName.latin1() ); @@ -331,6 +333,6 @@ void KConfig::sync() } - QTextStream t( &f ); - t.setEncoding( QTextStream::Latin1 ); + Q3TextStream t( &f ); + t.setEncoding( Q3TextStream::Latin1 ); QMap<QString,bool>::ConstIterator itBool; for( itBool = mBoolMap.begin(); itBool != mBoolMap.end(); ++itBool ) { |