diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /ksirc/KSOpenkSirc/serverFileParser.cpp | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksirc/KSOpenkSirc/serverFileParser.cpp')
-rw-r--r-- | ksirc/KSOpenkSirc/serverFileParser.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/ksirc/KSOpenkSirc/serverFileParser.cpp b/ksirc/KSOpenkSirc/serverFileParser.cpp index 8e6ba80e..10960650 100644 --- a/ksirc/KSOpenkSirc/serverFileParser.cpp +++ b/ksirc/KSOpenkSirc/serverFileParser.cpp @@ -1,12 +1,12 @@ #include "serverFileParser.h" #include "serverDataType.h" -#include <qfile.h> +#include <tqfile.h> #include <stdlib.h> #include <kstandarddirs.h> #include <kdebug.h> -extern QPtrList<Server> Groups; +extern TQPtrList<Server> Groups; // Opens, reads and parses server information from a server file, // sets the information in the global variable and returns 1 if @@ -16,30 +16,30 @@ int serverFileParser::readDatafile( const char *fileName ) { Groups.setAutoDelete( TRUE ); Groups.clear(); - QFile serverFile( fileName ); + TQFile serverFile( fileName ); if ( !serverFile.open( IO_ReadOnly ) ) return -1; - QTextStream fileStream(&serverFile); + TQTextStream fileStream(&serverFile); // the file is layed out as follows: // service:servername:serveraddress:ports:script: // so we parse it this way while( !fileStream.eof() ) { - QString str = fileStream.readLine(); + TQString str = fileStream.readLine(); const char *strC = str.ascii(); char *token; char groupC[1024], servernameC[1024], serveraddressC[1024], portsC[1024]; int pos = 0; - QString group; - QString servername; - QString serveraddress; - QPtrList<port> ports; - QString script; + TQString group; + TQString servername; + TQString serveraddress; + TQPtrList<port> ports; + TQString script; - QString buf; - QString portbuff; + TQString buf; + TQString portbuff; pos = sscanf(strC, "%1023[^:]:%1024[^:]:%1023[^:]:%1023[^:]:", groupC, servernameC, serveraddressC, portsC); if(pos != 4){ @@ -109,6 +109,6 @@ int serverFileParser::readDatafile( const char *fileName ) int writeDataFile() { - QString filename(KGlobal::dirs()->saveLocation("appdata")+"servers.txt"); + TQString filename(KGlobal::dirs()->saveLocation("appdata")+"servers.txt"); return 1; } |