summaryrefslogtreecommitdiffstats
path: root/kode/kwsdl/tests/google/googlesearchservice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kode/kwsdl/tests/google/googlesearchservice.cpp')
-rw-r--r--kode/kwsdl/tests/google/googlesearchservice.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/kode/kwsdl/tests/google/googlesearchservice.cpp b/kode/kwsdl/tests/google/googlesearchservice.cpp
index 55585071..3ccdb493 100644
--- a/kode/kwsdl/tests/google/googlesearchservice.cpp
+++ b/kode/kwsdl/tests/google/googlesearchservice.cpp
@@ -26,18 +26,18 @@
#include <serializer.h>
-void GoogleSearchService::doGetCachedPage( QString* key, QString* url )
+void GoogleSearchService::doGetCachedPage( TQString* key, TQString* url )
{
- QDomDocument doc( "kwsdl" );
+ TQDomDocument doc( "kwsdl" );
doc.appendChild( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );
- QDomElement env = doc.createElement( "SOAP-ENV:Envelope" );
+ TQDomElement env = doc.createElement( "SOAP-ENV:Envelope" );
env.setAttribute( "xmlns:SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/" );
env.setAttribute( "xmlns:xsi", "http://www.w3.org/1999/XMLSchema-instance" );
env.setAttribute( "xmlns:xsd", "http://www.w3.org/1999/XMLSchema" );
doc.appendChild( env );
- QDomElement body = doc.createElement( "SOAP-ENV:Body" );
+ TQDomElement body = doc.createElement( "SOAP-ENV:Body" );
env.appendChild( body );
- QDomElement method = doc.createElement( "ns1:doGetCachedPage" );
+ TQDomElement method = doc.createElement( "ns1:doGetCachedPage" );
method.setAttribute( "xmlns:ns1", "urn:GoogleSearch" );
method.setAttribute( "SOAP-ENV:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/" );
body.appendChild( method );
@@ -50,10 +50,10 @@ void GoogleSearchService::doGetCachedPage( QString* key, QString* url )
mDoGetCachedPageTransport->query( doc.toString() );
}
-void GoogleSearchService::doGetCachedPageResponseSlot( const QString &xml )
+void GoogleSearchService::doGetCachedPageResponseSlot( const TQString &xml )
{
- QDomDocument doc;
- QString errorMsg;
+ TQDomDocument doc;
+ TQString errorMsg;
int column, row;
qDebug( "%s", xml.latin1() );
@@ -63,27 +63,27 @@ void GoogleSearchService::doGetCachedPageResponseSlot( const QString &xml )
return;
}
- QByteArray* value = new QByteArray;
- QDomElement envelope = doc.documentElement();
- QDomElement body = envelope.firstChild().toElement();
- QDomElement method = body.firstChild().toElement();
+ TQByteArray* value = new QByteArray;
+ TQDomElement envelope = doc.documentElement();
+ TQDomElement body = envelope.firstChild().toElement();
+ TQDomElement method = body.firstChild().toElement();
Serializer::demarshal( method.firstChild().toElement(), value );
emit doGetCachedPageResponse( value );
}
-void GoogleSearchService::doSpellingSuggestion( QString* key, QString* phrase )
+void GoogleSearchService::doSpellingSuggestion( TQString* key, TQString* phrase )
{
- QDomDocument doc( "kwsdl" );
+ TQDomDocument doc( "kwsdl" );
doc.appendChild( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );
- QDomElement env = doc.createElement( "SOAP-ENV:Envelope" );
+ TQDomElement env = doc.createElement( "SOAP-ENV:Envelope" );
env.setAttribute( "xmlns:SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/" );
env.setAttribute( "xmlns:xsi", "http://www.w3.org/1999/XMLSchema-instance" );
env.setAttribute( "xmlns:xsd", "http://www.w3.org/1999/XMLSchema" );
doc.appendChild( env );
- QDomElement body = doc.createElement( "SOAP-ENV:Body" );
+ TQDomElement body = doc.createElement( "SOAP-ENV:Body" );
env.appendChild( body );
- QDomElement method = doc.createElement( "ns1:doSpellingSuggestion" );
+ TQDomElement method = doc.createElement( "ns1:doSpellingSuggestion" );
method.setAttribute( "xmlns:ns1", "urn:GoogleSearch" );
method.setAttribute( "SOAP-ENV:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/" );
body.appendChild( method );
@@ -96,10 +96,10 @@ void GoogleSearchService::doSpellingSuggestion( QString* key, QString* phrase )
mDoSpellingSuggestionTransport->query( doc.toString() );
}
-void GoogleSearchService::doSpellingSuggestionResponseSlot( const QString &xml )
+void GoogleSearchService::doSpellingSuggestionResponseSlot( const TQString &xml )
{
- QDomDocument doc;
- QString errorMsg;
+ TQDomDocument doc;
+ TQString errorMsg;
int column, row;
qDebug( "%s", xml.latin1() );
@@ -109,27 +109,27 @@ void GoogleSearchService::doSpellingSuggestionResponseSlot( const QString &xml )
return;
}
- QString* value = new QString;
- QDomElement envelope = doc.documentElement();
- QDomElement body = envelope.firstChild().toElement();
- QDomElement method = body.firstChild().toElement();
+ TQString* value = new QString;
+ TQDomElement envelope = doc.documentElement();
+ TQDomElement body = envelope.firstChild().toElement();
+ TQDomElement method = body.firstChild().toElement();
Serializer::demarshal( method.firstChild().toElement(), value );
emit doSpellingSuggestionResponse( value );
}
-void GoogleSearchService::doGoogleSearch( QString* key, QString* q, int* start, int* maxResults, bool* filter, QString* restrict, bool* safeSearch, QString* lr, QString* ie, QString* oe )
+void GoogleSearchService::doGoogleSearch( TQString* key, TQString* q, int* start, int* maxResults, bool* filter, TQString* restrict, bool* safeSearch, TQString* lr, TQString* ie, TQString* oe )
{
- QDomDocument doc( "kwsdl" );
+ TQDomDocument doc( "kwsdl" );
doc.appendChild( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );
- QDomElement env = doc.createElement( "SOAP-ENV:Envelope" );
+ TQDomElement env = doc.createElement( "SOAP-ENV:Envelope" );
env.setAttribute( "xmlns:SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/" );
env.setAttribute( "xmlns:xsi", "http://www.w3.org/1999/XMLSchema-instance" );
env.setAttribute( "xmlns:xsd", "http://www.w3.org/1999/XMLSchema" );
doc.appendChild( env );
- QDomElement body = doc.createElement( "SOAP-ENV:Body" );
+ TQDomElement body = doc.createElement( "SOAP-ENV:Body" );
env.appendChild( body );
- QDomElement method = doc.createElement( "ns1:doGoogleSearch" );
+ TQDomElement method = doc.createElement( "ns1:doGoogleSearch" );
method.setAttribute( "xmlns:ns1", "urn:GoogleSearch" );
method.setAttribute( "SOAP-ENV:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/" );
body.appendChild( method );
@@ -158,10 +158,10 @@ void GoogleSearchService::doGoogleSearch( QString* key, QString* q, int* start,
mDoGoogleSearchTransport->query( doc.toString() );
}
-void GoogleSearchService::doGoogleSearchResponseSlot( const QString &xml )
+void GoogleSearchService::doGoogleSearchResponseSlot( const TQString &xml )
{
- QDomDocument doc;
- QString errorMsg;
+ TQDomDocument doc;
+ TQString errorMsg;
int column, row;
qDebug( "%s", xml.latin1() );
@@ -172,9 +172,9 @@ void GoogleSearchService::doGoogleSearchResponseSlot( const QString &xml )
}
GoogleSearchResult* value = new GoogleSearchResult;
- QDomElement envelope = doc.documentElement();
- QDomElement body = envelope.firstChild().toElement();
- QDomElement method = body.firstChild().toElement();
+ TQDomElement envelope = doc.documentElement();
+ TQDomElement body = envelope.firstChild().toElement();
+ TQDomElement method = body.firstChild().toElement();
Serializer::demarshal( method.firstChild().toElement(), value );
emit doGoogleSearchResponse( value );
@@ -183,14 +183,14 @@ void GoogleSearchService::doGoogleSearchResponseSlot( const QString &xml )
GoogleSearchService::GoogleSearchService()
{
mDoGetCachedPageTransport = new Transport( "http://api.google.com/search/beta2" );
- connect( mDoGetCachedPageTransport, SIGNAL( result( const QString& ) ),
- this, SLOT( doGetCachedPageResponseSlot( const QString& ) ) );
+ connect( mDoGetCachedPageTransport, TQT_SIGNAL( result( const TQString& ) ),
+ this, TQT_SLOT( doGetCachedPageResponseSlot( const TQString& ) ) );
mDoSpellingSuggestionTransport = new Transport( "http://api.google.com/search/beta2" );
- connect( mDoSpellingSuggestionTransport, SIGNAL( result( const QString& ) ),
- this, SLOT( doSpellingSuggestionResponseSlot( const QString& ) ) );
+ connect( mDoSpellingSuggestionTransport, TQT_SIGNAL( result( const TQString& ) ),
+ this, TQT_SLOT( doSpellingSuggestionResponseSlot( const TQString& ) ) );
mDoGoogleSearchTransport = new Transport( "http://api.google.com/search/beta2" );
- connect( mDoGoogleSearchTransport, SIGNAL( result( const QString& ) ),
- this, SLOT( doGoogleSearchResponseSlot( const QString& ) ) );
+ connect( mDoGoogleSearchTransport, TQT_SIGNAL( result( const TQString& ) ),
+ this, TQT_SLOT( doGoogleSearchResponseSlot( const TQString& ) ) );
}
GoogleSearchService::~GoogleSearchService()