author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /libkdepim/phoneaccess.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | libkdepim/phoneaccess.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libkdepim/phoneaccess.cpp b/libkdepim/phoneaccess.cpp index 89db22b..0ea73f5 100644 --- a/libkdepim/phoneaccess.cpp +++ b/libkdepim/phoneaccess.cpp @@ -23,9 +23,10 @@ #include <qstring.h> #include <qapplication.h> -#include <qptrlist.h> +#include <QDesktopWidget> +#include <q3ptrlist.h> #include <qregexp.h> #include <qfile.h> #include <qlabel.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> #include <qdir.h> @@ -47,10 +48,12 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model QFile file( fileName ); if ( QFile::exists( fileName) ) { - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { qDebug("Error: cannot open %s ", fileName.latin1() ); return; } QString line; - while ( file.readLine( line, 1024 ) > 0 ) { + char tmp[1024]; + while ( file.readLine( tmp, 1024 ) > 0 ) { + line = tmp; //qDebug("*%s* ", line.latin1() ); if ( line.left(7 ) == "[gammu]" ) { @@ -116,10 +119,10 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model } if ( write ) { - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { qDebug("Error: cannot write file %s ", fileName.latin1() ); return; } qDebug("Writing file %s ", fileName.latin1() ); - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts << content ; file.close(); |