diff options
Diffstat (limited to 'dcop')
48 files changed, 386 insertions, 385 deletions
diff --git a/dcop/HOWTO b/dcop/HOWTO index 8609021c0..12a7f996e 100644 --- a/dcop/HOWTO +++ b/dcop/HOWTO @@ -190,7 +190,7 @@ Receiving Data via DCOP: Currently the only real way to receive data from DCOP is to multiply inherit from the normal class that you are inheriting (usually some -sort of QWidget subclass or QObject) as well as the DCOPObject class. +sort of QWidget subclass or TQObject) as well as the DCOPObject class. DCOPObject provides one very important method: DCOPObject::process(). This is a pure virtual method that you must implement in order to process DCOP messages that you receive. It takes a function @@ -385,7 +385,7 @@ but virtual, not pure virtual. Example: -class MyClass: public QObject, virtual public MyInterface +class MyClass: public TQObject, virtual public MyInterface { Q_OBJECT @@ -397,7 +397,7 @@ class MyClass: public QObject, virtual public MyInterface QRect mySynchronousMethod(); }; -Note: (Qt issue) Remember that if you are inheriting from QObject, you must +Note: (Qt issue) Remember that if you are inheriting from TQObject, you must place it first in the list of inherited classes. In the implementation of your class' ctor, you must explicitly initialize @@ -408,7 +408,7 @@ the interface which your are implementing. Example: MyClass::MyClass() - : QObject(), + : TQObject(), DCOPObject("MyInterface") { // whatever... @@ -429,7 +429,7 @@ It is not necessary (though very clean) to define an interface as an abstract class of its own, like we did in the example above. We could just as well have defined a k_dcop section directly within MyClass: -class MyClass: public QObject, virtual public DCOPObject +class MyClass: public TQObject, virtual public DCOPObject { Q_OBJECT K_DCOP diff --git a/dcop/KDE-ICE/ICE-def.cpp b/dcop/KDE-ICE/ICE-def.cpp index df1d9ea58..0bf780f59 100644 --- a/dcop/KDE-ICE/ICE-def.cpp +++ b/dcop/KDE-ICE/ICE-def.cpp @@ -11,7 +11,7 @@ EXPORTS IceCloseConnection IceComposeNetworkIdList IceConnectionNumber - IceConnectionStatus + IceConnectiontqStatus IceConnectionString IceFlush IceFreeAuthFileEntry diff --git a/dcop/KDE-ICE/ICEmsg.h b/dcop/KDE-ICE/ICEmsg.h index cf4d98975..db76c8252 100644 --- a/dcop/KDE-ICE/ICEmsg.h +++ b/dcop/KDE-ICE/ICEmsg.h @@ -39,7 +39,7 @@ Author: Ralph Mor, X Consortium #define _IceRead _kde_IceRead -extern Status _IceRead ( +extern tqStatus _IceRead ( #if NeedFunctionPrototypes IceConn /* iceConn */, unsigned long /* nbytes */, @@ -221,7 +221,7 @@ extern void _IceErrorBadValue ( /* - * Write pad bytes. Used to force 32 or 64 bit alignment. + * Write pad bytes. Used to force 32 or 64 bit tqalignment. * A maxium of 7 pad bytes can be specified. */ @@ -306,7 +306,7 @@ extern void _IceErrorBadValue ( /* - * Read pad bytes (for 32 or 64 bit alignment). + * Read pad bytes (for 32 or 64 bit tqalignment). * A maxium of 7 pad bytes can be specified. */ diff --git a/dcop/KDE-ICE/ICEutil.h b/dcop/KDE-ICE/ICEutil.h index dd32fe620..84ebc158d 100644 --- a/dcop/KDE-ICE/ICEutil.h +++ b/dcop/KDE-ICE/ICEutil.h @@ -119,7 +119,7 @@ extern void IceFreeAuthFileEntry ( #define IceWriteAuthFileEntry KDE_IceWriteAuthFileEntry -extern Status KDE_IceWriteAuthFileEntry ( +extern tqStatus KDE_IceWriteAuthFileEntry ( #if NeedFunctionPrototypes FILE * /* auth_file */, IceAuthFileEntry * /* auth */ diff --git a/dcop/KDE-ICE/Xtrans.c b/dcop/KDE-ICE/Xtrans.c index 371752919..1f072d8cd 100644 --- a/dcop/KDE-ICE/Xtrans.c +++ b/dcop/KDE-ICE/Xtrans.c @@ -54,7 +54,7 @@ extern char *strchr(const char *, int); #endif /* - * The transport table contains a definition for every transport (protocol) + * The transport table tqcontains a definition for every transport (protocol) * family. All operations that can be made on the transport go through this * table. * @@ -405,7 +405,7 @@ TRANS(Open) (int type, char *address) if ((thistrans = TRANS(SelectTransport) (protocol)) == NULL) { - PRMSG (1,"Open: Unable to find transport for %s\n", + PRMSG (1,"Open: Unable to tqfind transport for %s\n", protocol, 0, 0); xfree (protocol); @@ -495,7 +495,7 @@ TRANS(Reopen) (int type, int trans_id, int fd, char *port) if (thistrans == NULL) { - PRMSG (1,"Reopen: Unable to find transport id %d\n", + PRMSG (1,"Reopen: Unable to tqfind transport id %d\n", trans_id, 0, 0); return NULL; @@ -750,7 +750,7 @@ TRANS(NoListen) (char * protocol) if ((trans = TRANS(SelectTransport)(protocol)) == NULL) { - PRMSG (1,"TRANS(TransNoListen): unable to find transport: %s\n", + PRMSG (1,"TRANS(TransNoListen): unable to tqfind transport: %s\n", protocol, 0, 0); return -1; diff --git a/dcop/KDE-ICE/Xtranssock.c b/dcop/KDE-ICE/Xtranssock.c index 7b14ca9ab..812eb7b9d 100644 --- a/dcop/KDE-ICE/Xtranssock.c +++ b/dcop/KDE-ICE/Xtranssock.c @@ -176,7 +176,7 @@ static int IBMsockInit = 0; /* * This is the Socket implementation of the X Transport service layer * - * This file contains the implementation for both the UNIX and INET domains, + * This file tqcontains the implementation for both the UNIX and INET domains, * and can be built for either one, or both. * */ @@ -910,7 +910,7 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port) { struct sockaddr_un sockname; int namelen; - int oldUmask; + int oldUtqmask; int status; unsigned int mode; @@ -919,7 +919,7 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port) /* Make sure the directory is created */ - oldUmask = umask (0); + oldUtqmask = umask (0); #ifdef UNIX_DIR #ifdef HAS_STICKY_DIR_BIT @@ -930,7 +930,7 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port) if (trans_mkdir((char*)UNIX_DIR, mode) == -1) { PRMSG (1, "SocketUNIXCreateListener: mkdir(%s) failed, errno = %d\n", UNIX_DIR, errno, 0); - (void) umask (oldUmask); + (void) umask (oldUtqmask); return TRANS_CREATE_LISTENER_FAILED; } #endif @@ -952,7 +952,7 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port) #endif unlink (sockname.sun_path); - (void) umask (oldUmask); + (void) umask (oldUtqmask); if ((status = TRANS(SocketCreateListener) (ciptr, (struct sockaddr *) &sockname, namelen)) < 0) @@ -1011,7 +1011,7 @@ TRANS(SocketUNIXResetListener) (XtransConnInfo ciptr) S_IFSOCK)) #endif { - int oldUmask = umask (0); + int oldUtqmask = umask (0); #ifdef UNIX_DIR #ifdef HAS_STICKY_DIR_BIT @@ -1022,7 +1022,7 @@ TRANS(SocketUNIXResetListener) (XtransConnInfo ciptr) if (trans_mkdir((char*)UNIX_DIR, mode) == -1) { PRMSG (1, "SocketUNIXResetListener: mkdir(%s) failed, errno = %d\n", UNIX_DIR, errno, 0); - (void) umask (oldUmask); + (void) umask (oldUtqmask); return TRANS_RESET_FAILURE; } #endif @@ -1033,7 +1033,7 @@ TRANS(SocketUNIXResetListener) (XtransConnInfo ciptr) if ((ciptr->fd = socket (AF_UNIX, SOCK_STREAM, 0)) < 0) { TRANS(FreeConnInfo) (ciptr); - (void) umask (oldUmask); + (void) umask (oldUtqmask); return TRANS_RESET_FAILURE; } @@ -1048,11 +1048,11 @@ TRANS(SocketUNIXResetListener) (XtransConnInfo ciptr) { close (ciptr->fd); TRANS(FreeConnInfo) (ciptr); - (void) umask (oldUmask); + (void) umask (oldUtqmask); return TRANS_RESET_FAILURE; } - umask (oldUmask); + umask (oldUtqmask); status = TRANS_RESET_NEW_FD; } diff --git a/dcop/KDE-ICE/authutil.c b/dcop/KDE-ICE/authutil.c index 41a2eefaa..38fc68cff 100644 --- a/dcop/KDE-ICE/authutil.c +++ b/dcop/KDE-ICE/authutil.c @@ -62,12 +62,12 @@ extern unsigned sleep (); #endif #endif -static Status read_short (FILE *file, unsigned short *shortp); -static Status read_string (FILE *file, char **stringp); -static Status read_counted_string (FILE *file, unsigned short *countp, char **stringp); -static Status write_short (FILE *file, unsigned short s); -static Status write_string (FILE *file, char *string); -static Status write_counted_string (FILE *file, unsigned short count, char *string); +static tqStatus read_short (FILE *file, unsigned short *shortp); +static tqStatus read_string (FILE *file, char **stringp); +static tqStatus read_counted_string (FILE *file, unsigned short *countp, char **stringp); +static tqStatus write_short (FILE *file, unsigned short s); +static tqStatus write_string (FILE *file, char *string); +static tqStatus write_counted_string (FILE *file, unsigned short count, char *string); @@ -322,7 +322,7 @@ IceAuthFileEntry *auth; -Status +tqStatus IceWriteAuthFileEntry (auth_file, auth) FILE *auth_file; @@ -398,7 +398,7 @@ const char *auth_name; * local routines */ -static Status +static tqStatus read_short (FILE *file, unsigned short *shortp) { unsigned char file_short[2]; @@ -411,7 +411,7 @@ read_short (FILE *file, unsigned short *shortp) } -static Status +static tqStatus read_string (FILE *file, char **stringp) { unsigned short len; @@ -447,7 +447,7 @@ read_string (FILE *file, char **stringp) } -static Status +static tqStatus read_counted_string (FILE *file, unsigned short *countp, char **stringp) { unsigned short len; @@ -481,7 +481,7 @@ read_counted_string (FILE *file, unsigned short *countp, char **stringp) } -static Status +static tqStatus write_short (FILE *file, unsigned short s) { unsigned char file_short[2]; @@ -496,7 +496,7 @@ write_short (FILE *file, unsigned short s) } -static Status +static tqStatus write_string (FILE *file, char *string) { unsigned short count = strlen (string); @@ -511,7 +511,7 @@ write_string (FILE *file, char *string) } -static Status +static tqStatus write_counted_string (FILE *file, unsigned short count, char *string) { if (!write_short (file, count)) diff --git a/dcop/KDE-ICE/iceauth.c b/dcop/KDE-ICE/iceauth.c index 72297ceb5..f8bb87785 100644 --- a/dcop/KDE-ICE/iceauth.c +++ b/dcop/KDE-ICE/iceauth.c @@ -135,7 +135,7 @@ char **errorStringRet; if (!data) { const char *tempstr = - "Could not find correct MIT-MAGIC-COOKIE-1 authentication"; + "Could not tqfind correct MIT-MAGIC-COOKIE-1 authentication"; *errorStringRet = (char *) malloc (strlen (tempstr) + 1); if (*errorStringRet) @@ -243,7 +243,7 @@ char **errorStringRet; /* * We should never get here because in the ConnectionReply * we should have passed all the valid methods. So we should - * always find a valid entry. + * always tqfind a valid entry. */ const char *tempstr = diff --git a/dcop/KDE-ICE/listen.c b/dcop/KDE-ICE/listen.c index 03b715c27..0547a6243 100644 --- a/dcop/KDE-ICE/listen.c +++ b/dcop/KDE-ICE/listen.c @@ -36,7 +36,7 @@ Author: Ralph Mor, X Consortium #include <string.h> -Status +tqStatus IceListenForConnections (countRet, listenObjsRet, errorLength, errorStringRet) int *countRet; @@ -50,7 +50,7 @@ char *errorStringRet; int transCount, partial, i, j; int result = -1; int count = 0; - Status status = 1; + tqStatus status = 1; XtransConnInfo *transConns = NULL; while ((result < 0) && (count < 5)) diff --git a/dcop/KDE-ICE/listenwk.c b/dcop/KDE-ICE/listenwk.c index 80ff1dbae..21d47a66a 100644 --- a/dcop/KDE-ICE/listenwk.c +++ b/dcop/KDE-ICE/listenwk.c @@ -33,7 +33,7 @@ in this Software without prior written authorization from The Open Group. #include <string.h> -Status +tqStatus IceListenForWellKnownConnections (port, countRet, listenObjsRet, errorLength, errorStringRet) char *port; @@ -46,7 +46,7 @@ char *errorStringRet; struct _IceListenObj *listenObjs; char *networkId; int transCount, partial, i, j; - Status status = 1; + tqStatus status = 1; XtransConnInfo *transConns = NULL; diff --git a/dcop/KDE-ICE/locking.c b/dcop/KDE-ICE/locking.c index 0acce8368..0454704cf 100644 --- a/dcop/KDE-ICE/locking.c +++ b/dcop/KDE-ICE/locking.c @@ -32,7 +32,7 @@ Author: Ralph Mor, X Consortium */ -Status +tqStatus IceInitThreads () { diff --git a/dcop/KDE-ICE/ping.c b/dcop/KDE-ICE/ping.c index 5c0c601d6..bfee548c8 100644 --- a/dcop/KDE-ICE/ping.c +++ b/dcop/KDE-ICE/ping.c @@ -26,7 +26,7 @@ Author: Ralph Mor, X Consortium #include <KDE-ICE/ICElib.h> #include "KDE-ICE/ICElibint.h" -Status +tqStatus IcePing (iceConn, pingReplyProc, clientData) IceConn iceConn; diff --git a/dcop/KDE-ICE/watch.c b/dcop/KDE-ICE/watch.c index 79a2b8910..18be1ddc5 100644 --- a/dcop/KDE-ICE/watch.c +++ b/dcop/KDE-ICE/watch.c @@ -27,7 +27,7 @@ Author: Ralph Mor, X Consortium #include "KDE-ICE/ICElibint.h" #include "KDE-ICE/globals.h" -Status +tqStatus IceAddConnectionWatch (watchProc, clientData) IceWatchProc watchProc; diff --git a/dcop/Mainpage.dox b/dcop/Mainpage.dox index d573b01b5..9e0bec658 100644 --- a/dcop/Mainpage.dox +++ b/dcop/Mainpage.dox @@ -148,7 +148,7 @@ else { Currently the only real way to receive data from DCOP is to multiply inherit from the normal class that you are inheriting (usually some -sort of QWidget subclass or QObject) as well as the DCOPObject class. +sort of QWidget subclass or TQObject) as well as the DCOPObject class. DCOPObject provides one very important method: DCOPObject::process(). This is a pure virtual method that you must implement in order to process DCOP messages that you receive. It takes a function @@ -289,7 +289,7 @@ but virtual, not pure virtual. Example: \code -class MyClass: public QObject, virtual public MyInterface +class MyClass: public TQObject, virtual public MyInterface { Q_OBJECT @@ -301,7 +301,7 @@ class MyClass: public QObject, virtual public MyInterface QRect mySynchronousMethod(); }; \endcode -\note (Qt issue) Remember that if you are inheriting from QObject, you must +\note (Qt issue) Remember that if you are inheriting from TQObject, you must place it first in the list of inherited classes. In the implementation of your class' ctor, you must explicitly initialize @@ -313,7 +313,7 @@ Example: \code MyClass::MyClass() - : QObject(), + : TQObject(), DCOPObject("MyInterface") { // whatever... @@ -338,7 +338,7 @@ abstract class of its own, like we did in the example above. We could just as well have defined a k_dcop section directly within MyClass: \code -class MyClass: public QObject, virtual public DCOPObject +class MyClass: public TQObject, virtual public DCOPObject { Q_OBJECT K_DCOP @@ -373,7 +373,7 @@ b) the authentication must be ensured For the first step, you simply pass the server address (as found in .DCOPserver) to the second process. For the authentication, you can use the ICEAUTHORITY environment variable to tell the -second process where to find the authentication information. +second process where to tqfind the authentication information. (Note that this implies that the second process is able to read the authentication file, so it will probably only work if the second process runs as root. If it should run as another diff --git a/dcop/client/README.dcop b/dcop/client/README.dcop index e352cb439..8868b1c55 100644 --- a/dcop/client/README.dcop +++ b/dcop/client/README.dcop @@ -21,7 +21,7 @@ exit-code of '0' means success. An exit-code of '1' means error, the error msg is printed to stderr and no data is printed to stdout. -dcopfind [-l] [-a] <app-id> [<object-id> [<select_func> [args]]] +dcoptqfind [-l] [-a] <app-id> [<object-id> [<select_func> [args]]] Finds an existing DCOP application/object. The select_func can be used to select a specific single instance out of many based on some criteria. @@ -38,7 +38,7 @@ With the -a option it prints out "<app-id>" instead of a DCOPRef. With the -l option it calls "dcopstart <app-id>" if no object is found, stripping off any wildcard from the <app-id>. If the dcopstart command is -successful the find command is repeated, if the dcopstart command fails, an +successful the tqfind command is repeated, if the dcopstart command fails, an error message is printed to stderr and the command exits with exit-code '2'. The default selection criteria is "any". Applications can declare their own @@ -46,7 +46,7 @@ select_func as they see fit, e.g. konqueror could declare "isDoingProtocol(QString protocol)" and then the following command would select a konqueror mainwindow that is currently handling the help-protocol: - "dcopfind 'konqueror*' 'konqueror-mainwindow*' 'isDoingProtocol(QString + "dcoptqfind 'konqueror*' 'konqueror-mainwindow*' 'isDoingProtocol(QString protocol)' help" @@ -57,7 +57,7 @@ In addtion to the current syntax of dcop <appid> <object> <function> args you will now also be able to use <dcopref> to make calls with <dcopref> being -"DCOPRef(<appid>, <objectid>)" as returned by dcopfind. +"DCOPRef(<appid>, <objectid>)" as returned by dcoptqfind. Additional utilities: diff --git a/dcop/client/dcop.cpp b/dcop/client/dcop.cpp index 1d167ce70..86b63cba6 100644 --- a/dcop/client/dcop.cpp +++ b/dcop/client/dcop.cpp @@ -158,9 +158,9 @@ void queryFunctions( const char* app, const char* obj ) int callFunction( const char* app, const char* obj, const char* func, const QCStringList args ) { - TQString f = func; // Qt is better with unicode strings, so use one. - int left = f.find( '(' ); - int right = f.find( ')' ); + TQString f = func; // Qt is better with tqunicode strings, so use one. + int left = f.tqfind( '(' ); + int right = f.tqfind( ')' ); if ( right < left ) { @@ -181,12 +181,12 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt return( 1 ); } for ( QCStringList::Iterator it = funcs.begin(); it != funcs.end(); ++it ) { - int l = (*it).find( '(' ); + int l = (*it).tqfind( '(' ); int s; if (l > 0) - s = (*it).findRev( ' ', l); + s = (*it).tqfindRev( ' ', l); else - s = (*it).find( ' ' ); + s = (*it).tqfind( ' ' ); if ( s < 0 ) s = 0; @@ -195,8 +195,8 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt if ( l > 0 && (*it).mid( s, l - s ) == func ) { realfunc = (*it).mid( s ); - const TQString arguments = (*it).mid(l+1,(*it).find( ')' )-l-1); - uint a = arguments.contains(','); + const TQString arguments = (*it).mid(l+1,(*it).tqfind( ')' )-l-1); + uint a = arguments.tqcontains(','); if ( (a==0 && !arguments.isEmpty()) || a>0) a++; if ( a == args.count() ) @@ -209,8 +209,8 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt return( 1 ); } f = realfunc; - left = f.find( '(' ); - right = f.find( ')' ); + left = f.tqfind( '(' ); + right = f.tqfind( ')' ); } doit: @@ -230,7 +230,7 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) { TQString lt = (*it).simplifyWhiteSpace(); - int s = lt.find(' '); + int s = lt.tqfind(' '); // If there are spaces in the name, there may be two // reasons: the parameter name is still there, ie. @@ -250,7 +250,7 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt // s=1; - while (s < static_cast<int>(partl.count()) && intTypes.contains(partl[s])) + while (s < static_cast<int>(partl.count()) && intTypes.tqcontains(partl[s])) { s++; } @@ -345,7 +345,7 @@ void showHelp( int exitCode = 0 ) << " in bash, but because no new dcop instance has to be started" << endl << " for each line this is generally much faster, especially for" << endl << " the slower GNU dynamic linkers." << endl - << " The '%1' placeholder cannot be used to replace e.g. the" << endl + << " The '%1' placeholder cannot be used to tqreplace e.g. the" << endl << " program, object or method name." << endl << " --user <user> Connect to the given user's DCOP server. This option will" << endl << " ignore the values of the environment vars $DCOPSERVER and" << endl @@ -464,9 +464,9 @@ int runDCOP( QCStringList args, UserList users, Session session, QCStringList params; DCOPClient *client = 0L; int retval = 0; - if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 ) + if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 ) { - int delimPos = args[ 0 ].findRev( ',' ); + int delimPos = args[ 0 ].tqfindRev( ',' ); if( delimPos == -1 ) { cerr_ << "Error: '" << args[ 0 ] @@ -569,7 +569,7 @@ int runDCOP( QCStringList args, UserList users, Session session, } else if( !sessionName.isEmpty() ) { - if( sessions.contains( sessionName ) ) + if( sessions.tqcontains( sessionName ) ) { sessions.clear(); sessions.append( sessionName ); @@ -625,7 +625,7 @@ int runDCOP( QCStringList args, UserList users, Session session, continue; else { - cerr_ << "WARNING: Cannot find ICE authority file " + cerr_ << "WARNING: Cannot tqfind ICE authority file " << iceFile << "!" << endl << "Please check permissions or set the $ICEAUTHORITY" << " variable manually before" << endl @@ -706,12 +706,12 @@ int runDCOP( QCStringList args, UserList users, Session session, sendUserTime( app ); if( readStdin ) { - QCStringList::Iterator replaceArg = params.end(); + QCStringList::Iterator tqreplaceArg = params.end(); QCStringList::Iterator it = params.begin(); for( ; it != params.end(); ++it ) if( *it == "%1" ) - replaceArg = it; + tqreplaceArg = it; // Read from stdin until EOF and call function for each // read line @@ -719,8 +719,8 @@ int runDCOP( QCStringList args, UserList users, Session session, { TQString buf = cin_.readLine(); - if( replaceArg != params.end() ) - *replaceArg = buf.local8Bit(); + if( tqreplaceArg != params.end() ) + *tqreplaceArg = buf.local8Bit(); if( !buf.isNull() ) { @@ -861,7 +861,7 @@ int main( int argc, char** argv ) if (prog[prog.length()-1] != '*') { // Strip a trailing -<PID> part. - int i = prog.findRev('-'); + int i = prog.tqfindRev('-'); if ((i >= 0) && prog.mid(i+1).toLong()) { prog = prog.left(i); diff --git a/dcop/client/dcopfind.cpp b/dcop/client/dcopfind.cpp index cd3e4d517..c8feb5936 100644 --- a/dcop/client/dcopfind.cpp +++ b/dcop/client/dcopfind.cpp @@ -38,11 +38,11 @@ static DCOPClient* dcop = 0; static bool bAppIdOnly = 0; static bool bLaunchApp = 0; -bool findObject( const char* app, const char* obj, const char* func, QCStringList args ) +bool tqfindObject( const char* app, const char* obj, const char* func, QCStringList args ) { - TQString f = func; // Qt is better with unicode strings, so use one. - int left = f.find( '(' ); - int right = f.find( ')' ); + TQString f = func; // Qt is better with tqunicode strings, so use one. + int left = f.tqfind( '(' ); + int right = f.tqfind( ')' ); if ( right < left ) { @@ -66,7 +66,7 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) { TQString lt = (*it).simplifyWhiteSpace(); - int s = lt.find(' '); + int s = lt.tqfind(' '); // If there are spaces in the name, there may be two // reasons: the parameter name is still there, ie. @@ -86,7 +86,7 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis // s=1; - while (s < (int)partl.count() && intTypes.contains(partl[s])) + while (s < (int)partl.count() && intTypes.tqcontains(partl[s])) { s++; } @@ -139,7 +139,7 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis TQCString foundApp; TQCString foundObj; - if ( dcop->findObject( app, obj, f.latin1(), data, foundApp, foundObj) ) + if ( dcop->tqfindObject( app, obj, f.latin1(), data, foundApp, foundObj) ) { if (bAppIdOnly) puts(foundApp.data()); @@ -192,7 +192,7 @@ bool launchApp(TQString app) void usage() { - fprintf( stderr, "Usage: dcopfind [-l] [-a] application [object [function [arg1] [arg2] [arg3] ... ] ] ] \n" ); + fprintf( stderr, "Usage: dcoptqfind [-l] [-a] application [object [function [arg1] [arg2] [arg3] ... ] ] ] \n" ); exit(0); } @@ -267,7 +267,7 @@ int main( int argc, char** argv ) QCStringList params; for( int i = 0; i < argc; i++ ) params.append( args[ i ] ); - bool ok = findObject( app, objid, function, params ); + bool ok = tqfindObject( app, objid, function, params ); if (ok) return 0; if (bLaunchApp) @@ -275,7 +275,7 @@ int main( int argc, char** argv ) ok = launchApp(app); if (!ok) return 2; - ok = findObject( app, objid, function, params ); + ok = tqfindObject( app, objid, function, params ); } return 1; diff --git a/dcop/client/dcopstart.cpp b/dcop/client/dcopstart.cpp index 5741ef775..f46531735 100644 --- a/dcop/client/dcopstart.cpp +++ b/dcop/client/dcopstart.cpp @@ -33,7 +33,7 @@ static DCOPClient* dcop = 0; void startApp(const char *_app, int argc, const char **args) { const char *function = 0; - TQString app = TQString::fromLatin1(_app); + TQString app = TQString::tqfromLatin1(_app); if (app.endsWith(".desktop")) function = "start_service_by_desktop_path(TQString,TQStringList)"; else diff --git a/dcop/client/marshall.cpp b/dcop/client/marshall.cpp index f9b7955f2..1e3c8d887 100644 --- a/dcop/client/marshall.cpp +++ b/dcop/client/marshall.cpp @@ -102,12 +102,12 @@ TQCString demarshal( TQDataStream &stream, const TQString &type ) { TQCString result; - if ( type == "int" || type == "Q_INT32" ) + if ( type == "int" || type == "TQ_INT32" ) { int i; stream >> i; result.setNum( i ); - } else if ( type == "uint" || type == "Q_UINT32" || type == "unsigned int" ) + } else if ( type == "uint" || type == "TQ_UINT32" || type == "unsigned int" ) { uint i; stream >> i; @@ -132,12 +132,12 @@ TQCString demarshal( TQDataStream &stream, const TQString &type ) double d; stream >> d; result.setNum( d, 'f' ); - } else if ( type == "Q_INT64" ) { - Q_INT64 i; + } else if ( type == "TQ_INT64" ) { + TQ_INT64 i; stream >> i; result.sprintf( "%lld", i ); - } else if ( type == "Q_UINT64" ) { - Q_UINT64 i; + } else if ( type == "TQ_UINT64" ) { + TQ_UINT64 i; stream >> i; result.sprintf( "%llu", i ); } else if ( type == "bool" ) @@ -190,7 +190,7 @@ TQCString demarshal( TQDataStream &stream, const TQString &type ) result.sprintf( "%dx%d+%d+%d", r.width(), r.height(), r.x(), r.y() ); } else if ( type == "TQVariant" ) { - Q_INT32 type; + TQ_INT32 type; stream >> type; return demarshal( stream, TQVariant::typeToName( (TQVariant::Type)type ) ); } else if ( type == "DCOPRef" ) @@ -205,7 +205,7 @@ TQCString demarshal( TQDataStream &stream, const TQString &type ) result = r.url().local8Bit(); } else if ( type.left( 11 ) == "TQValueList<" ) { - if ( (uint)type.find( '>', 11 ) != type.length() - 1 ) + if ( (uint)type.tqfind( '>', 11 ) != type.length() - 1 ) return result; TQString nestedType = type.mid( 11, type.length() - 12 ); @@ -213,10 +213,10 @@ TQCString demarshal( TQDataStream &stream, const TQString &type ) if ( nestedType.isEmpty() ) return result; - Q_UINT32 count; + TQ_UINT32 count; stream >> count; - Q_UINT32 i = 0; + TQ_UINT32 i = 0; for (; i < count; ++i ) { TQCString arg = demarshal( stream, nestedType ); @@ -227,21 +227,21 @@ TQCString demarshal( TQDataStream &stream, const TQString &type ) } } else if ( type.left( 5 ) == "TQMap<" ) { - int commaPos = type.find( ',', 5 ); + int commaPos = type.tqfind( ',', 5 ); if ( commaPos == -1 ) return result; - if ( (uint)type.find( '>', commaPos ) != type.length() - 1 ) + if ( (uint)type.tqfind( '>', commaPos ) != type.length() - 1 ) return result; TQString keyType = type.mid( 5, commaPos - 5 ); TQString valueType = type.mid( commaPos + 1, type.length() - commaPos - 2 ); - Q_UINT32 count; + TQ_UINT32 count; stream >> count; - Q_UINT32 i = 0; + TQ_UINT32 i = 0; for (; i < count; ++i ) { TQCString key = demarshal( stream, keyType ); @@ -291,15 +291,15 @@ void marshall( TQDataStream &arg, QCStringList args, uint &i, TQString type ) arg << s.toUInt(); else if ( type == "unsigned int" ) arg << s.toUInt(); - else if ( type == "Q_INT32" ) + else if ( type == "TQ_INT32" ) arg << s.toInt(); - else if ( type == "Q_INT64" ) { + else if ( type == "TQ_INT64" ) { TQVariant qv = TQVariant( s ); arg << qv.toLongLong(); } - else if ( type == "Q_UINT32" ) + else if ( type == "TQ_UINT32" ) arg << s.toUInt(); - else if ( type == "Q_UINT64" ) { + else if ( type == "TQ_UINT64" ) { TQVariant qv = TQVariant( s ); arg << qv.toULongLong(); } @@ -376,7 +376,7 @@ void marshall( TQDataStream &arg, QCStringList args, uint &i, TQString type ) marshall( dummy_arg, args, j, type ); count++; } - arg << (Q_UINT32) count; + arg << (TQ_UINT32) count; // Parse the list for real while (true) { if( i > args.count() ) diff --git a/dcop/dcopc.c b/dcop/dcopc.c index 9667eb624..06cf8aaba 100644 --- a/dcop/dcopc.c +++ b/dcop/dcopc.c @@ -182,7 +182,7 @@ dcop_process_message( ) { struct DCOPMsg * pMsg = 0L; - Status status = False; + tqStatus status = False; char * buf = 0L; char * senderId = 0L; @@ -390,7 +390,7 @@ dcop_send_signal( free(header); - if (IceConnectionStatus(dcop_ice_conn) != IceConnectAccepted) + if (IceConnectiontqStatus(dcop_ice_conn) != IceConnectAccepted) return False; return True; @@ -412,7 +412,7 @@ dcop_call( ) { IceReplyWaitInfo waitInfo; - IceProcessMessagesStatus status; + IceProcessMessagestqStatus status; struct dcop_reply_struct replyStruct; char * pos = 0L; @@ -472,7 +472,7 @@ dcop_call( free(outputData); outputData = NULL; - if (IceConnectionStatus(dcop_ice_conn) != IceConnectAccepted) { + if (IceConnectiontqStatus(dcop_ice_conn) != IceConnectAccepted) { fprintf(stderr, "dcop_call(): Connection not accepted\n"); return False; } @@ -544,7 +544,7 @@ dcop_register(const char * app_name, Bool add_pid) char * data = 0L; char * pos = 0L; int dataLength = 0; - Bool callStatus = False; + Bool calltqStatus = False; fprintf(stderr, "dcop_register(`%s')\n", app_name); @@ -558,9 +558,9 @@ dcop_register(const char * app_name, Bool add_pid) fprintf(stderr, "dcop_init(): Reregistering as `%s'\n", app_name); - callStatus = dcop_detach(); + calltqStatus = dcop_detach(); - if (False == callStatus) { + if (False == calltqStatus) { fprintf(stderr, "dcop_init(): Could not detach before reregistering\n"); return 0L; } @@ -584,7 +584,7 @@ dcop_register(const char * app_name, Bool add_pid) pos = dcop_write_string(pos, dcop_requested_name); dataLength = pos - data; - callStatus = + calltqStatus = dcop_call( dcop_requested_name, "DCOPServer", @@ -600,7 +600,7 @@ dcop_register(const char * app_name, Bool add_pid) free(dcop_requested_name); free(data); - if (False == callStatus) { + if (False == calltqStatus) { fprintf(stderr, "dcop_register(): dcop_call() failed\n"); return 0L; } @@ -769,7 +769,7 @@ dcop_protocol_setup() return ( (status == IceProtocolSetupSuccess) && - (IceConnectionStatus(dcop_ice_conn) == IceConnectAccepted) + (IceConnectiontqStatus(dcop_ice_conn) == IceConnectAccepted) ); } diff --git a/dcop/dcopclient.cpp b/dcop/dcopclient.cpp index 8006ecd52..39e6b7e92 100644 --- a/dcop/dcopclient.cpp +++ b/dcop/dcopclient.cpp @@ -95,15 +95,15 @@ client_map_t *cliMap() return DCOPClient_CliMap; } -DCOPClient *DCOPClient::findLocalClient( const TQCString &_appId ) +DCOPClient *DCOPClient::tqfindLocalClient( const TQCString &_appId ) { - return cliMap()->find(_appId.data()); + return cliMap()->tqfind(_appId.data()); } static void registerLocalClient( const TQCString &_appId, DCOPClient *client ) { - cliMap()->replace(_appId.data(), client); + cliMap()->tqreplace(_appId.data(), client); } static @@ -141,7 +141,7 @@ public: TQCString* replyType; TQByteArray* replyData; int replyId; - Q_INT32 transactionId; + TQ_INT32 transactionId; TQCString calledApp; TQGuardedPtr<TQObject> replyObject; TQCString replySlot; @@ -173,7 +173,7 @@ public: TQCString defaultObject; TQPtrList<DCOPClientTransaction> *transactionList; bool transaction; - Q_INT32 transactionId; + TQ_INT32 transactionId; int opcode; // Special key values: @@ -205,7 +205,7 @@ public: class DCOPClientTransaction { public: - Q_INT32 id; + TQ_INT32 id; CARD32 key; TQCString senderId; }; @@ -263,12 +263,12 @@ static TQCString dcopServerFile(const TQCString &hostname, bool old) disp = "NODISPLAY"; int i; - if((i = disp.findRev('.')) > disp.findRev(KPATH_SEPARATOR) && i >= 0) + if((i = disp.tqfindRev('.')) > disp.tqfindRev(KPATH_SEPARATOR) && i >= 0) disp.truncate(i); if (!old) { - while( (i = disp.find(KPATH_SEPARATOR)) >= 0) + while( (i = disp.tqfind(KPATH_SEPARATOR)) >= 0) disp[i] = '_'; } @@ -382,7 +382,7 @@ static void DCOPProcessMessage(IceConn iceConn, IcePointer clientObject, case DCOPReplyWait: if ( replyStruct ) { TQCString calledApp, app; - Q_INT32 id; + TQ_INT32 id; TQDataStream ds( dataReceived, IO_ReadOnly ); ds >> calledApp >> app >> id; replyStruct->transactionId = id; @@ -398,7 +398,7 @@ static void DCOPProcessMessage(IceConn iceConn, IcePointer clientObject, { TQDataStream ds( dataReceived, IO_ReadOnly ); TQCString calledApp, app; - Q_INT32 id; + TQ_INT32 id; ds >> calledApp >> app >> id; if (replyStruct && (id == replyStruct->transactionId) && (calledApp == replyStruct->calledApp)) @@ -517,7 +517,7 @@ void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const TQ d->currentKey = key; if ( opcode == DCOPFind ) - b = c->find(app, objId, fun, data, replyType, replyData ); + b = c->tqfind(app, objId, fun, data, replyType, replyData ); else b = c->receive( app, objId, fun, data, replyType, replyData ); // set notifier back to previous state @@ -531,7 +531,7 @@ void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const TQ TQByteArray reply; TQDataStream replyStream( reply, IO_WriteOnly ); - Q_INT32 id = c->transactionId(); + TQ_INT32 id = c->transactionId(); if (id) { // Call delayed. Send back the transaction ID. replyStream << d->appId << fromApp << id; @@ -672,9 +672,9 @@ bool DCOPClient::attach() void DCOPClient::bindToApp() { - // check if we have a qApp instantiated. If we do, + // check if we have a tqApp instantiated. If we do, // we can create a TQSocketNotifier and use it for receiving data. - if (qApp) { + if (tqApp) { if ( d->notifier ) delete d->notifier; d->notifier = new TQSocketNotifier(socket(), @@ -690,7 +690,7 @@ void DCOPClient::suspend() if (!d->notifier) return; #endif - assert(d->notifier); // Suspending makes no sense if we didn't had a qApp yet + assert(d->notifier); // Suspending makes no sense if we didn't had a tqApp yet d->notifier->setEnabled(false); } @@ -764,7 +764,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous ) DCOPAuthCount, const_cast<char **>(DCOPAuthNames), DCOPClientAuthProcs, 0L)) < 0) { - emit attachFailed(TQString::fromLatin1( "Communications could not be established." )); + emit attachFailed(TQString::tqfromLatin1( "Communications could not be established." )); return false; } @@ -779,7 +779,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous ) TQCString fName = dcopServerFile(); TQFile f(TQFile::decodeName(fName)); if (!f.open(IO_ReadOnly)) { - emit attachFailed(TQString::fromLatin1( "Could not read network connection list.\n" )+TQFile::decodeName(fName)); + emit attachFailed(TQString::tqfromLatin1( "Could not read network connection list.\n" )+TQFile::decodeName(fName)); return false; } int size = QMIN( (qint64)1024, f.size() ); // protection against a huge file @@ -790,7 +790,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous ) // Should we abort ? } contents[size] = '\0'; - int pos = contents.find('\n'); + int pos = contents.tqfind('\n'); if ( pos == -1 ) // Shouldn't happen { qDebug("Only one line in dcopserver file !: %s", contents.data()); @@ -819,7 +819,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous ) delete [] d->serverAddr; d->serverAddr = 0; } - emit attachFailed(TQString::fromLatin1( errBuf )); + emit attachFailed(TQString::tqfromLatin1( errBuf )); return false; } fcntl(socket(), F_SETFL, FD_CLOEXEC); @@ -845,7 +845,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous ) delete [] d->serverAddr; d->serverAddr = 0; } - emit attachFailed(TQString::fromLatin1( errBuf )); + emit attachFailed(TQString::tqfromLatin1( errBuf )); return false; } else if (setupstat == IceProtocolAlreadyActive) { if (bClearServerAddr) { @@ -853,7 +853,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous ) d->serverAddr = 0; } /* should not happen because 3rd arg to IceOpenConnection was 0. */ - emit attachFailed(TQString::fromLatin1( "internal error in IceOpenConnection" )); + emit attachFailed(TQString::tqfromLatin1( "internal error in IceOpenConnection" )); return false; } @@ -863,7 +863,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous ) delete [] d->serverAddr; d->serverAddr = 0; } - emit attachFailed(TQString::fromLatin1( "DCOP server did not accept the connection." )); + emit attachFailed(TQString::tqfromLatin1( "DCOP server did not accept the connection." )); return false; } @@ -1017,7 +1017,7 @@ TQCString DCOPClient::normalizeFunctionSignature( const TQCString& fun ) { if ( fun.isEmpty() ) // nothing to do return fun.copy(); TQCString result( fun.size() ); - char *from = fun.data(); + char *from = const_cast<TQCString&>(fun).data(); char *to = result.data(); char *first = to; char last = 0; @@ -1052,11 +1052,11 @@ bool DCOPClient::send(const TQCString &remApp, const TQCString &remObjId, { if (remApp.isEmpty()) return false; - DCOPClient *localClient = findLocalClient( remApp ); + DCOPClient *localClient = tqfindLocalClient( remApp ); if ( localClient ) { bool saveTransaction = d->transaction; - Q_INT32 saveTransactionId = d->transactionId; + TQ_INT32 saveTransactionId = d->transactionId; TQCString saveSenderId = d->senderId; d->senderId = 0; // Local call @@ -1110,15 +1110,15 @@ bool DCOPClient::send(const TQCString &remApp, const TQCString &remObjId, return send(remApp, remObjId, remFun, ba); } -bool DCOPClient::findObject(const TQCString &remApp, const TQCString &remObj, +bool DCOPClient::tqfindObject(const TQCString &remApp, const TQCString &remObj, const TQCString &remFun, const TQByteArray &data, TQCString &foundApp, TQCString &foundObj, bool useEventLoop) { - return findObject( remApp, remObj, remFun, data, foundApp, foundObj, useEventLoop, -1 ); + return tqfindObject( remApp, remObj, remFun, data, foundApp, foundObj, useEventLoop, -1 ); } -bool DCOPClient::findObject(const TQCString &remApp, const TQCString &remObj, +bool DCOPClient::tqfindObject(const TQCString &remApp, const TQCString &remObj, const TQCString &remFun, const TQByteArray &data, TQCString &foundApp, TQCString &foundObj, bool useEventLoop, int timeout) @@ -1162,18 +1162,18 @@ bool DCOPClient::findObject(const TQCString &remApp, const TQCString &remObj, TQCString replyType; TQByteArray replyData; bool result = false; - DCOPClient *localClient = findLocalClient( remApp ); + DCOPClient *localClient = tqfindLocalClient( remApp ); if ( (phase == 1) && localClient ) { // In phase 1 we do all local clients bool saveTransaction = d->transaction; - Q_INT32 saveTransactionId = d->transactionId; + TQ_INT32 saveTransactionId = d->transactionId; TQCString saveSenderId = d->senderId; d->senderId = 0; // Local call - result = localClient->find( remApp, remObj, remFun, data, replyType, replyData ); + result = localClient->tqfind( remApp, remObj, remFun, data, replyType, replyData ); - Q_INT32 id = localClient->transactionId(); + TQ_INT32 id = localClient->transactionId(); if (id) { // Call delayed. We have to wait till it has been processed. do { @@ -1202,7 +1202,7 @@ bool DCOPClient::findObject(const TQCString &remApp, const TQCString &remObj, if (ref.app() == remApp) // Consistency check { - // replyType contains objId. + // replyType tqcontains objId. foundApp = ref.app(); foundObj = ref.object(); return true; @@ -1298,7 +1298,7 @@ void DCOPClient::setNotifications(bool enabled) { TQByteArray data; TQDataStream ds(data, IO_WriteOnly); - ds << static_cast<Q_INT8>(enabled); + ds << static_cast<TQ_INT8>(enabled); TQCString replyType; TQByteArray reply; @@ -1310,7 +1310,7 @@ void DCOPClient::setDaemonMode( bool daemonMode ) { TQByteArray data; TQDataStream ds(data, IO_WriteOnly); - ds << static_cast<Q_INT8>( daemonMode ); + ds << static_cast<TQ_INT8>( daemonMode ); TQCString replyType; TQByteArray reply; @@ -1331,9 +1331,9 @@ static void fillQtObjects( QCStringList& l, TQObject* o, TQCString path ) path += '/'; int unnamed = 0; - const TQObjectList *list = o ? o->tqchildren() : TQObject::objectTrees(); - if ( list ) { - TQObjectListIt it( *list ); + const TQObjectList list = o ? o->tqchildren() : TQObject::tqobjectTrees(); + if ( !list.isEmpty() ) { + TQObjectListIt it( list ); TQObject *obj; while ( (obj=it.current()) ) { ++it; @@ -1341,11 +1341,11 @@ static void fillQtObjects( QCStringList& l, TQObject* o, TQCString path ) if ( n == "unnamed" || n.isEmpty() ) { n.sprintf("%p", (void *) obj); - n = TQString("unnamed%1(%2, %3)").arg(++unnamed).arg(obj->className()).arg(TQString(n)).latin1(); + n = TQString(TQString("unnamed%1(%2, %3)").arg(++unnamed).arg(obj->className()).arg(TQString(n))).latin1(); } TQCString fn = path + n; l.append( fn ); - if ( obj->tqchildren() ) + if ( !obj->tqchildren().isEmpty() ) fillQtObjects( l, obj, fn ); } } @@ -1368,9 +1368,9 @@ static void fillQtObjectsEx( TQValueList<O>& l, TQObject* o, TQCString path ) path += '/'; int unnamed = 0; - const TQObjectList *list = o ? o->tqchildren() : TQObject::objectTrees(); - if ( list ) { - TQObjectListIt it( *list ); + const TQObjectList list = o ? o->tqchildren() : TQObject::tqobjectTrees(); + if ( !list.isEmpty() ) { + TQObjectListIt it( list ); TQObject *obj; while ( (obj=it.current()) ) { ++it; @@ -1378,42 +1378,42 @@ static void fillQtObjectsEx( TQValueList<O>& l, TQObject* o, TQCString path ) if ( n == "unnamed" || n.isEmpty() ) { n.sprintf("%p", (void *) obj); - n = TQString("unnamed%1(%2, %3)").arg(++unnamed).arg(obj->className()).arg(TQString(n)).latin1(); + n = TQString(TQString("unnamed%1(%2, %3)").arg(++unnamed).arg(obj->className()).arg(TQString(n))).latin1(); } TQCString fn = path + n; l.append( O( fn, obj ) ); - if ( obj->tqchildren() ) + if ( !obj->tqchildren().isEmpty() ) fillQtObjectsEx( l, obj, fn ); } } } -static TQObject* findQtObject( TQCString id ) +static TQObject* tqfindQtObject( TQCString id ) { TQRegExp expr( id ); TQValueList<O> l; fillQtObjectsEx( l, 0, "qt" ); - // Prefer an exact match, but fall-back on the first that contains the substring + // Prefer an exact match, but fall-back on the first that tqcontains the substring TQObject* firstContains = 0L; for ( TQValueList<O>::ConstIterator it = l.begin(); it != l.end(); ++it ) { if ( (*it).s == id ) // exact match return (*it).o; - if ( !firstContains && (*it).s.contains( expr ) ) { + if ( !firstContains && (*it).s.tqcontains( expr ) ) { firstContains = (*it).o; } } return firstContains; } -static QCStringList findQtObjects( TQCString id ) +static QCStringList tqfindQtObjects( TQCString id ) { TQRegExp expr( id ); TQValueList<O> l; fillQtObjectsEx( l, 0, "qt" ); QCStringList result; for ( TQValueList<O>::ConstIterator it = l.begin(); it != l.end(); ++it ) { - if ( (*it).s.contains( expr ) ) + if ( (*it).s.tqcontains( expr ) ) result << (*it).s; } return result; @@ -1438,7 +1438,7 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const l << "QCStringList functions()"; l << "QCStringList interfaces()"; l << "QCStringList objects()"; - l << "QCStringList find(TQCString)"; + l << "QCStringList tqfind(TQCString)"; reply << l; return true; } else if ( fun == "objects()" ) { @@ -1448,17 +1448,17 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const fillQtObjects( l, 0, "qt" ); reply << l; return true; - } else if ( fun == "find(TQCString)" ) { + } else if ( fun == "tqfind(TQCString)" ) { TQDataStream ds( data, IO_ReadOnly ); TQCString id; ds >> id ; replyType = "QCStringList"; TQDataStream reply( replyData, IO_WriteOnly ); - reply << findQtObjects( id ) ; + reply << tqfindQtObjects( id ) ; return true; } } else if ( objId.left(3) == "qt/" ) { - TQObject* o = findQtObject( objId ); + TQObject* o = tqfindQtObject( objId ); if ( !o ) return false; if ( fun == "functions()" ) { @@ -1470,13 +1470,13 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const l << "QCStringList properties()"; l << "bool setProperty(TQCString,TQVariant)"; l << "TQVariant property(TQCString)"; - TQStrList lst = o->metaObject()->slotNames( true ); + TQStrList lst = o->tqmetaObject()->slotNames( true ); int i = 0; for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) { - if ( o->metaObject()->slot( i++, true )->tqaccess != QMetaData::Public ) + if ( o->tqmetaObject()->slot( i++, true )->tqt_mo_access != TQMetaData::Public ) continue; TQCString slot = it.current(); - if ( slot.contains( "()" ) ) { + if ( slot.tqcontains( "()" ) ) { slot.prepend("void "); l << slot; } @@ -1487,10 +1487,10 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const replyType = "QCStringList"; TQDataStream reply( replyData, IO_WriteOnly ); QCStringList l; - TQMetaObject *meta = o->metaObject(); + TQMetaObject *meta = o->tqmetaObject(); while ( meta ) { l.prepend( meta->className() ); - meta = meta->superClass(); + meta = const_cast<TQMetaObject*>(TQT_TQMETAOBJECT_CONST(meta->superClass())); } reply << l; return true; @@ -1498,10 +1498,10 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const replyType = "QCStringList"; TQDataStream reply( replyData, IO_WriteOnly ); QCStringList l; - TQStrList lst = o->metaObject()->propertyNames( true ); + TQStrList lst = o->tqmetaObject()->propertyNames( true ); for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) { - TQMetaObject *mo = o->metaObject(); - const TQMetaProperty* p = mo->property( mo->findProperty( it.current(), true ), true ); + TQMetaObject *mo = o->tqmetaObject(); + const TQMetaProperty* p = mo->property( mo->tqfindProperty( it.current(), true ), true ); if ( !p ) continue; TQCString prop = p->type(); @@ -1529,13 +1529,13 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const ds >> name >> value; replyType = "bool"; TQDataStream reply( replyData, IO_WriteOnly ); - reply << (Q_INT8) o->setProperty( name, value ); + reply << (TQ_INT8) o->setProperty( name, value ); return true; } else { - int slot = o->metaObject()->findSlot( fun, true ); + int slot = o->tqmetaObject()->tqfindSlot( fun, true ); if ( slot != -1 ) { replyType = "void"; - QUObject uo[ 1 ]; + TQUObject uo[ 1 ]; o->qt_invoke( slot, uo ); return true; } @@ -1608,7 +1608,7 @@ bool DCOPClient::receive(const TQCString &/*app*/, const TQCString &objId, if ( objId.isEmpty() || objId == "default" ) { if ( !d->defaultObject.isEmpty() && DCOPObject::hasObject( d->defaultObject ) ) { - DCOPObject *objPtr = DCOPObject::find( d->defaultObject ); + DCOPObject *objPtr = DCOPObject::tqfind( d->defaultObject ); objPtr->setCallingDcopClient(this); if (objPtr->process(fun, data, replyType, replyData)) return true; @@ -1640,7 +1640,7 @@ bool DCOPClient::receive(const TQCString &/*app*/, const TQCString &objId, return false; } else { - DCOPObject *objPtr = DCOPObject::find(objId); + DCOPObject *objPtr = DCOPObject::tqfind(objId); objPtr->setCallingDcopClient(this); if (!objPtr->process(fun, data, replyType, replyData)) { // obj doesn't understand function or some other error. @@ -1654,9 +1654,9 @@ bool DCOPClient::receive(const TQCString &/*app*/, const TQCString &objId, // Check if the function result is a bool with the value "true" // If so set the function result to DCOPRef pointing to (app,objId) and // return true. Return false otherwise. -static bool findResultOk(TQCString &replyType, TQByteArray &replyData) +static bool tqfindResultOk(TQCString &replyType, TQByteArray &replyData) { - Q_INT8 success; // Tsk.. why is there no operator>>(bool)? + TQ_INT8 success; // Tsk.. why is there no operator>>(bool)? if (replyType != "bool") return false; TQDataStream reply( replyData, IO_ReadOnly ); @@ -1668,7 +1668,7 @@ static bool findResultOk(TQCString &replyType, TQByteArray &replyData) // set the function result to DCOPRef pointing to (app,objId) and // return true. -static bool findSuccess(const TQCString &app, const TQCString objId, TQCString &replyType, TQByteArray &replyData) +static bool tqfindSuccess(const TQCString &app, const TQCString objId, TQCString &replyType, TQByteArray &replyData) { DCOPRef ref(app, objId); replyType = "DCOPRef"; @@ -1680,7 +1680,7 @@ static bool findSuccess(const TQCString &app, const TQCString objId, TQCString & } -bool DCOPClient::find(const TQCString &app, const TQCString &objId, +bool DCOPClient::tqfind(const TQCString &app, const TQCString &objId, const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData) { @@ -1695,14 +1695,14 @@ bool DCOPClient::find(const TQCString &app, const TQCString &objId, if (fun.isEmpty()) { if (objId.isEmpty() || DCOPObject::hasObject(objId)) - return findSuccess(app, objId, replyType, replyData); + return tqfindSuccess(app, objId, replyType, replyData); return false; } // Message to application or single object... if (receive(app, objId, fun, data, replyType, replyData)) { - if (findResultOk(replyType, replyData)) - return findSuccess(app, objId, replyType, replyData); + if (tqfindResultOk(replyType, replyData)) + return tqfindSuccess(app, objId, replyType, replyData); } } else { @@ -1716,11 +1716,11 @@ bool DCOPClient::find(const TQCString &app, const TQCString &objId, replyType = 0; replyData = TQByteArray(); if (fun.isEmpty()) - return findSuccess(app, objPtr->objId(), replyType, replyData); + return tqfindSuccess(app, objPtr->objId(), replyType, replyData); objPtr->setCallingDcopClient(this); if (objPtr->process(fun, data, replyType, replyData)) - if (findResultOk(replyType, replyData)) - return findSuccess(app, objPtr->objId(), replyType, replyData); + if (tqfindResultOk(replyType, replyData)) + return tqfindSuccess(app, objPtr->objId(), replyType, replyData); } } return false; @@ -1742,17 +1742,17 @@ bool DCOPClient::call(const TQCString &remApp, const TQCString &remObjId, { if (remApp.isEmpty()) return false; - DCOPClient *localClient = findLocalClient( remApp ); + DCOPClient *localClient = tqfindLocalClient( remApp ); if ( localClient ) { bool saveTransaction = d->transaction; - Q_INT32 saveTransactionId = d->transactionId; + TQ_INT32 saveTransactionId = d->transactionId; TQCString saveSenderId = d->senderId; d->senderId = 0; // Local call bool b = localClient->receive( remApp, remObjId, remFun, data, replyType, replyData ); - Q_INT32 id = localClient->transactionId(); + TQ_INT32 id = localClient->transactionId(); if (id) { // Call delayed. We have to wait till it has been processed. do { @@ -1882,7 +1882,7 @@ bool DCOPClient::callInternal(const TQCString &remApp, const TQCString &remObjId for(;;) { bool checkMessages = true; if ( useEventLoop - ? d->notifier != NULL // useEventLoop needs a socket notifier and a qApp + ? d->notifier != NULL // useEventLoop needs a socket notifier and a tqApp : timeout >= 0 ) { // !useEventLoop doesn't block only for timeout >= 0 const int guiTimeout = 100; checkMessages = false; @@ -1907,7 +1907,7 @@ bool DCOPClient::callInternal(const TQCString &remApp, const TQCString &remObjId } if( timeout >= 0 ) d->eventLoopTimer.start(time_left - guiTimeout, true); - qApp->enter_loop(); + tqApp->enter_loop(); d->eventLoopTimer.stop(); if ( !old_lock ) { d->non_blocking_call_lock = false; @@ -1974,7 +1974,7 @@ bool DCOPClient::callInternal(const TQCString &remApp, const TQCString &remObjId // Wake up parent call, maybe it's reply is available already. if ( d->non_blocking_call_lock ) { - qApp->exit_loop(); + tqApp->exit_loop(); } d->currentKey = oldCurrentKey; @@ -1983,7 +1983,7 @@ bool DCOPClient::callInternal(const TQCString &remApp, const TQCString &remObjId void DCOPClient::eventLoopTimeout() { - qApp->exit_loop(); + tqApp->exit_loop(); } void DCOPClient::processSocketData(int fd) @@ -2000,8 +2000,8 @@ void DCOPClient::processSocketData(int fd) return; if ( d->non_blocking_call_lock ) { - if( qApp ) - qApp->exit_loop(); + if( tqApp ) + tqApp->exit_loop(); return; } @@ -2034,7 +2034,7 @@ TQCString DCOPClient::defaultObject() const } bool -DCOPClient::isLocalTransactionFinished(Q_INT32 id, TQCString &replyType, TQByteArray &replyData) +DCOPClient::isLocalTransactionFinished(TQ_INT32 id, TQCString &replyType, TQByteArray &replyData) { DCOPClientPrivate::LocalTransactionResult *result = d->localTransActionList.take(id); if (!result) @@ -2068,7 +2068,7 @@ DCOPClient::beginTransaction() return trans; } -Q_INT32 +TQ_INT32 DCOPClient::transactionId() const { if (d->transaction) @@ -2147,7 +2147,7 @@ DCOPClient::connectDCOPSignal( const TQCString &sender, const TQCString &senderO { TQCString replyType; TQByteArray data, replyData; - Q_INT8 iVolatile = Volatile ? 1 : 0; + TQ_INT8 iVolatile = Volatile ? 1 : 0; TQDataStream args(data, IO_WriteOnly ); args << sender << senderObj << normalizeFunctionSignature(signal) << receiverObj << normalizeFunctionSignature(slot) << iVolatile; @@ -2163,7 +2163,7 @@ DCOPClient::connectDCOPSignal( const TQCString &sender, const TQCString &senderO return false; TQDataStream reply(replyData, IO_ReadOnly ); - Q_INT8 result; + TQ_INT8 result; reply >> result; return (result != 0); } @@ -2197,7 +2197,7 @@ DCOPClient::disconnectDCOPSignal( const TQCString &sender, const TQCString &send return false; TQDataStream reply(replyData, IO_ReadOnly ); - Q_INT8 result; + TQ_INT8 result; reply >> result; return (result != 0); } diff --git a/dcop/dcopclient.h b/dcop/dcopclient.h index 41266c187..6c481b8af 100644 --- a/dcop/dcopclient.h +++ b/dcop/dcopclient.h @@ -42,7 +42,7 @@ typedef TQValueList<TQCString> QCStringList; * * This class provides IPC and RPC for KDE applications. Usually you * will not have to instantiate one yourself because KApplication - * contains a method to return a pointer to a DCOPClient object which + * tqcontains a method to return a pointer to a DCOPClient object which * can be used for your whole application. * * Before being able to send or receive any DCOP messages, you will have @@ -65,9 +65,10 @@ typedef TQValueList<TQCString> QCStringList; * @see KApplication::dcopClient() * @author Preston Brown <pbrown@kde.org>, Matthias Ettrich <ettrich@kde.org> */ -class DCOP_EXPORT DCOPClient : public QObject +class DCOP_EXPORT DCOPClient : public TQObject { Q_OBJECT + TQ_OBJECT public: /** @@ -83,7 +84,7 @@ class DCOP_EXPORT DCOPClient : public QObject * Sets the address of a server to use upon attaching. * * If no server address is ever specified, attach will try its best to - * find the server anyway. + * tqfind the server anyway. * @param addr the new address of the server */ static void setServerAddress(const TQCString &addr); @@ -345,7 +346,7 @@ class DCOP_EXPORT DCOPClient : public QObject /** * Searches for an object which matches a criteria. * - * findObject calls @p remFun in the applications and objects identified + * tqfindObject calls @p remFun in the applications and objects identified * by @p remApp and @p remObj until @p remFun returns true. The name of * the application and object that returned true are returned in * @p foundApp and @p foundObj respectively. @@ -353,7 +354,7 @@ class DCOP_EXPORT DCOPClient : public QObject * If @p remFun is empty a default function is called in the object * which always returns @p true. * - * A findObject blocks the application until the process receives the + * A tqfindObject blocks the application until the process receives the * answer. * * If @p useEventLoop is true, a local event loop will be started after @@ -378,7 +379,7 @@ class DCOP_EXPORT DCOPClient : public QObject * * @see send() */ - bool findObject(const TQCString &remApp, const TQCString &remObj, + bool tqfindObject(const TQCString &remApp, const TQCString &remObj, const TQCString &remFun, const TQByteArray &data, TQCString &foundApp, TQCString &foundObj, bool useEventLoop/*=false*/, int timeout/*=-1*/); @@ -387,7 +388,7 @@ class DCOP_EXPORT DCOPClient : public QObject * @deprecated */ // KDE4 merge with above - bool findObject(const TQCString &remApp, const TQCString &remObj, + bool tqfindObject(const TQCString &remApp, const TQCString &remObj, const TQCString &remFun, const TQByteArray &data, TQCString &foundApp, TQCString &foundObj, bool useEventLoop=false); @@ -511,7 +512,7 @@ class DCOP_EXPORT DCOPClient : public QObject * @see process() * @see beginTransaction() */ - Q_INT32 transactionId() const; + TQ_INT32 transactionId() const; /** * Checks whether @p remApp is registered with the DCOP server. @@ -589,7 +590,7 @@ class DCOP_EXPORT DCOPClient : public QObject * @param replyType write the reply type in this string * @param replyData write the reply data in this array */ - bool find(const TQCString &app, const TQCString &obj, + bool tqfind(const TQCString &app, const TQCString &obj, const TQCString &fun, const TQByteArray& data, TQCString& replyType, TQByteArray &replyData); @@ -693,7 +694,7 @@ class DCOP_EXPORT DCOPClient : public QObject * to check whether a given client (by name) is running in the same * process or in another one. */ - static DCOPClient* findLocalClient( const TQCString &_appId ); + static DCOPClient* tqfindLocalClient( const TQCString &_appId ); /** * @internal Do not use. @@ -715,7 +716,7 @@ class DCOP_EXPORT DCOPClient : public QObject * File with information how to reach the dcopserver. * @param hostname Hostname to use, if empty current hostname of * the system is used. - * @return Filename that contains information how to contact the + * @return Filename that tqcontains information how to contact the * DCOPserver. */ static TQCString dcopServerFile(const TQCString &hostname=0); @@ -758,7 +759,7 @@ signals: * * Usually attached to a dialog box or some other visual * aid. - * @param msg the message tha contains further information + * @param msg the message tha tqcontains further information */ void attachFailed(const TQString &msg); @@ -816,7 +817,7 @@ public: private: - bool isLocalTransactionFinished(Q_INT32 id, TQCString &replyType, TQByteArray &replyData); + bool isLocalTransactionFinished(TQ_INT32 id, TQCString &replyType, TQByteArray &replyData); bool attachInternal( bool registerAsAnonymous = true ); diff --git a/dcop/dcopidl/scanner.cc b/dcop/dcopidl/scanner.cc index e91b21d68..edc8ac567 100644 --- a/dcop/dcopidl/scanner.cc +++ b/dcop/dcopidl/scanner.cc @@ -803,7 +803,7 @@ static int yy_lp; *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ yy_cp = yy_full_match; /* restore poss. backed-over text */ \ ++yy_lp; \ -goto find_rule; \ +goto tqfind_rule; \ } #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 @@ -1140,11 +1140,11 @@ yy_match: } while ( yy_current_state != 310 ); -yy_find_action: +yy_tqfind_action: yy_current_state = *--yy_state_ptr; yy_lp = yy_accept[yy_current_state]; -find_rule: /* we branch to this label when backing up */ - for ( ; ; ) /* until we find what rule we matched */ +tqfind_rule: /* we branch to this label when backing up */ + for ( ; ; ) /* until we tqfind what rule we matched */ { if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) { @@ -1226,8 +1226,8 @@ YY_RULE_SETUP #line 170 "scanner.ll" { TQString s( yytext ); - int i = s.find(TQRegExp("[\"<]"))+1; - int j = s.find(TQRegExp("[\">]"), i); + int i = s.tqfind(TQRegExp("[\"<]"))+1; + int j = s.tqfind(TQRegExp("[\">]"), i); yylval._str = new TQString( s.mid( i, j - i ) ); idl_line_no++; return T_INCLUDE; @@ -1686,7 +1686,7 @@ ECHO; else { yy_cp = yy_c_buf_p; - goto yy_find_action; + goto yy_tqfind_action; } } @@ -1739,7 +1739,7 @@ ECHO; yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; + goto yy_tqfind_action; } break; } diff --git a/dcop/dcopidl/scanner.ll b/dcop/dcopidl/scanner.ll index 63e8ca59c..62a80cdd8 100644 --- a/dcop/dcopidl/scanner.ll +++ b/dcop/dcopidl/scanner.ll @@ -169,8 +169,8 @@ Kidl_Identifier [_a-zA-Z][a-zA-Z0-9_]* } "#include"[ \t]*[<\"][^>"]*[>\"]\s*\n { TQString s( yytext ); - int i = s.find(TQRegExp("[\"<]"))+1; - int j = s.find(TQRegExp("[\">]"), i); + int i = s.tqfind(TQRegExp("[\"<]"))+1; + int j = s.tqfind(TQRegExp("[\">]"), i); yylval._str = new TQString( s.mid( i, j - i ) ); idl_line_no++; return T_INCLUDE; diff --git a/dcop/dcopidl/yacc.cc b/dcop/dcopidl/yacc.cc index d41fa6dbd..1fbc4c0bd 100644 --- a/dcop/dcopidl/yacc.cc +++ b/dcop/dcopidl/yacc.cc @@ -1643,7 +1643,7 @@ yyreduce: case 15: #line 221 "yacc.yy" { - int pos = in_namespace.findRev( "::", -3 ); + int pos = in_namespace.tqfindRev( "::", -3 ); if( pos >= 0 ) in_namespace = in_namespace.left( pos + 2 ); else diff --git a/dcop/dcopidl/yacc.yy b/dcop/dcopidl/yacc.yy index ca22c65e1..7870eb6e9 100644 --- a/dcop/dcopidl/yacc.yy +++ b/dcop/dcopidl/yacc.yy @@ -219,7 +219,7 @@ declaration } main T_RIGHT_CURLY_BRACKET opt_semicolon { - int pos = in_namespace.findRev( "::", -3 ); + int pos = in_namespace.tqfindRev( "::", -3 ); if( pos >= 0 ) in_namespace = in_namespace.left( pos + 2 ); else diff --git a/dcop/dcopidl2cpp/main.cpp b/dcop/dcopidl2cpp/main.cpp index 5e0f27525..c0fb786c8 100644 --- a/dcop/dcopidl2cpp/main.cpp +++ b/dcop/dcopidl2cpp/main.cpp @@ -104,11 +104,11 @@ int main( int argc, char** argv ) TQString base( argv[argpos] ); TQString idl = base; - int pos = base.findRev( '.' ); + int pos = base.tqfindRev( '.' ); if ( pos != -1 ) base = base.left( pos ); - pos = idl.findRev('/'); + pos = idl.tqfindRev('/'); if ( pos != -1 ) idl = idl.mid( pos+1 ); @@ -118,7 +118,7 @@ int main( int argc, char** argv ) if ( generate_stub ) { TQString header = base; generateStub( idl, header + "_stub.h", de ); - pos = header.findRev('/'); + pos = header.tqfindRev('/'); if ( pos != -1 ) header = header.mid( pos+1 ); generateStubImpl( idl, header + "_stub.h", base+".h", base + "_stub." + suffix, de); diff --git a/dcop/dcopidl2cpp/skel.cpp b/dcop/dcopidl2cpp/skel.cpp index 5cc30de3e..b3d14fb13 100644 --- a/dcop/dcopidl2cpp/skel.cpp +++ b/dcop/dcopidl2cpp/skel.cpp @@ -92,7 +92,7 @@ void generateSkel( const TQString& idl, const TQString& filename, TQDomElement d TQDomElement n = e.firstChild().toElement(); Q_ASSERT( n.tagName() == "NAME" ); TQString className = n.firstChild().toText().data(); - // find dcop parent ( rightmost super class ) + // tqfind dcop parent ( rightmost super class ) TQString DCOPParent; TQDomElement s = n.nextSibling().toElement(); for( ; !s.isNull(); s = s.nextSibling().toElement() ) { @@ -177,7 +177,7 @@ void generateSkel( const TQString& idl, const TQString& filename, TQDomElement d TQString namespace_tmp = className; str << endl; for(;;) { - int pos = namespace_tmp.find( "::" ); + int pos = namespace_tmp.tqfind( "::" ); if( pos < 0 ) { className = namespace_tmp; break; @@ -223,7 +223,7 @@ void generateSkel( const TQString& idl, const TQString& filename, TQDomElement d str << "\t fdict->insert( " << className << "_ftable[i][1], new int( i ) );" << endl; str << " }" << endl; - str << " int* fp = fdict->find( fun );" << endl; + str << " int* fp = fdict->tqfind( fun );" << endl; str << " switch ( fp?*fp:-1) {" << endl; } s = n.nextSibling().toElement(); diff --git a/dcop/dcopidl2cpp/stub.cpp b/dcop/dcopidl2cpp/stub.cpp index 887945262..ab9165d4e 100644 --- a/dcop/dcopidl2cpp/stub.cpp +++ b/dcop/dcopidl2cpp/stub.cpp @@ -54,7 +54,7 @@ void generateStub( const TQString& idl, const TQString& filename, TQDomElement d str << endl; TQString ifdefstring = idl.upper(); - int pos = idl.findRev( '.' ); + int pos = idl.tqfindRev( '.' ); if ( pos != -1 ) ifdefstring = ifdefstring.left( pos ); @@ -99,7 +99,7 @@ void generateStub( const TQString& idl, const TQString& filename, TQDomElement d n = n.nextSibling().toElement(); } - // find dcop parent ( rightmost super class ) + // tqfind dcop parent ( rightmost super class ) TQString DCOPParent; for( ; !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "SUPER" ) @@ -107,13 +107,13 @@ void generateStub( const TQString& idl, const TQString& filename, TQDomElement d } if( DCOPParent != "DCOPObject" ) { // we need to include the .h file for the base stub - if( all_includes.contains( DCOPParent + ".h" )) + if( all_includes.tqcontains( DCOPParent + ".h" )) str << "#include <" << DCOPParent << "_stub.h>" << endl; - else if( all_includes.contains( DCOPParent.lower() + ".h" )) + else if( all_includes.tqcontains( DCOPParent.lower() + ".h" )) str << "#include <" << DCOPParent.lower() << "_stub.h>" << endl; else {// damn ... let's assume it's the last include TQString stub_h = all_includes.last(); - unsigned int pos = stub_h.find( ".h" ); + unsigned int pos = stub_h.tqfind( ".h" ); if( pos > 0 ) { stub_h = stub_h.remove( pos, 100000 ); str << "#include <" << stub_h << "_stub.h>" << endl; @@ -128,7 +128,7 @@ void generateStub( const TQString& idl, const TQString& filename, TQDomElement d int namespace_count = 0; TQString namespace_tmp = className; for(;;) { - int pos = namespace_tmp.find( "::" ); + int pos = namespace_tmp.tqfind( "::" ); if( pos < 0 ) { className = namespace_tmp; break; diff --git a/dcop/dcopidl2cpp/stubimpl.cpp b/dcop/dcopidl2cpp/stubimpl.cpp index 5cdd2a00d..7e9990e61 100644 --- a/dcop/dcopidl2cpp/stubimpl.cpp +++ b/dcop/dcopidl2cpp/stubimpl.cpp @@ -98,7 +98,7 @@ void generateStubImpl( const TQString& idl, const TQString& header, const TQStri TQString namespace_tmp = className_stub; str << endl; for(;;) { - int pos = namespace_tmp.find( "::" ); + int pos = namespace_tmp.tqfind( "::" ); if( pos < 0 ) { className_stub = namespace_tmp; break; diff --git a/dcop/dcopidl2cpp/type.h b/dcop/dcopidl2cpp/type.h index 2a99c83a9..005a97696 100644 --- a/dcop/dcopidl2cpp/type.h +++ b/dcop/dcopidl2cpp/type.h @@ -10,7 +10,7 @@ static TQString writeType( TQTextStream& str, const TQDomElement& r ) if ( r.hasAttribute( "qleft" ) ) str << r.attribute("qleft") << " "; TQString t = r.firstChild().toText().data(); - t = t.replace( ">>", "> >" ); + t = t.tqreplace( ">>", "> >" ); str << t; if ( r.hasAttribute( "qright" ) ) str << r.attribute("qright") << " "; diff --git a/dcop/dcopidlng/kalyptus b/dcop/dcopidlng/kalyptus index 9a3709fc0..b0f0e1871 100644 --- a/dcop/dcopidlng/kalyptus +++ b/dcop/dcopidlng/kalyptus @@ -67,14 +67,14 @@ $exe = basename $0; @inputqueue = (); @codeqobject = split "\n", <<CODE; public: - virtual QMetaObject *metaObject() const; + virtual QMetaObject *tqmetaObject() const; virtual const char *className() const; virtual void* qt_cast( const char* ); virtual bool qt_invoke( int, QUObject* ); virtual bool qt_emit( int, QUObject* ); virtual bool qt_property( int, int, QVariant* ); static QMetaObject* staticMetaObject(); - QObject* qObject(); + TQObject* qObject(); static QString tr( const char *, const char * = 0 ); static QString trUtf8( const char *, const char * = 0 ); private: @@ -116,7 +116,7 @@ $allowed_k_dcop_accesors_re = join("|", @allowed_k_dcop_accesors); Q_WS_MAC => 'undef', Q_OBJECT => <<'CODE', public: - virtual QMetaObject *metaObject() const; + virtual QMetaObject *tqmetaObject() const; virtual const char *className() const; virtual bool qt_invoke( int, QUObject* ); virtual bool qt_emit( int, QUObject* ); @@ -419,7 +419,7 @@ LOOP: } next if ( $p =~ /^\s*$/s ); # blank lines -# || $p =~ /^\s*Q_OBJECT/ # QObject macro +# || $p =~ /^\s*Q_OBJECT/ # TQObject macro # ); # @@ -514,7 +514,7 @@ sub readCxxCodeBlock return $lastLine if ( $open || $close) && $count == 0; } - # find opening brace + # tqfind opening brace if ( $count == 0 ) { while( $count == 0 ) { $l = readCxxLine(); @@ -529,7 +529,7 @@ sub readCxxCodeBlock $count -= kdocUtil::countReg( $l, "}" ); } - # find associated closing brace + # tqfind associated closing brace while ( $count > 0 ) { $l = readCxxLine(); croak "Confused by unmatched braces" if !defined $l; @@ -1096,8 +1096,8 @@ sub newClass my $access = "private"; $access = "public" if $cNodeType ne "class"; - # try to find an exisiting node, or create a new one - # We need to make the fully-qualified-name otherwise findRef will look + # try to tqfind an exisiting node, or create a new one + # We need to make the fully-qualified-name otherwise tqfindRef will look # for that classname in the global namespace # testcase: class Foo; namespace Bar { class Foo { ... } } my @parents; @@ -1105,7 +1105,7 @@ sub newClass push @parents, $name; my $fullyQualifiedName = join "::", @parents; print "looking for $fullyQualifiedName\n" if($debug); - my $oldnode = kdocAstUtil::findRef( $cNode, $fullyQualifiedName ); + my $oldnode = kdocAstUtil::tqfindRef( $cNode, $fullyQualifiedName ); my $node = defined $oldnode ? $oldnode : Ast::New( $name ); if ( $endTag ne "{" ) { @@ -1344,15 +1344,15 @@ sub newMethod # ALWAYS IGNORE... return undef; - my $node = kdocAstUtil::findRef( $cNode, $class ); + my $node = kdocAstUtil::tqfindRef( $cNode, $class ); if ( !defined $node ) { - # if we couldn't find the name, try again with + # if we couldn't tqfind the name, try again with # all template parameters stripped off: my $strippedClass = $class; $strippedClass =~ s/<[^<>]*>//g; - $node = kdocAstUtil::findRef( $cNode, $strippedClass ); + $node = kdocAstUtil::tqfindRef( $cNode, $strippedClass ); # if still not found: give up if ( !defined $node ) { @@ -1370,7 +1370,7 @@ sub newMethod $class = $globalSpaceClassName; # FIXME - sanitize the naming system? $isGlobalSpace = 1; - my $opsNode = kdocAstUtil::findRef( $cNode, $class ); + my $opsNode = kdocAstUtil::tqfindRef( $cNode, $class ); if (!$opsNode) { # manually create a "GlobalSpace" class $opsNode = Ast::New( $class ); @@ -1468,7 +1468,7 @@ sub newMethod * 1 for enums Adds a property "ParamList" to the method node. - This property contains a list of nodes, one for each parameter. + This property tqcontains a list of nodes, one for each parameter. Each parameter node has the following properties: * ArgType the type of the argument, e.g. const QString& diff --git a/dcop/dcopidlng/kdocAstUtil.pm b/dcop/dcopidlng/kdocAstUtil.pm index ec67ace5f..27f65dd21 100644 --- a/dcop/dcopidlng/kdocAstUtil.pm +++ b/dcop/dcopidlng/kdocAstUtil.pm @@ -17,13 +17,13 @@ use strict; use vars qw/ $depth $refcalls $refiters @noreflist %noref /; sub BEGIN { -# statistics for findRef +# statistics for tqfindRef $depth = 0; $refcalls = 0; $refiters = 0; -# findRef will ignore these words +# tqfindRef will ignore these words @noreflist = qw( const int char long double template unsigned signed float void bool true false uint @@ -35,22 +35,22 @@ sub BEGIN { } -=head2 findRef +=head2 tqfindRef Parameters: root, ident, report-on-fail Returns: node, or undef Given a root node and a fully qualified identifier (:: separated), - this function will try to find a child of the root node that matches + this function will try to tqfind a child of the root node that matches the identifier. =cut -sub findRef +sub tqfindRef { my( $root, $name, $r ) = @_; - confess "findRef: no name" if !defined $name || $name eq ""; + confess "tqfindRef: no name" if !defined $name || $name eq ""; $name =~ s/\s+//g; return undef if exists $noref{ $name }; @@ -65,7 +65,7 @@ sub findRef # Upward search for the first token return undef if !defined $iter; - while ( !defined findIn( $root, $iter ) ) { + while ( !defined tqfindIn( $root, $iter ) ) { return undef if !defined $root->{Parent}; $root = $root->{Parent}; } @@ -77,8 +77,8 @@ sub findRef confess "iter in $name is undefined\n" if !defined $iter; next if $iter =~ /^\s*$/; - unless ( defined findIn( $root, $iter ) ) { - confess "findRef: failed on '$name' at '$iter'\n" + unless ( defined tqfindIn( $root, $iter ) ) { + confess "tqfindRef: failed on '$name' at '$iter'\n" if defined $r; return undef; } @@ -90,13 +90,13 @@ sub findRef return $root; } -=head2 findIn +=head2 tqfindIn node, name: search for a child =cut -sub findIn +sub tqfindIn { return undef unless defined $_[0]->{KidHash}; @@ -147,7 +147,7 @@ ANITER: next ANITER; } - my $ref = kdocAstUtil::findRef( $rnode, + my $ref = kdocAstUtil::tqfindRef( $rnode, $in->{astNodeName} ); if( !defined $ref ) { @@ -302,16 +302,16 @@ sub allMembers } } -=head2 findOverride +=head2 tqfindOverride Parameters: root, node, name Looks for nodes of the same name as the parameter, in its parent - and the parent's ancestors. It returns a node if it finds one. + and the parent's ancestors. It returns a node if it tqfinds one. =cut -sub findOverride +sub tqfindOverride { my ( $root, $node, $name ) = @_; return undef if !exists $node->{InList}; @@ -325,7 +325,7 @@ sub findOverride return $n if defined $ref && $ref->{NodeType} eq "method"; if ( exists $n->{InList} ) { - $ref = findOverride( $root, $n, $name ); + $ref = tqfindOverride( $root, $n, $name ); return $ref if defined $ref; } } @@ -464,14 +464,14 @@ sub testRef { my $rootNode = $_[ 0 ]; - my $term = new Term::ReadLine 'Testing findRef'; + my $term = new Term::ReadLine 'Testing tqfindRef'; my $OUT = $term->OUT || *STDOUT{IO}; my $prompt = "Identifier: "; while( defined ($_ = $term->readline($prompt)) ) { - my $node = kdocAstUtil::findRef( $rootNode, $_ ); + my $node = kdocAstUtil::tqfindRef( $rootNode, $_ ); if( defined $node ) { print $OUT "Reference: '", $node->{astNodeName}, @@ -487,7 +487,7 @@ sub testRef { sub printDebugStats { - print "findRef: ", $refcalls, " calls, ", + print "tqfindRef: ", $refcalls, " calls, ", $refiters, " iterations.\n"; } diff --git a/dcop/dcopidlng/kdocUtil.pm b/dcop/dcopidlng/kdocUtil.pm index 629147ac3..e83359724 100644 --- a/dcop/dcopidlng/kdocUtil.pm +++ b/dcop/dcopidlng/kdocUtil.pm @@ -30,7 +30,7 @@ sub countReg return $count; } -=head2 findCommonPrefix +=head2 tqfindCommonPrefix Parameters: string, string @@ -39,7 +39,7 @@ sub countReg =cut -sub findCommonPrefix +sub tqfindCommonPrefix { my @s1 = split( "/", $_[0] ); my @s2 = split( "/", $_[1] ); @@ -72,7 +72,7 @@ sub makeRelativePath $from .= '/' unless $from =~ m#/$#; $to .= '/' unless $to =~ m#/$#; - my $pfx = findCommonPrefix( $from, $to ); + my $pfx = tqfindCommonPrefix( $from, $to ); if ( $pfx ne "" ) { $from =~ s/^$pfx//g; diff --git a/dcop/dcopobject.cpp b/dcop/dcopobject.cpp index fd39fb347..c686b79d7 100644 --- a/dcop/dcopobject.cpp +++ b/dcop/dcopobject.cpp @@ -58,7 +58,7 @@ DCOPObject::DCOPObject(TQObject *obj) while (currentObj != 0L) { ident.prepend( currentObj->name() ); ident.prepend("/"); - currentObj = currentObj->parent(); + currentObj = currentObj->tqparent(); } if ( ident[0] == '/' ) ident = ident.mid(1); @@ -97,7 +97,7 @@ void DCOPObject::setCallingDcopClient(DCOPClient *client) bool DCOPObject::setObjId(const TQCString &objId) { - if (objMap()->find(objId)!=objMap()->end()) return false; + if (objMap()->tqfind(objId)!=objMap()->end()) return false; DCOPClient *client = DCOPClient::mainClient(); if ( d->m_signalConnections > 0 && client ) @@ -116,16 +116,16 @@ TQCString DCOPObject::objId() const bool DCOPObject::hasObject(const TQCString &_objId) { - if (objMap()->contains(_objId)) + if (objMap()->tqcontains(_objId)) return true; else return false; } -DCOPObject *DCOPObject::find(const TQCString &_objId) +DCOPObject *DCOPObject::tqfind(const TQCString &_objId) { TQMap<TQCString, DCOPObject *>::ConstIterator it; - it = objMap()->find(_objId); + it = objMap()->tqfind(_objId); if (it != objMap()->end()) return *it; else @@ -155,7 +155,7 @@ TQCString DCOPObject::objectName( TQObject* obj ) { identity.prepend( currentObj->name() ); identity.prepend("/"); - currentObj = currentObj->parent(); + currentObj = currentObj->tqparent(); } if ( identity[0] == '/' ) identity = identity.mid(1); diff --git a/dcop/dcopobject.h b/dcop/dcopobject.h index 2040379b2..d1f19ccb4 100644 --- a/dcop/dcopobject.h +++ b/dcop/dcopobject.h @@ -299,16 +299,16 @@ public: static bool hasObject(const TQCString &objId); /** - * Try to find a dcop object with the given id. + * Try to tqfind a dcop object with the given id. * This function does not query the DCOPObjectProxy. * @param objId the object id to search * @return the DCOPObject for the id @p objId. */ - static DCOPObject *find(const TQCString &objId); + static DCOPObject *tqfind(const TQCString &objId); /** - * Tries to find an object using a partial object id. + * Tries to tqfind an object using a partial object id. * This function is used for multicasting a DCOP message to * several objects inside a single process. * diff --git a/dcop/dcopref.cpp b/dcop/dcopref.cpp index bb39c109b..c446eb0ee 100644 --- a/dcop/dcopref.cpp +++ b/dcop/dcopref.cpp @@ -62,9 +62,9 @@ DCOPReply DCOPRef::callInternal( const TQCString& fun, const TQCString& args, co return reply; } TQCString sig = fun; - if ( fun.find('(') == -1 ) { + if ( fun.tqfind('(') == -1 ) { sig += args; - if( args.find( "<unknown" ) != -1 ) + if( args.tqfind( "<unknown" ) != -1 ) qWarning("DCOPRef: unknown type error " "<\"%s\",\"%s\">::call(\"%s\",%s", STR(m_app), STR(m_obj), STR(fun), args.data()+1 ); @@ -87,9 +87,9 @@ bool DCOPRef::sendInternal( const TQCString& fun, const TQCString& args, const T } Q_UNUSED( data ); TQCString sig = fun; - if ( fun.find('(') == -1 ) { + if ( fun.tqfind('(') == -1 ) { sig += args; - if( args.find( "<unknown" ) != -1 ) + if( args.tqfind( "<unknown" ) != -1 ) qWarning("DCOPRef: unknown type error " "<\"%s\",\"%s\">::send(\"%s\",%s", STR(m_app), STR(m_obj), STR(fun), args.data()+1 ); diff --git a/dcop/dcopref.h b/dcop/dcopref.h index 92cb921bb..c7fa69822 100644 --- a/dcop/dcopref.h +++ b/dcop/dcopref.h @@ -396,7 +396,7 @@ public: * Flag for allowing entering the event loop if the call blocks too long. * @p NoEventLoop disables entering the event loop. * @p UseEventLoop allows entering the event loop while waiting for long - * blocking DCOP call, thus making the GUI repaint if needed, and possibly + * blocking DCOP call, thus making the GUI tqrepaint if needed, and possibly * allowing also other code in the application to be executed. * @see DCOPClient::call() */ diff --git a/dcop/dcopserver.cpp b/dcop/dcopserver.cpp index 41a639b2e..11ef834e3 100644 --- a/dcop/dcopserver.cpp +++ b/dcop/dcopserver.cpp @@ -82,7 +82,7 @@ template class TQPtrList<DCOPListener>; #define _DCOPIceSendEnd() \ fcntl(fd, F_SETFL, fd_fl); -static TQCString findDcopserverShutdown() +static TQCString tqfindDcopserverShutdown() { #ifdef Q_OS_WIN32 char szPath[512]; @@ -124,9 +124,9 @@ void DCOPIceWriteChar(register IceConn iceConn, unsigned long nbytes, char *ptr) static TQCString readQCString(TQDataStream &ds) { TQCString result; - Q_UINT32 len; + TQ_UINT32 len; ds >> len; - TQIODevice *device = ds.device(); + TQIODevice *device = ds.tqdevice(); int bytesLeft = device->size()-device->at(); if ((bytesLeft < 0 ) || (len > (uint) bytesLeft)) { @@ -142,9 +142,9 @@ static TQCString readQCString(TQDataStream &ds) static TQByteArray readQByteArray(TQDataStream &ds) { TQByteArray result; - Q_UINT32 len; + TQ_UINT32 len; ds >> len; - TQIODevice *device = ds.device(); + TQIODevice *device = ds.tqdevice(); int bytesLeft = device->size()-device->at(); if ((bytesLeft < 0 ) || (len > (uint) bytesLeft)) { @@ -238,7 +238,7 @@ static unsigned long writeIceData(IceConn iceConn, unsigned long nbytes, char *p void DCOPIceWriteChar(register IceConn iceConn, unsigned long nbytes, char *ptr) { - DCOPConnection* conn = the_server->findConn( iceConn ); + DCOPConnection* conn = the_server->tqfindConn( iceConn ); #ifdef DCOP_DEBUG qWarning("DCOPServer: DCOPIceWriteChar() Writing %d bytes to %d [%s]", nbytes, fd, conn ? conn->appId.data() : "<unknown>"); #endif @@ -270,7 +270,7 @@ qWarning("DCOPServer: _IceWrite() outputBlocked. Queuing %d bytes.", _data.size( static void DCOPIceWrite(IceConn iceConn, const TQByteArray &_data) { - DCOPConnection* conn = the_server->findConn( iceConn ); + DCOPConnection* conn = the_server->tqfindConn( iceConn ); #ifdef DCOP_DEBUG qWarning("DCOPServer: DCOPIceWrite() Writing %d bytes to %d [%s]", _data.size(), fd, conn ? conn->appId.data() : "<unknown>"); #endif @@ -287,7 +287,7 @@ qWarning("DCOPServer: DCOPIceWrite() outputBlocked. Queuing %d bytes.", _data.si // assert(conn->outputBuffer.isEmpty()); } - unsigned long nleft = writeIceData(iceConn, _data.size(), _data.data()); + unsigned long nleft = writeIceData(iceConn, _data.size(), const_cast<TQByteArray&>(_data).data()); if ((nleft > 0) && conn) { conn->waitForOutputReady(_data, _data.size() - nleft); @@ -319,7 +319,7 @@ void DCOPServer::slotOutputReady(int socket) qWarning("DCOPServer: slotOutputReady fd = %d", socket); #endif // Find out connection. - DCOPConnection *conn = fd_clients.find(socket); + DCOPConnection *conn = fd_clients.tqfind(socket); //assert(conn); //assert(conn->outputBlocked); //assert(conn->socket() == socket); @@ -396,7 +396,7 @@ qWarning("DCOPServer: Flushing data, fd = %d", IceConnectionNumber(_iceConn)); DCOPIceWrite(_iceConn, _data); } -class DCOPListener : public QSocketNotifier +class DCOPListener : public TQSocketNotifier { public: DCOPListener( IceListenObj obj ) @@ -487,7 +487,7 @@ write_iceauth (FILE *addfp, IceAuthDataEntry *entry) SUFFIX_LEN tells us how long <suffix> is (it can be zero length). The last six characters of TEMPLATE before <suffix> must be "XXXXXX"; - they are replaced with a string that makes the filename unique. + they are tqreplaced with a string that makes the filename unique. Returns a file descriptor open on the file for reading and writing. */ @@ -535,7 +535,7 @@ int mkstemps (char* _template, int suffix_len) with (module 2^32). */ value += 7777; } - /* We return the null string if we can't find a unique file name. */ + /* We return the null string if we can't tqfind a unique file name. */ _template[0] = '\0'; return -1; } @@ -710,7 +710,7 @@ void DCOPProcessMessage( IceConn iceConn, IcePointer /*clientData*/, void DCOPServer::processMessage( IceConn iceConn, int opcode, unsigned long length, Bool /*swap*/) { - DCOPConnection* conn = clients.find( iceConn ); + DCOPConnection* conn = clients.tqfind( iceConn ); if ( !conn ) { qWarning("DCOPServer::processMessage message from unknown connection. [opcode = %d]", opcode); return; @@ -728,7 +728,7 @@ void DCOPServer::processMessage( IceConn iceConn, int opcode, TQCString fromApp = readQCString(ds); TQCString toApp = readQCString(ds); - DCOPConnection* target = findApp( toApp ); + DCOPConnection* target = tqfindApp( toApp ); int datalen = ba.size(); if ( opcode == DCOPReplyDelayed ) { if ( !target ) @@ -805,7 +805,7 @@ if (opcode == DCOPSend) TQDataStream ds( ba, IO_ReadOnly ); TQCString fromApp = readQCString(ds); TQCString toApp = readQCString(ds); - DCOPConnection* target = findApp( toApp ); + DCOPConnection* target = tqfindApp( toApp ); int datalen = ba.size(); if ( target ) { @@ -888,7 +888,7 @@ if (opcode == DCOPCall) TQCString fromApp = readQCString(ds); TQCString toApp = readQCString(ds); - DCOPConnection* connreply = findApp( toApp ); + DCOPConnection* connreply = tqfindApp( toApp ); int datalen = ba.size(); if ( !connreply ) @@ -1090,7 +1090,7 @@ DCOPServer::DCOPServer(bool _suicide) DCOPServer::~DCOPServer() { - system(findDcopserverShutdown()+" --nokill"); + system(tqfindDcopserverShutdown()+" --nokill"); IceFreeListenObjs(numTransports, listenObjs); FreeAuthenticationData(numTransports, authDataEntries); delete dcopSignals; @@ -1105,11 +1105,11 @@ DCOPServer::~DCOPServer() #endif } -DCOPConnection* DCOPServer::findApp( const TQCString& appId ) +DCOPConnection* DCOPServer::tqfindApp( const TQCString& appId ) { if ( appId.isNull() ) return 0; - DCOPConnection* conn = appIds.find( appId ); + DCOPConnection* conn = appIds.tqfind( appId ); return conn; } @@ -1204,7 +1204,7 @@ void DCOPServer::removeConnection( void* data ) while (!conn->waitingForReply.isEmpty()) { IceConn iceConn = conn->waitingForReply.take(0); if (iceConn) { - DCOPConnection* target = clients.find( iceConn ); + DCOPConnection* target = clients.tqfind( iceConn ); qWarning("DCOP aborting call from '%s' to '%s'", target ? target->appId.data() : "<unknown>" , conn->appId.data() ); TQByteArray reply; DCOPMsg *pMsg; @@ -1226,7 +1226,7 @@ void DCOPServer::removeConnection( void* data ) while (!conn->waitingForDelayedReply.isEmpty()) { IceConn iceConn = conn->waitingForDelayedReply.take(0); if (iceConn) { - DCOPConnection* target = clients.find( iceConn ); + DCOPConnection* target = clients.tqfind( iceConn ); qWarning("DCOP aborting (delayed) call from '%s' to '%s'", target ? target->appId.data() : "<unknown>", conn->appId.data() ); TQByteArray reply; DCOPMsg *pMsg; @@ -1247,7 +1247,7 @@ void DCOPServer::removeConnection( void* data ) { IceConn iceConn = conn->waitingOnReply.take(0); if (iceConn) { - DCOPConnection* target = clients.find( iceConn ); + DCOPConnection* target = clients.tqfind( iceConn ); if (!target) { qWarning("DCOP Error: still waiting for answer from non-existing client."); @@ -1295,7 +1295,7 @@ void DCOPServer::slotTerminate() dcopSignals->emitSignal(0L /* dcopserver */, "terminateKDE()", data, false); disconnect( m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTerminate()) ); connect( m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotSuicide()) ); - system(findDcopserverShutdown()+" --nokill"); + system(tqfindDcopserverShutdown()+" --nokill"); } void DCOPServer::slotSuicide() @@ -1359,7 +1359,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj, if ( obj == "emit") { - DCOPConnection* conn = clients.find( iceConn ); + DCOPConnection* conn = clients.tqfind( iceConn ); if (conn) { //qDebug("DCOPServer: %s emits %s", conn->appId.data(), fun.data()); dcopSignals->emitSignal(conn, fun, data, false); @@ -1370,13 +1370,13 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj, if ( fun == "setDaemonMode(bool)" ) { TQDataStream args( data, IO_ReadOnly ); if ( !args.atEnd() ) { - Q_INT8 iDaemon; + TQ_INT8 iDaemon; bool daemon; args >> iDaemon; daemon = static_cast<bool>( iDaemon ); - DCOPConnection* conn = clients.find( iceConn ); + DCOPConnection* conn = clients.tqfind( iceConn ); if ( conn && !conn->appId.isNull() ) { if ( daemon ) { if ( !conn->daemon ) @@ -1414,10 +1414,10 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj, if (!args.atEnd()) { TQCString app2 = readQCString(args); TQDataStream reply( replyData, IO_WriteOnly ); - DCOPConnection* conn = clients.find( iceConn ); + DCOPConnection* conn = clients.tqfind( iceConn ); if ( conn && !app2.isEmpty() ) { if ( !conn->appId.isNull() && - appIds.find( conn->appId ) == conn ) { + appIds.tqfind( conn->appId ) == conn ) { appIds.remove( conn->appId ); } @@ -1440,7 +1440,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj, #endif conn->appId = app2; - if ( appIds.find( app2 ) != 0 ) { + if ( appIds.tqfind( app2 ) != 0 ) { // we already have this application, unify int n = 1; TQCString tmp; @@ -1449,12 +1449,12 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj, tmp.setNum( n ); tmp.prepend("-"); tmp.prepend( app2 ); - } while ( appIds.find( tmp ) != 0 ); + } while ( appIds.tqfind( tmp ) != 0 ); conn->appId = tmp; } appIds.insert( conn->appId, conn ); - int c = conn->appId.find( '-' ); + int c = conn->appId.tqfind( '-' ); if ( c > 0 ) conn->plainAppId = conn->appId.left( c ); else @@ -1486,7 +1486,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj, if (!args.atEnd()) { TQCString s = readQCString(args); TQDataStream reply( replyData, IO_WriteOnly ); - int b = ( findApp( s ) != 0 ); + int b = ( tqfindApp( s ) != 0 ); replyType = "bool"; reply << b; return true; @@ -1494,9 +1494,9 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj, } else if ( fun == "setNotifications(bool)" ) { TQDataStream args( data, IO_ReadOnly ); if (!args.atEnd()) { - Q_INT8 notifyActive; + TQ_INT8 notifyActive; args >> notifyActive; - DCOPConnection* conn = clients.find( iceConn ); + DCOPConnection* conn = clients.tqfind( iceConn ); if ( conn ) { if ( notifyActive ) conn->notifyRegister++; @@ -1507,7 +1507,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj, return true; } } else if ( fun == "connectSignal(TQCString,TQCString,TQCString,TQCString,TQCString,bool)") { - DCOPConnection* conn = clients.find( iceConn ); + DCOPConnection* conn = clients.tqfind( iceConn ); if (!conn) return false; TQDataStream args(data, IO_ReadOnly ); if (args.atEnd()) return false; @@ -1516,16 +1516,16 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj, TQCString signal = readQCString(args); TQCString receiverObj = readQCString(args); TQCString slot = readQCString(args); - Q_INT8 Volatile; + TQ_INT8 Volatile; args >> Volatile; //qDebug("DCOPServer: connectSignal(sender = %s senderObj = %s signal = %s recvObj = %s slot = %s)", sender.data(), senderObj.data(), signal.data(), receiverObj.data(), slot.data()); bool b = dcopSignals->connectSignal(sender, senderObj, signal, conn, receiverObj, slot, (Volatile != 0)); replyType = "bool"; TQDataStream reply( replyData, IO_WriteOnly ); - reply << (Q_INT8) (b?1:0); + reply << (TQ_INT8) (b?1:0); return true; } else if ( fun == "disconnectSignal(TQCString,TQCString,TQCString,TQCString,TQCString)") { - DCOPConnection* conn = clients.find( iceConn ); + DCOPConnection* conn = clients.tqfind( iceConn ); if (!conn) return false; TQDataStream args(data, IO_ReadOnly ); if (args.atEnd()) return false; @@ -1538,7 +1538,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj, bool b = dcopSignals->disconnectSignal(sender, senderObj, signal, conn, receiverObj, slot); replyType = "bool"; TQDataStream reply( replyData, IO_WriteOnly ); - reply << (Q_INT8) (b?1:0); + reply << (TQ_INT8) (b?1:0); return true; } @@ -1618,7 +1618,7 @@ static bool isRunning(const TQCString &fName, bool printNetworkId = false) TQCString contents( size+1 ); bool ok = f.readBlock( contents.data(), size ) == size; contents[size] = '\0'; - int pos = contents.find('\n'); + int pos = contents.tqfind('\n'); ok = ok && ( pos != -1 ); pid_t pid = ok ? contents.mid(pos+1).toUInt(&ok) : 0; f.close(); @@ -1739,7 +1739,7 @@ extern "C" DCOP_EXPORT int kdemain( int argc, char* argv[] ) return 0; } qWarning("DCOPServer self-test failed."); - system(findDcopserverShutdown()+" --kill"); + system(tqfindDcopserverShutdown()+" --kill"); return 1; } close(ready[0]); diff --git a/dcop/dcopserver.h b/dcop/dcopserver.h index 7b649ccf2..1373c2a03 100644 --- a/dcop/dcopserver.h +++ b/dcop/dcopserver.h @@ -66,7 +66,7 @@ typedef TQValueList<TQCString> QCStringList; /** * @internal */ -class DCOPConnection : public QSocketNotifier +class DCOPConnection : public TQSocketNotifier { public: DCOPConnection( IceConn conn ); @@ -88,11 +88,11 @@ public: int notifyRegister; /** * When client A has called client B then for the duration of the call: - * A->waitingOnReply contains B + * A->waitingOnReply tqcontains B * and either - * B->waitingForReply contains A + * B->waitingForReply tqcontains A * or - * B->waitingForDelayedReply contains A + * B->waitingForDelayedReply tqcontains A * * This allows us to do proper bookkeeping in case client A, client B * or both unregister during the call. @@ -112,7 +112,7 @@ public: /** * @internal */ -class DCOPServer : public QObject +class DCOPServer : public TQObject { Q_OBJECT public: @@ -128,9 +128,9 @@ public: const TQCString &fun, const TQByteArray& data, TQCString& replyType, TQByteArray &replyData, IceConn iceConn); - DCOPConnection *findApp(const TQCString &appId); - DCOPConnection *findConn(IceConn iceConn) - { return clients.find(iceConn); } + DCOPConnection *tqfindApp(const TQCString &appId); + DCOPConnection *tqfindConn(IceConn iceConn) + { return clients.tqfind(iceConn); } void sendMessage(DCOPConnection *conn, const TQCString &sApp, const TQCString &rApp, const TQCString &rObj, diff --git a/dcop/dcopserver_win.cpp b/dcop/dcopserver_win.cpp index 4e6bc5e9f..7f06e287f 100644 --- a/dcop/dcopserver_win.cpp +++ b/dcop/dcopserver_win.cpp @@ -52,7 +52,7 @@ BOOL WINAPI DCOPServer::dcopServerConsoleProc(DWORD dwCtrlType) case CTRL_LOGOFF_EVENT: case CTRL_SHUTDOWN_EVENT: case CTRL_C_EVENT: - system(findDcopserverShutdown()+" --nokill"); + system(tqfindDcopserverShutdown()+" --nokill"); ret = TRUE; break; default: diff --git a/dcop/dcopsignals.cpp b/dcop/dcopsignals.cpp index 437051a55..e9f1af9aa 100644 --- a/dcop/dcopsignals.cpp +++ b/dcop/dcopsignals.cpp @@ -39,14 +39,14 @@ DCOPSignals::emitSignal( DCOPConnection *conn, const TQCString &_fun, const TQBy { TQCString senderObj; TQCString fun = _fun; - int i = fun.find('#'); + int i = fun.tqfind('#'); if (i > -1) { senderObj = fun.left(i); fun = fun.mid(i+1); } - DCOPSignalConnectionList *list = connections.find(fun); + DCOPSignalConnectionList *list = connections.tqfind(fun); if (!list) return; for(DCOPSignalConnection *current = list->first(); current; current = list->next()) { @@ -102,16 +102,16 @@ DCOPSignals::connectSignal( const TQCString &sender, const TQCString &senderObj, // TODO: Check if signal and slot match TQCString signalArgs, slotArgs; int i,j; - i = signal.find('('); + i = signal.tqfind('('); if (i < 0) return false; signalArgs = signal.mid(i+1); - j = signalArgs.find(')'); + j = signalArgs.tqfind(')'); if (j < 0) return false; signalArgs.truncate(j); - i = slot.find('('); + i = slot.tqfind('('); if (i < 0) return false; slotArgs = slot.mid(i+1); - j = slotArgs.find(')'); + j = slotArgs.tqfind(')'); if (j < 0) return false; slotArgs.truncate(j); @@ -129,7 +129,7 @@ DCOPSignals::connectSignal( const TQCString &sender, const TQCString &senderObj, DCOPConnection *senderConn = 0; if (Volatile) { - senderConn = the_server->findApp(sender); + senderConn = the_server->tqfindApp(sender); if (!senderConn) return false; // Sender does not exist. } @@ -142,7 +142,7 @@ DCOPSignals::connectSignal( const TQCString &sender, const TQCString &senderObj, current->recvObj = receiverObj; current->slot = slot; - DCOPSignalConnectionList *list = connections.find(signal); + DCOPSignalConnectionList *list = connections.tqfind(signal); if (!list) { list = new DCOPSignalConnectionList; @@ -177,7 +177,7 @@ DCOPSignals::disconnectSignal( const TQCString &sender, const TQCString &senderO return true; } - DCOPSignalConnectionList *list = connections.find(signal); + DCOPSignalConnectionList *list = connections.tqfind(signal); if (!list) return false; // Not found... @@ -255,7 +255,7 @@ DCOPSignals::removeConnections(DCOPConnection *conn, const TQCString &obj) if (current->recvConn != conn) current->recvConn->signalConnectionList()->removeRef(current); - DCOPSignalConnectionList *signalList = connections.find(current->signal); + DCOPSignalConnectionList *signalList = connections.tqfind(current->signal); if (signalList) { signalList->removeRef(current); diff --git a/dcop/dcopstub.cpp b/dcop/dcopstub.cpp index 903ed0bc5..5f046aa45 100644 --- a/dcop/dcopstub.cpp +++ b/dcop/dcopstub.cpp @@ -64,12 +64,12 @@ DCOPClient* DCOPStub::dcopClient() return DCOPClient::mainClient(); } -DCOPStub::Status DCOPStub::status() const +DCOPStub::tqStatus DCOPStub::status() const { return m_status; } -void DCOPStub::setStatus( Status _status ) +void DCOPStub::setStatus( tqStatus _status ) { m_status = _status; } diff --git a/dcop/dcopstub.h b/dcop/dcopstub.h index df55e0f72..a60220f59 100644 --- a/dcop/dcopstub.h +++ b/dcop/dcopstub.h @@ -75,7 +75,7 @@ public: */ TQCString obj() const; - enum Status{ CallSucceeded, CallFailed }; + enum tqStatus{ CallSucceeded, CallFailed }; /** * Return the status of the last call, either @p CallSucceeded or * @p CallFailed. @@ -83,7 +83,7 @@ public: * @return the status of the last call * @see ok(); */ - Status status() const; + tqStatus status() const; /** @@ -101,7 +101,7 @@ protected: @param _status the new status @see status() */ - void setStatus( Status _status ); + void setStatus( tqStatus _status ); /** Invoked whenever a call fails. The default implementation @@ -134,7 +134,7 @@ protected: private: TQCString m_app; TQCString m_obj; - Status m_status; + tqStatus m_status; protected: virtual void virtual_hook( int id, void* data ); diff --git a/dcop/kdatastream.h b/dcop/kdatastream.h index de85ebb47..6551295f6 100644 --- a/dcop/kdatastream.h +++ b/dcop/kdatastream.h @@ -6,13 +6,13 @@ #ifdef USE_QT3 inline TQDataStream & operator << (TQDataStream & str, bool b) { - str << Q_INT8(b); + str << TQ_INT8(b); return str; } inline TQDataStream & operator >> (TQDataStream & str, bool & b) { - Q_INT8 l; + TQ_INT8 l; str >> l; b = bool(l); return str; @@ -22,7 +22,7 @@ inline TQDataStream & operator >> (TQDataStream & str, bool & b) #if QT_VERSION < 0x030200 && !defined(Q_WS_WIN) && !defined(Q_WS_MAC) inline TQDataStream & operator << (TQDataStream & str, long long int ll) { - Q_UINT32 l1,l2; + TQ_UINT32 l1,l2; l1 = ll & 0xffffffffLL; l2 = ll >> 32; str << l1 << l2; @@ -31,7 +31,7 @@ inline TQDataStream & operator << (TQDataStream & str, long long int ll) inline TQDataStream & operator >> (TQDataStream & str, long long int&ll) { - Q_UINT32 l1,l2; + TQ_UINT32 l1,l2; str >> l1 >> l2; ll = ((unsigned long long int)(l2) << 32) + (long long int) l1; return str; @@ -39,7 +39,7 @@ inline TQDataStream & operator >> (TQDataStream & str, long long int&ll) inline TQDataStream & operator << (TQDataStream & str, unsigned long long int ll) { - Q_UINT32 l1,l2; + TQ_UINT32 l1,l2; l1 = ll & 0xffffffffLL; l2 = ll >> 32; str << l1 << l2; @@ -48,7 +48,7 @@ inline TQDataStream & operator << (TQDataStream & str, unsigned long long int ll inline TQDataStream & operator >> (TQDataStream & str, unsigned long long int &ll) { - Q_UINT32 l1,l2; + TQ_UINT32 l1,l2; str >> l1 >> l2; ll = ((unsigned long long int)(l2) << 32) + (unsigned long long int) l1; return str; diff --git a/dcop/testdcop.cpp b/dcop/testdcop.cpp index e43b41c31..ce30f0076 100644 --- a/dcop/testdcop.cpp +++ b/dcop/testdcop.cpp @@ -248,23 +248,23 @@ int main(int argc, char **argv) // Find a object called "object1" in any application that // meets the criteria "canLaunchRockets()" -// bool boolResult = client->findObject( "", "object1", "canLaunchRockets()", data, foundApp, foundObj); -// qDebug("findObject: result = %s, %s, %s\n", boolResult ? "true" : "false", +// bool boolResult = client->tqfindObject( "", "object1", "canLaunchRockets()", data, foundApp, foundObj); +// qDebug("tqfindObject: result = %s, %s, %s\n", boolResult ? "true" : "false", // foundApp.data(), foundObj.data()); // Find an application that matches with "konqueror*" - bool boolResult = client->findObject( "konqueror*", "", "", data, foundApp, foundObj); - qDebug("findObject: result = %s, %s, %s\n", boolResult ? "true" : "false", + bool boolResult = client->tqfindObject( "konqueror*", "", "", data, foundApp, foundObj); + qDebug("tqfindObject: result = %s, %s, %s\n", boolResult ? "true" : "false", foundApp.data(), foundObj.data()); // Find an object called "object1" in any application. - boolResult = client->findObject( "", "ksycoca", "", data, foundApp, foundObj); - qDebug("findObject: result = %s, %s, %s\n", boolResult ? "true" : "false", + boolResult = client->tqfindObject( "", "ksycoca", "", data, foundApp, foundObj); + qDebug("tqfindObject: result = %s, %s, %s\n", boolResult ? "true" : "false", foundApp.data(), foundObj.data()); // Find ourselves in any application. - boolResult = client->findObject( "testdcop", "ksycoca", "", data, foundApp, foundObj); - qDebug("findObject: result = %s, %s, %s\n", boolResult ? "true" : "false", + boolResult = client->tqfindObject( "testdcop", "ksycoca", "", data, foundApp, foundObj); + qDebug("tqfindObject: result = %s, %s, %s\n", boolResult ? "true" : "false", foundApp.data(), foundObj.data()); DCOPClient *client2 = new DCOPClient(); @@ -287,8 +287,8 @@ qDebug("Calling countDown() in object1"); qDebug("return type was '%s'", replyType.data() ); // Find ourselves in any application. - boolResult = client2->findObject( "testdcop", "object1", "", data, foundApp, foundObj); - qDebug("findObject: result = %s, %s, %s\n", boolResult ? "true" : "false", + boolResult = client2->tqfindObject( "testdcop", "object1", "", data, foundApp, foundObj); + qDebug("tqfindObject: result = %s, %s, %s\n", boolResult ? "true" : "false", foundApp.data(), foundObj.data()); client->detach(); diff --git a/dcop/testdcop.h b/dcop/testdcop.h index 135812e39..936632b55 100644 --- a/dcop/testdcop.h +++ b/dcop/testdcop.h @@ -35,13 +35,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <stdio.h> /** - $QTDIR/bin/moc testdcop.cpp -o testdcop.moc + $QTDIR/bin/tqmoc testdcop.cpp -o testdcop.moc g++ -o testdcop testdcop.cpp -I$QTDIR/include -L$QTDIR/lib @internal **/ -class TestObject : public QObject +class TestObject : public TQObject { Q_OBJECT public: diff --git a/dcop/tests/testcases b/dcop/tests/testcases index 0f16bdbe3..e9ba94919 100644 --- a/dcop/tests/testcases +++ b/dcop/tests/testcases @@ -19,7 +19,7 @@ # 2. First you put shell like argument: # "string with spaces" 4 string_without_spaces # Then you should put c++ style arguments: -# QString::fromLatin1("string with spaces"),4,"string_with_spaces" +# QString::tqfromLatin1("string with spaces"),4,"string_with_spaces" # # Note that the first argument has type QString and the last type const char* # (adapt accordingly) @@ -29,7 +29,7 @@ QString url () { -return QString::fromLatin1( "http://www.kde.org/"); +return QString::tqfromLatin1( "http://www.kde.org/"); } - @@ -63,7 +63,7 @@ identity { return x; } -"test";QString::fromLatin1("test") +"test";QString::tqfromLatin1("test") // 2.3 unsigned long int unsigned long int |