summaryrefslogtreecommitdiffstats
path: root/libkcddb/sites.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
commite654398e46e37abf457b2b1122ab898d2c51c49f (patch)
treed39ee6440f3c3663c3ead84a2d4cc2d034667e96 /libkcddb/sites.cpp
parente4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff)
downloadtdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz
tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkcddb/sites.cpp')
-rw-r--r--libkcddb/sites.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/libkcddb/sites.cpp b/libkcddb/sites.cpp
index 5980ce89..393740fe 100644
--- a/libkcddb/sites.cpp
+++ b/libkcddb/sites.cpp
@@ -20,9 +20,9 @@
#include "sites.h"
#include <kurl.h>
#include <kio/netaccess.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
namespace KCDDB
{
@@ -32,7 +32,7 @@ namespace KCDDB
}
- QValueList<Mirror>
+ TQValueList<Mirror>
Sites::siteList()
{
KURL url;
@@ -41,18 +41,18 @@ namespace KCDDB
url.setPort( 80 );
url.setPath( "/~cddb/cddb.cgi" );
- url.setQuery( QString::null );
+ url.setQuery( TQString::null );
- QString hello = QString("%1 %2 %3 %4")
+ TQString hello = TQString("%1 %2 %3 %4")
.arg(user_, localHostName_, clientName(), clientVersion());
url.addQueryItem( "cmd", "sites" );
url.addQueryItem( "hello", hello );
url.addQueryItem( "proto", "5" );
- QValueList<Mirror> result;
+ TQValueList<Mirror> result;
- QString tmpFile;
+ TQString tmpFile;
if( KIO::NetAccess::download( url, tmpFile, 0 ) )
{
result = readFile( tmpFile );
@@ -62,26 +62,26 @@ namespace KCDDB
return result;
}
- QValueList<Mirror>
- Sites::readFile(const QString& fileName)
+ TQValueList<Mirror>
+ Sites::readFile(const TQString& fileName)
{
- QValueList<Mirror> result;
+ TQValueList<Mirror> result;
- QFile f(fileName);
+ TQFile f(fileName);
if (!f.open(IO_ReadOnly))
{
kdDebug(60010) << "Couldn't read: " << fileName << endl;
return result;
}
- QTextStream ts(&f);
+ TQTextStream ts(&f);
if (statusCode(ts.readLine()) != 210)
return result;
while (!ts.atEnd())
{
- QString line = ts.readLine();
+ TQString line = ts.readLine();
if (line == ".")
break;
result << parseLine(line);
@@ -91,11 +91,11 @@ namespace KCDDB
}
Mirror
- Sites::parseLine(const QString& line)
+ Sites::parseLine(const TQString& line)
{
Mirror m;
- QRegExp rexp("([^ ]+) (cddbp|http) (\\d+) ([^ ]+) [N|S]\\d{3}.\\d{2} [E|W]\\d{3}.\\d{2} (.*)");
+ TQRegExp rexp("([^ ]+) (cddbp|http) (\\d+) ([^ ]+) [N|S]\\d{3}.\\d{2} [E|W]\\d{3}.\\d{2} (.*)");
if (rexp.search(line) != -1)
{