diff options
Diffstat (limited to 'kode/kwsdl/tests')
-rw-r--r-- | kode/kwsdl/tests/google/directorycategory.cpp | 10 | ||||
-rw-r--r-- | kode/kwsdl/tests/google/directorycategory.h | 12 | ||||
-rw-r--r-- | kode/kwsdl/tests/google/directorycategoryarray.cpp | 6 | ||||
-rw-r--r-- | kode/kwsdl/tests/google/directorycategoryarray.h | 8 | ||||
-rw-r--r-- | kode/kwsdl/tests/google/googlesearch.cc | 42 | ||||
-rw-r--r-- | kode/kwsdl/tests/google/googlesearch.hh | 22 | ||||
-rw-r--r-- | kode/kwsdl/tests/google/googlesearchresult.cpp | 14 | ||||
-rw-r--r-- | kode/kwsdl/tests/google/googlesearchresult.h | 18 | ||||
-rw-r--r-- | kode/kwsdl/tests/google/googlesearchservice.cpp | 82 | ||||
-rw-r--r-- | kode/kwsdl/tests/google/googlesearchservice.h | 22 | ||||
-rw-r--r-- | kode/kwsdl/tests/google/resultelement.cpp | 30 | ||||
-rw-r--r-- | kode/kwsdl/tests/google/resultelement.h | 42 | ||||
-rw-r--r-- | kode/kwsdl/tests/google/resultelementarray.cpp | 6 | ||||
-rw-r--r-- | kode/kwsdl/tests/google/resultelementarray.h | 8 | ||||
-rw-r--r-- | kode/kwsdl/tests/google/serializer.cpp | 234 | ||||
-rw-r--r-- | kode/kwsdl/tests/google/serializer.h | 126 | ||||
-rw-r--r-- | kode/kwsdl/tests/google/transport.cpp | 16 | ||||
-rw-r--r-- | kode/kwsdl/tests/google/transport.h | 14 |
18 files changed, 356 insertions, 356 deletions
diff --git a/kode/kwsdl/tests/google/directorycategory.cpp b/kode/kwsdl/tests/google/directorycategory.cpp index 87f9c5f1a..6a61dab53 100644 --- a/kode/kwsdl/tests/google/directorycategory.cpp +++ b/kode/kwsdl/tests/google/directorycategory.cpp @@ -25,24 +25,24 @@ #include "directorycategory.h" #include <serializer.h> -#include <qstring.h> +#include <tqstring.h> -void DirectoryCategory::setFullViewableName( QString* fullViewableName ) +void DirectoryCategory::setFullViewableName( TQString* fullViewableName ) { mFullViewableName = fullViewableName; } -QString*DirectoryCategory::fullViewableName() const +TQString*DirectoryCategory::fullViewableName() const { return mFullViewableName; } -void DirectoryCategory::setSpecialEncoding( QString* specialEncoding ) +void DirectoryCategory::setSpecialEncoding( TQString* specialEncoding ) { mSpecialEncoding = specialEncoding; } -QString*DirectoryCategory::specialEncoding() const +TQString*DirectoryCategory::specialEncoding() const { return mSpecialEncoding; } diff --git a/kode/kwsdl/tests/google/directorycategory.h b/kode/kwsdl/tests/google/directorycategory.h index 0ce1c417d..82dadedc0 100644 --- a/kode/kwsdl/tests/google/directorycategory.h +++ b/kode/kwsdl/tests/google/directorycategory.h @@ -29,16 +29,16 @@ class QString; class DirectoryCategory { public: - void setFullViewableName( QString* fullViewableName ); - QString*fullViewableName() const; - void setSpecialEncoding( QString* specialEncoding ); - QString*specialEncoding() const; + void setFullViewableName( TQString* fullViewableName ); + TQString*fullViewableName() const; + void setSpecialEncoding( TQString* specialEncoding ); + TQString*specialEncoding() const; DirectoryCategory(); ~DirectoryCategory(); private: - QString*mFullViewableName; - QString*mSpecialEncoding; + TQString*mFullViewableName; + TQString*mSpecialEncoding; }; #endif diff --git a/kode/kwsdl/tests/google/directorycategoryarray.cpp b/kode/kwsdl/tests/google/directorycategoryarray.cpp index 724cf26cf..b8305222c 100644 --- a/kode/kwsdl/tests/google/directorycategoryarray.cpp +++ b/kode/kwsdl/tests/google/directorycategoryarray.cpp @@ -26,14 +26,14 @@ #include <serializer.h> #include <directorycategory.h> -#include <qptrlist.h> +#include <tqptrlist.h> -void DirectoryCategoryArray::setItems( QPtrList<DirectoryCategory>* items ) +void DirectoryCategoryArray::setItems( TQPtrList<DirectoryCategory>* items ) { mItems = items; } -QPtrList<DirectoryCategory>*DirectoryCategoryArray::items() const +TQPtrList<DirectoryCategory>*DirectoryCategoryArray::items() const { return mItems; } diff --git a/kode/kwsdl/tests/google/directorycategoryarray.h b/kode/kwsdl/tests/google/directorycategoryarray.h index db19d9bfa..f4c279952 100644 --- a/kode/kwsdl/tests/google/directorycategoryarray.h +++ b/kode/kwsdl/tests/google/directorycategoryarray.h @@ -24,20 +24,20 @@ #ifndef DIRECTORYCATEGORYARRAY_H #define DIRECTORYCATEGORYARRAY_H -#include <qptrlist.h> +#include <tqptrlist.h> class DirectoryCategory; class DirectoryCategoryArray { public: - void setItems( QPtrList<DirectoryCategory>* items ); - QPtrList<DirectoryCategory>*items() const; + void setItems( TQPtrList<DirectoryCategory>* items ); + TQPtrList<DirectoryCategory>*items() const; DirectoryCategoryArray(); ~DirectoryCategoryArray(); private: - QPtrList<DirectoryCategory>*mItems; + TQPtrList<DirectoryCategory>*mItems; }; #endif diff --git a/kode/kwsdl/tests/google/googlesearch.cc b/kode/kwsdl/tests/google/googlesearch.cc index 2e1374b47..5e26c769a 100644 --- a/kode/kwsdl/tests/google/googlesearch.cc +++ b/kode/kwsdl/tests/google/googlesearch.cc @@ -27,38 +27,38 @@ #include "resultelementarray.h" GoogleSearch::GoogleSearch() - : QObject( 0, "" ) + : TQObject( 0, "" ) { - connect( &mService, SIGNAL( doGetCachedPageResponse( QByteArray* ) ), - this, SLOT( cachedPageResult( QByteArray* ) ) ); - connect( &mService, SIGNAL( doSpellingSuggestionResponse( QString* ) ), - this, SLOT( spellingSuggestionResult( QString* ) ) ); - connect( &mService, SIGNAL( doGoogleSearchResponse( GoogleSearchResult* ) ), - this, SLOT( googleSearchResult( GoogleSearchResult* ) ) ); + connect( &mService, TQT_SIGNAL( doGetCachedPageResponse( TQByteArray* ) ), + this, TQT_SLOT( cachedPageResult( TQByteArray* ) ) ); + connect( &mService, TQT_SIGNAL( doSpellingSuggestionResponse( TQString* ) ), + this, TQT_SLOT( spellingSuggestionResult( TQString* ) ) ); + connect( &mService, TQT_SIGNAL( doGoogleSearchResponse( GoogleSearchResult* ) ), + this, TQT_SLOT( googleSearchResult( GoogleSearchResult* ) ) ); mKey = ""; } -void GoogleSearch::cachedPage( const QString &url ) +void GoogleSearch::cachedPage( const TQString &url ) { - mService.doGetCachedPage( new QString( mKey ), new QString( url ) ); + mService.doGetCachedPage( new TQString( mKey ), new TQString( url ) ); } -void GoogleSearch::spellingSuggestion( const QString &phrase ) +void GoogleSearch::spellingSuggestion( const TQString &phrase ) { - mService.doSpellingSuggestion( new QString( mKey ), new QString( phrase ) ); + mService.doSpellingSuggestion( new TQString( mKey ), new TQString( phrase ) ); } -void GoogleSearch::googleSearch( const QString &query, int start, int maxResults, bool filter, - const QString &restrict, bool safeSearch, const QString &lr, const QString &ie, - const QString &oe ) +void GoogleSearch::googleSearch( const TQString &query, int start, int maxResults, bool filter, + const TQString &restrict, bool safeSearch, const TQString &lr, const TQString &ie, + const TQString &oe ) { - mService.doGoogleSearch( new QString( mKey ), new QString( query ), new int( start ), new int( maxResults ), - new bool( filter ), new QString( restrict ), new bool( safeSearch ), new QString( lr ), - new QString( ie ), new QString( oe ) ); + mService.doGoogleSearch( new TQString( mKey ), new TQString( query ), new int( start ), new int( maxResults ), + new bool( filter ), new TQString( restrict ), new bool( safeSearch ), new TQString( lr ), + new TQString( ie ), new TQString( oe ) ); } -void GoogleSearch::cachedPageResult( QByteArray *array ) +void GoogleSearch::cachedPageResult( TQByteArray *array ) { qDebug( "--------------- Cached Page Results ---------------------" ); qDebug( "%s", array->data() ); @@ -67,7 +67,7 @@ void GoogleSearch::cachedPageResult( QByteArray *array ) delete array; } -void GoogleSearch::spellingSuggestionResult( QString *word ) +void GoogleSearch::spellingSuggestionResult( TQString *word ) { qDebug( "--------------- Spelling Suggestion ---------------------" ); qDebug( "%s", word->latin1() ); @@ -80,8 +80,8 @@ void GoogleSearch::googleSearchResult( GoogleSearchResult *result ) { qDebug( "--------------------- Search Results ---------------------" ); ResultElementArray *array = result->resultElements(); - QPtrList<ResultElement> *list = array->items(); - QPtrListIterator<ResultElement> it( *list ); + TQPtrList<ResultElement> *list = array->items(); + TQPtrListIterator<ResultElement> it( *list ); while ( it.current() != 0 ) { qDebug( "%s: %s", it.current()->summary()->latin1(), it.current()->uRL()->latin1() ); ++it; diff --git a/kode/kwsdl/tests/google/googlesearch.hh b/kode/kwsdl/tests/google/googlesearch.hh index 21aed9574..a1c490bbf 100644 --- a/kode/kwsdl/tests/google/googlesearch.hh +++ b/kode/kwsdl/tests/google/googlesearch.hh @@ -25,7 +25,7 @@ #ifndef GOOGLESEARCH_H #define GOOGLESEARCH_H -#include <qobject.h> +#include <tqobject.h> #include "googlesearchservice.h" class GoogleSearch : public QObject @@ -35,25 +35,25 @@ class GoogleSearch : public QObject public: GoogleSearch(); - void cachedPage( const QString &url ); - void spellingSuggestion( const QString &phrase ); - void googleSearch( const QString &query, + void cachedPage( const TQString &url ); + void spellingSuggestion( const TQString &phrase ); + void googleSearch( const TQString &query, int start, int maxResults, bool filter, - const QString &restrict, + const TQString &restrict, bool safeSearch, - const QString &lr, - const QString &ie, - const QString &oe ); + const TQString &lr, + const TQString &ie, + const TQString &oe ); private slots: - void cachedPageResult( QByteArray* ); - void spellingSuggestionResult( QString* ); + void cachedPageResult( TQByteArray* ); + void spellingSuggestionResult( TQString* ); void googleSearchResult( GoogleSearchResult* ); private: - QString mKey; + TQString mKey; GoogleSearchService mService; }; diff --git a/kode/kwsdl/tests/google/googlesearchresult.cpp b/kode/kwsdl/tests/google/googlesearchresult.cpp index 2d3ce11e2..faa209ce6 100644 --- a/kode/kwsdl/tests/google/googlesearchresult.cpp +++ b/kode/kwsdl/tests/google/googlesearchresult.cpp @@ -25,7 +25,7 @@ #include "googlesearchresult.h" #include <serializer.h> -#include <qstring.h> +#include <tqstring.h> #include <resultelementarray.h> #include <directorycategoryarray.h> @@ -39,12 +39,12 @@ bool*GoogleSearchResult::documentFiltering() const return mDocumentFiltering; } -void GoogleSearchResult::setSearchComments( QString* searchComments ) +void GoogleSearchResult::setSearchComments( TQString* searchComments ) { mSearchComments = searchComments; } -QString*GoogleSearchResult::searchComments() const +TQString*GoogleSearchResult::searchComments() const { return mSearchComments; } @@ -79,12 +79,12 @@ ResultElementArray*GoogleSearchResult::resultElements() const return mResultElements; } -void GoogleSearchResult::setSearchQuery( QString* searchQuery ) +void GoogleSearchResult::setSearchQuery( TQString* searchQuery ) { mSearchQuery = searchQuery; } -QString*GoogleSearchResult::searchQuery() const +TQString*GoogleSearchResult::searchQuery() const { return mSearchQuery; } @@ -109,12 +109,12 @@ int*GoogleSearchResult::endIndex() const return mEndIndex; } -void GoogleSearchResult::setSearchTips( QString* searchTips ) +void GoogleSearchResult::setSearchTips( TQString* searchTips ) { mSearchTips = searchTips; } -QString*GoogleSearchResult::searchTips() const +TQString*GoogleSearchResult::searchTips() const { return mSearchTips; } diff --git a/kode/kwsdl/tests/google/googlesearchresult.h b/kode/kwsdl/tests/google/googlesearchresult.h index 542fb6864..c2cfa16dc 100644 --- a/kode/kwsdl/tests/google/googlesearchresult.h +++ b/kode/kwsdl/tests/google/googlesearchresult.h @@ -33,22 +33,22 @@ class GoogleSearchResult public: void setDocumentFiltering( bool* documentFiltering ); bool*documentFiltering() const; - void setSearchComments( QString* searchComments ); - QString*searchComments() const; + void setSearchComments( TQString* searchComments ); + TQString*searchComments() const; void setEstimatedTotalResultsCount( int* estimatedTotalResultsCount ); int*estimatedTotalResultsCount() const; void setEstimateIsExact( bool* estimateIsExact ); bool*estimateIsExact() const; void setResultElements( ResultElementArray* resultElements ); ResultElementArray*resultElements() const; - void setSearchQuery( QString* searchQuery ); - QString*searchQuery() const; + void setSearchQuery( TQString* searchQuery ); + TQString*searchQuery() const; void setStartIndex( int* startIndex ); int*startIndex() const; void setEndIndex( int* endIndex ); int*endIndex() const; - void setSearchTips( QString* searchTips ); - QString*searchTips() const; + void setSearchTips( TQString* searchTips ); + TQString*searchTips() const; void setDirectoryCategories( DirectoryCategoryArray* directoryCategories ); DirectoryCategoryArray*directoryCategories() const; void setSearchTime( double* searchTime ); @@ -58,14 +58,14 @@ class GoogleSearchResult private: bool*mDocumentFiltering; - QString*mSearchComments; + TQString*mSearchComments; int*mEstimatedTotalResultsCount; bool*mEstimateIsExact; ResultElementArray*mResultElements; - QString*mSearchQuery; + TQString*mSearchQuery; int*mStartIndex; int*mEndIndex; - QString*mSearchTips; + TQString*mSearchTips; DirectoryCategoryArray*mDirectoryCategories; double*mSearchTime; }; diff --git a/kode/kwsdl/tests/google/googlesearchservice.cpp b/kode/kwsdl/tests/google/googlesearchservice.cpp index 555850713..3ccdb4935 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() diff --git a/kode/kwsdl/tests/google/googlesearchservice.h b/kode/kwsdl/tests/google/googlesearchservice.h index cc8bef027..6efd65239 100644 --- a/kode/kwsdl/tests/google/googlesearchservice.h +++ b/kode/kwsdl/tests/google/googlesearchservice.h @@ -24,10 +24,10 @@ #ifndef GOOGLESEARCHSERVICE_H #define GOOGLESEARCHSERVICE_H -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> #include <transport.h> -#include <qcstring.h> +#include <tqcstring.h> #include <googlesearchresult.h> class GoogleSearchService : public QObject @@ -35,21 +35,21 @@ class GoogleSearchService : public QObject Q_OBJECT public: - void doGetCachedPage( QString* key, QString* url ); - void doSpellingSuggestion( QString* key, QString* phrase ); - void doGoogleSearch( QString* key, QString* q, int* start, int* maxResults, bool* filter, QString* restrict, bool* safeSearch, QString* lr, QString* ie, QString* oe ); + void doGetCachedPage( TQString* key, TQString* url ); + void doSpellingSuggestion( TQString* key, TQString* phrase ); + void doGoogleSearch( TQString* key, TQString* q, int* start, int* maxResults, bool* filter, TQString* restrict, bool* safeSearch, TQString* lr, TQString* ie, TQString* oe ); GoogleSearchService(); ~GoogleSearchService(); signals: - void doGetCachedPageResponse( QByteArray* value ); - void doSpellingSuggestionResponse( QString* value ); + void doGetCachedPageResponse( TQByteArray* value ); + void doSpellingSuggestionResponse( TQString* value ); void doGoogleSearchResponse( GoogleSearchResult* value ); private slots: - void doGetCachedPageResponseSlot( const QString &xml ); - void doSpellingSuggestionResponseSlot( const QString &xml ); - void doGoogleSearchResponseSlot( const QString &xml ); + void doGetCachedPageResponseSlot( const TQString &xml ); + void doSpellingSuggestionResponseSlot( const TQString &xml ); + void doGoogleSearchResponseSlot( const TQString &xml ); private: Transport*mDoGetCachedPageTransport; diff --git a/kode/kwsdl/tests/google/resultelement.cpp b/kode/kwsdl/tests/google/resultelement.cpp index b02b8ca44..c340f8b04 100644 --- a/kode/kwsdl/tests/google/resultelement.cpp +++ b/kode/kwsdl/tests/google/resultelement.cpp @@ -25,55 +25,55 @@ #include "resultelement.h" #include <serializer.h> -#include <qstring.h> +#include <tqstring.h> #include <directorycategory.h> -void ResultElement::setSummary( QString* summary ) +void ResultElement::setSummary( TQString* summary ) { mSummary = summary; } -QString*ResultElement::summary() const +TQString*ResultElement::summary() const { return mSummary; } -void ResultElement::setURL( QString* uRL ) +void ResultElement::setURL( TQString* uRL ) { mURL = uRL; } -QString*ResultElement::uRL() const +TQString*ResultElement::uRL() const { return mURL; } -void ResultElement::setSnippet( QString* snippet ) +void ResultElement::setSnippet( TQString* snippet ) { mSnippet = snippet; } -QString*ResultElement::snippet() const +TQString*ResultElement::snippet() const { return mSnippet; } -void ResultElement::setTitle( QString* title ) +void ResultElement::setTitle( TQString* title ) { mTitle = title; } -QString*ResultElement::title() const +TQString*ResultElement::title() const { return mTitle; } -void ResultElement::setCachedSize( QString* cachedSize ) +void ResultElement::setCachedSize( TQString* cachedSize ) { mCachedSize = cachedSize; } -QString*ResultElement::cachedSize() const +TQString*ResultElement::cachedSize() const { return mCachedSize; } @@ -88,12 +88,12 @@ bool*ResultElement::relatedInformationPresent() const return mRelatedInformationPresent; } -void ResultElement::setHostName( QString* hostName ) +void ResultElement::setHostName( TQString* hostName ) { mHostName = hostName; } -QString*ResultElement::hostName() const +TQString*ResultElement::hostName() const { return mHostName; } @@ -108,12 +108,12 @@ DirectoryCategory*ResultElement::directoryCategory() const return mDirectoryCategory; } -void ResultElement::setDirectoryTitle( QString* directoryTitle ) +void ResultElement::setDirectoryTitle( TQString* directoryTitle ) { mDirectoryTitle = directoryTitle; } -QString*ResultElement::directoryTitle() const +TQString*ResultElement::directoryTitle() const { return mDirectoryTitle; } diff --git a/kode/kwsdl/tests/google/resultelement.h b/kode/kwsdl/tests/google/resultelement.h index 4a24f7291..e83ff3713 100644 --- a/kode/kwsdl/tests/google/resultelement.h +++ b/kode/kwsdl/tests/google/resultelement.h @@ -30,37 +30,37 @@ class DirectoryCategory; class ResultElement { public: - void setSummary( QString* summary ); - QString*summary() const; - void setURL( QString* uRL ); - QString*uRL() const; - void setSnippet( QString* snippet ); - QString*snippet() const; - void setTitle( QString* title ); - QString*title() const; - void setCachedSize( QString* cachedSize ); - QString*cachedSize() const; + void setSummary( TQString* summary ); + TQString*summary() const; + void setURL( TQString* uRL ); + TQString*uRL() const; + void setSnippet( TQString* snippet ); + TQString*snippet() const; + void setTitle( TQString* title ); + TQString*title() const; + void setCachedSize( TQString* cachedSize ); + TQString*cachedSize() const; void setRelatedInformationPresent( bool* relatedInformationPresent ); bool*relatedInformationPresent() const; - void setHostName( QString* hostName ); - QString*hostName() const; + void setHostName( TQString* hostName ); + TQString*hostName() const; void setDirectoryCategory( DirectoryCategory* directoryCategory ); DirectoryCategory*directoryCategory() const; - void setDirectoryTitle( QString* directoryTitle ); - QString*directoryTitle() const; + void setDirectoryTitle( TQString* directoryTitle ); + TQString*directoryTitle() const; ResultElement(); ~ResultElement(); private: - QString*mSummary; - QString*mURL; - QString*mSnippet; - QString*mTitle; - QString*mCachedSize; + TQString*mSummary; + TQString*mURL; + TQString*mSnippet; + TQString*mTitle; + TQString*mCachedSize; bool*mRelatedInformationPresent; - QString*mHostName; + TQString*mHostName; DirectoryCategory*mDirectoryCategory; - QString*mDirectoryTitle; + TQString*mDirectoryTitle; }; #endif diff --git a/kode/kwsdl/tests/google/resultelementarray.cpp b/kode/kwsdl/tests/google/resultelementarray.cpp index f356f0101..0ea65755f 100644 --- a/kode/kwsdl/tests/google/resultelementarray.cpp +++ b/kode/kwsdl/tests/google/resultelementarray.cpp @@ -25,15 +25,15 @@ #include "resultelementarray.h" #include <serializer.h> -#include <qptrlist.h> +#include <tqptrlist.h> #include <resultelement.h> -void ResultElementArray::setItems( QPtrList<ResultElement>* items ) +void ResultElementArray::setItems( TQPtrList<ResultElement>* items ) { mItems = items; } -QPtrList<ResultElement>*ResultElementArray::items() const +TQPtrList<ResultElement>*ResultElementArray::items() const { return mItems; } diff --git a/kode/kwsdl/tests/google/resultelementarray.h b/kode/kwsdl/tests/google/resultelementarray.h index 2d63fe4dd..972171172 100644 --- a/kode/kwsdl/tests/google/resultelementarray.h +++ b/kode/kwsdl/tests/google/resultelementarray.h @@ -24,20 +24,20 @@ #ifndef RESULTELEMENTARRAY_H #define RESULTELEMENTARRAY_H -#include <qptrlist.h> +#include <tqptrlist.h> class ResultElement; class ResultElementArray { public: - void setItems( QPtrList<ResultElement>* items ); - QPtrList<ResultElement>*items() const; + void setItems( TQPtrList<ResultElement>* items ); + TQPtrList<ResultElement>*items() const; ResultElementArray(); ~ResultElementArray(); private: - QPtrList<ResultElement>*mItems; + TQPtrList<ResultElement>*mItems; }; #endif diff --git a/kode/kwsdl/tests/google/serializer.cpp b/kode/kwsdl/tests/google/serializer.cpp index 595666fab..273ce5929 100644 --- a/kode/kwsdl/tests/google/serializer.cpp +++ b/kode/kwsdl/tests/google/serializer.cpp @@ -31,297 +31,297 @@ #include <directorycategory.h> #include <resultelement.h> -QString Serializer::marshalValue( const QString* value ) +TQString Serializer::marshalValue( const TQString* value ) { return *value; } -void Serializer::demarshalValue( const QString &str, QString *value ) +void Serializer::demarshalValue( const TQString &str, TQString *value ) { *value = str; } -void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const QString* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQString* value ) { - QDomElement element = doc.createElement( name ); + TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:string" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); parent.appendChild( element ); } -void Serializer::demarshal( const QDomElement &element, QString* value ) +void Serializer::demarshal( const TQDomElement &element, TQString* value ) { Serializer::demarshalValue( element.text(), value ); } -QString Serializer::marshalValue( const bool* value ) +TQString Serializer::marshalValue( const bool* value ) { return (*value ? "true" : "false"); } -void Serializer::demarshalValue( const QString &str, bool *value ) +void Serializer::demarshalValue( const TQString &str, bool *value ) { *value = (str.lower() == "true" ? true : false); } -void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const bool* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const bool* value ) { - QDomElement element = doc.createElement( name ); + TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:boolean" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); parent.appendChild( element ); } -void Serializer::demarshal( const QDomElement &element, bool* value ) +void Serializer::demarshal( const TQDomElement &element, bool* value ) { Serializer::demarshalValue( element.text(), value ); } -QString Serializer::marshalValue( const float* value ) +TQString Serializer::marshalValue( const float* value ) { - return QString::number( *value ); + return TQString::number( *value ); } -void Serializer::demarshalValue( const QString &str, float *value ) +void Serializer::demarshalValue( const TQString &str, float *value ) { *value = str.toFloat(); } -void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const float* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const float* value ) { - QDomElement element = doc.createElement( name ); + TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:TODO" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); parent.appendChild( element ); } -void Serializer::demarshal( const QDomElement &element, float* value ) +void Serializer::demarshal( const TQDomElement &element, float* value ) { Serializer::demarshalValue( element.text(), value ); } -QString Serializer::marshalValue( const int* value ) +TQString Serializer::marshalValue( const int* value ) { - return QString::number( *value ); + return TQString::number( *value ); } -void Serializer::demarshalValue( const QString &str, int *value ) +void Serializer::demarshalValue( const TQString &str, int *value ) { *value = str.toInt(); } -void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const int* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const int* value ) { - QDomElement element = doc.createElement( name ); + TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:int" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); parent.appendChild( element ); } -void Serializer::demarshal( const QDomElement &element, int* value ) +void Serializer::demarshal( const TQDomElement &element, int* value ) { Serializer::demarshalValue( element.text(), value ); } -QString Serializer::marshalValue( const unsigned int* value ) +TQString Serializer::marshalValue( const unsigned int* value ) { - return QString::number( *value ); + return TQString::number( *value ); } -void Serializer::demarshalValue( const QString &str, unsigned int *value ) +void Serializer::demarshalValue( const TQString &str, unsigned int *value ) { *value = str.toUInt(); } -void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const unsigned int* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const unsigned int* value ) { - QDomElement element = doc.createElement( name ); + TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:unsignedByte" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); parent.appendChild( element ); } -void Serializer::demarshal( const QDomElement &element, unsigned int* value ) +void Serializer::demarshal( const TQDomElement &element, unsigned int* value ) { Serializer::demarshalValue( element.text(), value ); } -QString Serializer::marshalValue( const double* value ) +TQString Serializer::marshalValue( const double* value ) { - return QString::number( *value ); + return TQString::number( *value ); } -void Serializer::demarshalValue( const QString &str, double *value ) +void Serializer::demarshalValue( const TQString &str, double *value ) { *value = str.toDouble(); } -void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const double* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const double* value ) { - QDomElement element = doc.createElement( name ); + TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:double" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); parent.appendChild( element ); } -void Serializer::demarshal( const QDomElement &element, double* value ) +void Serializer::demarshal( const TQDomElement &element, double* value ) { Serializer::demarshalValue( element.text(), value ); } -QString Serializer::marshalValue( const char* value ) +TQString Serializer::marshalValue( const char* value ) { - return QString( QChar( *value ) ); + return TQString( TQChar( *value ) ); } -void Serializer::demarshalValue( const QString &str, char *value ) +void Serializer::demarshalValue( const TQString &str, char *value ) { *value = str[ 0 ].latin1(); } -void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const char* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const char* value ) { - QDomElement element = doc.createElement( name ); + TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:byte" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); parent.appendChild( element ); } -void Serializer::demarshal( const QDomElement &element, char* value ) +void Serializer::demarshal( const TQDomElement &element, char* value ) { Serializer::demarshalValue( element.text(), value ); } -QString Serializer::marshalValue( const unsigned char* value ) +TQString Serializer::marshalValue( const unsigned char* value ) { - return QString( QChar( *value ) ); + return TQString( TQChar( *value ) ); } -void Serializer::demarshalValue( const QString &str, unsigned char *value ) +void Serializer::demarshalValue( const TQString &str, unsigned char *value ) { *value = str[ 0 ].latin1(); } -void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const unsigned char* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const unsigned char* value ) { - QDomElement element = doc.createElement( name ); + TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:unsignedByte" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); parent.appendChild( element ); } -void Serializer::demarshal( const QDomElement &element, unsigned char* value ) +void Serializer::demarshal( const TQDomElement &element, unsigned char* value ) { Serializer::demarshalValue( element.text(), value ); } -QString Serializer::marshalValue( const short* value ) +TQString Serializer::marshalValue( const short* value ) { - return QString::number( *value ); + return TQString::number( *value ); } -void Serializer::demarshalValue( const QString &str, short *value ) +void Serializer::demarshalValue( const TQString &str, short *value ) { *value = str.toShort(); } -void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const short* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const short* value ) { - QDomElement element = doc.createElement( name ); + TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:short" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); parent.appendChild( element ); } -void Serializer::demarshal( const QDomElement &element, short* value ) +void Serializer::demarshal( const TQDomElement &element, short* value ) { Serializer::demarshalValue( element.text(), value ); } -QString Serializer::marshalValue( const QByteArray* value ) +TQString Serializer::marshalValue( const TQByteArray* value ) { - return QString::fromUtf8( KCodecs::base64Encode( *value ) ); + return TQString::fromUtf8( KCodecs::base64Encode( *value ) ); } -void Serializer::demarshalValue( const QString &str, QByteArray *value ) +void Serializer::demarshalValue( const TQString &str, TQByteArray *value ) { *value = KCodecs::base64Decode( str.utf8() ); } -void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const QByteArray* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQByteArray* value ) { - QDomElement element = doc.createElement( name ); + TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:base64Binary" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); parent.appendChild( element ); } -void Serializer::demarshal( const QDomElement &element, QByteArray* value ) +void Serializer::demarshal( const TQDomElement &element, TQByteArray* value ) { Serializer::demarshalValue( element.text(), value ); } -QString Serializer::marshalValue( const QDateTime* value ) +TQString Serializer::marshalValue( const TQDateTime* value ) { return value->toString( Qt::ISODate ); } -void Serializer::demarshalValue( const QString &str, QDateTime *value ) +void Serializer::demarshalValue( const TQString &str, TQDateTime *value ) { - *value = QDateTime::fromString( str, Qt::ISODate ); + *value = TQDateTime::fromString( str, Qt::ISODate ); } -void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const QDateTime* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQDateTime* value ) { - QDomElement element = doc.createElement( name ); + TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:dateTime" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); parent.appendChild( element ); } -void Serializer::demarshal( const QDomElement &element, QDateTime* value ) +void Serializer::demarshal( const TQDomElement &element, TQDateTime* value ) { Serializer::demarshalValue( element.text(), value ); } -QString Serializer::marshalValue( const QDate* value ) +TQString Serializer::marshalValue( const TQDate* value ) { return value->toString( Qt::ISODate ); } -void Serializer::demarshalValue( const QString &str, QDate *value ) +void Serializer::demarshalValue( const TQString &str, TQDate *value ) { - *value = QDate::fromString( str, Qt::ISODate ); + *value = TQDate::fromString( str, Qt::ISODate ); } -void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const QDate* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQDate* value ) { - QDomElement element = doc.createElement( name ); + TQDomElement element = doc.createElement( name ); element.setAttribute( "xsi:type", "xsd:date" ); element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) ); parent.appendChild( element ); } -void Serializer::demarshal( const QDomElement &element, QDate* value ) +void Serializer::demarshal( const TQDomElement &element, TQDate* value ) { Serializer::demarshalValue( element.text(), value ); } -void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const ResultElementArray* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const ResultElementArray* value ) { - QDomElement root = doc.createElement( name ); + TQDomElement root = doc.createElement( name ); root.setAttribute( "xsi:type", "ns1:ResultElementArray" ); parent.appendChild( root ); if ( value->items() ) { - const QPtrList<ResultElement>* list = value->items(); + const TQPtrList<ResultElement>* list = value->items(); - QDomElement element = doc.createElement( name ); + TQDomElement element = doc.createElement( name ); element.setAttribute( "xmlns:ns1", "http://schemas.xmlsoap.org/soap/encoding/" ); element.setAttribute( "xsi:type", "ns1:Array" ); - element.setAttribute( "ns1:arrayType", "ns1:ResultElement[" + QString::number( list->count() ) + "]" ); + element.setAttribute( "ns1:arrayType", "ns1:ResultElement[" + TQString::number( list->count() ) + "]" ); parent.appendChild( element ); - QPtrListIterator<ResultElement> it( *list ); + TQPtrListIterator<ResultElement> it( *list ); while ( it.current() != 0 ) { Serializer::marshal( doc, element, "item", it.current() ); ++it; @@ -329,13 +329,13 @@ void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString } } -void Serializer::demarshal( const QDomElement &parent, ResultElementArray* value ) +void Serializer::demarshal( const TQDomElement &parent, ResultElementArray* value ) { - QPtrList<ResultElement>* itemsList = new QPtrList<ResultElement>(); + TQPtrList<ResultElement>* itemsList = new TQPtrList<ResultElement>(); itemsList->setAutoDelete( true ); - QDomNode node = parent.firstChild(); + TQDomNode node = parent.firstChild(); while ( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if ( !element.isNull() ) { if ( element.tagName() == "item" ) { ResultElement *item = new ResultElement; @@ -349,21 +349,21 @@ void Serializer::demarshal( const QDomElement &parent, ResultElementArray* value value->setItems( itemsList ); } -void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const DirectoryCategoryArray* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const DirectoryCategoryArray* value ) { - QDomElement root = doc.createElement( name ); + TQDomElement root = doc.createElement( name ); root.setAttribute( "xsi:type", "ns1:DirectoryCategoryArray" ); parent.appendChild( root ); if ( value->items() ) { - const QPtrList<DirectoryCategory>* list = value->items(); + const TQPtrList<DirectoryCategory>* list = value->items(); - QDomElement element = doc.createElement( name ); + TQDomElement element = doc.createElement( name ); element.setAttribute( "xmlns:ns1", "http://schemas.xmlsoap.org/soap/encoding/" ); element.setAttribute( "xsi:type", "ns1:Array" ); - element.setAttribute( "ns1:arrayType", "ns1:DirectoryCategory[" + QString::number( list->count() ) + "]" ); + element.setAttribute( "ns1:arrayType", "ns1:DirectoryCategory[" + TQString::number( list->count() ) + "]" ); parent.appendChild( element ); - QPtrListIterator<DirectoryCategory> it( *list ); + TQPtrListIterator<DirectoryCategory> it( *list ); while ( it.current() != 0 ) { Serializer::marshal( doc, element, "item", it.current() ); ++it; @@ -371,13 +371,13 @@ void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString } } -void Serializer::demarshal( const QDomElement &parent, DirectoryCategoryArray* value ) +void Serializer::demarshal( const TQDomElement &parent, DirectoryCategoryArray* value ) { - QPtrList<DirectoryCategory>* itemsList = new QPtrList<DirectoryCategory>(); + TQPtrList<DirectoryCategory>* itemsList = new TQPtrList<DirectoryCategory>(); itemsList->setAutoDelete( true ); - QDomNode node = parent.firstChild(); + TQDomNode node = parent.firstChild(); while ( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if ( !element.isNull() ) { if ( element.tagName() == "item" ) { DirectoryCategory *item = new DirectoryCategory; @@ -391,9 +391,9 @@ void Serializer::demarshal( const QDomElement &parent, DirectoryCategoryArray* v value->setItems( itemsList ); } -void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const GoogleSearchResult* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const GoogleSearchResult* value ) { - QDomElement root = doc.createElement( name ); + TQDomElement root = doc.createElement( name ); root.setAttribute( "xsi:type", "ns1:GoogleSearchResult" ); parent.appendChild( root ); if ( value->documentFiltering() ) { @@ -431,11 +431,11 @@ void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString } } -void Serializer::demarshal( const QDomElement &parent, GoogleSearchResult* value ) +void Serializer::demarshal( const TQDomElement &parent, GoogleSearchResult* value ) { - QDomNode node = parent.firstChild(); + TQDomNode node = parent.firstChild(); while ( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if ( !element.isNull() ) { if ( element.tagName() == "documentFiltering" ) { bool* item = new bool; @@ -443,7 +443,7 @@ void Serializer::demarshal( const QDomElement &parent, GoogleSearchResult* value value->setDocumentFiltering( item ); } if ( element.tagName() == "searchComments" ) { - QString* item = new QString; + TQString* item = new QString; Serializer::demarshal( element, item ); value->setSearchComments( item ); } @@ -463,7 +463,7 @@ void Serializer::demarshal( const QDomElement &parent, GoogleSearchResult* value value->setResultElements( item ); } if ( element.tagName() == "searchQuery" ) { - QString* item = new QString; + TQString* item = new QString; Serializer::demarshal( element, item ); value->setSearchQuery( item ); } @@ -478,7 +478,7 @@ void Serializer::demarshal( const QDomElement &parent, GoogleSearchResult* value value->setEndIndex( item ); } if ( element.tagName() == "searchTips" ) { - QString* item = new QString; + TQString* item = new QString; Serializer::demarshal( element, item ); value->setSearchTips( item ); } @@ -498,9 +498,9 @@ void Serializer::demarshal( const QDomElement &parent, GoogleSearchResult* value } -void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const DirectoryCategory* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const DirectoryCategory* value ) { - QDomElement root = doc.createElement( name ); + TQDomElement root = doc.createElement( name ); root.setAttribute( "xsi:type", "ns1:DirectoryCategory" ); parent.appendChild( root ); if ( value->fullViewableName() ) { @@ -511,19 +511,19 @@ void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString } } -void Serializer::demarshal( const QDomElement &parent, DirectoryCategory* value ) +void Serializer::demarshal( const TQDomElement &parent, DirectoryCategory* value ) { - QDomNode node = parent.firstChild(); + TQDomNode node = parent.firstChild(); while ( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if ( !element.isNull() ) { if ( element.tagName() == "fullViewableName" ) { - QString* item = new QString; + TQString* item = new QString; Serializer::demarshal( element, item ); value->setFullViewableName( item ); } if ( element.tagName() == "specialEncoding" ) { - QString* item = new QString; + TQString* item = new QString; Serializer::demarshal( element, item ); value->setSpecialEncoding( item ); } @@ -533,9 +533,9 @@ void Serializer::demarshal( const QDomElement &parent, DirectoryCategory* value } -void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const ResultElement* value ) +void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const ResultElement* value ) { - QDomElement root = doc.createElement( name ); + TQDomElement root = doc.createElement( name ); root.setAttribute( "xsi:type", "ns1:ResultElement" ); parent.appendChild( root ); if ( value->summary() ) { @@ -567,34 +567,34 @@ void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString } } -void Serializer::demarshal( const QDomElement &parent, ResultElement* value ) +void Serializer::demarshal( const TQDomElement &parent, ResultElement* value ) { - QDomNode node = parent.firstChild(); + TQDomNode node = parent.firstChild(); while ( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if ( !element.isNull() ) { if ( element.tagName() == "summary" ) { - QString* item = new QString; + TQString* item = new QString; Serializer::demarshal( element, item ); value->setSummary( item ); } if ( element.tagName() == "URL" ) { - QString* item = new QString; + TQString* item = new QString; Serializer::demarshal( element, item ); value->setURL( item ); } if ( element.tagName() == "snippet" ) { - QString* item = new QString; + TQString* item = new QString; Serializer::demarshal( element, item ); value->setSnippet( item ); } if ( element.tagName() == "title" ) { - QString* item = new QString; + TQString* item = new QString; Serializer::demarshal( element, item ); value->setTitle( item ); } if ( element.tagName() == "cachedSize" ) { - QString* item = new QString; + TQString* item = new QString; Serializer::demarshal( element, item ); value->setCachedSize( item ); } @@ -604,7 +604,7 @@ void Serializer::demarshal( const QDomElement &parent, ResultElement* value ) value->setRelatedInformationPresent( item ); } if ( element.tagName() == "hostName" ) { - QString* item = new QString; + TQString* item = new QString; Serializer::demarshal( element, item ); value->setHostName( item ); } @@ -614,7 +614,7 @@ void Serializer::demarshal( const QDomElement &parent, ResultElement* value ) value->setDirectoryCategory( item ); } if ( element.tagName() == "directoryTitle" ) { - QString* item = new QString; + TQString* item = new QString; Serializer::demarshal( element, item ); value->setDirectoryTitle( item ); } diff --git a/kode/kwsdl/tests/google/serializer.h b/kode/kwsdl/tests/google/serializer.h index d2db93d87..eb60d3f26 100644 --- a/kode/kwsdl/tests/google/serializer.h +++ b/kode/kwsdl/tests/google/serializer.h @@ -24,11 +24,11 @@ #ifndef SERIALIZER_H #define SERIALIZER_H -#include <qcstring.h> -#include <qdom.h> -#include <qdatetime.h> -#include <qstring.h> -#include <qptrlist.h> +#include <tqcstring.h> +#include <tqdom.h> +#include <tqdatetime.h> +#include <tqstring.h> +#include <tqptrlist.h> class ResultElementArray; class DirectoryCategoryArray; @@ -39,64 +39,64 @@ class ResultElement; class Serializer { public: - static QString marshalValue( const QString* value ); - static void demarshalValue( const QString &str, QString *value ); - static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const QString* value ); - static void demarshal( const QDomElement &element, QString* value ); - static QString marshalValue( const bool* value ); - static void demarshalValue( const QString &str, bool *value ); - static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const bool* value ); - static void demarshal( const QDomElement &element, bool* value ); - static QString marshalValue( const float* value ); - static void demarshalValue( const QString &str, float *value ); - static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const float* value ); - static void demarshal( const QDomElement &element, float* value ); - static QString marshalValue( const int* value ); - static void demarshalValue( const QString &str, int *value ); - static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const int* value ); - static void demarshal( const QDomElement &element, int* value ); - static QString marshalValue( const unsigned int* value ); - static void demarshalValue( const QString &str, unsigned int *value ); - static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const unsigned int* value ); - static void demarshal( const QDomElement &element, unsigned int* value ); - static QString marshalValue( const double* value ); - static void demarshalValue( const QString &str, double *value ); - static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const double* value ); - static void demarshal( const QDomElement &element, double* value ); - static QString marshalValue( const char* value ); - static void demarshalValue( const QString &str, char *value ); - static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const char* value ); - static void demarshal( const QDomElement &element, char* value ); - static QString marshalValue( const unsigned char* value ); - static void demarshalValue( const QString &str, unsigned char *value ); - static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const unsigned char* value ); - static void demarshal( const QDomElement &element, unsigned char* value ); - static QString marshalValue( const short* value ); - static void demarshalValue( const QString &str, short *value ); - static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const short* value ); - static void demarshal( const QDomElement &element, short* value ); - static QString marshalValue( const QByteArray* value ); - static void demarshalValue( const QString &str, QByteArray *value ); - static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const QByteArray* value ); - static void demarshal( const QDomElement &element, QByteArray* value ); - static QString marshalValue( const QDateTime* value ); - static void demarshalValue( const QString &str, QDateTime *value ); - static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const QDateTime* value ); - static void demarshal( const QDomElement &element, QDateTime* value ); - static QString marshalValue( const QDate* value ); - static void demarshalValue( const QString &str, QDate *value ); - static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const QDate* value ); - static void demarshal( const QDomElement &element, QDate* value ); - static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const ResultElementArray* value ); - static void demarshal( const QDomElement &parent, ResultElementArray* value ); - static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const DirectoryCategoryArray* value ); - static void demarshal( const QDomElement &parent, DirectoryCategoryArray* value ); - static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const GoogleSearchResult* value ); - static void demarshal( const QDomElement &parent, GoogleSearchResult* value ); - static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const DirectoryCategory* value ); - static void demarshal( const QDomElement &parent, DirectoryCategory* value ); - static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const ResultElement* value ); - static void demarshal( const QDomElement &parent, ResultElement* value ); + static TQString marshalValue( const TQString* value ); + static void demarshalValue( const TQString &str, TQString *value ); + static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQString* value ); + static void demarshal( const TQDomElement &element, TQString* value ); + static TQString marshalValue( const bool* value ); + static void demarshalValue( const TQString &str, bool *value ); + static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const bool* value ); + static void demarshal( const TQDomElement &element, bool* value ); + static TQString marshalValue( const float* value ); + static void demarshalValue( const TQString &str, float *value ); + static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const float* value ); + static void demarshal( const TQDomElement &element, float* value ); + static TQString marshalValue( const int* value ); + static void demarshalValue( const TQString &str, int *value ); + static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const int* value ); + static void demarshal( const TQDomElement &element, int* value ); + static TQString marshalValue( const unsigned int* value ); + static void demarshalValue( const TQString &str, unsigned int *value ); + static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const unsigned int* value ); + static void demarshal( const TQDomElement &element, unsigned int* value ); + static TQString marshalValue( const double* value ); + static void demarshalValue( const TQString &str, double *value ); + static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const double* value ); + static void demarshal( const TQDomElement &element, double* value ); + static TQString marshalValue( const char* value ); + static void demarshalValue( const TQString &str, char *value ); + static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const char* value ); + static void demarshal( const TQDomElement &element, char* value ); + static TQString marshalValue( const unsigned char* value ); + static void demarshalValue( const TQString &str, unsigned char *value ); + static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const unsigned char* value ); + static void demarshal( const TQDomElement &element, unsigned char* value ); + static TQString marshalValue( const short* value ); + static void demarshalValue( const TQString &str, short *value ); + static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const short* value ); + static void demarshal( const TQDomElement &element, short* value ); + static TQString marshalValue( const TQByteArray* value ); + static void demarshalValue( const TQString &str, TQByteArray *value ); + static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQByteArray* value ); + static void demarshal( const TQDomElement &element, TQByteArray* value ); + static TQString marshalValue( const TQDateTime* value ); + static void demarshalValue( const TQString &str, TQDateTime *value ); + static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQDateTime* value ); + static void demarshal( const TQDomElement &element, TQDateTime* value ); + static TQString marshalValue( const TQDate* value ); + static void demarshalValue( const TQString &str, TQDate *value ); + static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQDate* value ); + static void demarshal( const TQDomElement &element, TQDate* value ); + static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const ResultElementArray* value ); + static void demarshal( const TQDomElement &parent, ResultElementArray* value ); + static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const DirectoryCategoryArray* value ); + static void demarshal( const TQDomElement &parent, DirectoryCategoryArray* value ); + static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const GoogleSearchResult* value ); + static void demarshal( const TQDomElement &parent, GoogleSearchResult* value ); + static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const DirectoryCategory* value ); + static void demarshal( const TQDomElement &parent, DirectoryCategory* value ); + static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const ResultElement* value ); + static void demarshal( const TQDomElement &parent, ResultElement* value ); }; diff --git a/kode/kwsdl/tests/google/transport.cpp b/kode/kwsdl/tests/google/transport.cpp index 4f4583ba2..5d7d92f2b 100644 --- a/kode/kwsdl/tests/google/transport.cpp +++ b/kode/kwsdl/tests/google/transport.cpp @@ -26,17 +26,17 @@ #include <kdebug.h> -Transport::Transport( const QString &url ) +Transport::Transport( const TQString &url ) { mUrl = url; } -void Transport::query( const QString &xml ) +void Transport::query( const TQString &xml ) { mData.truncate( 0 ); - QByteArray postData; - QDataStream stream( postData, IO_WriteOnly ); + TQByteArray postData; + TQDataStream stream( postData, IO_WriteOnly ); stream.writeRawBytes( xml.utf8(), xml.utf8().length() ); KIO::TransferJob* job = KIO::http_post( KURL( mUrl ), postData, false ); @@ -48,11 +48,11 @@ void Transport::query( const QString &xml ) job->addMetaData( "UserAgent", "KWSDL" ); job->addMetaData( "content-type", "Content-Type: text/xml; charset=utf-8" ); - connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ), this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) ); - connect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotResult( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotResult( KIO::Job* ) ) ); } -void Transport::slotData( KIO::Job*, const QByteArray &data ) +void Transport::slotData( KIO::Job*, const TQByteArray &data ) { unsigned int oldSize = mData.size(); mData.resize( oldSize + data.size() ); @@ -67,7 +67,7 @@ void Transport::slotResult( KIO::Job* job ) return; } - emit result( QString::fromUtf8( mData.data(), mData.size() ) ); + emit result( TQString::fromUtf8( mData.data(), mData.size() ) ); } diff --git a/kode/kwsdl/tests/google/transport.h b/kode/kwsdl/tests/google/transport.h index b39d6e82c..f2386832f 100644 --- a/kode/kwsdl/tests/google/transport.h +++ b/kode/kwsdl/tests/google/transport.h @@ -24,7 +24,7 @@ #ifndef TRANSPORT_H #define TRANSPORT_H -#include <qobject.h> +#include <tqobject.h> #include <kio/job.h> class Transport : public QObject @@ -32,19 +32,19 @@ class Transport : public QObject Q_OBJECT public: - Transport( const QString &url ); - void query( const QString &xml ); + Transport( const TQString &url ); + void query( const TQString &xml ); signals: - void result( const QString &xml ); + void result( const TQString &xml ); private slots: - void slotData( KIO::Job*, const QByteArray &data ); + void slotData( KIO::Job*, const TQByteArray &data ); void slotResult( KIO::Job* job ); private: - QString mUrl; - QByteArray mData; + TQString mUrl; + TQByteArray mData; }; #endif |