summaryrefslogtreecommitdiffstats
path: root/dcop
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /dcop
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'dcop')
-rw-r--r--dcop/client/dcop.cpp136
-rw-r--r--dcop/client/dcopfind.cpp62
-rw-r--r--dcop/client/dcopstart.cpp30
-rw-r--r--dcop/client/marshall.cpp148
-rw-r--r--dcop/dcop_deadlock_test.cpp30
-rw-r--r--dcop/dcop_deadlock_test.h16
-rw-r--r--dcop/dcopc.c8
-rw-r--r--dcop/dcopclient.cpp622
-rw-r--r--dcop/dcopclient.h172
-rw-r--r--dcop/dcopidl/dcopidl_test.h18
-rw-r--r--dcop/dcopidl/main.cpp10
-rw-r--r--dcop/dcopidl/scanner.cc20
-rw-r--r--dcop/dcopidl/yacc.cc126
-rw-r--r--dcop/dcopidl/yacc.cc.h2
-rw-r--r--dcop/dcopidl2cpp/dcopidl_test.h60
-rw-r--r--dcop/dcopidl2cpp/main.cpp22
-rw-r--r--dcop/dcopidl2cpp/main.h10
-rw-r--r--dcop/dcopidl2cpp/skel.cpp120
-rw-r--r--dcop/dcopidl2cpp/stub.cpp48
-rw-r--r--dcop/dcopidl2cpp/stubimpl.cpp70
-rw-r--r--dcop/dcopidl2cpp/type.h8
-rw-r--r--dcop/dcopobject.cpp76
-rw-r--r--dcop/dcopobject.h74
-rw-r--r--dcop/dcopref.cpp36
-rw-r--r--dcop/dcopref.h352
-rw-r--r--dcop/dcopserver.cpp298
-rw-r--r--dcop/dcopserver.h76
-rw-r--r--dcop/dcopserver_shutdown.c4
-rw-r--r--dcop/dcopserver_shutdown_win.cpp20
-rw-r--r--dcop/dcopserver_win.cpp4
-rw-r--r--dcop/dcopsignals.cpp30
-rw-r--r--dcop/dcopsignals.h42
-rw-r--r--dcop/dcopstub.cpp8
-rw-r--r--dcop/dcopstub.h14
-rw-r--r--dcop/dcoptypes.h54
-rw-r--r--dcop/kdatastream.h14
-rw-r--r--dcop/testdcop.cpp112
-rw-r--r--dcop/testdcop.h26
-rw-r--r--dcop/tests/driver.cpp10
-rw-r--r--dcop/tests/driver.h4
-rw-r--r--dcop/tests/test.cpp2
41 files changed, 1497 insertions, 1497 deletions
diff --git a/dcop/client/dcop.cpp b/dcop/client/dcop.cpp
index e8fd7683a..a78c8e016 100644
--- a/dcop/client/dcop.cpp
+++ b/dcop/client/dcop.cpp
@@ -30,16 +30,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdio.h>
#include <stdlib.h>
-#include <qbuffer.h>
-#include <qcolor.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qimage.h>
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
-#include <qvariant.h>
+#include <tqbuffer.h>
+#include <tqcolor.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqimage.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
+#include <tqvariant.h>
#include "../dcopclient.h"
#include "../dcopref.h"
@@ -52,13 +52,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <X11/Xatom.h>
#endif
-typedef QMap<QString, QString> UserList;
+typedef TQMap<TQString, TQString> UserList;
static DCOPClient* dcop = 0;
-static QTextStream cin_ ( stdin, IO_ReadOnly );
-static QTextStream cout_( stdout, IO_WriteOnly );
-static QTextStream cerr_( stderr, IO_WriteOnly );
+static TQTextStream cin_ ( stdin, IO_ReadOnly );
+static TQTextStream cout_( stdout, IO_WriteOnly );
+static TQTextStream cerr_( stderr, IO_WriteOnly );
/**
* Session to send call to
@@ -71,12 +71,12 @@ static QTextStream cerr_( stderr, IO_WriteOnly );
*/
enum Session { DefaultSession = 0, AllSessions, QuerySessions, CustomSession };
-bool startsWith(const QCString &id, const char *str, int n)
+bool startsWith(const TQCString &id, const char *str, int n)
{
return !n || (strncmp(id.data(), str, n) == 0);
}
-bool endsWith(QCString &id, char c)
+bool endsWith(TQCString &id, char c)
{
if (id.length() && (id[id.length()-1] == c))
{
@@ -86,13 +86,13 @@ bool endsWith(QCString &id, char c)
return false;
}
-void queryApplications(const QCString &filter)
+void queryApplications(const TQCString &filter)
{
int filterLen = filter.length();
QCStringList apps = dcop->registeredApplications();
for ( QCStringList::Iterator it = apps.begin(); it != apps.end(); ++it )
{
- QCString &clientId = *it;
+ TQCString &clientId = *it;
if ( (clientId != dcop->appId()) &&
!startsWith(clientId, "anonymous",9) &&
startsWith(clientId, filter, filterLen)
@@ -107,7 +107,7 @@ void queryApplications(const QCString &filter)
}
}
-void queryObjects( const QCString &app, const QCString &filter )
+void queryObjects( const TQCString &app, const TQCString &filter )
{
int filterLen = filter.length();
bool ok = false;
@@ -115,7 +115,7 @@ void queryObjects( const QCString &app, const QCString &filter )
QCStringList objs = dcop->remoteObjects( app, &ok );
for ( QCStringList::Iterator it = objs.begin(); it != objs.end(); ++it )
{
- QCString &objId = *it;
+ TQCString &objId = *it;
if (objId == "default")
{
@@ -158,7 +158,7 @@ void queryFunctions( const char* app, const char* obj )
int callFunction( const char* app, const char* obj, const char* func, const QCStringList args )
{
- QString f = func; // Qt is better with unicode strings, so use one.
+ TQString f = func; // Qt is better with unicode strings, so use one.
int left = f.find( '(' );
int right = f.find( ')' );
@@ -172,7 +172,7 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
// try to get the interface from the server
bool ok = false;
QCStringList funcs = dcop->remoteFunctions( app, obj, &ok );
- QCString realfunc;
+ TQCString realfunc;
if ( !ok && args.isEmpty() )
goto doit;
if ( !ok )
@@ -195,7 +195,7 @@ 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 QString arguments = (*it).mid(l+1,(*it).find( ')' )-l-1);
+ const TQString arguments = (*it).mid(l+1,(*it).find( ')' )-l-1);
uint a = arguments.contains(',');
if ( (a==0 && !arguments.isEmpty()) || a>0)
a++;
@@ -221,26 +221,26 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
// of dcop, so it should be OK.
//
//
- QStringList intTypes;
+ TQStringList intTypes;
intTypes << "int" << "unsigned" << "long" << "bool" ;
- QStringList types;
+ TQStringList types;
if ( left >0 && left + 1 < right - 1) {
- types = QStringList::split( ',', f.mid( left + 1, right - left - 1) );
- for ( QStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
- QString lt = (*it).simplifyWhiteSpace();
+ types = TQStringList::split( ',', f.mid( left + 1, right - left - 1) );
+ for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
+ TQString lt = (*it).simplifyWhiteSpace();
int s = lt.find(' ');
// If there are spaces in the name, there may be two
// reasons: the parameter name is still there, ie.
- // "QString URL" or it's a complicated int type, ie.
+ // "TQString URL" or it's a complicated int type, ie.
// "unsigned long long int bool".
//
//
if ( s > 0 )
{
- QStringList partl = QStringList::split(' ' , lt);
+ TQStringList partl = TQStringList::split(' ' , lt);
// The zero'th part is -- at the very least -- a
// type part. Any trailing parts *might* be extra
@@ -271,10 +271,10 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
(*it) = lt;
}
- QString fc = f.left( left );
+ TQString fc = f.left( left );
fc += '(';
bool first = true;
- for ( QStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
+ for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
if ( !first )
fc +=",";
first = false;
@@ -284,12 +284,12 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
f = fc;
}
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
uint i = 0;
- for( QStringList::Iterator it = types.begin(); it != types.end(); ++it )
+ for( TQStringList::Iterator it = types.begin(); it != types.end(); ++it )
marshall( arg, args, i, *it );
if ( i != args.count() )
@@ -302,11 +302,11 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
qWarning( "call failed");
return( 1 );
} else {
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
if ( replyType != "void" && replyType != "ASYNC" )
{
- QCString replyString = demarshal( reply, replyType );
+ TQCString replyString = demarshal( reply, replyType );
if ( !replyString.isEmpty() )
printf( "%s\n", replyString.data() );
else
@@ -380,7 +380,7 @@ static UserList userList()
while( passwd* pstruct = getpwent() )
{
- result[ QString::fromLocal8Bit(pstruct->pw_name) ] = QFile::decodeName(pstruct->pw_dir);
+ result[ TQString::fromLocal8Bit(pstruct->pw_name) ] = TQFile::decodeName(pstruct->pw_dir);
}
return result;
@@ -390,7 +390,7 @@ static UserList userList()
* Return a list of available DCOP sessions for the specified user
* An empty list means no sessions are available, or an error occurred.
*/
-QStringList dcopSessionList( const QString &user, const QString &home )
+TQStringList dcopSessionList( const TQString &user, const TQString &home )
{
if( home.isEmpty() )
{
@@ -398,16 +398,16 @@ QStringList dcopSessionList( const QString &user, const QString &home )
<< user << "!" << endl
<< "Please check permissions or set the $DCOPSERVER variable manually before" << endl
<< "calling dcop." << endl;
- return QStringList();
+ return TQStringList();
}
- QStringList result;
- QFileInfo dirInfo( home );
+ TQStringList result;
+ TQFileInfo dirInfo( home );
if( !dirInfo.exists() || !dirInfo.isReadable() )
return result;
- QDir d( home );
- d.setFilter( QDir::Files | QDir::Hidden | QDir::NoSymLinks );
+ TQDir d( home );
+ d.setFilter( TQDir::Files | TQDir::Hidden | TQDir::NoSymLinks );
d.setNameFilter( ".DCOPserver*" );
const QFileInfoList *list = d.entryInfoList();
@@ -415,7 +415,7 @@ QStringList dcopSessionList( const QString &user, const QString &home )
return result;
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
while ( ( fi = it.current() ) != 0 )
{
@@ -455,12 +455,12 @@ void sendUserTime( const char* app )
* Do the actual DCOP call
*/
int runDCOP( QCStringList args, UserList users, Session session,
- const QString sessionName, bool readStdin, bool updateUserTime )
+ const TQString sessionName, bool readStdin, bool updateUserTime )
{
bool DCOPrefmode=false;
- QCString app;
- QCString objid;
- QCString function;
+ TQCString app;
+ TQCString objid;
+ TQCString function;
QCStringList params;
DCOPClient *client = 0L;
int retval = 0;
@@ -505,10 +505,10 @@ int runDCOP( QCStringList args, UserList users, Session session,
bool firstRun = true;
UserList::Iterator it;
- QStringList sessions;
+ TQStringList sessions;
bool presetDCOPServer = false;
// char *dcopStr = 0L;
- QString dcopServer;
+ TQString dcopServer;
for( it = users.begin(); it != users.end() || firstRun; ++it )
{
@@ -518,7 +518,7 @@ int runDCOP( QCStringList args, UserList users, Session session,
if( session == QuerySessions )
{
- QStringList sessions = dcopSessionList( it.key(), it.data() );
+ TQStringList sessions = dcopSessionList( it.key(), it.data() );
if( sessions.isEmpty() )
{
if( users.count() <= 1 )
@@ -536,7 +536,7 @@ int runDCOP( QCStringList args, UserList users, Session session,
cout_ << "for user " << *it << " ";
cout_ << ":" << endl;
- QStringList::Iterator sIt = sessions.begin();
+ TQStringList::Iterator sIt = sessions.begin();
for( ; sIt != sessions.end(); ++sIt )
cout_ << " " << *sIt << endl;
@@ -593,9 +593,9 @@ int runDCOP( QCStringList args, UserList users, Session session,
( getenv( "ICEAUTHORITY" ) == 0 || getenv( "DISPLAY" ) == 0 ) ) )
{
// Check for ICE authority file and if the file can be read by us
- QString home = it.data();
- QString iceFile = it.data() + "/.ICEauthority";
- QFileInfo fi( iceFile );
+ TQString home = it.data();
+ TQString iceFile = it.data() + "/.ICEauthority";
+ TQFileInfo fi( iceFile );
if( iceFile.isEmpty() )
{
cerr_ << "WARNING: Cannot determine home directory for user "
@@ -638,20 +638,20 @@ int runDCOP( QCStringList args, UserList users, Session session,
// If users is an empty list we're calling for the currently logged
// in user. In this case we don't have a session, but still want
// to iterate the loop once.
- QStringList::Iterator sIt = sessions.begin();
+ TQStringList::Iterator sIt = sessions.begin();
for( ; sIt != sessions.end() || users.isEmpty(); ++sIt )
{
if( !presetDCOPServer && !users.isEmpty() )
{
- QString dcopFile = it.data() + "/" + *sIt;
- QFile f( dcopFile );
+ TQString dcopFile = it.data() + "/" + *sIt;
+ TQFile f( dcopFile );
if( !f.open( IO_ReadOnly ) )
{
cerr_ << "Can't open " << dcopFile << " for reading!" << endl;
exit( -1 );
}
- QStringList l( QStringList::split( '\n', f.readAll() ) );
+ TQStringList l( TQStringList::split( '\n', f.readAll() ) );
dcopServer = l.first();
if( dcopServer.isEmpty() )
@@ -717,7 +717,7 @@ int runDCOP( QCStringList args, UserList users, Session session,
// read line
while ( !cin_.atEnd() )
{
- QString buf = cin_.readLine();
+ TQString buf = cin_.readLine();
if( replaceArg != params.end() )
*replaceArg = buf.local8Bit();
@@ -759,12 +759,12 @@ int main( int argc, char** argv )
{
bool readStdin = false;
int numOptions = 0;
- QString user;
+ TQString user;
Session session = DefaultSession;
- QString sessionName;
+ TQString sessionName;
bool updateUserTime = true;
- cin_.setEncoding( QTextStream::Locale );
+ cin_.setEncoding( TQTextStream::Locale );
// Scan for command-line options first
for( int pos = 1 ; pos <= argc - 1 ; pos++ )
@@ -780,7 +780,7 @@ int main( int argc, char** argv )
{
if( pos <= argc - 2 )
{
- user = QString::fromLocal8Bit( argv[ pos + 1] );
+ user = TQString::fromLocal8Bit( argv[ pos + 1] );
numOptions +=2;
pos++;
}
@@ -799,7 +799,7 @@ int main( int argc, char** argv )
}
else if( pos <= argc - 2 )
{
- sessionName = QString::fromLocal8Bit( argv[ pos + 1] );
+ sessionName = TQString::fromLocal8Bit( argv[ pos + 1] );
numOptions +=2;
pos++;
}
@@ -851,7 +851,7 @@ int main( int argc, char** argv )
#ifdef DCOPQUIT
if (argc > 1)
{
- QCString prog = argv[ numOptions + 1 ];
+ TQCString prog = argv[ numOptions + 1 ];
if (!prog.isEmpty())
{
diff --git a/dcop/client/dcopfind.cpp b/dcop/client/dcopfind.cpp
index 4f69f848f..cd3e4d517 100644
--- a/dcop/client/dcopfind.cpp
+++ b/dcop/client/dcopfind.cpp
@@ -21,10 +21,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qbuffer.h>
-#include <qvariant.h>
-#include <qcolor.h>
-#include <qimage.h>
+#include <tqbuffer.h>
+#include <tqvariant.h>
+#include <tqcolor.h>
+#include <tqimage.h>
#include "../kdatastream.h"
#include "../dcopclient.h"
#include "../dcopref.h"
@@ -40,7 +40,7 @@ static bool bLaunchApp = 0;
bool findObject( const char* app, const char* obj, const char* func, QCStringList args )
{
- QString f = func; // Qt is better with unicode strings, so use one.
+ TQString f = func; // Qt is better with unicode strings, so use one.
int left = f.find( '(' );
int right = f.find( ')' );
@@ -57,26 +57,26 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis
// of dcop, so it should be OK.
//
//
- QStringList intTypes;
+ TQStringList intTypes;
intTypes << "int" << "unsigned" << "long" << "bool" ;
- QStringList types;
+ TQStringList types;
if ( left >0 && left + 1 < right - 1) {
- types = QStringList::split( ',', f.mid( left + 1, right - left - 1) );
- for ( QStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
- QString lt = (*it).simplifyWhiteSpace();
+ types = TQStringList::split( ',', f.mid( left + 1, right - left - 1) );
+ for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
+ TQString lt = (*it).simplifyWhiteSpace();
int s = lt.find(' ');
// If there are spaces in the name, there may be two
// reasons: the parameter name is still there, ie.
- // "QString URL" or it's a complicated int type, ie.
+ // "TQString URL" or it's a complicated int type, ie.
// "unsigned long long int bool".
//
//
if ( s > 0 )
{
- QStringList partl = QStringList::split(' ' , lt);
+ TQStringList partl = TQStringList::split(' ' , lt);
// The zero'th part is -- at the very least -- a
// type part. Any trailing parts *might* be extra
@@ -107,10 +107,10 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis
(*it) = lt;
}
- QString fc = f.left( left );
+ TQString fc = f.left( left );
fc += '(';
bool first = true;
- for ( QStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
+ for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
if ( !first )
fc +=",";
first = false;
@@ -125,11 +125,11 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis
exit(1);
}
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
uint i = 0;
- for ( QStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
+ for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
marshall(arg, args, i, *it);
}
if ( (uint) i != args.count() ) {
@@ -137,8 +137,8 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis
exit(1);
}
- QCString foundApp;
- QCString foundObj;
+ TQCString foundApp;
+ TQCString foundObj;
if ( dcop->findObject( app, obj, f.latin1(), data, foundApp, foundObj) )
{
if (bAppIdOnly)
@@ -150,7 +150,7 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis
return false;
}
-bool launchApp(QString app)
+bool launchApp(TQString app)
{
int l = app.length();
if (l && (app[l-1] == '*'))
@@ -160,18 +160,18 @@ bool launchApp(QString app)
if (!l) return false;
app.truncate(l);
- QStringList URLs;
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQStringList URLs;
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << app << URLs;
- if ( !dcop->call( "klauncher", "klauncher", "start_service_by_desktop_name(QString,QStringList)",
+ if ( !dcop->call( "klauncher", "klauncher", "start_service_by_desktop_name(TQString,TQStringList)",
data, replyType, replyData) ) {
qWarning( "call to klauncher failed.");
return false;
}
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
if ( replyType != "serviceResult" )
{
@@ -179,8 +179,8 @@ bool launchApp(QString app)
return false;
}
int result;
- QCString dcopName;
- QString error;
+ TQCString dcopName;
+ TQString error;
reply >> result >> dcopName >> error;
if (result != 0)
{
@@ -226,9 +226,9 @@ int main( int argc, char** argv )
client.attach();
dcop = &client;
- QCString app;
- QCString objid;
- QCString function;
+ TQCString app;
+ TQCString objid;
+ TQCString function;
char **args = 0;
if ((argc > argi) && (strncmp(argv[argi], "DCOPRef(", 8)) == 0)
{
diff --git a/dcop/client/dcopstart.cpp b/dcop/client/dcopstart.cpp
index 2b870964f..5741ef775 100644
--- a/dcop/client/dcopstart.cpp
+++ b/dcop/client/dcopstart.cpp
@@ -26,34 +26,34 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdio.h>
#include <ctype.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
static DCOPClient* dcop = 0;
void startApp(const char *_app, int argc, const char **args)
{
const char *function = 0;
- QString app = QString::fromLatin1(_app);
+ TQString app = TQString::fromLatin1(_app);
if (app.endsWith(".desktop"))
- function = "start_service_by_desktop_path(QString,QStringList)";
+ function = "start_service_by_desktop_path(TQString,TQStringList)";
else
- function = "start_service_by_desktop_name(QString,QStringList)";
- QStringList URLs;
+ function = "start_service_by_desktop_name(TQString,TQStringList)";
+ TQStringList URLs;
for(int i = 0; i < argc; i++)
{
- URLs.append(QString::fromLocal8Bit(args[i]));
+ URLs.append(TQString::fromLocal8Bit(args[i]));
}
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << app << URLs;
if ( !dcop->call( "klauncher", "klauncher", function, data, replyType, replyData) ) {
qWarning( "call failed");
exit(1);
} else {
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
if ( replyType != "serviceResult" )
{
@@ -61,8 +61,8 @@ void startApp(const char *_app, int argc, const char **args)
exit(1);
}
int result;
- QCString dcopName;
- QString error;
+ TQCString dcopName;
+ TQString error;
reply >> result >> dcopName >> error;
if (result != 0)
{
@@ -89,9 +89,9 @@ int main( int argc, char** argv )
client.attach();
dcop = &client;
- QCString app;
- QCString objid;
- QCString function;
+ TQCString app;
+ TQCString objid;
+ TQCString function;
/*char **args = 0;*/
startApp( argv[1], argc - 2, (const char**)&argv[2] );
diff --git a/dcop/client/marshall.cpp b/dcop/client/marshall.cpp
index d7d5c260a..f9b7955f2 100644
--- a/dcop/client/marshall.cpp
+++ b/dcop/client/marshall.cpp
@@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define KDE_QT_ONLY
#include "../../kdecore/kurl.cpp"
-bool mkBool( const QString& s )
+bool mkBool( const TQString& s )
{
if ( s.lower() == "true" )
return true;
@@ -37,7 +37,7 @@ bool mkBool( const QString& s )
return false;
}
-QPoint mkPoint( const QString &str )
+TQPoint mkPoint( const TQString &str )
{
const char *s = str.latin1();
char *end;
@@ -46,10 +46,10 @@ QPoint mkPoint( const QString &str )
s = (const char *)end;
while(*s && !isdigit(*s) && *s != '-') s++;
int y = strtol(s, &end, 10);
- return QPoint( x, y );
+ return TQPoint( x, y );
}
-QSize mkSize( const QString &str )
+TQSize mkSize( const TQString &str )
{
const char *s = str.latin1();
char *end;
@@ -58,10 +58,10 @@ QSize mkSize( const QString &str )
s = (const char *)end;
while(*s && !isdigit(*s) && *s != '-') s++;
int h = strtol(s, &end, 10);
- return QSize( w, h );
+ return TQSize( w, h );
}
-QRect mkRect( const QString &str )
+TQRect mkRect( const TQString &str )
{
const char *s = str.latin1();
char *end;
@@ -79,28 +79,28 @@ QRect mkRect( const QString &str )
int p4 = strtol(s, &end, 10);
if (legacy)
{
- return QRect( p3, p4, p1, p2 );
+ return TQRect( p3, p4, p1, p2 );
}
- return QRect( p1, p2, p3, p4 );
+ return TQRect( p1, p2, p3, p4 );
}
-QColor mkColor( const QString& s )
+TQColor mkColor( const TQString& s )
{
- QColor c;
+ TQColor c;
c.setNamedColor(s);
return c;
}
-const char *qStringToC(const QCString &s)
+const char *qStringToC(const TQCString &s)
{
if (s.isEmpty())
return "";
return s.data();
}
-QCString demarshal( QDataStream &stream, const QString &type )
+TQCString demarshal( TQDataStream &stream, const TQString &type )
{
- QCString result;
+ TQCString result;
if ( type == "int" || type == "Q_INT32" )
{
@@ -145,54 +145,54 @@ QCString demarshal( QDataStream &stream, const QString &type )
bool b;
stream >> b;
result = b ? "true" : "false";
- } else if ( type == "QString" )
+ } else if ( type == "TQString" )
{
- QString s;
+ TQString s;
stream >> s;
result = s.local8Bit();
- } else if ( type == "QCString" )
+ } else if ( type == "TQCString" )
{
stream >> result;
} else if ( type == "QCStringList" )
{
- return demarshal( stream, "QValueList<QCString>" );
- } else if ( type == "QStringList" )
+ return demarshal( stream, "TQValueList<TQCString>" );
+ } else if ( type == "TQStringList" )
{
- return demarshal( stream, "QValueList<QString>" );
- } else if ( type == "QColor" )
+ return demarshal( stream, "TQValueList<TQString>" );
+ } else if ( type == "TQColor" )
{
- QColor c;
+ TQColor c;
stream >> c;
result = c.name().local8Bit();
- } else if ( type == "QSize" )
+ } else if ( type == "TQSize" )
{
- QSize s;
+ TQSize s;
stream >> s;
result.sprintf( "%dx%d", s.width(), s.height() );
- } else if ( type == "QPixmap" || type == "QImage" )
+ } else if ( type == "TQPixmap" || type == "TQImage" )
{
- QImage i;
+ TQImage i;
stream >> i;
- QByteArray ba;
- QBuffer buf( ba );
+ TQByteArray ba;
+ TQBuffer buf( ba );
buf.open( IO_WriteOnly );
i.save( &buf, "XPM" );
result = ba;
- } else if ( type == "QPoint" )
+ } else if ( type == "TQPoint" )
{
- QPoint p;
+ TQPoint p;
stream >> p;
result.sprintf( "+%d+%d", p.x(), p.y() );
- } else if ( type == "QRect" )
+ } else if ( type == "TQRect" )
{
- QRect r;
+ TQRect r;
stream >> r;
result.sprintf( "%dx%d+%d+%d", r.width(), r.height(), r.x(), r.y() );
- } else if ( type == "QVariant" )
+ } else if ( type == "TQVariant" )
{
Q_INT32 type;
stream >> type;
- return demarshal( stream, QVariant::typeToName( (QVariant::Type)type ) );
+ return demarshal( stream, TQVariant::typeToName( (TQVariant::Type)type ) );
} else if ( type == "DCOPRef" )
{
DCOPRef r;
@@ -203,12 +203,12 @@ QCString demarshal( QDataStream &stream, const QString &type )
KURL r;
stream >> r;
result = r.url().local8Bit();
- } else if ( type.left( 11 ) == "QValueList<" )
+ } else if ( type.left( 11 ) == "TQValueList<" )
{
if ( (uint)type.find( '>', 11 ) != type.length() - 1 )
return result;
- QString nestedType = type.mid( 11, type.length() - 12 );
+ TQString nestedType = type.mid( 11, type.length() - 12 );
if ( nestedType.isEmpty() )
return result;
@@ -219,13 +219,13 @@ QCString demarshal( QDataStream &stream, const QString &type )
Q_UINT32 i = 0;
for (; i < count; ++i )
{
- QCString arg = demarshal( stream, nestedType );
+ TQCString arg = demarshal( stream, nestedType );
result += arg;
if ( i < count - 1 )
result += '\n';
}
- } else if ( type.left( 5 ) == "QMap<" )
+ } else if ( type.left( 5 ) == "TQMap<" )
{
int commaPos = type.find( ',', 5 );
@@ -235,8 +235,8 @@ QCString demarshal( QDataStream &stream, const QString &type )
if ( (uint)type.find( '>', commaPos ) != type.length() - 1 )
return result;
- QString keyType = type.mid( 5, commaPos - 5 );
- QString valueType = type.mid( commaPos + 1, type.length() - commaPos - 2 );
+ TQString keyType = type.mid( 5, commaPos - 5 );
+ TQString valueType = type.mid( commaPos + 1, type.length() - commaPos - 2 );
Q_UINT32 count;
stream >> count;
@@ -244,12 +244,12 @@ QCString demarshal( QDataStream &stream, const QString &type )
Q_UINT32 i = 0;
for (; i < count; ++i )
{
- QCString key = demarshal( stream, keyType );
+ TQCString key = demarshal( stream, keyType );
if ( key.isEmpty() )
continue;
- QCString value = demarshal( stream, valueType );
+ TQCString value = demarshal( stream, valueType );
if ( value.isEmpty() )
continue;
@@ -269,19 +269,19 @@ QCString demarshal( QDataStream &stream, const QString &type )
}
-void marshall( QDataStream &arg, QCStringList args, uint &i, QString type )
+void marshall( TQDataStream &arg, QCStringList args, uint &i, TQString type )
{
if( i >= args.count() )
{
qWarning("Not enough arguments (expected %d, got %d).", i, args.count());
exit(1);
}
- QString s = QString::fromLocal8Bit( args[ i ] );
+ TQString s = TQString::fromLocal8Bit( args[ i ] );
- if (type == "QStringList")
- type = "QValueList<QString>";
+ if (type == "TQStringList")
+ type = "TQValueList<TQString>";
if (type == "QCStringList")
- type = "QValueList<QCString>";
+ type = "TQValueList<TQCString>";
if ( type == "int" )
arg << s.toInt();
@@ -294,13 +294,13 @@ void marshall( QDataStream &arg, QCStringList args, uint &i, QString type )
else if ( type == "Q_INT32" )
arg << s.toInt();
else if ( type == "Q_INT64" ) {
- QVariant qv = QVariant( s );
+ TQVariant qv = TQVariant( s );
arg << qv.toLongLong();
}
else if ( type == "Q_UINT32" )
arg << s.toUInt();
else if ( type == "Q_UINT64" ) {
- QVariant qv = QVariant( s );
+ TQVariant qv = TQVariant( s );
arg << qv.toULongLong();
}
else if ( type == "long" )
@@ -317,50 +317,50 @@ void marshall( QDataStream &arg, QCStringList args, uint &i, QString type )
arg << s.toDouble();
else if ( type == "bool" )
arg << mkBool( s );
- else if ( type == "QString" )
+ else if ( type == "TQString" )
arg << s;
- else if ( type == "QCString" )
- arg << QCString( args[ i ] );
- else if ( type == "QColor" )
+ else if ( type == "TQCString" )
+ arg << TQCString( args[ i ] );
+ else if ( type == "TQColor" )
arg << mkColor( s );
- else if ( type == "QPoint" )
+ else if ( type == "TQPoint" )
arg << mkPoint( s );
- else if ( type == "QSize" )
+ else if ( type == "TQSize" )
arg << mkSize( s );
- else if ( type == "QRect" )
+ else if ( type == "TQRect" )
arg << mkRect( s );
else if ( type == "KURL" )
arg << KURL( s );
- else if ( type == "QVariant" ) {
+ else if ( type == "TQVariant" ) {
if ( s == "true" || s == "false" )
- arg << QVariant( mkBool( s ), 42 );
+ arg << TQVariant( mkBool( s ), 42 );
else if ( s.left( 4 ) == "int(" )
- arg << QVariant( s.mid(4, s.length()-5).toInt() );
- else if ( s.left( 7 ) == "QPoint(" )
- arg << QVariant( mkPoint( s.mid(7, s.length()-8) ) );
- else if ( s.left( 6 ) == "QSize(" )
- arg << QVariant( mkSize( s.mid(6, s.length()-7) ) );
- else if ( s.left( 6 ) == "QRect(" )
- arg << QVariant( mkRect( s.mid(6, s.length()-7) ) );
- else if ( s.left( 7 ) == "QColor(" )
- arg << QVariant( mkColor( s.mid(7, s.length()-8) ) );
+ arg << TQVariant( s.mid(4, s.length()-5).toInt() );
+ else if ( s.left( 7 ) == "TQPoint(" )
+ arg << TQVariant( mkPoint( s.mid(7, s.length()-8) ) );
+ else if ( s.left( 6 ) == "TQSize(" )
+ arg << TQVariant( mkSize( s.mid(6, s.length()-7) ) );
+ else if ( s.left( 6 ) == "TQRect(" )
+ arg << TQVariant( mkRect( s.mid(6, s.length()-7) ) );
+ else if ( s.left( 7 ) == "TQColor(" )
+ arg << TQVariant( mkColor( s.mid(7, s.length()-8) ) );
else
- arg << QVariant( s );
- } else if ( type.startsWith("QValueList<") ||
+ arg << TQVariant( s );
+ } else if ( type.startsWith("TQValueList<") ||
type == "KURL::List" ) {
if ( type == "KURL::List" )
type = "KURL";
else
type = type.mid(11, type.length() - 12);
- QStringList list;
- QString delim = s;
+ TQStringList list;
+ TQString delim = s;
if (delim == "[")
delim = "]";
if (delim == "(")
delim = ")";
i++;
- QByteArray dummy_data;
- QDataStream dummy_arg(dummy_data, IO_WriteOnly);
+ TQByteArray dummy_data;
+ TQDataStream dummy_arg(dummy_data, IO_WriteOnly);
uint j = i;
uint count = 0;
@@ -371,7 +371,7 @@ void marshall( QDataStream &arg, QCStringList args, uint &i, QString type )
qWarning("List end-delimiter '%s' not found.", delim.latin1());
exit(1);
}
- if( QString::fromLocal8Bit( args[ j ] ) == delim )
+ if( TQString::fromLocal8Bit( args[ j ] ) == delim )
break;
marshall( dummy_arg, args, j, type );
count++;
@@ -384,7 +384,7 @@ void marshall( QDataStream &arg, QCStringList args, uint &i, QString type )
qWarning("List end-delimiter '%s' not found.", delim.latin1());
exit(1);
}
- if( QString::fromLocal8Bit( args[ i ] ) == delim )
+ if( TQString::fromLocal8Bit( args[ i ] ) == delim )
break;
marshall( arg, args, i, type );
}
diff --git a/dcop/dcop_deadlock_test.cpp b/dcop/dcop_deadlock_test.cpp
index d26bc25fb..71e8ba66c 100644
--- a/dcop/dcop_deadlock_test.cpp
+++ b/dcop/dcop_deadlock_test.cpp
@@ -24,32 +24,32 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <dcop_deadlock_test.h>
#include <dcopref.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
-MyDCOPObject::MyDCOPObject(const QCString &name, const QCString &remoteName)
-: QObject(0, name), DCOPObject(name), m_remoteName(remoteName)
+MyDCOPObject::MyDCOPObject(const TQCString &name, const TQCString &remoteName)
+: TQObject(0, name), DCOPObject(name), m_remoteName(remoteName)
{
- connect(&m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout()));
+ connect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()));
}
-bool MyDCOPObject::process(const QCString &fun, const QByteArray &data,
-QCString& replyType, QByteArray &replyData)
+bool MyDCOPObject::process(const TQCString &fun, const TQByteArray &data,
+TQCString& replyType, TQByteArray &replyData)
{
- if (fun == "function(QCString)") {
- QDataStream args( data, IO_ReadOnly );
+ if (fun == "function(TQCString)") {
+ TQDataStream args( data, IO_ReadOnly );
args >> m_remoteName;
struct timeval tv;
gettimeofday(&tv, 0);
qWarning("%s: function('%s') %d:%06d", name(), m_remoteName.data(), tv.tv_sec % 100, tv.tv_usec);
- replyType = "QString";
- QDataStream reply( replyData, IO_WriteOnly );
- reply << QString("Hey");
+ replyType = "TQString";
+ TQDataStream reply( replyData, IO_WriteOnly );
+ reply << TQString("Hey");
m_timer.start(1000, true);
return true;
}
@@ -63,15 +63,15 @@ void MyDCOPObject::slotTimeout()
qWarning("%s: slotTimeout() %d:%06d", name(), tv.tv_sec % 100, tv.tv_usec);
m_timer.start(1000, true);
- QString result;
- DCOPRef(m_remoteName, m_remoteName).call("function", QCString(name())).get(result);
+ TQString result;
+ DCOPRef(m_remoteName, m_remoteName).call("function", TQCString(name())).get(result);
gettimeofday(&tv, 0);
qWarning("%s: Got result '%s' %d:%06d", name(), result.latin1(), tv.tv_sec % 100, tv.tv_usec);
}
int main(int argc, char **argv)
{
- QCString myName = KApplication::dcopClient()->registerAs("testdcop", false);
+ TQCString myName = KApplication::dcopClient()->registerAs("testdcop", false);
KApplication app(argc, argv, "testdcop");
qWarning("%d:I am '%s'", getpid(), app.dcopClient()->appId().data());
@@ -81,7 +81,7 @@ int main(int argc, char **argv)
system("./dcop_deadlock_test testdcop&");
}
- QCString remoteApp;
+ TQCString remoteApp;
if (argc == 2)
{
remoteApp = argv[1];
diff --git a/dcop/dcop_deadlock_test.h b/dcop/dcop_deadlock_test.h
index f4f437fb2..0557e7062 100644
--- a/dcop/dcop_deadlock_test.h
+++ b/dcop/dcop_deadlock_test.h
@@ -29,23 +29,23 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <dcopclient.h>
#include <dcopobject.h>
-#include <qobject.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqtimer.h>
#include <stdio.h>
-class MyDCOPObject : public QObject, public DCOPObject
+class MyDCOPObject : public TQObject, public DCOPObject
{
Q_OBJECT
public:
- MyDCOPObject(const QCString &name, const QCString &remoteName);
- bool process(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData);
+ MyDCOPObject(const TQCString &name, const TQCString &remoteName);
+ bool process(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData);
public slots:
void slotTimeout();
private:
- QCString m_remoteName;
- QTimer m_timer;
+ TQCString m_remoteName;
+ TQTimer m_timer;
};
#endif
diff --git a/dcop/dcopc.c b/dcop/dcopc.c
index c62caf2ba..39083d4f5 100644
--- a/dcop/dcopc.c
+++ b/dcop/dcopc.c
@@ -23,7 +23,7 @@
/* We really don't want to require X11 headers... */
#include "config.h"
-#include <qglobal.h>
+#include <tqglobal.h>
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
#include <X11/Xlib.h>
#include <X11/X.h>
@@ -340,10 +340,10 @@ dcop_send_signal(
* Marshall the arguments for the DCOP message header (callerApp, destApp,
* destObj, destFunc. The last argument is actually part of the data part of
* the call, but we add it to the header. It's the size of the marshalled
- * argument data. In Qt it would look like QDataStream str( ... ) str <<
+ * argument data. In Qt it would look like TQDataStream str( ... ) str <<
* callerApp << destApp << destObj << destFun <<
* argumentQByteArrayDataStuff; (where as str is the complete data stream
- * sent do the dcopserver, excluding the ICE header) As the QByteArray is
+ * sent do the dcopserver, excluding the ICE header) As the TQByteArray is
* marshalled as [size][data] and as we (below) send the data in two chunks,
* first the dcop msg header and the the data, we just put the [size] field
* as last field into the dcop msg header ;-)
@@ -589,7 +589,7 @@ dcop_register(const char * app_name, Bool add_pid)
dcop_requested_name,
"DCOPServer",
"", /* Object irrelevant */
- "registerAs(QCString)",
+ "registerAs(TQCString)",
data,
dataLength,
&replyType,
diff --git a/dcop/dcopclient.cpp b/dcop/dcopclient.cpp
index 2b39ecb55..176dbf8e9 100644
--- a/dcop/dcopclient.cpp
+++ b/dcop/dcopclient.cpp
@@ -23,12 +23,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
// qt <-> dcop integration
-#include <qobjectlist.h>
-#include <qmetaobject.h>
-#include <qvariant.h>
-#include <qtimer.h>
-#include <qintdict.h>
-#include <qeventloop.h>
+#include <tqobjectlist.h>
+#include <tqmetaobject.h>
+#include <tqvariant.h>
+#include <tqtimer.h>
+#include <tqintdict.h>
+#include <tqeventloop.h>
// end of qt <-> dcop integration
#include "config.h"
@@ -53,13 +53,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef QT_CLEAN_NAMESPACE
#define QT_CLEAN_NAMESPACE
#endif
-#include <qguardedptr.h>
-#include <qtextstream.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qapplication.h>
-#include <qsocketnotifier.h>
-#include <qregexp.h>
+#include <tqguardedptr.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqapplication.h>
+#include <tqsocketnotifier.h>
+#include <tqregexp.h>
#include <private/qucomextra_p.h>
@@ -79,12 +79,12 @@ extern "C" {
// #define DCOPCLIENT_DEBUG 1
-extern QMap<QCString, DCOPObject *> * kde_dcopObjMap; // defined in dcopobject.cpp
+extern TQMap<TQCString, DCOPObject *> * kde_dcopObjMap; // defined in dcopobject.cpp
/*********************************************
* Keep track of local clients
*********************************************/
-typedef QAsciiDict<DCOPClient> client_map_t;
+typedef TQAsciiDict<DCOPClient> client_map_t;
static client_map_t *DCOPClient_CliMap = 0;
static
@@ -95,34 +95,34 @@ client_map_t *cliMap()
return DCOPClient_CliMap;
}
-DCOPClient *DCOPClient::findLocalClient( const QCString &_appId )
+DCOPClient *DCOPClient::findLocalClient( const TQCString &_appId )
{
return cliMap()->find(_appId.data());
}
static
-void registerLocalClient( const QCString &_appId, DCOPClient *client )
+void registerLocalClient( const TQCString &_appId, DCOPClient *client )
{
cliMap()->replace(_appId.data(), client);
}
static
-void unregisterLocalClient( const QCString &_appId )
+void unregisterLocalClient( const TQCString &_appId )
{
client_map_t *map = cliMap();
map->remove(_appId.data());
}
/////////////////////////////////////////////////////////
-template class QPtrList<DCOPObjectProxy>;
-template class QPtrList<DCOPClientTransaction>;
-template class QPtrList<_IceConn>;
+template class TQPtrList<DCOPObjectProxy>;
+template class TQPtrList<DCOPClientTransaction>;
+template class TQPtrList<_IceConn>;
struct DCOPClientMessage
{
int opcode;
CARD32 key;
- QByteArray data;
+ TQByteArray data;
};
class DCOPClient::ReplyStruct
@@ -138,27 +138,27 @@ public:
replyObject = 0;
}
ReplyStatus status;
- QCString* replyType;
- QByteArray* replyData;
+ TQCString* replyType;
+ TQByteArray* replyData;
int replyId;
Q_INT32 transactionId;
- QCString calledApp;
- QGuardedPtr<QObject> replyObject;
- QCString replySlot;
+ TQCString calledApp;
+ TQGuardedPtr<TQObject> replyObject;
+ TQCString replySlot;
};
class DCOPClientPrivate
{
public:
DCOPClient *parent;
- QCString appId;
+ TQCString appId;
IceConn iceConn;
int majorOpcode; // major opcode negotiated w/server and used to tag all comms.
int majorVersion, minorVersion; // protocol versions negotiated w/server
static const char* serverAddr; // location of server in ICE-friendly format.
- QSocketNotifier *notifier;
+ TQSocketNotifier *notifier;
bool non_blocking_call_lock;
bool registered;
bool foreign_server;
@@ -166,12 +166,12 @@ public:
bool accept_calls_override; // If true, user has specified policy.
bool qt_bridge_enabled;
- QCString senderId;
- QCString objId;
- QCString function;
+ TQCString senderId;
+ TQCString objId;
+ TQCString function;
- QCString defaultObject;
- QPtrList<DCOPClientTransaction> *transactionList;
+ TQCString defaultObject;
+ TQPtrList<DCOPClientTransaction> *transactionList;
bool transaction;
Q_INT32 transactionId;
int opcode;
@@ -185,21 +185,21 @@ public:
CARD32 currentKey;
CARD32 currentKeySaved;
- QTimer postMessageTimer;
- QPtrList<DCOPClientMessage> messages;
+ TQTimer postMessageTimer;
+ TQPtrList<DCOPClientMessage> messages;
- QPtrList<DCOPClient::ReplyStruct> pendingReplies;
- QPtrList<DCOPClient::ReplyStruct> asyncReplyQueue;
+ TQPtrList<DCOPClient::ReplyStruct> pendingReplies;
+ TQPtrList<DCOPClient::ReplyStruct> asyncReplyQueue;
struct LocalTransactionResult
{
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
};
- QIntDict<LocalTransactionResult> localTransActionList;
+ TQIntDict<LocalTransactionResult> localTransActionList;
- QTimer eventLoopTimer;
+ TQTimer eventLoopTimer;
};
class DCOPClientTransaction
@@ -207,10 +207,10 @@ class DCOPClientTransaction
public:
Q_INT32 id;
CARD32 key;
- QCString senderId;
+ TQCString senderId;
};
-QCString DCOPClient::iceauthPath()
+TQCString DCOPClient::iceauthPath()
{
#ifdef Q_OS_WIN32
char szPath[512];
@@ -218,13 +218,13 @@ QCString DCOPClient::iceauthPath()
int ret;
ret = SearchPathA(NULL,"iceauth.exe",NULL,sizeof(szPath)/sizeof(szPath[0]),szPath,&pszFilePart);
if(ret != 0)
- return QCString(szPath);
+ return TQCString(szPath);
#else
- QCString path = ::getenv("PATH");
+ TQCString path = ::getenv("PATH");
if (path.isEmpty())
path = "/bin:/usr/bin";
path += ":/usr/bin/X11:/usr/X11/bin:/usr/X11R6/bin";
- QCString fPath = strtok(path.data(), ":\b");
+ TQCString fPath = strtok(path.data(), ":\b");
while (!fPath.isNull())
{
fPath += "/iceauth";
@@ -239,13 +239,13 @@ QCString DCOPClient::iceauthPath()
return 0;
}
-static QCString dcopServerFile(const QCString &hostname, bool old)
+static TQCString dcopServerFile(const TQCString &hostname, bool old)
{
- QCString fName = ::getenv("DCOPAUTHORITY");
+ TQCString fName = ::getenv("DCOPAUTHORITY");
if (!old && !fName.isEmpty())
return fName;
- fName = QFile::encodeName( QDir::homeDirPath() );
+ fName = TQFile::encodeName( TQDir::homeDirPath() );
// fName = ::getenv("HOME");
if (fName.isEmpty())
{
@@ -253,11 +253,11 @@ static QCString dcopServerFile(const QCString &hostname, bool old)
exit(1);
}
#ifdef Q_WS_X11
- QCString disp = getenv("DISPLAY");
+ TQCString disp = getenv("DISPLAY");
#elif defined(Q_WS_QWS)
- QCString disp = getenv("QWS_DISPLAY");
+ TQCString disp = getenv("QWS_DISPLAY");
#else
- QCString disp;
+ TQCString disp;
#endif
if (disp.isEmpty())
disp = "NODISPLAY";
@@ -297,14 +297,14 @@ static QCString dcopServerFile(const QCString &hostname, bool old)
// static
-QCString DCOPClient::dcopServerFile(const QCString &hostname)
+TQCString DCOPClient::dcopServerFile(const TQCString &hostname)
{
return ::dcopServerFile(hostname, false);
}
// static
-QCString DCOPClient::dcopServerFileOld(const QCString &hostname)
+TQCString DCOPClient::dcopServerFileOld(const TQCString &hostname)
{
return ::dcopServerFile(hostname, true);
}
@@ -312,16 +312,16 @@ QCString DCOPClient::dcopServerFileOld(const QCString &hostname)
const char* DCOPClientPrivate::serverAddr = 0;
-static void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const QByteArray& dataReceived, bool canPost );
+static void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const TQByteArray& dataReceived, bool canPost );
void DCOPClient::handleAsyncReply(ReplyStruct *replyStruct)
{
if (replyStruct->replyObject)
{
- QObject::connect(this, SIGNAL(callBack(int, const QCString&, const QByteArray &)),
+ TQObject::connect(this, TQT_SIGNAL(callBack(int, const TQCString&, const TQByteArray &)),
replyStruct->replyObject, replyStruct->replySlot);
emit callBack(replyStruct->replyId, *(replyStruct->replyType), *(replyStruct->replyData));
- QObject::disconnect(this, SIGNAL(callBack(int, const QCString&, const QByteArray &)),
+ TQObject::disconnect(this, TQT_SIGNAL(callBack(int, const TQCString&, const TQByteArray &)),
replyStruct->replyObject, replyStruct->replySlot);
}
delete replyStruct;
@@ -344,7 +344,7 @@ static void DCOPProcessMessage(IceConn iceConn, IcePointer clientObject,
if ( d->key == 0 )
d->key = key; // received a key from the server
- QByteArray dataReceived( length );
+ TQByteArray dataReceived( length );
IceReadData(iceConn, length, dataReceived.data() );
d->opcode = opcode;
@@ -362,13 +362,13 @@ static void DCOPProcessMessage(IceConn iceConn, IcePointer clientObject,
}
case DCOPReply:
if ( replyStruct ) {
- QByteArray* b = replyStruct->replyData;
- QCString* t = replyStruct->replyType;
+ TQByteArray* b = replyStruct->replyData;
+ TQCString* t = replyStruct->replyType;
replyStruct->status = DCOPClient::ReplyStruct::Ok;
replyStruct->transactionId = 0;
- QCString calledApp, app;
- QDataStream ds( dataReceived, IO_ReadOnly );
+ TQCString calledApp, app;
+ TQDataStream ds( dataReceived, IO_ReadOnly );
ds >> calledApp >> app >> *t >> *b;
*replyWaitRet = True;
@@ -379,9 +379,9 @@ static void DCOPProcessMessage(IceConn iceConn, IcePointer clientObject,
}
case DCOPReplyWait:
if ( replyStruct ) {
- QCString calledApp, app;
+ TQCString calledApp, app;
Q_INT32 id;
- QDataStream ds( dataReceived, IO_ReadOnly );
+ TQDataStream ds( dataReceived, IO_ReadOnly );
ds >> calledApp >> app >> id;
replyStruct->transactionId = id;
replyStruct->calledApp = calledApp;
@@ -394,8 +394,8 @@ static void DCOPProcessMessage(IceConn iceConn, IcePointer clientObject,
}
case DCOPReplyDelayed:
{
- QDataStream ds( dataReceived, IO_ReadOnly );
- QCString calledApp, app;
+ TQDataStream ds( dataReceived, IO_ReadOnly );
+ TQCString calledApp, app;
Q_INT32 id;
ds >> calledApp >> app >> id;
@@ -410,8 +410,8 @@ static void DCOPProcessMessage(IceConn iceConn, IcePointer clientObject,
if ((rs->transactionId == id) && (rs->calledApp == calledApp))
{
d->pendingReplies.remove();
- QByteArray* b = rs->replyData;
- QCString* t = rs->replyType;
+ TQByteArray* b = rs->replyData;
+ TQCString* t = rs->replyType;
ds >> *t >> *b;
rs->status = DCOPClient::ReplyStruct::Ok;
@@ -437,7 +437,7 @@ void DCOPClient::processPostedMessagesInternal()
{
if ( d->messages.isEmpty() )
return;
- QPtrListIterator<DCOPClientMessage> it (d->messages );
+ TQPtrListIterator<DCOPClientMessage> it (d->messages );
DCOPClientMessage* msg ;
while ( ( msg = it.current() ) ) {
++it;
@@ -455,7 +455,7 @@ void DCOPClient::processPostedMessagesInternal()
/**
Processes DCOPCall, DCOPFind and DCOPSend
*/
-void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const QByteArray& dataReceived, bool canPost )
+void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const TQByteArray& dataReceived, bool canPost )
{
if (!d->accept_calls && (opcode == DCOPSend))
return;
@@ -463,17 +463,17 @@ void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const QB
IceConn iceConn = d->iceConn;
DCOPMsg *pMsg = 0;
DCOPClient *c = d->parent;
- QDataStream ds( dataReceived, IO_ReadOnly );
+ TQDataStream ds( dataReceived, IO_ReadOnly );
- QCString fromApp;
+ TQCString fromApp;
ds >> fromApp;
if (fromApp.isEmpty())
return; // Reserved for local calls
if (!d->accept_calls)
{
- QByteArray reply;
- QDataStream replyStream( reply, IO_WriteOnly );
+ TQByteArray reply;
+ TQDataStream replyStream( reply, IO_WriteOnly );
// Call rejected.
replyStream << d->appId << fromApp;
IceGetHeader( iceConn, d->majorOpcode, DCOPReplyFailed,
@@ -485,8 +485,8 @@ void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const QB
return;
}
- QCString app, objId, fun;
- QByteArray data;
+ TQCString app, objId, fun;
+ TQByteArray data;
ds >> app >> objId >> fun >> data;
d->senderId = fromApp;
d->objId = objId;
@@ -507,8 +507,8 @@ void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const QB
d->objId = objId;
d->function = fun;
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
bool b;
CARD32 oldCurrentKey = d->currentKey;
if ( opcode != DCOPSend ) // DCOPSend doesn't change the current key
@@ -526,8 +526,8 @@ void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const QB
if ((d->currentKey == key) || (oldCurrentKey != 2))
d->currentKey = oldCurrentKey;
- QByteArray reply;
- QDataStream replyStream( reply, IO_WriteOnly );
+ TQByteArray reply;
+ TQDataStream replyStream( reply, IO_WriteOnly );
Q_INT32 id = c->transactionId();
if (id) {
@@ -609,8 +609,8 @@ DCOPClient::DCOPClient()
d->qt_bridge_enabled = true;
d->transactionList = 0L;
d->transactionId = 0;
- QObject::connect( &d->postMessageTimer, SIGNAL( timeout() ), this, SLOT( processPostedMessagesInternal() ) );
- QObject::connect( &d->eventLoopTimer, SIGNAL( timeout() ), this, SLOT( eventLoopTimeout() ) );
+ TQObject::connect( &d->postMessageTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( processPostedMessagesInternal() ) );
+ TQObject::connect( &d->eventLoopTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( eventLoopTimeout() ) );
if ( !mainClient() )
setMainClient( this );
@@ -620,16 +620,16 @@ DCOPClient::~DCOPClient()
{
#ifdef DCOPCLIENT_DEBUG
qWarning("d->messages.count() = %d", d->messages.count());
- QPtrListIterator<DCOPClientMessage> it (d->messages );
+ TQPtrListIterator<DCOPClientMessage> it (d->messages );
DCOPClientMessage* msg ;
while ( ( msg = it.current() ) ) {
++it;
d->messages.removeRef( msg );
qWarning("DROPPING UNHANDLED DCOP MESSAGE:");
qWarning(" opcode = %d key = %d", msg->opcode, msg->key);
- QDataStream ds( msg->data, IO_ReadOnly );
+ TQDataStream ds( msg->data, IO_ReadOnly );
- QCString fromApp, app, objId, fun;
+ TQCString fromApp, app, objId, fun;
ds >> fromApp >> app >> objId >> fun;
qWarning(" from = %s", fromApp.data());
qWarning(" to = %s / %s / %s", app.data(), objId.data(), fun.data());
@@ -652,9 +652,9 @@ DCOPClient::~DCOPClient()
setMainClient( 0 );
}
-void DCOPClient::setServerAddress(const QCString &addr)
+void DCOPClient::setServerAddress(const TQCString &addr)
{
- QCString env = "DCOPSERVER=" + addr;
+ TQCString env = "DCOPSERVER=" + addr;
putenv(strdup(env.data()));
delete [] DCOPClientPrivate::serverAddr;
DCOPClientPrivate::serverAddr = qstrdup( addr.data() );
@@ -671,14 +671,14 @@ bool DCOPClient::attach()
void DCOPClient::bindToApp()
{
// check if we have a qApp instantiated. If we do,
- // we can create a QSocketNotifier and use it for receiving data.
+ // we can create a TQSocketNotifier and use it for receiving data.
if (qApp) {
if ( d->notifier )
delete d->notifier;
- d->notifier = new QSocketNotifier(socket(),
- QSocketNotifier::Read, 0, 0);
- QObject::connect(d->notifier, SIGNAL(activated(int)),
- SLOT(processSocketData(int)));
+ d->notifier = new TQSocketNotifier(socket(),
+ TQSocketNotifier::Read, 0, 0);
+ TQObject::connect(d->notifier, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(processSocketData(int)));
}
}
@@ -762,7 +762,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
DCOPAuthCount,
const_cast<char **>(DCOPAuthNames),
DCOPClientAuthProcs, 0L)) < 0) {
- emit attachFailed(QString::fromLatin1( "Communications could not be established." ));
+ emit attachFailed(TQString::fromLatin1( "Communications could not be established." ));
return false;
}
@@ -771,17 +771,17 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
if (!d->serverAddr) {
// here, we obtain the list of possible DCOP connections,
// and attach to them.
- QCString dcopSrv;
+ TQCString dcopSrv;
dcopSrv = ::getenv("DCOPSERVER");
if (dcopSrv.isEmpty()) {
- QCString fName = dcopServerFile();
- QFile f(QFile::decodeName(fName));
+ TQCString fName = dcopServerFile();
+ TQFile f(TQFile::decodeName(fName));
if (!f.open(IO_ReadOnly)) {
- emit attachFailed(QString::fromLatin1( "Could not read network connection list.\n" )+QFile::decodeName(fName));
+ emit attachFailed(TQString::fromLatin1( "Could not read network connection list.\n" )+TQFile::decodeName(fName));
return false;
}
int size = QMIN( 1024, f.size() ); // protection against a huge file
- QCString contents( size+1 );
+ TQCString contents( size+1 );
if ( f.readBlock( contents.data(), size ) != size )
{
qDebug("Error reading from %s, didn't read the expected %d bytes", fName.data(), size);
@@ -817,7 +817,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
delete [] d->serverAddr;
d->serverAddr = 0;
}
- emit attachFailed(QString::fromLatin1( errBuf ));
+ emit attachFailed(TQString::fromLatin1( errBuf ));
return false;
}
fcntl(socket(), F_SETFL, FD_CLOEXEC);
@@ -843,7 +843,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
delete [] d->serverAddr;
d->serverAddr = 0;
}
- emit attachFailed(QString::fromLatin1( errBuf ));
+ emit attachFailed(TQString::fromLatin1( errBuf ));
return false;
} else if (setupstat == IceProtocolAlreadyActive) {
if (bClearServerAddr) {
@@ -851,7 +851,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
d->serverAddr = 0;
}
/* should not happen because 3rd arg to IceOpenConnection was 0. */
- emit attachFailed(QString::fromLatin1( "internal error in IceOpenConnection" ));
+ emit attachFailed(TQString::fromLatin1( "internal error in IceOpenConnection" ));
return false;
}
@@ -861,7 +861,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
delete [] d->serverAddr;
d->serverAddr = 0;
}
- emit attachFailed(QString::fromLatin1( "DCOP server did not accept the connection." ));
+ emit attachFailed(TQString::fromLatin1( "DCOP server did not accept the connection." ));
return false;
}
@@ -939,14 +939,14 @@ void DCOPClient::setQtBridgeEnabled(bool b)
d->qt_bridge_enabled = b;
}
-QCString DCOPClient::registerAs( const QCString &appId, bool addPID )
+TQCString DCOPClient::registerAs( const TQCString &appId, bool addPID )
{
- QCString result;
+ TQCString result;
- QCString _appId = appId;
+ TQCString _appId = appId;
if (addPID) {
- QCString pid;
+ TQCString pid;
pid.sprintf("-%d", getpid());
_appId = _appId + pid;
}
@@ -968,12 +968,12 @@ QCString DCOPClient::registerAs( const QCString &appId, bool addPID )
}
// register the application identifier with the server
- QCString replyType;
- QByteArray data, replyData;
- QDataStream arg( data, IO_WriteOnly );
+ TQCString replyType;
+ TQByteArray data, replyData;
+ TQDataStream arg( data, IO_WriteOnly );
arg << _appId;
- if ( call( "DCOPServer", "", "registerAs(QCString)", data, replyType, replyData ) ) {
- QDataStream reply( replyData, IO_ReadOnly );
+ if ( call( "DCOPServer", "", "registerAs(TQCString)", data, replyType, replyData ) ) {
+ TQDataStream reply( replyData, IO_ReadOnly );
reply >> result;
}
@@ -992,7 +992,7 @@ bool DCOPClient::isRegistered() const
}
-QCString DCOPClient::appId() const
+TQCString DCOPClient::appId() const
{
return d->appId;
}
@@ -1011,10 +1011,10 @@ static inline bool isIdentChar( char x )
(x >= 'a' && x <= 'z') || (x >= 'A' && x <= 'Z');
}
-QCString DCOPClient::normalizeFunctionSignature( const QCString& fun ) {
+TQCString DCOPClient::normalizeFunctionSignature( const TQCString& fun ) {
if ( fun.isEmpty() ) // nothing to do
return fun.copy();
- QCString result( fun.size() );
+ TQCString result( fun.size() );
char *from = fun.data();
char *to = result.data();
char *first = to;
@@ -1039,14 +1039,14 @@ QCString DCOPClient::normalizeFunctionSignature( const QCString& fun ) {
}
-QCString DCOPClient::senderId() const
+TQCString DCOPClient::senderId() const
{
return d->senderId;
}
-bool DCOPClient::send(const QCString &remApp, const QCString &remObjId,
- const QCString &remFun, const QByteArray &data)
+bool DCOPClient::send(const TQCString &remApp, const TQCString &remObjId,
+ const TQCString &remFun, const TQByteArray &data)
{
if (remApp.isEmpty())
return false;
@@ -1055,11 +1055,11 @@ bool DCOPClient::send(const QCString &remApp, const QCString &remObjId,
if ( localClient ) {
bool saveTransaction = d->transaction;
Q_INT32 saveTransactionId = d->transactionId;
- QCString saveSenderId = d->senderId;
+ TQCString saveSenderId = d->senderId;
d->senderId = 0; // Local call
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
(void) localClient->receive( remApp, remObjId, remFun, data, replyType, replyData );
d->transaction = saveTransaction;
@@ -1078,8 +1078,8 @@ bool DCOPClient::send(const QCString &remApp, const QCString &remObjId,
DCOPMsg *pMsg;
- QByteArray ba;
- QDataStream ds(ba, IO_WriteOnly);
+ TQByteArray ba;
+ TQDataStream ds(ba, IO_WriteOnly);
ds << d->appId << remApp << remObjId << normalizeFunctionSignature(remFun) << data.size();
IceGetHeader(d->iceConn, d->majorOpcode, DCOPSend,
@@ -1099,30 +1099,30 @@ bool DCOPClient::send(const QCString &remApp, const QCString &remObjId,
return false;
}
-bool DCOPClient::send(const QCString &remApp, const QCString &remObjId,
- const QCString &remFun, const QString &data)
+bool DCOPClient::send(const TQCString &remApp, const TQCString &remObjId,
+ const TQCString &remFun, const TQString &data)
{
- QByteArray ba;
- QDataStream ds(ba, IO_WriteOnly);
+ TQByteArray ba;
+ TQDataStream ds(ba, IO_WriteOnly);
ds << data;
return send(remApp, remObjId, remFun, ba);
}
-bool DCOPClient::findObject(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data,
- QCString &foundApp, QCString &foundObj,
+bool DCOPClient::findObject(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 );
}
-bool DCOPClient::findObject(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data,
- QCString &foundApp, QCString &foundObj,
+bool DCOPClient::findObject(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString &foundApp, TQCString &foundObj,
bool useEventLoop, int timeout)
{
QCStringList appList;
- QCString app = remApp;
+ TQCString app = remApp;
if (app.isEmpty())
app = "*";
@@ -1156,9 +1156,9 @@ bool DCOPClient::findObject(const QCString &remApp, const QCString &remObj,
it != appList.end();
++it)
{
- QCString remApp = *it;
- QCString replyType;
- QByteArray replyData;
+ TQCString remApp = *it;
+ TQCString replyType;
+ TQByteArray replyData;
bool result = false;
DCOPClient *localClient = findLocalClient( remApp );
@@ -1166,7 +1166,7 @@ bool DCOPClient::findObject(const QCString &remApp, const QCString &remObj,
// In phase 1 we do all local clients
bool saveTransaction = d->transaction;
Q_INT32 saveTransactionId = d->transactionId;
- QCString saveSenderId = d->senderId;
+ TQCString saveSenderId = d->senderId;
d->senderId = 0; // Local call
result = localClient->find( remApp, remObj, remFun, data, replyType, replyData );
@@ -1175,7 +1175,7 @@ bool DCOPClient::findObject(const QCString &remApp, const QCString &remObj,
if (id) {
// Call delayed. We have to wait till it has been processed.
do {
- QApplication::eventLoop()->processEvents( QEventLoop::WaitForMore);
+ TQApplication::eventLoop()->processEvents( TQEventLoop::WaitForMore);
} while( !localClient->isLocalTransactionFinished(id, replyType, replyData));
result = true;
}
@@ -1195,7 +1195,7 @@ bool DCOPClient::findObject(const QCString &remApp, const QCString &remObj,
if (replyType == "DCOPRef")
{
DCOPRef ref;
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
reply >> ref;
if (ref.app() == remApp) // Consistency check
@@ -1212,21 +1212,21 @@ bool DCOPClient::findObject(const QCString &remApp, const QCString &remObj,
return false;
}
-bool DCOPClient::process(const QCString &, const QByteArray &,
- QCString&, QByteArray &)
+bool DCOPClient::process(const TQCString &, const TQByteArray &,
+ TQCString&, TQByteArray &)
{
return false;
}
-bool DCOPClient::isApplicationRegistered( const QCString& remApp)
+bool DCOPClient::isApplicationRegistered( const TQCString& remApp)
{
- QCString replyType;
- QByteArray data, replyData;
- QDataStream arg( data, IO_WriteOnly );
+ TQCString replyType;
+ TQByteArray data, replyData;
+ TQDataStream arg( data, IO_WriteOnly );
arg << remApp;
int result = false;
- if ( call( "DCOPServer", "", "isApplicationRegistered(QCString)", data, replyType, replyData ) ) {
- QDataStream reply( replyData, IO_ReadOnly );
+ if ( call( "DCOPServer", "", "isApplicationRegistered(TQCString)", data, replyType, replyData ) ) {
+ TQDataStream reply( replyData, IO_ReadOnly );
reply >> result;
}
return result;
@@ -1234,25 +1234,25 @@ bool DCOPClient::isApplicationRegistered( const QCString& remApp)
QCStringList DCOPClient::registeredApplications()
{
- QCString replyType;
- QByteArray data, replyData;
+ TQCString replyType;
+ TQByteArray data, replyData;
QCStringList result;
if ( call( "DCOPServer", "", "registeredApplications()", data, replyType, replyData ) ) {
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
reply >> result;
}
return result;
}
-QCStringList DCOPClient::remoteObjects( const QCString& remApp, bool *ok )
+QCStringList DCOPClient::remoteObjects( const TQCString& remApp, bool *ok )
{
- QCString replyType;
- QByteArray data, replyData;
+ TQCString replyType;
+ TQByteArray data, replyData;
QCStringList result;
if ( ok )
*ok = false;
if ( call( remApp, "DCOPClient", "objects()", data, replyType, replyData ) ) {
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
reply >> result;
if ( ok )
*ok = true;
@@ -1260,15 +1260,15 @@ QCStringList DCOPClient::remoteObjects( const QCString& remApp, bool *ok )
return result;
}
-QCStringList DCOPClient::remoteInterfaces( const QCString& remApp, const QCString& remObj, bool *ok )
+QCStringList DCOPClient::remoteInterfaces( const TQCString& remApp, const TQCString& remObj, bool *ok )
{
- QCString replyType;
- QByteArray data, replyData;
+ TQCString replyType;
+ TQByteArray data, replyData;
QCStringList result;
if ( ok )
*ok = false;
if ( call( remApp, remObj, "interfaces()", data, replyType, replyData ) && replyType == "QCStringList") {
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
reply >> result;
if ( ok )
*ok = true;
@@ -1276,15 +1276,15 @@ QCStringList DCOPClient::remoteInterfaces( const QCString& remApp, const QCStrin
return result;
}
-QCStringList DCOPClient::remoteFunctions( const QCString& remApp, const QCString& remObj, bool *ok )
+QCStringList DCOPClient::remoteFunctions( const TQCString& remApp, const TQCString& remObj, bool *ok )
{
- QCString replyType;
- QByteArray data, replyData;
+ TQCString replyType;
+ TQByteArray data, replyData;
QCStringList result;
if ( ok )
*ok = false;
if ( call( remApp, remObj, "functions()", data, replyType, replyData ) && replyType == "QCStringList") {
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
reply >> result;
if ( ok )
*ok = true;
@@ -1294,24 +1294,24 @@ QCStringList DCOPClient::remoteFunctions( const QCString& remApp, const QCString
void DCOPClient::setNotifications(bool enabled)
{
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << static_cast<Q_INT8>(enabled);
- QCString replyType;
- QByteArray reply;
+ TQCString replyType;
+ TQByteArray reply;
if (!call("DCOPServer", "", "setNotifications( bool )", data, replyType, reply))
qWarning("I couldn't enable notifications at the dcopserver!");
}
void DCOPClient::setDaemonMode( bool daemonMode )
{
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << static_cast<Q_INT8>( daemonMode );
- QCString replyType;
- QByteArray reply;
+ TQCString replyType;
+ TQByteArray reply;
if (!call("DCOPServer", "", "setDaemonMode(bool)", data, replyType, reply))
qWarning("I couldn't enable daemon mode at the dcopserver!");
}
@@ -1323,25 +1323,25 @@ void DCOPClient::setDaemonMode( bool daemonMode )
********************************************************************************
*/
-static void fillQtObjects( QCStringList& l, QObject* o, QCString path )
+static void fillQtObjects( QCStringList& l, TQObject* o, TQCString path )
{
if ( !path.isEmpty() )
path += '/';
int unnamed = 0;
- const QObjectList *list = o ? o->children() : QObject::objectTrees();
+ const TQObjectList *list = o ? o->children() : TQObject::objectTrees();
if ( list ) {
- QObjectListIt it( *list );
- QObject *obj;
+ TQObjectListIt it( *list );
+ TQObject *obj;
while ( (obj=it.current()) ) {
++it;
- QCString n = obj->name();
+ TQCString n = obj->name();
if ( n == "unnamed" || n.isEmpty() )
{
n.sprintf("%p", (void *) obj);
- n = QString("unnamed%1(%2, %3)").arg(++unnamed).arg(obj->className()).arg(n).latin1();
+ n = TQString("unnamed%1(%2, %3)").arg(++unnamed).arg(obj->className()).arg(n).latin1();
}
- QCString fn = path + n;
+ TQCString fn = path + n;
l.append( fn );
if ( obj->children() )
fillQtObjects( l, obj, fn );
@@ -1354,31 +1354,31 @@ namespace
struct O
{
O(): o(0) {}
- O ( const QCString& str, QObject* obj ):s(str), o(obj){}
- QCString s;
- QObject* o;
+ O ( const TQCString& str, TQObject* obj ):s(str), o(obj){}
+ TQCString s;
+ TQObject* o;
};
} // namespace
-static void fillQtObjectsEx( QValueList<O>& l, QObject* o, QCString path )
+static void fillQtObjectsEx( TQValueList<O>& l, TQObject* o, TQCString path )
{
if ( !path.isEmpty() )
path += '/';
int unnamed = 0;
- const QObjectList *list = o ? o->children() : QObject::objectTrees();
+ const TQObjectList *list = o ? o->children() : TQObject::objectTrees();
if ( list ) {
- QObjectListIt it( *list );
- QObject *obj;
+ TQObjectListIt it( *list );
+ TQObject *obj;
while ( (obj=it.current()) ) {
++it;
- QCString n = obj->name();
+ TQCString n = obj->name();
if ( n == "unnamed" || n.isEmpty() )
{
n.sprintf("%p", (void *) obj);
- n = QString("unnamed%1(%2, %3)").arg(++unnamed).arg(obj->className()).arg(n).latin1();
+ n = TQString("unnamed%1(%2, %3)").arg(++unnamed).arg(obj->className()).arg(n).latin1();
}
- QCString fn = path + n;
+ TQCString fn = path + n;
l.append( O( fn, obj ) );
if ( obj->children() )
fillQtObjectsEx( l, obj, fn );
@@ -1387,14 +1387,14 @@ static void fillQtObjectsEx( QValueList<O>& l, QObject* o, QCString path )
}
-static QObject* findQtObject( QCString id )
+static TQObject* findQtObject( TQCString id )
{
- QRegExp expr( id );
- QValueList<O> l;
+ TQRegExp expr( id );
+ TQValueList<O> l;
fillQtObjectsEx( l, 0, "qt" );
// Prefer an exact match, but fall-back on the first that contains the substring
- QObject* firstContains = 0L;
- for ( QValueList<O>::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+ 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 ) ) {
@@ -1404,26 +1404,26 @@ static QObject* findQtObject( QCString id )
return firstContains;
}
-static QCStringList findQtObjects( QCString id )
+static QCStringList findQtObjects( TQCString id )
{
- QRegExp expr( id );
- QValueList<O> l;
+ TQRegExp expr( id );
+ TQValueList<O> l;
fillQtObjectsEx( l, 0, "qt" );
QCStringList result;
- for ( QValueList<O>::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+ for ( TQValueList<O>::ConstIterator it = l.begin(); it != l.end(); ++it ) {
if ( (*it).s.contains( expr ) )
result << (*it).s;
}
return result;
}
-static bool receiveQtObject( const QCString &objId, const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData)
+static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData)
{
if ( objId == "qt" ) {
if ( fun == "interfaces()" ) {
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
QCStringList l;
l << "DCOPObject";
l << "Qt";
@@ -1431,49 +1431,49 @@ static bool receiveQtObject( const QCString &objId, const QCString &fun, const Q
return true;
} else if ( fun == "functions()" ) {
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
QCStringList l;
l << "QCStringList functions()";
l << "QCStringList interfaces()";
l << "QCStringList objects()";
- l << "QCStringList find(QCString)";
+ l << "QCStringList find(TQCString)";
reply << l;
return true;
} else if ( fun == "objects()" ) {
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
QCStringList l;
fillQtObjects( l, 0, "qt" );
reply << l;
return true;
- } else if ( fun == "find(QCString)" ) {
- QDataStream ds( data, IO_ReadOnly );
- QCString id;
+ } else if ( fun == "find(TQCString)" ) {
+ TQDataStream ds( data, IO_ReadOnly );
+ TQCString id;
ds >> id ;
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << findQtObjects( id ) ;
return true;
}
} else if ( objId.left(3) == "qt/" ) {
- QObject* o = findQtObject( objId );
+ TQObject* o = findQtObject( objId );
if ( !o )
return false;
if ( fun == "functions()" ) {
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
QCStringList l;
l << "QCStringList functions()";
l << "QCStringList interfaces()";
l << "QCStringList properties()";
- l << "bool setProperty(QCString,QVariant)";
- l << "QVariant property(QCString)";
- QStrList lst = o->metaObject()->slotNames( true );
+ l << "bool setProperty(TQCString,TQVariant)";
+ l << "TQVariant property(TQCString)";
+ TQStrList lst = o->metaObject()->slotNames( true );
int i = 0;
- for ( QPtrListIterator<char> it( lst ); it.current(); ++it ) {
+ for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
if ( o->metaObject()->slot( i++, true )->access != QMetaData::Public )
continue;
- QCString slot = it.current();
+ TQCString slot = it.current();
if ( slot.contains( "()" ) ) {
slot.prepend("void ");
l << slot;
@@ -1483,9 +1483,9 @@ static bool receiveQtObject( const QCString &objId, const QCString &fun, const Q
return true;
} else if ( fun == "interfaces()" ) {
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
QCStringList l;
- QMetaObject *meta = o->metaObject();
+ TQMetaObject *meta = o->metaObject();
while ( meta ) {
l.prepend( meta->className() );
meta = meta->superClass();
@@ -1494,15 +1494,15 @@ static bool receiveQtObject( const QCString &objId, const QCString &fun, const Q
return true;
} else if ( fun == "properties()" ) {
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
QCStringList l;
- QStrList lst = o->metaObject()->propertyNames( true );
- for ( QPtrListIterator<char> it( lst ); it.current(); ++it ) {
- QMetaObject *mo = o->metaObject();
- const QMetaProperty* p = mo->property( mo->findProperty( it.current(), true ), true );
+ TQStrList lst = o->metaObject()->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 );
if ( !p )
continue;
- QCString prop = p->type();
+ TQCString prop = p->type();
prop += ' ';
prop += p->name();
if ( !p->writable() )
@@ -1511,22 +1511,22 @@ static bool receiveQtObject( const QCString &objId, const QCString &fun, const Q
}
reply << l;
return true;
- } else if ( fun == "property(QCString)" ) {
- replyType = "QVariant";
- QDataStream ds( data, IO_ReadOnly );
- QCString name;
+ } else if ( fun == "property(TQCString)" ) {
+ replyType = "TQVariant";
+ TQDataStream ds( data, IO_ReadOnly );
+ TQCString name;
ds >> name ;
- QVariant result = o->property( name );
- QDataStream reply( replyData, IO_WriteOnly );
+ TQVariant result = o->property( name );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << result;
return true;
- } else if ( fun == "setProperty(QCString,QVariant)" ) {
- QDataStream ds( data, IO_ReadOnly );
- QCString name;
- QVariant value;
+ } else if ( fun == "setProperty(TQCString,TQVariant)" ) {
+ TQDataStream ds( data, IO_ReadOnly );
+ TQCString name;
+ TQVariant value;
ds >> name >> value;
replyType = "bool";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << (Q_INT8) o->setProperty( name, value );
return true;
} else {
@@ -1551,22 +1551,22 @@ static bool receiveQtObject( const QCString &objId, const QCString &fun, const Q
*/
-bool DCOPClient::receive(const QCString &/*app*/, const QCString &objId,
- const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData)
+bool DCOPClient::receive(const TQCString &/*app*/, const TQCString &objId,
+ const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData)
{
d->transaction = false; // Assume no transaction.
if ( objId == "DCOPClient" ) {
if ( fun == "objects()" ) {
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
QCStringList l;
if (d->qt_bridge_enabled)
{
l << "qt"; // the Qt bridge object
}
if ( kde_dcopObjMap ) {
- QMap<QCString, DCOPObject *>::ConstIterator it( kde_dcopObjMap->begin());
+ TQMap<TQCString, DCOPObject *>::ConstIterator it( kde_dcopObjMap->begin());
for (; it != kde_dcopObjMap->end(); ++it) {
if ( !it.key().isEmpty() ) {
if ( it.key() == d->defaultObject )
@@ -1581,15 +1581,15 @@ bool DCOPClient::receive(const QCString &/*app*/, const QCString &objId,
}
if ( objId.isEmpty() || objId == "DCOPClient" ) {
- if ( fun == "applicationRegistered(QCString)" ) {
- QDataStream ds( data, IO_ReadOnly );
- QCString r;
+ if ( fun == "applicationRegistered(TQCString)" ) {
+ TQDataStream ds( data, IO_ReadOnly );
+ TQCString r;
ds >> r;
emit applicationRegistered( r );
return true;
- } else if ( fun == "applicationRemoved(QCString)" ) {
- QDataStream ds( data, IO_ReadOnly );
- QCString r;
+ } else if ( fun == "applicationRemoved(TQCString)" ) {
+ TQDataStream ds( data, IO_ReadOnly );
+ TQCString r;
ds >> r;
emit applicationRemoved( r );
return true;
@@ -1618,7 +1618,7 @@ bool DCOPClient::receive(const QCString &/*app*/, const QCString &objId,
if (!objId.isEmpty() && objId[objId.length()-1] == '*') {
// handle a multicast to several objects.
// doesn't handle proxies currently. should it?
- QPtrList<DCOPObject> matchList =
+ TQPtrList<DCOPObject> matchList =
DCOPObject::match(objId.left(objId.length()-1));
for (DCOPObject *objPtr = matchList.first();
objPtr != 0L; objPtr = matchList.next()) {
@@ -1629,7 +1629,7 @@ bool DCOPClient::receive(const QCString &/*app*/, const QCString &objId,
return true;
} else if (!DCOPObject::hasObject(objId)) {
if ( DCOPObjectProxy::proxies ) {
- for ( QPtrListIterator<DCOPObjectProxy> it( *DCOPObjectProxy::proxies ); it.current(); ++it ) {
+ for ( TQPtrListIterator<DCOPObjectProxy> it( *DCOPObjectProxy::proxies ); it.current(); ++it ) {
// TODO: it.current()->setCallingDcopClient(this);
if ( it.current()->process( objId, fun, data, replyType, replyData ) )
return true;
@@ -1652,12 +1652,12 @@ bool DCOPClient::receive(const QCString &/*app*/, const QCString &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(QCString &replyType, QByteArray &replyData)
+static bool findResultOk(TQCString &replyType, TQByteArray &replyData)
{
Q_INT8 success; // Tsk.. why is there no operator>>(bool)?
if (replyType != "bool") return false;
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
reply >> success;
if (!success) return false;
@@ -1666,21 +1666,21 @@ static bool findResultOk(QCString &replyType, QByteArray &replyData)
// set the function result to DCOPRef pointing to (app,objId) and
// return true.
-static bool findSuccess(const QCString &app, const QCString objId, QCString &replyType, QByteArray &replyData)
+static bool findSuccess(const TQCString &app, const TQCString objId, TQCString &replyType, TQByteArray &replyData)
{
DCOPRef ref(app, objId);
replyType = "DCOPRef";
- replyData = QByteArray();
- QDataStream final_reply( replyData, IO_WriteOnly );
+ replyData = TQByteArray();
+ TQDataStream final_reply( replyData, IO_WriteOnly );
final_reply << ref;
return true;
}
-bool DCOPClient::find(const QCString &app, const QCString &objId,
- const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData)
+bool DCOPClient::find(const TQCString &app, const TQCString &objId,
+ const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData)
{
d->transaction = false; // Transactions are not allowed.
if ( !app.isEmpty() && app != d->appId && app[app.length()-1] != '*') {
@@ -1706,13 +1706,13 @@ bool DCOPClient::find(const QCString &app, const QCString &objId,
else {
// handle a multicast to several objects.
// doesn't handle proxies currently. should it?
- QPtrList<DCOPObject> matchList =
+ TQPtrList<DCOPObject> matchList =
DCOPObject::match(objId.left(objId.length()-1));
for (DCOPObject *objPtr = matchList.first();
objPtr != 0L; objPtr = matchList.next())
{
replyType = 0;
- replyData = QByteArray();
+ replyData = TQByteArray();
if (fun.isEmpty())
return findSuccess(app, objPtr->objId(), replyType, replyData);
objPtr->setCallingDcopClient(this);
@@ -1725,17 +1725,17 @@ bool DCOPClient::find(const QCString &app, const QCString &objId,
}
-bool DCOPClient::call(const QCString &remApp, const QCString &remObjId,
- const QCString &remFun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData,
+bool DCOPClient::call(const TQCString &remApp, const TQCString &remObjId,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData,
bool useEventLoop)
{
return call( remApp, remObjId, remFun, data, replyType, replyData, useEventLoop, -1 );
}
-bool DCOPClient::call(const QCString &remApp, const QCString &remObjId,
- const QCString &remFun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData,
+bool DCOPClient::call(const TQCString &remApp, const TQCString &remObjId,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData,
bool useEventLoop, int timeout)
{
if (remApp.isEmpty())
@@ -1745,7 +1745,7 @@ bool DCOPClient::call(const QCString &remApp, const QCString &remObjId,
if ( localClient ) {
bool saveTransaction = d->transaction;
Q_INT32 saveTransactionId = d->transactionId;
- QCString saveSenderId = d->senderId;
+ TQCString saveSenderId = d->senderId;
d->senderId = 0; // Local call
bool b = localClient->receive( remApp, remObjId, remFun, data, replyType, replyData );
@@ -1754,7 +1754,7 @@ bool DCOPClient::call(const QCString &remApp, const QCString &remObjId,
if (id) {
// Call delayed. We have to wait till it has been processed.
do {
- QApplication::eventLoop()->processEvents( QEventLoop::WaitForMore);
+ TQApplication::eventLoop()->processEvents( TQEventLoop::WaitForMore);
} while( !localClient->isLocalTransactionFinished(id, replyType, replyData));
b = true;
}
@@ -1777,12 +1777,12 @@ void DCOPClient::asyncReplyReady()
}
}
-int DCOPClient::callAsync(const QCString &remApp, const QCString &remObjId,
- const QCString &remFun, const QByteArray &data,
- QObject *callBackObj, const char *callBackSlot)
+int DCOPClient::callAsync(const TQCString &remApp, const TQCString &remObjId,
+ const TQCString &remFun, const TQByteArray &data,
+ TQObject *callBackObj, const char *callBackSlot)
{
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
ReplyStruct *replyStruct = new ReplyStruct;
replyStruct->replyType = new QCString;
@@ -1806,16 +1806,16 @@ int DCOPClient::callAsync(const QCString &remApp, const QCString &remObjId,
if (replyStruct->transactionId == 0)
{
// Call is finished already
- QTimer::singleShot(0, this, SLOT(asyncReplyReady()));
+ TQTimer::singleShot(0, this, TQT_SLOT(asyncReplyReady()));
d->asyncReplyQueue.append(replyStruct);
}
return replyStruct->replyId;
}
-bool DCOPClient::callInternal(const QCString &remApp, const QCString &remObjId,
- const QCString &remFun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData,
+bool DCOPClient::callInternal(const TQCString &remApp, const TQCString &remObjId,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData,
bool useEventLoop, int timeout, int minor_opcode)
{
ReplyStruct replyStruct;
@@ -1824,8 +1824,8 @@ bool DCOPClient::callInternal(const QCString &remApp, const QCString &remObjId,
return callInternal(remApp, remObjId, remFun, data, &replyStruct, useEventLoop, timeout, minor_opcode);
}
-bool DCOPClient::callInternal(const QCString &remApp, const QCString &remObjId,
- const QCString &remFun, const QByteArray &data,
+bool DCOPClient::callInternal(const TQCString &remApp, const TQCString &remObjId,
+ const TQCString &remFun, const TQByteArray &data,
ReplyStruct *replyStruct,
bool useEventLoop, int timeout, int minor_opcode)
{
@@ -1838,8 +1838,8 @@ bool DCOPClient::callInternal(const QCString &remApp, const QCString &remObjId,
if ( !d->currentKey )
d->currentKey = d->key; // no key yet, initiate new call
- QByteArray ba;
- QDataStream ds(ba, IO_WriteOnly);
+ TQByteArray ba;
+ TQDataStream ds(ba, IO_WriteOnly);
ds << d->appId << remApp << remObjId << normalizeFunctionSignature(remFun) << data.size();
IceGetHeader(d->iceConn, d->majorOpcode, minor_opcode,
@@ -1963,8 +1963,8 @@ bool DCOPClient::callInternal(const QCString &remApp, const QCString &remObjId,
useEventLoop = false;
continue;
}
- *(replyStruct->replyType) = QCString();
- *(replyStruct->replyData) = QByteArray();
+ *(replyStruct->replyType) = TQCString();
+ *(replyStruct->replyData) = TQByteArray();
replyStruct->status = ReplyStruct::Failed;
break;
}
@@ -2020,19 +2020,19 @@ void DCOPClient::processSocketData(int fd)
}
}
-void DCOPClient::setDefaultObject( const QCString& objId )
+void DCOPClient::setDefaultObject( const TQCString& objId )
{
d->defaultObject = objId;
}
-QCString DCOPClient::defaultObject() const
+TQCString DCOPClient::defaultObject() const
{
return d->defaultObject;
}
bool
-DCOPClient::isLocalTransactionFinished(Q_INT32 id, QCString &replyType, QByteArray &replyData)
+DCOPClient::isLocalTransactionFinished(Q_INT32 id, TQCString &replyType, TQByteArray &replyData)
{
DCOPClientPrivate::LocalTransactionResult *result = d->localTransActionList.take(id);
if (!result)
@@ -2051,7 +2051,7 @@ DCOPClient::beginTransaction()
if (d->opcode == DCOPSend)
return 0;
if (!d->transactionList)
- d->transactionList = new QPtrList<DCOPClientTransaction>;
+ d->transactionList = new TQPtrList<DCOPClientTransaction>;
d->transaction = true;
DCOPClientTransaction *trans = new DCOPClientTransaction();
@@ -2076,8 +2076,8 @@ DCOPClient::transactionId() const
}
void
-DCOPClient::endTransaction( DCOPClientTransaction *trans, QCString& replyType,
- QByteArray &replyData)
+DCOPClient::endTransaction( DCOPClientTransaction *trans, TQCString& replyType,
+ TQByteArray &replyData)
{
if ( !trans )
return;
@@ -2111,8 +2111,8 @@ DCOPClient::endTransaction( DCOPClientTransaction *trans, QCString& replyType,
DCOPMsg *pMsg;
- QByteArray ba;
- QDataStream ds(ba, IO_WriteOnly);
+ TQByteArray ba;
+ TQDataStream ds(ba, IO_WriteOnly);
ds << d->appId << trans->senderId << trans->id << replyType << replyData;
IceGetHeader(d->iceConn, d->majorOpcode, DCOPReplyDelayed,
@@ -2126,32 +2126,32 @@ DCOPClient::endTransaction( DCOPClientTransaction *trans, QCString& replyType,
}
void
-DCOPClient::emitDCOPSignal( const QCString &object, const QCString &signal, const QByteArray &data)
+DCOPClient::emitDCOPSignal( const TQCString &object, const TQCString &signal, const TQByteArray &data)
{
// We hack the sending object name into the signal name
send("DCOPServer", "emit", object+"#"+normalizeFunctionSignature(signal), data);
}
void
-DCOPClient::emitDCOPSignal( const QCString &signal, const QByteArray &data)
+DCOPClient::emitDCOPSignal( const TQCString &signal, const TQByteArray &data)
{
emitDCOPSignal(0, signal, data);
}
bool
-DCOPClient::connectDCOPSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- const QCString &receiverObj, const QCString &slot, bool Volatile)
+DCOPClient::connectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ const TQCString &receiverObj, const TQCString &slot, bool Volatile)
{
- QCString replyType;
- QByteArray data, replyData;
+ TQCString replyType;
+ TQByteArray data, replyData;
Q_INT8 iVolatile = Volatile ? 1 : 0;
- QDataStream args(data, IO_WriteOnly );
+ TQDataStream args(data, IO_WriteOnly );
args << sender << senderObj << normalizeFunctionSignature(signal) << receiverObj << normalizeFunctionSignature(slot) << iVolatile;
if (!call("DCOPServer", 0,
- "connectSignal(QCString,QCString,QCString,QCString,QCString,bool)",
+ "connectSignal(TQCString,TQCString,TQCString,TQCString,TQCString,bool)",
data, replyType, replyData))
{
return false;
@@ -2160,32 +2160,32 @@ DCOPClient::connectDCOPSignal( const QCString &sender, const QCString &senderObj
if (replyType != "bool")
return false;
- QDataStream reply(replyData, IO_ReadOnly );
+ TQDataStream reply(replyData, IO_ReadOnly );
Q_INT8 result;
reply >> result;
return (result != 0);
}
bool
-DCOPClient::connectDCOPSignal( const QCString &sender, const QCString &signal,
- const QCString &receiverObj, const QCString &slot, bool Volatile)
+DCOPClient::connectDCOPSignal( const TQCString &sender, const TQCString &signal,
+ const TQCString &receiverObj, const TQCString &slot, bool Volatile)
{
return connectDCOPSignal( sender, 0, signal, receiverObj, slot, Volatile);
}
bool
-DCOPClient::disconnectDCOPSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- const QCString &receiverObj, const QCString &slot)
+DCOPClient::disconnectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ const TQCString &receiverObj, const TQCString &slot)
{
- QCString replyType;
- QByteArray data, replyData;
+ TQCString replyType;
+ TQByteArray data, replyData;
- QDataStream args(data, IO_WriteOnly );
+ TQDataStream args(data, IO_WriteOnly );
args << sender << senderObj << normalizeFunctionSignature(signal) << receiverObj << normalizeFunctionSignature(slot);
if (!call("DCOPServer", 0,
- "disconnectSignal(QCString,QCString,QCString,QCString,QCString)",
+ "disconnectSignal(TQCString,TQCString,TQCString,TQCString,TQCString)",
data, replyType, replyData))
{
return false;
@@ -2194,15 +2194,15 @@ DCOPClient::disconnectDCOPSignal( const QCString &sender, const QCString &sender
if (replyType != "bool")
return false;
- QDataStream reply(replyData, IO_ReadOnly );
+ TQDataStream reply(replyData, IO_ReadOnly );
Q_INT8 result;
reply >> result;
return (result != 0);
}
bool
-DCOPClient::disconnectDCOPSignal( const QCString &sender, const QCString &signal,
- const QCString &receiverObj, const QCString &slot)
+DCOPClient::disconnectDCOPSignal( const TQCString &sender, const TQCString &signal,
+ const TQCString &receiverObj, const TQCString &slot)
{
return disconnectDCOPSignal( sender, 0, signal, receiverObj, slot);
}
@@ -2232,10 +2232,10 @@ DCOPClient::setPriorityCall(bool b)
void
DCOPClient::emergencyClose()
{
- QPtrList<DCOPClient> list;
+ TQPtrList<DCOPClient> list;
client_map_t *map = DCOPClient_CliMap;
if (!map) return;
- QAsciiDictIterator<DCOPClient> it(*map);
+ TQAsciiDictIterator<DCOPClient> it(*map);
while(it.current()) {
list.removeRef(it.current());
list.append(it.current());
diff --git a/dcop/dcopclient.h b/dcop/dcopclient.h
index 2024aeaeb..41266c187 100644
--- a/dcop/dcopclient.h
+++ b/dcop/dcopclient.h
@@ -23,10 +23,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef _DCOPCLIENT_H
#define _DCOPCLIENT_H
-#include <qobject.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
#include <kdatastream.h> // needed for proper bool marshalling
#include <kdelibs_export.h>
@@ -34,7 +34,7 @@ class DCOPObjectProxy;
class DCOPClientPrivate;
class DCOPClientTransaction;
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
/**
* Inter-process communication and remote procedure calls
@@ -51,15 +51,15 @@ typedef QValueList<QCString> QCStringList;
* and registerAs() for
* more information.
*
- * Data to be sent should be serialized into a QDataStream which was
- * initialized with the QByteArray that you actually intend to send
+ * Data to be sent should be serialized into a TQDataStream which was
+ * initialized with the TQByteArray that you actually intend to send
* the data in. An example of how you might do this:
*
* \code
- * QByteArray data;
- * QDataStream arg(data, IO_WriteOnly);
- * arg << QString("This is text I am serializing");
- * client->send("someApp", "someObject", "someFunction(QString)", data);
+ * TQByteArray data;
+ * TQDataStream arg(data, IO_WriteOnly);
+ * arg << TQString("This is text I am serializing");
+ * client->send("someApp", "someObject", "someFunction(TQString)", data);
* \endcode
*
* @see KApplication::dcopClient()
@@ -86,7 +86,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* find the server anyway.
* @param addr the new address of the server
*/
- static void setServerAddress(const QCString &addr);
+ static void setServerAddress(const TQCString &addr);
/**
* Attaches to the DCOP server.
@@ -96,9 +96,9 @@ class DCOP_EXPORT DCOPClient : public QObject
*
* Naturally, only attached application can use DCOP services.
*
- * If a QApplication object exists then client registers itself as
- * QApplication::name() + "-" + \<pid\>.
- * If no QApplication object exists the client registers itself as
+ * If a TQApplication object exists then client registers itself as
+ * TQApplication::name() + "-" + \<pid\>.
+ * If no TQApplication object exists the client registers itself as
* "anonymous".
*
* If you want to register differently, you should use registerAs()
@@ -191,7 +191,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* @return The actual @p appId used for the registration or a null string
* if the registration wasn't successful.
*/
- QCString registerAs( const QCString &appId, bool addPID = true );
+ TQCString registerAs( const TQCString &appId, bool addPID = true );
/**
* Returns whether or not the client is registered at the server.
@@ -202,9 +202,9 @@ class DCOP_EXPORT DCOPClient : public QObject
/**
* Returns the current app id or a null string if the application
* hasn't yet been registered.
- * @return the application id, or QString::null if not registered
+ * @return the application id, or TQString::null if not registered
*/
- QCString appId() const;
+ TQCString appId() const;
/**
* Returns the socket fd that is used for communication with the server.
@@ -251,12 +251,12 @@ class DCOP_EXPORT DCOPClient : public QObject
*
* @return Whether or not the server was able to accept the send.
*/
- bool send(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data);
+ bool send(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQByteArray &data);
/**
* This function acts exactly the same as the above, but the data
- * parameter can be specified as a QString for convenience.
+ * parameter can be specified as a TQString for convenience.
*
* @param remApp The remote application id.
* @param remObj The name of the remote object.
@@ -265,14 +265,14 @@ class DCOP_EXPORT DCOPClient : public QObject
*
* @return Whether or not the server was able to accept the send.
*/
- bool send(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QString &data);
+ bool send(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQString &data);
/**
* Performs a synchronous send and receive.
*
* The parameters are the same as for send, with the exception of
- * another QByteArray being provided for results to be
+ * another TQByteArray being provided for results to be
* (optionally) returned in.
*
* A call blocks the application until the process receives the
@@ -297,17 +297,17 @@ class DCOP_EXPORT DCOPClient : public QObject
*
* @see send()
*/
- bool call(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData,
+ bool call(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData,
bool useEventLoop/*=false*/, int timeout/*=-1*/);
/**
* @deprecated
*/
// KDE4 merge with above
- bool call(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData,
+ bool call(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData,
bool useEventLoop=false);
/**
@@ -319,8 +319,8 @@ class DCOP_EXPORT DCOPClient : public QObject
* slot that is called when an answer is received.
*
* The slot should have the following signature:
- * callBackSlot(int callId, const QCString& replyType,
- * const QByteArray &replyData);
+ * callBackSlot(int callId, const TQCString& replyType,
+ * const TQByteArray &replyData);
*
*
* @param remApp the remote application's id
@@ -338,9 +338,9 @@ class DCOP_EXPORT DCOPClient : public QObject
*
* @since 3.2
*/
- int callAsync(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data,
- QObject *callBackObj, const char *callBackSlot);
+ int callAsync(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQByteArray &data,
+ TQObject *callBackObj, const char *callBackSlot);
/**
* Searches for an object which matches a criteria.
@@ -378,18 +378,18 @@ class DCOP_EXPORT DCOPClient : public QObject
*
* @see send()
*/
- bool findObject(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data,
- QCString &foundApp, QCString &foundObj,
+ bool findObject(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString &foundApp, TQCString &foundObj,
bool useEventLoop/*=false*/, int timeout/*=-1*/);
/**
* @deprecated
*/
// KDE4 merge with above
- bool findObject(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data,
- QCString &foundApp, QCString &foundObj,
+ bool findObject(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString &foundApp, TQCString &foundObj,
bool useEventLoop=false);
@@ -397,11 +397,11 @@ class DCOP_EXPORT DCOPClient : public QObject
* Emits @p signal as DCOP signal from object @p object with @p data as
* arguments.
*/
- void emitDCOPSignal( const QCString &object, const QCString &signal,
- const QByteArray &data);
+ void emitDCOPSignal( const TQCString &object, const TQCString &signal,
+ const TQByteArray &data);
/* For backwards compatibility */
- void emitDCOPSignal( const QCString &signal, const QByteArray &data);
+ void emitDCOPSignal( const TQCString &signal, const TQByteArray &data);
/**
* Connects to a DCOP signal.
@@ -423,17 +423,17 @@ class DCOP_EXPORT DCOPClient : public QObject
* @li @p Volatile is true and @p sender does not exist.
* @li @p signal and @p slot do not have matching arguments.
*/
- bool connectDCOPSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- const QCString &receiverObj, const QCString &slot,
+ bool connectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ const TQCString &receiverObj, const TQCString &slot,
bool Volatile);
/**
* @deprecated
* For backwards compatibility
*/
- bool connectDCOPSignal( const QCString &sender, const QCString &signal,
- const QCString &receiverObj, const QCString &slot,
+ bool connectDCOPSignal( const TQCString &sender, const TQCString &signal,
+ const TQCString &receiverObj, const TQCString &slot,
bool Volatile) KDE_DEPRECATED;
/**
@@ -453,16 +453,16 @@ class DCOP_EXPORT DCOPClient : public QObject
* If empty all slots will be disconnected.
* @return false if no connection(s) where removed.
*/
- bool disconnectDCOPSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- const QCString &receiverObj, const QCString &slot);
+ bool disconnectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ const TQCString &receiverObj, const TQCString &slot);
/**
* @deprecated
* For backwards compatibility
*/
- bool disconnectDCOPSignal( const QCString &sender, const QCString &signal,
- const QCString &receiverObj, const QCString &slot) KDE_DEPRECATED;
+ bool disconnectDCOPSignal( const TQCString &sender, const TQCString &signal,
+ const TQCString &receiverObj, const TQCString &slot) KDE_DEPRECATED;
/**
* Reimplement this function to handle app-wide function calls unassociated w/an object.
@@ -479,8 +479,8 @@ class DCOP_EXPORT DCOPClient : public QObject
* @return true if successful, false otherwise
* @see setDefaultObject()
*/
- virtual bool process(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData);
+ virtual bool process(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData);
/**
* Delays the reply of the current function call
@@ -500,7 +500,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* @param replyData write the reply data in this array
* @see beginTransaction()
*/
- void endTransaction( DCOPClientTransaction *t, QCString& replyType, QByteArray &replyData);
+ void endTransaction( DCOPClientTransaction *t, TQCString& replyType, TQByteArray &replyData);
/**
* Test whether the current function call is delayed.
@@ -518,7 +518,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* @param remApp the id of the remote application
* @return true if the remote application is registered, otherwise @p false.
*/
- bool isApplicationRegistered( const QCString& remApp);
+ bool isApplicationRegistered( const TQCString& remApp);
/**
* Retrieves the list of all currently registered applications
@@ -534,7 +534,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* and false if an error occurred
* @return the list of object ids
*/
- QCStringList remoteObjects( const QCString& remApp, bool *ok = 0 );
+ QCStringList remoteObjects( const TQCString& remApp, bool *ok = 0 );
/**
* Retrieves the list of interfaces of the remote object @p remObj
@@ -545,7 +545,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* and false if an error occurred
* @return the list of interfaces
*/
- QCStringList remoteInterfaces( const QCString& remApp, const QCString& remObj , bool *ok = 0 );
+ QCStringList remoteInterfaces( const TQCString& remApp, const TQCString& remObj , bool *ok = 0 );
/**
* Retrieves the list of functions of the remote object @p remObj
@@ -556,7 +556,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* and false if an error occurred
* @return the list of function ids
*/
- QCStringList remoteFunctions( const QCString& remApp, const QCString& remObj , bool *ok = 0 );
+ QCStringList remoteFunctions( const TQCString& remApp, const TQCString& remObj , bool *ok = 0 );
/**
* @internal
@@ -572,9 +572,9 @@ class DCOP_EXPORT DCOPClient : public QObject
* @param replyData write the reply data in this array
* @return true if successful, false otherwise
*/
- bool receive(const QCString &app, const QCString &obj,
- const QCString &fun, const QByteArray& data,
- QCString& replyType, QByteArray &replyData);
+ bool receive(const TQCString &app, const TQCString &obj,
+ const TQCString &fun, const TQByteArray& data,
+ TQCString& replyType, TQByteArray &replyData);
/**
* @internal
@@ -589,9 +589,9 @@ 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 QCString &app, const QCString &obj,
- const QCString &fun, const QByteArray& data,
- QCString& replyType, QByteArray &replyData);
+ bool find(const TQCString &app, const TQCString &obj,
+ const TQCString &fun, const TQByteArray& data,
+ TQCString& replyType, TQByteArray &replyData);
/**
* Normalizes the function signature @p fun.
@@ -601,7 +601,7 @@ class DCOP_EXPORT DCOPClient : public QObject
*
* Example for a normalized signature:
* \code
- * "someFunction(QString,int)"
+ * "someFunction(TQString,int)"
* \endcode
*
* When using send() or call(), normalization is done
@@ -610,7 +610,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* @param fun the function signature to normalize
* @return the normalized function
*/
- static QCString normalizeFunctionSignature( const QCString& fun );
+ static TQCString normalizeFunctionSignature( const TQCString& fun );
/**
@@ -618,7 +618,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* @return the application id of the last application that send a message
* to this client
*/
- QCString senderId() const;
+ TQCString senderId() const;
/**
@@ -628,7 +628,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* will be send further to @p objId.
* @param objId the id of the new default object
*/
- void setDefaultObject( const QCString& objId );
+ void setDefaultObject( const TQCString& objId );
/**
* Returns the current default object or an empty string if no object is
@@ -638,7 +638,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* been processed by the DCOPClient itself.
* @return the id of the new default object
*/
- QCString defaultObject() const;
+ TQCString defaultObject() const;
/**
* Enables / disables the applicationRegistered() /
@@ -693,7 +693,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 QCString &_appId );
+ static DCOPClient* findLocalClient( const TQCString &_appId );
/**
* @internal Do not use.
@@ -718,19 +718,19 @@ class DCOP_EXPORT DCOPClient : public QObject
* @return Filename that contains information how to contact the
* DCOPserver.
*/
- static QCString dcopServerFile(const QCString &hostname=0);
+ static TQCString dcopServerFile(const TQCString &hostname=0);
/**
* @deprecated
* For backwards compatibility with KDE 2.x
* // KDE4 remove
*/
- static QCString dcopServerFileOld(const QCString &hostname=0) KDE_DEPRECATED;
+ static TQCString dcopServerFileOld(const TQCString &hostname=0) KDE_DEPRECATED;
/**
* Return the path of iceauth or an empty string if not found.
*/
- static QCString iceauthPath();
+ static TQCString iceauthPath();
signals:
/**
@@ -741,7 +741,7 @@ signals:
* that you want to get these events.
* @param appId the id of the new application
*/
- void applicationRegistered( const QCString& appId );
+ void applicationRegistered( const TQCString& appId );
/**
* Indicates that the formerly registered application @p appId has
* been removed.
@@ -750,7 +750,7 @@ signals:
* DCOP server that you want to get these events.
* @param appId the id of the removed application
*/
- void applicationRemoved( const QCString& appId );
+ void applicationRemoved( const TQCString& appId );
/**
* Indicates that the process of establishing DCOP communications failed
@@ -760,7 +760,7 @@ signals:
* aid.
* @param msg the message tha contains further information
*/
- void attachFailed(const QString &msg);
+ void attachFailed(const TQString &msg);
/**
* Indicates that user input shall be blocked or released,
@@ -790,7 +790,7 @@ signals:
* @see callAsync()
* @since 3.2
*/
- void callBack(int, const QCString&, const QByteArray &);
+ void callBack(int, const TQCString&, const TQByteArray &);
public slots:
/**
@@ -816,18 +816,18 @@ public:
private:
- bool isLocalTransactionFinished(Q_INT32 id, QCString &replyType, QByteArray &replyData);
+ bool isLocalTransactionFinished(Q_INT32 id, TQCString &replyType, TQByteArray &replyData);
bool attachInternal( bool registerAsAnonymous = true );
- bool callInternal(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData,
+ bool callInternal(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData,
bool useEventLoop, int timeout, int minor_opcode);
- bool callInternal(const QCString &remApp, const QCString &remObjId,
- const QCString &remFun, const QByteArray &data,
+ bool callInternal(const TQCString &remApp, const TQCString &remObjId,
+ const TQCString &remFun, const TQByteArray &data,
ReplyStruct *replyStruct,
bool useEventLoop, int timeout, int minor_opcode);
diff --git a/dcop/dcopidl/dcopidl_test.h b/dcop/dcopidl/dcopidl_test.h
index a902be4fd..6d57167e2 100644
--- a/dcop/dcopidl/dcopidl_test.h
+++ b/dcop/dcopidl/dcopidl_test.h
@@ -12,9 +12,9 @@
class Test2;
// this has to work too
-#include <qstring.h>
+#include <tqstring.h>
-typedef QMap<KIO::Job *, KIODownload> KIODownloadMap;
+typedef TQMap<KIO::Job *, KIODownload> KIODownloadMap;
class Test3;
// Those namespaces are opened and closed, so they should be just ignored
@@ -31,7 +31,7 @@ namespace KMail {
* blah di blah
**/
class KDEUI_EXPORT Test : public MyNamespace::MyParentClass, virtual public DCOPObject,
- public QValueList<QString>
+ public TQValueList<TQString>
{
K_DCOP
@@ -45,7 +45,7 @@ public:
~Test();
int getPageOfObj( int obj );
void setCell( KSpreadTable *table,
- const QPoint& point );
+ const TQPoint& point );
SomeForwardFooPrivate *d;
static const int AUDIO_CD = 1;
@@ -54,8 +54,8 @@ public:
enum { Enum1, Enum2 };
enum NamedEnum { Enum3, Enum4 };
k_dcop:
- virtual QString url();
- virtual QString constTest() const;
+ virtual TQString url();
+ virtual TQString constTest() const;
virtual DCOPRef firstView();
virtual DCOPRef nextView();
virtual int getNumObjects();
@@ -68,8 +68,8 @@ k_dcop:
**/
int getPageOfObj( int obj );
void setCell( const int& point = 3 );
- QValueList<DCOPRef> getWindows();
- const QStringList remotes(); // returns const type, but shouldn't use const var for it in stub
+ TQValueList<DCOPRef> getWindows();
+ const TQStringList remotes(); // returns const type, but shouldn't use const var for it in stub
k_dcop_signals:
void blah_signal();
@@ -78,7 +78,7 @@ private:
Test3 *doc();
struct KIODownload;
- typedef QMap<KIO::Job *, KIODownload> KIODownloadMap;
+ typedef TQMap<KIO::Job *, KIODownload> KIODownloadMap;
};
class Test2 : public DCOPObject
diff --git a/dcop/dcopidl/main.cpp b/dcop/dcopidl/main.cpp
index 03e0a6465..aa60e2c41 100644
--- a/dcop/dcopidl/main.cpp
+++ b/dcop/dcopidl/main.cpp
@@ -20,9 +20,9 @@ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qstring.h>
-#include <qfile.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqcstring.h>
#include <stdlib.h>
void dcopidlParse( const char *_code );
@@ -40,14 +40,14 @@ int main( int argc, char** argv )
fprintf(stderr, "Usage : dcopidl input_file\n");
return -1;
}
- QFile file( argv[1] );
+ TQFile file( argv[1] );
if ( !file.open( IO_ReadOnly ) )
{
fprintf(stderr, "Can't open input file\n");
return -1;
}
- QByteArray arr = file.readAll();
+ TQByteArray arr = file.readAll();
uint len = arr.size();
uint j = 1;
for (uint i = 1; i<len; i++, j++) {
diff --git a/dcop/dcopidl/scanner.cc b/dcop/dcopidl/scanner.cc
index 4926e0421..92c08583f 100644
--- a/dcop/dcopidl/scanner.cc
+++ b/dcop/dcopidl/scanner.cc
@@ -849,8 +849,8 @@ extern int idl_line_no;
int comment_mode;
int function_mode = 0;
-#include <qstring.h>
-#include <qregexp.h>
+#include <tqstring.h>
+#include <tqregexp.h>
static long ascii_to_longlong( long base, const char *s )
{
@@ -1225,10 +1225,10 @@ case 10:
YY_RULE_SETUP
#line 170 "scanner.ll"
{
- QString s( yytext );
- int i = s.find(QRegExp("[\"<]"))+1;
- int j = s.find(QRegExp("[\">]"), i);
- yylval._str = new QString( s.mid( i, j - i ) );
+ TQString s( yytext );
+ int i = s.find(TQRegExp("[\"<]"))+1;
+ int j = s.find(TQRegExp("[\">]"), i);
+ yylval._str = new TQString( s.mid( i, j - i ) );
idl_line_no++;
return T_INCLUDE;
}
@@ -1539,7 +1539,7 @@ case 71:
YY_RULE_SETUP
#line 243 "scanner.ll"
{
- yylval._str = new QString( yytext );
+ yylval._str = new TQString( yytext );
return T_IDENTIFIER;
}
YY_BREAK
@@ -1587,7 +1587,7 @@ case 80:
YY_RULE_SETUP
#line 268 "scanner.ll"
{
- QCString s( yytext );
+ TQCString s( yytext );
s = s.mid( 1, s.length() - 2 );
yylval._char = translate_char( s );
return T_CHARACTER_LITERAL;
@@ -1597,8 +1597,8 @@ case 81:
YY_RULE_SETUP
#line 274 "scanner.ll"
{
- QString s( yytext );
- yylval._str = new QString( s.mid( 1, s.length() - 2 ) );
+ TQString s( yytext );
+ yylval._str = new TQString( s.mid( 1, s.length() - 2 ) );
return T_STRING_LITERAL;
}
YY_BREAK
diff --git a/dcop/dcopidl/yacc.cc b/dcop/dcopidl/yacc.cc
index 4147a3472..d41fa6dbd 100644
--- a/dcop/dcopidl/yacc.cc
+++ b/dcop/dcopidl/yacc.cc
@@ -226,21 +226,21 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdio.h>
#include <assert.h>
-#include <qstring.h>
+#include <tqstring.h>
#define AMP_ENTITY "&amp;"
#define YYERROR_VERBOSE
extern int yylex();
-// extern QString idl_lexFile;
+// extern TQString idl_lexFile;
extern int idl_line_no;
extern int function_mode;
static int dcop_area = 0;
static int dcop_signal_area = 0;
-static QString in_namespace( "" );
+static TQString in_namespace( "" );
void dcopidlInitFlex( const char *_code );
@@ -270,7 +270,7 @@ void yyerror( const char *s )
#line 67 "yacc.yy"
typedef union YYSTYPE {
long _int;
- QString *_str;
+ TQString *_str;
unsigned short _char;
double _float;
} YYSTYPE;
@@ -1757,7 +1757,7 @@ yyreduce:
case 41:
#line 308 "yacc.yy"
{
- QString* tmp = new QString( "%1::%2" );
+ TQString* tmp = new TQString( "%1::%2" );
*tmp = tmp->arg(*(yyvsp[-2]._str)).arg(*(yyvsp[0]._str));
yyval._str = tmp;
;}
@@ -1766,7 +1766,7 @@ yyreduce:
case 42:
#line 317 "yacc.yy"
{
- QString* tmp = new QString( " <SUPER>%1</SUPER>\n" );
+ TQString* tmp = new TQString( " <SUPER>%1</SUPER>\n" );
*tmp = tmp->arg( *(yyvsp[0]._str) );
yyval._str = tmp;
;}
@@ -1775,7 +1775,7 @@ yyreduce:
case 43:
#line 323 "yacc.yy"
{
- QString* tmp = new QString( " <SUPER>%1</SUPER>\n" );
+ TQString* tmp = new TQString( " <SUPER>%1</SUPER>\n" );
*tmp = tmp->arg( *(yyvsp[-3]._str) + "&lt;" + *(yyvsp[-1]._str) + "&gt;" );
yyval._str = tmp;
;}
@@ -1806,7 +1806,7 @@ yyreduce:
#line 347 "yacc.yy"
{
/* $$ = $1; */
- yyval._str = new QString( *(yyvsp[-2]._str) + *(yyvsp[0]._str) );
+ yyval._str = new TQString( *(yyvsp[-2]._str) + *(yyvsp[0]._str) );
;}
break;
@@ -1820,7 +1820,7 @@ yyreduce:
case 49:
#line 359 "yacc.yy"
{
- yyval._str = new QString( "" );
+ yyval._str = new TQString( "" );
;}
break;
@@ -1833,28 +1833,28 @@ yyreduce:
case 52:
#line 373 "yacc.yy"
{
- yyval._str = new QString( "" );
+ yyval._str = new TQString( "" );
;}
break;
case 53:
#line 377 "yacc.yy"
{
- yyval._str = new QString( *(yyvsp[-1]._str) + *(yyvsp[0]._str) );
+ yyval._str = new TQString( *(yyvsp[-1]._str) + *(yyvsp[0]._str) );
;}
break;
case 54:
#line 381 "yacc.yy"
{
- yyval._str = new QString( *(yyvsp[-1]._str) + *(yyvsp[0]._str) );
+ yyval._str = new TQString( *(yyvsp[-1]._str) + *(yyvsp[0]._str) );
;}
break;
case 55:
#line 385 "yacc.yy"
{
- yyval._str = new QString( *(yyvsp[-1]._str) + *(yyvsp[0]._str) );
+ yyval._str = new TQString( *(yyvsp[-1]._str) + *(yyvsp[0]._str) );
;}
break;
@@ -2003,11 +2003,11 @@ yyreduce:
#line 475 "yacc.yy"
{
if (dcop_area) {
- QString* tmp = new QString("<TYPEDEF name=\"%1\" template=\"%2\"><PARAM %3</TYPEDEF>\n");
+ TQString* tmp = new TQString("<TYPEDEF name=\"%1\" template=\"%2\"><PARAM %3</TYPEDEF>\n");
*tmp = tmp->arg( *(yyvsp[-1]._str) ).arg( *(yyvsp[-5]._str) ).arg( *(yyvsp[-3]._str) );
yyval._str = tmp;
} else {
- yyval._str = new QString("");
+ yyval._str = new TQString("");
}
;}
break;
@@ -2036,115 +2036,115 @@ yyreduce:
case 89:
#line 503 "yacc.yy"
- { yyval._str = new QString("signed int"); ;}
+ { yyval._str = new TQString("signed int"); ;}
break;
case 90:
#line 504 "yacc.yy"
- { yyval._str = new QString("signed int"); ;}
+ { yyval._str = new TQString("signed int"); ;}
break;
case 91:
#line 505 "yacc.yy"
- { yyval._str = new QString("unsigned int"); ;}
+ { yyval._str = new TQString("unsigned int"); ;}
break;
case 92:
#line 506 "yacc.yy"
- { yyval._str = new QString("unsigned int"); ;}
+ { yyval._str = new TQString("unsigned int"); ;}
break;
case 93:
#line 507 "yacc.yy"
- { yyval._str = new QString("signed short int"); ;}
+ { yyval._str = new TQString("signed short int"); ;}
break;
case 94:
#line 508 "yacc.yy"
- { yyval._str = new QString("signed short int"); ;}
+ { yyval._str = new TQString("signed short int"); ;}
break;
case 95:
#line 509 "yacc.yy"
- { yyval._str = new QString("signed long int"); ;}
+ { yyval._str = new TQString("signed long int"); ;}
break;
case 96:
#line 510 "yacc.yy"
- { yyval._str = new QString("signed long int"); ;}
+ { yyval._str = new TQString("signed long int"); ;}
break;
case 97:
#line 511 "yacc.yy"
- { yyval._str = new QString("unsigned short int"); ;}
+ { yyval._str = new TQString("unsigned short int"); ;}
break;
case 98:
#line 512 "yacc.yy"
- { yyval._str = new QString("unsigned short int"); ;}
+ { yyval._str = new TQString("unsigned short int"); ;}
break;
case 99:
#line 513 "yacc.yy"
- { yyval._str = new QString("unsigned long int"); ;}
+ { yyval._str = new TQString("unsigned long int"); ;}
break;
case 100:
#line 514 "yacc.yy"
- { yyval._str = new QString("unsigned long int"); ;}
+ { yyval._str = new TQString("unsigned long int"); ;}
break;
case 101:
#line 515 "yacc.yy"
- { yyval._str = new QString("int"); ;}
+ { yyval._str = new TQString("int"); ;}
break;
case 102:
#line 516 "yacc.yy"
- { yyval._str = new QString("long int"); ;}
+ { yyval._str = new TQString("long int"); ;}
break;
case 103:
#line 517 "yacc.yy"
- { yyval._str = new QString("long int"); ;}
+ { yyval._str = new TQString("long int"); ;}
break;
case 104:
#line 518 "yacc.yy"
- { yyval._str = new QString("short int"); ;}
+ { yyval._str = new TQString("short int"); ;}
break;
case 105:
#line 519 "yacc.yy"
- { yyval._str = new QString("short int"); ;}
+ { yyval._str = new TQString("short int"); ;}
break;
case 106:
#line 520 "yacc.yy"
- { yyval._str = new QString("char"); ;}
+ { yyval._str = new TQString("char"); ;}
break;
case 107:
#line 521 "yacc.yy"
- { yyval._str = new QString("signed char"); ;}
+ { yyval._str = new TQString("signed char"); ;}
break;
case 108:
#line 522 "yacc.yy"
- { yyval._str = new QString("unsigned char"); ;}
+ { yyval._str = new TQString("unsigned char"); ;}
break;
case 111:
#line 532 "yacc.yy"
{
- yyval._str = new QString( "" );
+ yyval._str = new TQString( "" );
;}
break;
case 113:
#line 537 "yacc.yy"
{
- yyval._str = new QString( *(yyvsp[-2]._str) + *(yyvsp[0]._str) );
+ yyval._str = new TQString( *(yyvsp[-2]._str) + *(yyvsp[0]._str) );
;}
break;
@@ -2166,7 +2166,7 @@ yyreduce:
case 118:
#line 548 "yacc.yy"
{
- QString *tmp = new QString("%1&lt;%2&gt;");
+ TQString *tmp = new TQString("%1&lt;%2&gt;");
*tmp = tmp->arg(*(yyvsp[-3]._str));
*tmp = tmp->arg(*(yyvsp[-1]._str));
yyval._str = tmp;
@@ -2176,7 +2176,7 @@ yyreduce:
case 119:
#line 554 "yacc.yy"
{
- QString *tmp = new QString("%1&lt;%2&gt;::%3");
+ TQString *tmp = new TQString("%1&lt;%2&gt;::%3");
*tmp = tmp->arg(*(yyvsp[-5]._str));
*tmp = tmp->arg(*(yyvsp[-3]._str));
*tmp = tmp->arg(*(yyvsp[0]._str));
@@ -2187,7 +2187,7 @@ yyreduce:
case 120:
#line 566 "yacc.yy"
{
- yyval._str = new QString(*(yyvsp[-2]._str) + "," + *(yyvsp[0]._str));
+ yyval._str = new TQString(*(yyvsp[-2]._str) + "," + *(yyvsp[0]._str));
;}
break;
@@ -2225,7 +2225,7 @@ yyreduce:
#line 596 "yacc.yy"
{
if (dcop_area) {
- QString* tmp = new QString("<TYPE qleft=\"const\" qright=\"" AMP_ENTITY "\">%1</TYPE>");
+ TQString* tmp = new TQString("<TYPE qleft=\"const\" qright=\"" AMP_ENTITY "\">%1</TYPE>");
*tmp = tmp->arg( *(yyvsp[-1]._str) );
yyval._str = tmp;
}
@@ -2235,7 +2235,7 @@ yyreduce:
case 126:
#line 603 "yacc.yy"
{
- QString* tmp = new QString("<TYPE>%1</TYPE>");
+ TQString* tmp = new TQString("<TYPE>%1</TYPE>");
*tmp = tmp->arg( *(yyvsp[0]._str) );
yyval._str = tmp;
;}
@@ -2244,7 +2244,7 @@ yyreduce:
case 127:
#line 608 "yacc.yy"
{
- QString* tmp = new QString("<TYPE>%1</TYPE>");
+ TQString* tmp = new TQString("<TYPE>%1</TYPE>");
*tmp = tmp->arg( *(yyvsp[-1]._str) );
yyval._str = tmp;
;}
@@ -2254,7 +2254,7 @@ yyreduce:
#line 613 "yacc.yy"
{
if (dcop_area) {
- QString* tmp = new QString("<TYPE qleft=\"const\" qright=\"" AMP_ENTITY "\">%1</TYPE>");
+ TQString* tmp = new TQString("<TYPE qleft=\"const\" qright=\"" AMP_ENTITY "\">%1</TYPE>");
*tmp = tmp->arg( *(yyvsp[-2]._str) );
yyval._str = tmp;
}
@@ -2272,7 +2272,7 @@ yyreduce:
case 130:
#line 625 "yacc.yy"
{
- QString* tmp = new QString("<TYPE>%1</TYPE>");
+ TQString* tmp = new TQString("<TYPE>%1</TYPE>");
*tmp = tmp->arg( *(yyvsp[0]._str) );
yyval._str = tmp;
;}
@@ -2289,7 +2289,7 @@ yyreduce:
case 132:
#line 639 "yacc.yy"
{
- yyval._str = new QString(*(yyvsp[-2]._str) + "," + *(yyvsp[0]._str));
+ yyval._str = new TQString(*(yyvsp[-2]._str) + "," + *(yyvsp[0]._str));
;}
break;
@@ -2304,11 +2304,11 @@ yyreduce:
#line 650 "yacc.yy"
{
if (dcop_area) {
- QString* tmp = new QString("\n <ARG>%1<NAME>%2</NAME></ARG>");
+ TQString* tmp = new TQString("\n <ARG>%1<NAME>%2</NAME></ARG>");
*tmp = tmp->arg( *(yyvsp[-2]._str) );
*tmp = tmp->arg( *(yyvsp[-1]._str) );
yyval._str = tmp;
- } else yyval._str = new QString();
+ } else yyval._str = new TQString();
;}
break;
@@ -2316,10 +2316,10 @@ yyreduce:
#line 659 "yacc.yy"
{
if (dcop_area) {
- QString* tmp = new QString("\n <ARG>%1</ARG>");
+ TQString* tmp = new TQString("\n <ARG>%1</ARG>");
*tmp = tmp->arg( *(yyvsp[-1]._str) );
yyval._str = tmp;
- } else yyval._str = new QString();
+ } else yyval._str = new TQString();
;}
break;
@@ -2328,7 +2328,7 @@ yyreduce:
{
if (dcop_area)
yyerror("variable arguments not supported in dcop area.");
- yyval._str = new QString("");
+ yyval._str = new TQString("");
;}
break;
@@ -2394,8 +2394,8 @@ yyreduce:
#line 716 "yacc.yy"
{
if (dcop_area || dcop_signal_area) {
- QString* tmp = 0;
- tmp = new QString(
+ TQString* tmp = 0;
+ tmp = new TQString(
" <%4>\n"
" %2\n"
" <NAME>%1</NAME>"
@@ -2405,13 +2405,13 @@ yyreduce:
*tmp = tmp->arg( *(yyvsp[-5]._str) );
*tmp = tmp->arg( *(yyvsp[-2]._str) );
- QString tagname = (dcop_signal_area) ? "SIGNAL" : "FUNC";
- QString attr = (yyvsp[0]._int) ? " qual=\"const\"" : "";
- *tmp = tmp->arg( QString("%1%2").arg(tagname).arg(attr) );
- *tmp = tmp->arg( QString("%1").arg(tagname) );
+ TQString tagname = (dcop_signal_area) ? "SIGNAL" : "FUNC";
+ TQString attr = (yyvsp[0]._int) ? " qual=\"const\"" : "";
+ *tmp = tmp->arg( TQString("%1%2").arg(tagname).arg(attr) );
+ *tmp = tmp->arg( TQString("%1").arg(tagname) );
yyval._str = tmp;
} else
- yyval._str = new QString("");
+ yyval._str = new TQString("");
;}
break;
@@ -2420,7 +2420,7 @@ yyreduce:
{
if (dcop_area)
yyerror("operators aren't allowed in dcop areas!");
- yyval._str = new QString("");
+ yyval._str = new TQString("");
;}
break;
@@ -2480,7 +2480,7 @@ yyreduce:
{
/* The constructor */
assert(!dcop_area);
- yyval._str = new QString("");
+ yyval._str = new TQString("");
;}
break;
@@ -2489,7 +2489,7 @@ yyreduce:
{
/* The constructor */
assert(!dcop_area);
- yyval._str = new QString("");
+ yyval._str = new TQString("");
;}
break;
@@ -2498,7 +2498,7 @@ yyreduce:
{
/* The destructor */
assert(!dcop_area);
- yyval._str = new QString("");
+ yyval._str = new TQString("");
;}
break;
@@ -2511,7 +2511,7 @@ yyreduce:
else
yyerror("DCOP functions cannot be static");
} else {
- yyval._str = new QString();
+ yyval._str = new TQString();
}
;}
break;
diff --git a/dcop/dcopidl/yacc.cc.h b/dcop/dcopidl/yacc.cc.h
index b056f2922..af3f8d088 100644
--- a/dcop/dcopidl/yacc.cc.h
+++ b/dcop/dcopidl/yacc.cc.h
@@ -167,7 +167,7 @@
#line 67 "yacc.yy"
typedef union YYSTYPE {
long _int;
- QString *_str;
+ TQString *_str;
unsigned short _char;
double _float;
} YYSTYPE;
diff --git a/dcop/dcopidl2cpp/dcopidl_test.h b/dcop/dcopidl2cpp/dcopidl_test.h
index a6c625abe..8a2436c6c 100644
--- a/dcop/dcopidl2cpp/dcopidl_test.h
+++ b/dcop/dcopidl2cpp/dcopidl_test.h
@@ -8,27 +8,27 @@
// stub:
// - includes to super relationship, a bit much to test, needs multiple files?
-class KDEUI_EXPORT DefaultTest : public QObject, virtual public DCOPObject
+class KDEUI_EXPORT DefaultTest : public TQObject, virtual public DCOPObject
{
Q_OBJECT
K_DCOP
public:
DefaultTest();
- void nonDcopFunction( QString filename, QString url, QString text, QString address, QString icon );
+ void nonDcopFunction( TQString filename, TQString url, TQString text, TQString address, TQString icon );
k_dcop:
void noArgsTest();
- void argsTest( QString filename, QString url );
- void unNamedArgsTest( QString, QString );
+ void argsTest( TQString filename, TQString url );
+ void unNamedArgsTest( TQString, TQString );
- void constTest( QString, QString ) const;
- QStringList writeTypeTest( const QString &, QPtrList<int> );
+ void constTest( TQString, TQString ) const;
+ TQStringList writeTypeTest( const TQString &, TQPtrList<int> );
- void voidReturnType( QString filename, QString url, QString text, QString address, QString icon );
- QString nonVoidReturnType( QString filename, QString text, QString address );
- int intReturnType( QString filename, QString text, QString address );
- bool boolReturnType( QString filename, QString text, QString address );
+ void voidReturnType( TQString filename, TQString url, TQString text, TQString address, TQString icon );
+ TQString nonVoidReturnType( TQString filename, TQString text, TQString address );
+ int intReturnType( TQString filename, TQString text, TQString address );
+ bool boolReturnType( TQString filename, TQString text, TQString address );
- ASYNC asyncTest( QString filename, QString text, QString address );
+ ASYNC asyncTest( TQString filename, TQString text, TQString address );
};
namespace TestNamespace {
@@ -38,7 +38,7 @@ namespace TestNamespace {
public:
NamespaceTest();
k_dcop:
- void function1( QString filename, QString url, QString text, QString address, QString icon );
+ void function1( TQString filename, TQString url, TQString text, TQString address, TQString icon );
};
}
@@ -48,7 +48,7 @@ class NoSuper
public:
NoSuper();
k_dcop:
- void function1( QString filename, QString url, QString text, QString address, QString icon );
+ void function1( TQString filename, TQString url, TQString text, TQString address, TQString icon );
};
class NonDCOPObject : public MyDCOPObjectBase
@@ -57,7 +57,7 @@ class NonDCOPObject : public MyDCOPObjectBase
public:
NonDCOPObject();
k_dcop:
- void function1( QString filename, QString url, QString text, QString address, QString icon );
+ void function1( TQString filename, TQString url, TQString text, TQString address, TQString icon );
};
class NoFunctions : public DCOPObject
@@ -65,45 +65,45 @@ class NoFunctions : public DCOPObject
K_DCOP
public:
NonDCOPObject();
- void nonDcopFunction( QString filename, QString url, QString text, QString address, QString icon );
+ void nonDcopFunction( TQString filename, TQString url, TQString text, TQString address, TQString icon );
};
-class NonHashingTest : public QObject, virtual public DCOPObject
+class NonHashingTest : public TQObject, virtual public DCOPObject
{
Q_OBJECT
K_DCOP
public:
NonHashingTest();
k_dcop:
- void function1( QString );
+ void function1( TQString );
};
-class HashingTest : public QObject, virtual public DCOPObject
+class HashingTest : public TQObject, virtual public DCOPObject
{
Q_OBJECT
K_DCOP
public:
HashingTest();
k_dcop:
- void function1( QString );
- void function2( QString, QString );
- void function3( QString, QString, QString );
- void function4( QString, QString, QString, QString );
- void function5( QString, QString, QString, QString, QString );
- void function6( QString, QString, QString, QString, QString, QString );
- void function7( QString, QString, QString, QString, QString, QString, QString );
- void function8( QString, QString, QString, QString, QString, QString, QString, QString );
+ void function1( TQString );
+ void function2( TQString, TQString );
+ void function3( TQString, TQString, TQString );
+ void function4( TQString, TQString, TQString, TQString );
+ void function5( TQString, TQString, TQString, TQString, TQString );
+ void function6( TQString, TQString, TQString, TQString, TQString, TQString );
+ void function7( TQString, TQString, TQString, TQString, TQString, TQString, TQString );
+ void function8( TQString, TQString, TQString, TQString, TQString, TQString, TQString, TQString );
};
class SignalTest : virtual public DCOPObject
{
K_DCOP
public:
- SignalTest(QCString objId = "KBookmarkNotifier") : DCOPObject(objId) {}
+ SignalTest(TQCString objId = "KBookmarkNotifier") : DCOPObject(objId) {}
k_dcop_signals:
- void signal1( QString filename, QString url, QString text, QString address, QString icon );
- void signal2( QString filename, QString text, QString address );
- void signal3( QString filename, QString url );
+ void signal1( TQString filename, TQString url, TQString text, TQString address, TQString icon );
+ void signal2( TQString filename, TQString text, TQString address );
+ void signal3( TQString filename, TQString url );
};
#endif // end
diff --git a/dcop/dcopidl2cpp/main.cpp b/dcop/dcopidl2cpp/main.cpp
index 32d128c30..5e0f27525 100644
--- a/dcop/dcopidl2cpp/main.cpp
+++ b/dcop/dcopidl2cpp/main.cpp
@@ -20,10 +20,10 @@ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstring.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
#include <string.h>
#include <stdlib.h>
@@ -53,7 +53,7 @@ int main( int argc, char** argv )
bool generate_skel = true;
bool generate_stub = true;
- QString suffix = "cpp";
+ TQString suffix = "cpp";
while (argc > 2) {
@@ -91,18 +91,18 @@ int main( int argc, char** argv )
}
}
- QFile in( QFile::decodeName(argv[argpos]) );
+ TQFile in( TQFile::decodeName(argv[argpos]) );
if ( !in.open( IO_ReadOnly ) )
qFatal("Could not read %s", argv[argpos] );
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( &in );
- QDomElement de = doc.documentElement();
+ TQDomElement de = doc.documentElement();
Q_ASSERT( de.tagName() == "DCOP-IDL" );
- QString base( argv[argpos] );
- QString idl = base;
+ TQString base( argv[argpos] );
+ TQString idl = base;
int pos = base.findRev( '.' );
if ( pos != -1 )
@@ -116,7 +116,7 @@ int main( int argc, char** argv )
generateSkel( idl, base + "_skel." + suffix, de );
if ( generate_stub ) {
- QString header = base;
+ TQString header = base;
generateStub( idl, header + "_stub.h", de );
pos = header.findRev('/');
if ( pos != -1 )
diff --git a/dcop/dcopidl2cpp/main.h b/dcop/dcopidl2cpp/main.h
index a0ecdb250..dd3c4d115 100644
--- a/dcop/dcopidl2cpp/main.h
+++ b/dcop/dcopidl2cpp/main.h
@@ -20,21 +20,21 @@ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qdom.h>
-#include <qstring.h>
+#include <tqdom.h>
+#include <tqstring.h>
/**
* Writes the skeleton
*/
-void generateSkel( const QString& idl, const QString& filename, QDomElement de );
+void generateSkel( const TQString& idl, const TQString& filename, TQDomElement de );
/**
* Writes the stubs header
*/
-void generateStub( const QString& idl, const QString& filename, QDomElement de);
+void generateStub( const TQString& idl, const TQString& filename, TQDomElement de);
/**
* Writes the stub implementation
*/
-void generateStubImpl( const QString& idl, const QString& header, const QString& headerBase, const QString& filename, QDomElement de);
+void generateStubImpl( const TQString& idl, const TQString& header, const TQString& headerBase, const TQString& filename, TQDomElement de);
diff --git a/dcop/dcopidl2cpp/skel.cpp b/dcop/dcopidl2cpp/skel.cpp
index fe79aec92..9ab0c763d 100644
--- a/dcop/dcopidl2cpp/skel.cpp
+++ b/dcop/dcopidl2cpp/skel.cpp
@@ -20,11 +20,11 @@ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <string.h>
#include <stdlib.h>
@@ -52,11 +52,11 @@ static int const primes[] =
struct Function
{
Function(){}
- Function( const QString& t, const QString& n, const QString&fn, bool h )
+ Function( const TQString& t, const TQString& n, const TQString&fn, bool h )
: type( t ), name( n ), fullName( fn ), hidden( h ) {}
- QString type;
- QString name;
- QString fullName;
+ TQString type;
+ TQString name;
+ TQString fullName;
bool hidden;
};
@@ -64,13 +64,13 @@ struct Function
/*
* Writes the skeleton
*/
-void generateSkel( const QString& idl, const QString& filename, QDomElement de )
+void generateSkel( const TQString& idl, const TQString& filename, TQDomElement de )
{
- QFile skel( filename );
+ TQFile skel( filename );
if ( !skel.open( IO_WriteOnly ) )
qFatal("Could not write to %s", filename.local8Bit().data() );
- QTextStream str( &skel );
+ TQTextStream str( &skel );
str << "/****************************************************************************" << endl;
str << "**" << endl;
@@ -81,7 +81,7 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
str << "*****************************************************************************/" << endl;
str << endl;
- QDomElement e = de.firstChild().toElement();
+ TQDomElement e = de.firstChild().toElement();
if ( e.tagName() == "SOURCE" ) {
str << "#include \"" << e.firstChild().toText().data() << "\"" << endl << endl;
}
@@ -89,35 +89,35 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
for( ; !e.isNull(); e = e.nextSibling().toElement() ) {
if ( e.tagName() != "CLASS" )
continue;
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
Q_ASSERT( n.tagName() == "NAME" );
- QString className = n.firstChild().toText().data();
+ TQString className = n.firstChild().toText().data();
// find dcop parent ( rightmost super class )
- QString DCOPParent;
- QDomElement s = n.nextSibling().toElement();
+ TQString DCOPParent;
+ TQDomElement s = n.nextSibling().toElement();
for( ; !s.isNull(); s = s.nextSibling().toElement() ) {
if ( s.tagName() == "SUPER" )
DCOPParent = s.firstChild().toText().data();
}
// get function table
- QValueList<Function> functions;
+ TQValueList<Function> functions;
s = n.nextSibling().toElement();
for( ; !s.isNull(); s = s.nextSibling().toElement() ) {
if ( s.tagName() != "FUNC" )
continue;
- QDomElement r = s.firstChild().toElement();
+ TQDomElement r = s.firstChild().toElement();
Q_ASSERT( r.tagName() == "TYPE" );
- QString funcType = r.firstChild().toText().data();
+ TQString funcType = r.firstChild().toText().data();
r = r.nextSibling().toElement();
Q_ASSERT ( r.tagName() == "NAME" );
- QString funcName = r.firstChild().toText().data();
- QStringList argtypes;
- QStringList argnames;
+ TQString funcName = r.firstChild().toText().data();
+ TQStringList argtypes;
+ TQStringList argnames;
r = r.nextSibling().toElement();
for( ; !r.isNull(); r = r.nextSibling().toElement() ) {
Q_ASSERT( r.tagName() == "ARG" );
- QDomElement a = r.firstChild().toElement();
+ TQDomElement a = r.firstChild().toElement();
Q_ASSERT( a.tagName() == "TYPE" );
argtypes.append( a.firstChild().toText().data() );
a = a.nextSibling().toElement();
@@ -125,14 +125,14 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
Q_ASSERT( a.tagName() == "NAME" );
argnames.append( a.firstChild().toText().data() );
} else {
- argnames.append( QString::null );
+ argnames.append( TQString::null );
}
}
funcName += '(';
- QString fullFuncName = funcName;
+ TQString fullFuncName = funcName;
bool first = true;
- QStringList::Iterator ittype = argtypes.begin();
- QStringList::Iterator itname = argnames.begin();
+ TQStringList::Iterator ittype = argtypes.begin();
+ TQStringList::Iterator itname = argnames.begin();
while ( ittype != argtypes.end() && itname != argnames.end() ) {
if ( !first ) {
funcName += ',';
@@ -168,13 +168,13 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
bool useHashing = functions.count() > 7;
if ( useHashing ) {
- str << "#include <qasciidict.h>" << endl;
+ str << "#include <tqasciidict.h>" << endl;
}
- QString classNameFull = className; // class name with possible namespaces prepended
+ TQString classNameFull = className; // class name with possible namespaces prepended
// namespaces will be removed from className now
int namespace_count = 0;
- QString namespace_tmp = className;
+ TQString namespace_tmp = className;
str << endl;
for(;;) {
int pos = namespace_tmp.find( "::" );
@@ -193,7 +193,7 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
str << "static const int " << className << "_fhash = " << fhash << ";" << endl;
}
str << "static const char* const " << className << "_ftable[" << functions.count() + 1 << "][3] = {" << endl;
- for( QValueList<Function>::Iterator it = functions.begin(); it != functions.end(); ++it ){
+ for( TQValueList<Function>::Iterator it = functions.begin(); it != functions.end(); ++it ){
str << " { \"" << (*it).type << "\", \"" << (*it).name << "\", \"" << (*it).fullName << "\" }," << endl;
}
str << " { 0, 0, 0 }" << endl;
@@ -201,7 +201,7 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
if (functions.count() > 0) {
str << "static const int " << className << "_ftable_hiddens[" << functions.count() << "] = {" << endl;
- for( QValueList<Function>::Iterator it = functions.begin(); it != functions.end(); ++it ){
+ for( TQValueList<Function>::Iterator it = functions.begin(); it != functions.end(); ++it ){
str << " " << !!(*it).hidden << "," << endl;
}
str << "};" << endl;
@@ -212,13 +212,13 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
// Write dispatcher
str << "bool " << className;
- str << "::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)" << endl;
+ str << "::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)" << endl;
str << "{" << endl;
if ( useHashing ) {
- str << " static QAsciiDict<int>* fdict = 0;" << endl;
+ str << " static TQAsciiDict<int>* fdict = 0;" << endl;
str << " if ( !fdict ) {" << endl;
- str << "\tfdict = new QAsciiDict<int>( " << className << "_fhash, true, false );" << endl;
+ str << "\tfdict = new TQAsciiDict<int>( " << className << "_fhash, true, false );" << endl;
str << "\tfor ( int i = 0; " << className << "_ftable[i][1]; i++ )" << endl;
str << "\t fdict->insert( " << className << "_ftable[i][1], new int( i ) );" << endl;
str << " }" << endl;
@@ -232,28 +232,28 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
for( ; !s.isNull(); s = s.nextSibling().toElement() ) {
if ( s.tagName() != "FUNC" )
continue;
- QDomElement r = s.firstChild().toElement();
+ TQDomElement r = s.firstChild().toElement();
Q_ASSERT( r.tagName() == "TYPE" );
- QString funcType = r.firstChild().toText().data();
+ TQString funcType = r.firstChild().toText().data();
if ( funcType == "ASYNC" )
funcType = "void";
r = r.nextSibling().toElement();
Q_ASSERT ( r.tagName() == "NAME" );
- QString funcName = r.firstChild().toText().data();
- QStringList args;
- QStringList argtypes;
+ TQString funcName = r.firstChild().toText().data();
+ TQStringList args;
+ TQStringList argtypes;
r = r.nextSibling().toElement();
for( ; !r.isNull(); r = r.nextSibling().toElement() ) {
Q_ASSERT( r.tagName() == "ARG" );
- QDomElement a = r.firstChild().toElement();
+ TQDomElement a = r.firstChild().toElement();
Q_ASSERT( a.tagName() == "TYPE" );
argtypes.append( a.firstChild().toText().data() );
- args.append( QString("arg" ) + QString::number( args.count() ) );
+ args.append( TQString("arg" ) + TQString::number( args.count() ) );
}
- QString plainFuncName = funcName;
+ TQString plainFuncName = funcName;
funcName += '(';
bool first = true;
- for( QStringList::Iterator argtypes_count = argtypes.begin(); argtypes_count != argtypes.end(); ++argtypes_count ){
+ for( TQStringList::Iterator argtypes_count = argtypes.begin(); argtypes_count != argtypes.end(); ++argtypes_count ){
if ( !first )
funcName += ',';
first = false;
@@ -271,8 +271,8 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
firstFunc = false;
}
if ( !args.isEmpty() ) {
- QStringList::Iterator ittypes = argtypes.begin();
- QStringList::Iterator args_count;
+ TQStringList::Iterator ittypes = argtypes.begin();
+ TQStringList::Iterator args_count;
for( args_count = args.begin(); args_count != args.end(); ++args_count ){
str << '\t'<< *ittypes << " " << *args_count << ";" << endl;
++ittypes;
@@ -293,7 +293,7 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
}
first = true;
- for ( QStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
+ for ( TQStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
if ( !first )
str << ", ";
first = false;
@@ -372,16 +372,16 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
for(s = e.firstChild().toElement(); !s.isNull(); s = s.nextSibling().toElement() ) {
if (s.tagName() != "SIGNAL")
continue;
- QDomElement r = s.firstChild().toElement();
- QString result = writeType( str, r );
+ TQDomElement r = s.firstChild().toElement();
+ TQString result = writeType( str, r );
r = r.nextSibling().toElement();
Q_ASSERT ( r.tagName() == "NAME" );
- QString funcName = r.firstChild().toText().data();
+ TQString funcName = r.firstChild().toText().data();
str << className << "::" << funcName << "(";
- QStringList args;
- QStringList argtypes;
+ TQStringList args;
+ TQStringList argtypes;
bool first = true;
r = r.nextSibling().toElement();
for( ; !r.isNull(); r = r.nextSibling().toElement() ) {
@@ -391,10 +391,10 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
str << " ";
first = false;
Q_ASSERT( r.tagName() == "ARG" );
- QDomElement a = r.firstChild().toElement();
- QString type = writeType( str, a );
+ TQDomElement a = r.firstChild().toElement();
+ TQString type = writeType( str, a );
argtypes.append( type );
- args.append( QString("arg" ) + QString::number( args.count() ) ) ;
+ args.append( TQString("arg" ) + TQString::number( args.count() ) ) ;
str << args.last();
}
if ( !first )
@@ -409,7 +409,7 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
funcName += "(";
first = true;
- for( QStringList::Iterator it = argtypes.begin(); it != argtypes.end(); ++it ){
+ for( TQStringList::Iterator it = argtypes.begin(); it != argtypes.end(); ++it ){
if ( !first )
funcName += ",";
first = false;
@@ -420,10 +420,10 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
if ( result != "void" )
qFatal("Error in DCOP signal %s::%s: DCOP signals can not return values.", className.latin1(), funcName.latin1());
- str << " QByteArray data;" << endl;
+ str << " TQByteArray data;" << endl;
if ( !args.isEmpty() ) {
- str << " QDataStream arg( data, IO_WriteOnly );" << endl;
- for( QStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
+ str << " TQDataStream arg( data, IO_WriteOnly );" << endl;
+ for( TQStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
str << " arg << " << *args_count << ";" << endl;
}
}
diff --git a/dcop/dcopidl2cpp/stub.cpp b/dcop/dcopidl2cpp/stub.cpp
index 4060ae88f..887945262 100644
--- a/dcop/dcopidl2cpp/stub.cpp
+++ b/dcop/dcopidl2cpp/stub.cpp
@@ -20,11 +20,11 @@ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <string.h>
#include <stdlib.h>
@@ -36,13 +36,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/*
* Writes the stubs header
*/
-void generateStub( const QString& idl, const QString& filename, QDomElement de)
+void generateStub( const TQString& idl, const TQString& filename, TQDomElement de)
{
- QFile stub( filename );
+ TQFile stub( filename );
if ( !stub.open( IO_WriteOnly ) )
qFatal("Could not write to %s", filename.local8Bit().data() );
- QTextStream str( &stub );
+ TQTextStream str( &stub );
str << "/****************************************************************************" << endl;
str << "**" << endl;
@@ -53,19 +53,19 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
str << "*****************************************************************************/" << endl;
str << endl;
- QString ifdefstring = idl.upper();
+ TQString ifdefstring = idl.upper();
int pos = idl.findRev( '.' );
if ( pos != -1 )
ifdefstring = ifdefstring.left( pos );
- QString ifdefsuffix = "_STUB__";
+ TQString ifdefsuffix = "_STUB__";
str << "#ifndef __" << ifdefstring << ifdefsuffix << endl;
str << "#define __" << ifdefstring << ifdefsuffix << endl << endl;
str << "#include <dcopstub.h>" << endl;
- QStringList includeslist, all_includes;
- QDomElement e = de.firstChild().toElement();
+ TQStringList includeslist, all_includes;
+ TQDomElement e = de.firstChild().toElement();
for( ; !e.isNull(); e = e.nextSibling().toElement() ) {
if ( e.tagName() == "INCLUDE" ) {
// dcopidl lists the includes in reversed order because of the used yacc/bison gramatic
@@ -74,7 +74,7 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
continue;
}
if( !includeslist.empty()) {
- for( QStringList::ConstIterator it = includeslist.begin();
+ for( TQStringList::ConstIterator it = includeslist.begin();
it != includeslist.end();
++it ) {
str << "#include <" << ( *it ) << ">" << endl;
@@ -87,20 +87,20 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
str << endl;
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
Q_ASSERT( n.tagName() == "NAME" );
- QString className = n.firstChild().toText().data() + ( "_stub" );
+ TQString className = n.firstChild().toText().data() + ( "_stub" );
//add link scope, if available
n = n.nextSibling().toElement();
- QString linkScope;
+ TQString linkScope;
if (n.tagName()=="LINK_SCOPE") {
linkScope = n.firstChild().toText().data() + " ";
n = n.nextSibling().toElement();
}
// find dcop parent ( rightmost super class )
- QString DCOPParent;
+ TQString DCOPParent;
for( ; !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "SUPER" )
DCOPParent = n.firstChild().toText().data();
@@ -112,7 +112,7 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
else if( all_includes.contains( DCOPParent.lower() + ".h" ))
str << "#include <" << DCOPParent.lower() << "_stub.h>" << endl;
else {// damn ... let's assume it's the last include
- QString stub_h = all_includes.last();
+ TQString stub_h = all_includes.last();
unsigned int pos = stub_h.find( ".h" );
if( pos > 0 ) {
stub_h = stub_h.remove( pos, 100000 );
@@ -123,10 +123,10 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
}
}
- QString classNameFull = className; // class name with possible namespaces prepended
+ TQString classNameFull = className; // class name with possible namespaces prepended
// namespaces will be removed from className now
int namespace_count = 0;
- QString namespace_tmp = className;
+ TQString namespace_tmp = className;
for(;;) {
int pos = namespace_tmp.find( "::" );
if( pos < 0 ) {
@@ -156,15 +156,15 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
str << "public:" << endl;
// Constructors
- str << " " << className << "( const QCString& app, const QCString& id );" << endl;
- str << " " << className << "( DCOPClient* client, const QCString& app, const QCString& id );" << endl;
+ str << " " << className << "( const TQCString& app, const TQCString& id );" << endl;
+ str << " " << className << "( DCOPClient* client, const TQCString& app, const TQCString& id );" << endl;
str << " explicit " << className << "( const DCOPRef& ref );" << endl;
n = e.firstChild().toElement();
for( ; !n.isNull(); n = n.nextSibling().toElement() ) {
if (n.tagName() != "FUNC")
continue;
- QDomElement r = n.firstChild().toElement();
+ TQDomElement r = n.firstChild().toElement();
str << " virtual "; // KDE4 - I really don't think these need to be virtual
writeType( str, r );
@@ -181,7 +181,7 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
str << " ";
first = false;
Q_ASSERT( r.tagName() == "ARG" );
- QDomElement a = r.firstChild().toElement();
+ TQDomElement a = r.firstChild().toElement();
writeType( str, a );
a = a.nextSibling().toElement();
if ( a.tagName() == "NAME" )
diff --git a/dcop/dcopidl2cpp/stubimpl.cpp b/dcop/dcopidl2cpp/stubimpl.cpp
index 22c11527b..5cdd2a00d 100644
--- a/dcop/dcopidl2cpp/stubimpl.cpp
+++ b/dcop/dcopidl2cpp/stubimpl.cpp
@@ -20,11 +20,11 @@ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <string.h>
#include <stdlib.h>
@@ -33,7 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main.h"
#include "type.h"
-static bool isIntType( const QString& t )
+static bool isIntType( const TQString& t )
{
return ((t == "int")
|| (t == "signed int")
@@ -62,13 +62,13 @@ static bool isIntType( const QString& t )
/*
* Writes the stub implementation
*/
-void generateStubImpl( const QString& idl, const QString& header, const QString& /*headerBase*/, const QString& filename, QDomElement de )
+void generateStubImpl( const TQString& idl, const TQString& header, const TQString& /*headerBase*/, const TQString& filename, TQDomElement de )
{
- QFile impl( filename );
+ TQFile impl( filename );
if ( !impl.open( IO_WriteOnly ) )
qFatal("Could not write to %s", filename.latin1() );
- QTextStream str( &impl );
+ TQTextStream str( &impl );
str << "/****************************************************************************" << endl;
str << "**" << endl;
@@ -83,19 +83,19 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << "#include <dcopclient.h>" << endl << endl;
str << "#include <kdatastream.h>" << endl;
- QDomElement e = de.firstChild().toElement();
+ TQDomElement e = de.firstChild().toElement();
for( ; !e.isNull(); e = e.nextSibling().toElement() ) {
if ( e.tagName() != "CLASS" )
continue;
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
Q_ASSERT( n.tagName() == "NAME" );
- QString classNameBase = n.firstChild().toText().data();
- QString className_stub = classNameBase + "_stub";
+ TQString classNameBase = n.firstChild().toText().data();
+ TQString className_stub = classNameBase + "_stub";
- QString classNameFull = className_stub; // class name with possible namespaces prepended
+ TQString classNameFull = className_stub; // class name with possible namespaces prepended
// namespaces will be removed from className now
int namespace_count = 0;
- QString namespace_tmp = className_stub;
+ TQString namespace_tmp = className_stub;
str << endl;
for(;;) {
int pos = namespace_tmp.find( "::" );
@@ -111,7 +111,7 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << endl;
// Write constructors
- str << className_stub << "::" << className_stub << "( const QCString& app, const QCString& obj )" << endl;
+ str << className_stub << "::" << className_stub << "( const TQCString& app, const TQCString& obj )" << endl;
str << " : ";
// Always explicitly call DCOPStub constructor, because it's virtual base class.
@@ -121,7 +121,7 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << "{" << endl;
str << "}" << endl << endl;
- str << className_stub << "::" << className_stub << "( DCOPClient* client, const QCString& app, const QCString& obj )" << endl;
+ str << className_stub << "::" << className_stub << "( DCOPClient* client, const TQCString& app, const TQCString& obj )" << endl;
str << " : ";
str << "DCOPStub( client, app, obj )" << endl;
@@ -138,13 +138,13 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << "}" << endl << endl;
// Write marshalling code
- QDomElement s = e.firstChild().toElement();
+ TQDomElement s = e.firstChild().toElement();
for( ; !s.isNull(); s = s.nextSibling().toElement() ) {
if (s.tagName() != "FUNC")
continue;
- QDomElement r = s.firstChild().toElement();
+ TQDomElement r = s.firstChild().toElement();
Q_ASSERT( r.tagName() == "TYPE" );
- QString result = r.firstChild().toText().data();
+ TQString result = r.firstChild().toText().data();
bool async = result == "ASYNC";
if ( async) {
result = "void";
@@ -154,11 +154,11 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
r = r.nextSibling().toElement();
Q_ASSERT ( r.tagName() == "NAME" );
- QString funcName = r.firstChild().toText().data();
+ TQString funcName = r.firstChild().toText().data();
str << className_stub << "::" << funcName << "(";
- QStringList args;
- QStringList argtypes;
+ TQStringList args;
+ TQStringList argtypes;
bool first = true;
r = r.nextSibling().toElement();
for( ; !r.isNull(); r = r.nextSibling().toElement() ) {
@@ -168,10 +168,10 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << " ";
first = false;
Q_ASSERT( r.tagName() == "ARG" );
- QDomElement a = r.firstChild().toElement();
- QString type = writeType( str, a );
+ TQDomElement a = r.firstChild().toElement();
+ TQString type = writeType( str, a );
argtypes.append( type );
- args.append( QString("arg" ) + QString::number( args.count() ) ) ;
+ args.append( TQString("arg" ) + TQString::number( args.count() ) ) ;
str << args.last();
}
if ( !first )
@@ -188,7 +188,7 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
funcName += "(";
first = true;
- for( QStringList::Iterator it = argtypes.begin(); it != argtypes.end(); ++it ){
+ for( TQStringList::Iterator it = argtypes.begin(); it != argtypes.end(); ++it ){
if ( !first )
funcName += ",";
first = false;
@@ -203,10 +203,10 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << "\treturn;" << endl;
str << " }" << endl;
- str << " QByteArray data;" << endl;
+ str << " TQByteArray data;" << endl;
if ( !args.isEmpty() ) {
- str << " QDataStream arg( data, IO_WriteOnly );" << endl;
- for( QStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
+ str << " TQDataStream arg( data, IO_WriteOnly );" << endl;
+ for( TQStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
str << " arg << " << *args_count << ";" << endl;
}
}
@@ -236,12 +236,12 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << "\treturn;" << endl;
str << " }" << endl;
- str << " QByteArray data, replyData;" << endl;
- str << " QCString replyType;" << endl;
+ str << " TQByteArray data, replyData;" << endl;
+ str << " TQCString replyType;" << endl;
if ( !args.isEmpty() ) {
- str << " QDataStream arg( data, IO_WriteOnly );" << endl;
- for( QStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
+ str << " TQDataStream arg( data, IO_WriteOnly );" << endl;
+ for( TQStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
str << " arg << " << *args_count << ";" << endl;
}
}
@@ -249,7 +249,7 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << " data, replyType, replyData ) ) {" << endl;
if ( result != "void" ) {
str << "\tif ( replyType == \"" << result << "\" ) {" << endl;
- str << "\t QDataStream _reply_stream( replyData, IO_ReadOnly );" << endl;
+ str << "\t TQDataStream _reply_stream( replyData, IO_ReadOnly );" << endl;
str << "\t _reply_stream >> result;" << endl;
str << "\t setStatus( CallSucceeded );" << endl;
str << "\t} else {" << endl;
diff --git a/dcop/dcopidl2cpp/type.h b/dcop/dcopidl2cpp/type.h
index baaacacfb..2a99c83a9 100644
--- a/dcop/dcopidl2cpp/type.h
+++ b/dcop/dcopidl2cpp/type.h
@@ -1,15 +1,15 @@
#ifndef TYPE_H
#define TYPE_H
-#include <qtextstream.h>
-#include <qdom.h>
+#include <tqtextstream.h>
+#include <tqdom.h>
-static QString writeType( QTextStream& str, const QDomElement& r )
+static TQString writeType( TQTextStream& str, const TQDomElement& r )
{
Q_ASSERT( r.tagName() == "TYPE" );
if ( r.hasAttribute( "qleft" ) )
str << r.attribute("qleft") << " ";
- QString t = r.firstChild().toText().data();
+ TQString t = r.firstChild().toText().data();
t = t.replace( ">>", "> >" );
str << t;
if ( r.hasAttribute( "qright" ) )
diff --git a/dcop/dcopobject.cpp b/dcop/dcopobject.cpp
index 98a147e9f..fd39fb347 100644
--- a/dcop/dcopobject.cpp
+++ b/dcop/dcopobject.cpp
@@ -25,12 +25,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <dcopobject.h>
#include <dcopclient.h>
-QMap<QCString, DCOPObject *> *kde_dcopObjMap = 0;
+TQMap<TQCString, DCOPObject *> *kde_dcopObjMap = 0;
-static inline QMap<QCString, DCOPObject *> *objMap()
+static inline TQMap<TQCString, DCOPObject *> *objMap()
{
if (!kde_dcopObjMap)
- kde_dcopObjMap = new QMap<QCString, DCOPObject *>;
+ kde_dcopObjMap = new TQMap<TQCString, DCOPObject *>;
return kde_dcopObjMap;
}
@@ -51,10 +51,10 @@ DCOPObject::DCOPObject()
objMap()->insert(ident, this );
}
-DCOPObject::DCOPObject(QObject *obj)
+DCOPObject::DCOPObject(TQObject *obj)
{
d = new DCOPObjectPrivate;
- QObject *currentObj = obj;
+ TQObject *currentObj = obj;
while (currentObj != 0L) {
ident.prepend( currentObj->name() );
ident.prepend("/");
@@ -66,7 +66,7 @@ DCOPObject::DCOPObject(QObject *obj)
objMap()->insert(ident, this);
}
-DCOPObject::DCOPObject(const QCString &_objId)
+DCOPObject::DCOPObject(const TQCString &_objId)
: ident(_objId)
{
d = new DCOPObjectPrivate;
@@ -95,7 +95,7 @@ void DCOPObject::setCallingDcopClient(DCOPClient *client)
d->m_dcopClient = client;
}
-bool DCOPObject::setObjId(const QCString &objId)
+bool DCOPObject::setObjId(const TQCString &objId)
{
if (objMap()->find(objId)!=objMap()->end()) return false;
@@ -109,12 +109,12 @@ bool DCOPObject::setObjId(const QCString &objId)
return true;
}
-QCString DCOPObject::objId() const
+TQCString DCOPObject::objId() const
{
return ident;
}
-bool DCOPObject::hasObject(const QCString &_objId)
+bool DCOPObject::hasObject(const TQCString &_objId)
{
if (objMap()->contains(_objId))
return true;
@@ -122,9 +122,9 @@ bool DCOPObject::hasObject(const QCString &_objId)
return false;
}
-DCOPObject *DCOPObject::find(const QCString &_objId)
+DCOPObject *DCOPObject::find(const TQCString &_objId)
{
- QMap<QCString, DCOPObject *>::ConstIterator it;
+ TQMap<TQCString, DCOPObject *>::ConstIterator it;
it = objMap()->find(_objId);
if (it != objMap()->end())
return *it;
@@ -132,10 +132,10 @@ DCOPObject *DCOPObject::find(const QCString &_objId)
return 0L;
}
-QPtrList<DCOPObject> DCOPObject::match(const QCString &partialId)
+TQPtrList<DCOPObject> DCOPObject::match(const TQCString &partialId)
{
- QPtrList<DCOPObject> mlist;
- QMap<QCString, DCOPObject *>::ConstIterator it(objMap()->begin());
+ TQPtrList<DCOPObject> mlist;
+ TQMap<TQCString, DCOPObject *>::ConstIterator it(objMap()->begin());
for (; it != objMap()->end(); ++it)
if (it.key().left(partialId.length()) == partialId) // found it?
mlist.append(it.data());
@@ -143,14 +143,14 @@ QPtrList<DCOPObject> DCOPObject::match(const QCString &partialId)
}
-QCString DCOPObject::objectName( QObject* obj )
+TQCString DCOPObject::objectName( TQObject* obj )
{
if ( obj == 0 )
- return QCString();
+ return TQCString();
- QCString identity;
+ TQCString identity;
- QObject *currentObj = obj;
+ TQObject *currentObj = obj;
while (currentObj != 0 )
{
identity.prepend( currentObj->name() );
@@ -163,24 +163,24 @@ QCString DCOPObject::objectName( QObject* obj )
return identity;
}
-bool DCOPObject::process(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData)
+bool DCOPObject::process(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData)
{
if ( fun == "interfaces()" ) {
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << interfaces();
return true;
} else if ( fun == "functions()" ) {
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << functions();
return true;
}
return processDynamic( fun, data, replyType, replyData );
}
-bool DCOPObject::processDynamic( const QCString&, const QByteArray&, QCString&, QByteArray& )
+bool DCOPObject::processDynamic( const TQCString&, const TQByteArray&, TQCString&, TQByteArray& )
{
return false;
}
@@ -210,16 +210,16 @@ QCStringList DCOPObject::functions()
return result;
}
-void DCOPObject::emitDCOPSignal( const QCString &signal, const QByteArray &data)
+void DCOPObject::emitDCOPSignal( const TQCString &signal, const TQByteArray &data)
{
DCOPClient *client = DCOPClient::mainClient();
if ( client )
client->emitDCOPSignal( objId(), signal, data );
}
-bool DCOPObject::connectDCOPSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- const QCString &slot,
+bool DCOPObject::connectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ const TQCString &slot,
bool Volatile)
{
DCOPClient *client = DCOPClient::mainClient();
@@ -231,9 +231,9 @@ bool DCOPObject::connectDCOPSignal( const QCString &sender, const QCString &send
return client->connectDCOPSignal( sender, senderObj, signal, objId(), slot, Volatile );
}
-bool DCOPObject::disconnectDCOPSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- const QCString &slot)
+bool DCOPObject::disconnectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ const TQCString &slot)
{
DCOPClient *client = DCOPClient::mainClient();
@@ -245,19 +245,19 @@ bool DCOPObject::disconnectDCOPSignal( const QCString &sender, const QCString &s
}
-QPtrList<DCOPObjectProxy>* DCOPObjectProxy::proxies = 0;
+TQPtrList<DCOPObjectProxy>* DCOPObjectProxy::proxies = 0;
DCOPObjectProxy::DCOPObjectProxy()
{
if ( !proxies )
- proxies = new QPtrList<DCOPObjectProxy>;
+ proxies = new TQPtrList<DCOPObjectProxy>;
proxies->append( this );
}
DCOPObjectProxy::DCOPObjectProxy( DCOPClient*)
{
if ( !proxies )
- proxies = new QPtrList<DCOPObjectProxy>;
+ proxies = new TQPtrList<DCOPObjectProxy>;
proxies->append( this );
}
@@ -267,11 +267,11 @@ DCOPObjectProxy:: ~DCOPObjectProxy()
proxies->removeRef( this );
}
-bool DCOPObjectProxy::process( const QCString& /*obj*/,
- const QCString& /*fun*/,
- const QByteArray& /*data*/,
- QCString& /*replyType*/,
- QByteArray &/*replyData*/ )
+bool DCOPObjectProxy::process( const TQCString& /*obj*/,
+ const TQCString& /*fun*/,
+ const TQByteArray& /*data*/,
+ TQCString& /*replyType*/,
+ TQByteArray &/*replyData*/ )
{
return false;
}
diff --git a/dcop/dcopobject.h b/dcop/dcopobject.h
index 691ad4e67..2040379b2 100644
--- a/dcop/dcopobject.h
+++ b/dcop/dcopobject.h
@@ -23,22 +23,22 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef _DCOPOBJECT_H
#define _DCOPOBJECT_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
#include <kdatastream.h> // needed for proper bool marshalling
#include "kdelibs_export.h"
class DCOPClient;
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
// Makros for DCOP interfaces
#define K_DCOP \
public: \
- virtual bool process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData); \
+ virtual bool process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData); \
QCStringList functions(); \
QCStringList interfaces(); \
private:
@@ -74,15 +74,15 @@ public:
DCOPObject();
/**
* Creates a DCOPObject and calculates the object id
- * using QObject::name().
+ * using TQObject::name().
* @param obj the object to extract the name from
*/
- DCOPObject(QObject *obj);
+ DCOPObject(TQObject *obj);
/**
* Creates a DCOPObject with object Id @p objId.
* @param objId the object id of the DCOP object
*/
- DCOPObject(const QCString &objId);
+ DCOPObject(const TQCString &objId);
/**
* Destroys the DCOPObject and removes it from the map
* of known objects.
@@ -93,7 +93,7 @@ public:
* Returns the object id of the DCOPObject.
* @return the object's id
*/
- QCString objId() const;
+ TQCString objId() const;
/**
* Renames a dcop object, if no other with the same name exists
@@ -101,7 +101,7 @@ public:
*
* @param objId the new object id
**/
- bool setObjId(const QCString &objId);
+ bool setObjId(const TQCString &objId);
/**
* Dispatches a message.
@@ -120,7 +120,7 @@ public:
*
* @param fun is the normalized function signature.
* Such a signature usually looks like
- * foobar(QString,int). The return type,
+ * foobar(TQString,int). The return type,
* qualifiers like "const" etc. are not part of
* the signature.
* @param data the received data
@@ -134,8 +134,8 @@ public:
* @see functions()
* @see DCOPClient::process()
*/
- virtual bool process(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData);
+ virtual bool process(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData);
/**
@@ -147,7 +147,7 @@ public:
*
* @param fun is the normalized function signature.
* Such a signature usually looks like
- * foobar(QString,int). The return type,
+ * foobar(TQString,int). The return type,
* qualifiers like "const" etc. are not part of
* the signature.
* @param data the received data
@@ -160,8 +160,8 @@ public:
* @see functions(),
* @see DCOPClient::process()
*/
- virtual bool processDynamic(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData);
+ virtual bool processDynamic(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData);
/**
* This function is of interest when you used an IDL compiler
@@ -226,7 +226,7 @@ public:
* @param signal the signal to emit
* @param data the data to send
*/
- void emitDCOPSignal( const QCString &signal, const QByteArray &data);
+ void emitDCOPSignal( const TQCString &signal, const TQByteArray &data);
/**
* Connects to a DCOP signal.
@@ -247,9 +247,9 @@ public:
* @li @p Volatile is true and @p sender does not exist.
* @li @p signal and @p slot do not have matching arguments.
*/
- bool connectDCOPSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- const QCString &slot,
+ bool connectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ const TQCString &slot,
bool Volatile);
/**
@@ -269,9 +269,9 @@ public:
*
* @return false if no connection(s) where removed.
*/
- bool disconnectDCOPSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- const QCString &slot);
+ bool disconnectDCOPSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ const TQCString &slot);
/**
* Returns the DCOPClient responsible for making the call.
@@ -296,7 +296,7 @@ public:
*
* DCOPObjectProxy
*/
- static bool hasObject(const QCString &objId);
+ static bool hasObject(const TQCString &objId);
/**
* Try to find a dcop object with the given id.
@@ -304,7 +304,7 @@ public:
* @param objId the object id to search
* @return the DCOPObject for the id @p objId.
*/
- static DCOPObject *find(const QCString &objId);
+ static DCOPObject *find(const TQCString &objId);
/**
@@ -316,21 +316,21 @@ public:
* @return a list of DCOPObjects beginning with the string
* contained in @p partialId.
*/
- static QPtrList<DCOPObject> match(const QCString &partialId);
+ static TQPtrList<DCOPObject> match(const TQCString &partialId);
/**
- * Creates an object id for the QObject @p obj. This is done
- * using the QObject::name() function.
+ * Creates an object id for the TQObject @p obj. This is done
+ * using the TQObject::name() function.
* @param obj the object whose name will be used
* @return the created object id
*/
- static QCString objectName( QObject* obj );
+ static TQCString objectName( TQObject* obj );
private:
/**
* The object id of this DCOPObject.
*/
- QCString ident;
+ TQCString ident;
protected:
virtual void virtual_hook( int id, void* data );
@@ -382,7 +382,7 @@ public:
* @param obj the id of the object
* @param fun is the normalized function signature.
* Such a signature usually looks like
- * foobar(QString,int). The return type,
+ * foobar(TQString,int). The return type,
* qualifiers like "const" etc. are not part of
* the signature.
* @param data the received data
@@ -391,14 +391,14 @@ public:
* @return true if successful, false otherwise. The default implementation
* returns always false.
*/
- virtual bool process( const QCString& obj, const QCString& fun,
- const QByteArray& data,
- QCString& replyType, QByteArray &replyData );
+ virtual bool process( const TQCString& obj, const TQCString& fun,
+ const TQByteArray& data,
+ TQCString& replyType, TQByteArray &replyData );
private:
void* unused;
void* unused_too;
friend class DCOPClient;
- static QPtrList<DCOPObjectProxy>* proxies;
+ static TQPtrList<DCOPObjectProxy>* proxies;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/dcop/dcopref.cpp b/dcop/dcopref.cpp
index 9e94821fc..bb39c109b 100644
--- a/dcop/dcopref.cpp
+++ b/dcop/dcopref.cpp
@@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "dcopclient.h"
#include "dcopobject.h"
-#include <qdatastream.h>
+#include <tqdatastream.h>
#define STR( s ) ( s.data() ? s.data() : "" )
@@ -47,12 +47,12 @@ bool DCOPReply::typeCheck( const char* t, bool warn )
}
// this has to stay BC too even if private, because it's called from inlines
-DCOPReply DCOPRef::callInternal( const QCString& fun, const QCString& args, const QByteArray& data )
+DCOPReply DCOPRef::callInternal( const TQCString& fun, const TQCString& args, const TQByteArray& data )
{
return callInternal( fun, args, data, NoEventLoop, -1 );
}
-DCOPReply DCOPRef::callInternal( const QCString& fun, const QCString& args, const QByteArray& data,
+DCOPReply DCOPRef::callInternal( const TQCString& fun, const TQCString& args, const TQByteArray& data,
EventLoopFlag useEventLoop, int timeout )
{
DCOPReply reply;
@@ -61,7 +61,7 @@ DCOPReply DCOPRef::callInternal( const QCString& fun, const QCString& args, cons
STR( fun ) );
return reply;
}
- QCString sig = fun;
+ TQCString sig = fun;
if ( fun.find('(') == -1 ) {
sig += args;
if( args.find( "<unknown" ) != -1 )
@@ -78,7 +78,7 @@ DCOPReply DCOPRef::callInternal( const QCString& fun, const QCString& args, cons
return reply;
}
-bool DCOPRef::sendInternal( const QCString& fun, const QCString& args, const QByteArray& data )
+bool DCOPRef::sendInternal( const TQCString& fun, const TQCString& args, const TQByteArray& data )
{
if ( isNull() ) {
qWarning( "DCOPRef: send '%s' on null reference error",
@@ -86,7 +86,7 @@ bool DCOPRef::sendInternal( const QCString& fun, const QCString& args, const QBy
return false;
}
Q_UNUSED( data );
- QCString sig = fun;
+ TQCString sig = fun;
if ( fun.find('(') == -1 ) {
sig += args;
if( args.find( "<unknown" ) != -1 )
@@ -116,18 +116,18 @@ DCOPRef::DCOPRef( const DCOPRef& ref )
}
DCOPRef::DCOPRef( DCOPObject *o )
- : m_app( DCOPClient::mainClient() ? DCOPClient::mainClient()->appId() : QCString() ),
+ : m_app( DCOPClient::mainClient() ? DCOPClient::mainClient()->appId() : TQCString() ),
m_obj( o->objId() ), m_type( o->interfaces().last() ), d(0)
{
}
-DCOPRef::DCOPRef( const QCString& _app, const QCString& obj )
+DCOPRef::DCOPRef( const TQCString& _app, const TQCString& obj )
: m_app( _app ), m_obj( obj ), d(0)
{
}
-DCOPRef::DCOPRef( const QCString& _app, const QCString& _obj, const QCString& _type )
+DCOPRef::DCOPRef( const TQCString& _app, const TQCString& _obj, const TQCString& _type )
: m_app( _app ), m_obj( _obj ), m_type( _type ), d(0)
{
}
@@ -137,23 +137,23 @@ bool DCOPRef::isNull() const
return ( m_app.isNull() || m_obj.isNull() );
}
-QCString DCOPRef::app() const
+TQCString DCOPRef::app() const
{
return m_app;
}
-QCString DCOPRef::obj() const
+TQCString DCOPRef::obj() const
{
return m_obj;
}
-QCString DCOPRef::object() const
+TQCString DCOPRef::object() const
{
return m_obj;
}
-QCString DCOPRef::type() const
+TQCString DCOPRef::type() const
{
return m_type;
}
@@ -177,14 +177,14 @@ DCOPRef& DCOPRef::operator=( const DCOPRef& ref )
return *this;
}
-void DCOPRef::setRef( const QCString& _app, const QCString& _obj )
+void DCOPRef::setRef( const TQCString& _app, const TQCString& _obj )
{
m_app = _app;
m_obj = _obj;
m_type = 0;
}
-void DCOPRef::setRef( const QCString& _app, const QCString& _obj, const QCString& _type )
+void DCOPRef::setRef( const TQCString& _app, const TQCString& _obj, const TQCString& _type )
{
m_app = _app;
m_obj = _obj;
@@ -198,7 +198,7 @@ void DCOPRef::clear()
m_type = 0;
}
-QDataStream& operator<<( QDataStream& str, const DCOPRef& ref )
+TQDataStream& operator<<( TQDataStream& str, const DCOPRef& ref )
{
str << ref.app();
str << ref.obj();
@@ -207,9 +207,9 @@ QDataStream& operator<<( QDataStream& str, const DCOPRef& ref )
return str;
}
-QDataStream& operator>>( QDataStream& str, DCOPRef& ref )
+TQDataStream& operator>>( TQDataStream& str, DCOPRef& ref )
{
- QCString a, o, t;
+ TQCString a, o, t;
str >> a >> o >> t;
ref.setRef( a, o, t );
diff --git a/dcop/dcopref.h b/dcop/dcopref.h
index 3b65fb9dc..380bebf5a 100644
--- a/dcop/dcopref.h
+++ b/dcop/dcopref.h
@@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef _DCOPREF_H
#define _DCOPREF_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <dcoptypes.h>
#include <kdatastream.h> // needed for proper bool marshalling
#include "kdelibs_export.h"
@@ -46,7 +46,7 @@ class DCOP_EXPORT DCOPReply
public:
/**
* Casts the value to the type @p T. Requires that the
- * type @p T suppports QDataStream deserialisation
+ * type @p T suppports TQDataStream deserialisation
* and has a function dcopTypeName(T). This is true for most
* basic types.
*/
@@ -55,21 +55,21 @@ public:
T t;
dcopTypeInit(t);
if ( typeCheck( dcopTypeName(t), true ) ) {
- QDataStream reply( data, IO_ReadOnly );
+ TQDataStream reply( data, IO_ReadOnly );
reply >> t;
}
return t;
}
/**
* Retrieves the value from the type @p T. Requires that the
- * type @p T suppports QDataStream deserialisation.
+ * type @p T suppports TQDataStream deserialisation.
* @param t the type will be written here, if successful
* @param tname the signature type name
* @return true if successful, false otherwise
*/
template <class T> bool get( T& t, const char* tname ) {
if ( typeCheck( tname, false ) ) {
- QDataStream reply( data, IO_ReadOnly );
+ TQDataStream reply( data, IO_ReadOnly );
reply >> t;
return true;
}
@@ -77,7 +77,7 @@ public:
}
/**
* Retrieves the value from the type @p T. Requires that the
- * type @p T suppports QDataStream deserialisation
+ * type @p T suppports TQDataStream deserialisation
* and has a function dcopTypeName(T). This is true for most
* basic types.
* @param t the type will be written here, if successful
@@ -85,7 +85,7 @@ public:
*/
template <class T> bool get( T& t ) {
if ( typeCheck( dcopTypeName(t), false ) ) {
- QDataStream reply( data, IO_ReadOnly );
+ TQDataStream reply( data, IO_ReadOnly );
reply >> t;
return true;
}
@@ -99,9 +99,9 @@ public:
inline bool isValid() const { return !type.isNull(); }
/// The serialized data.
- QByteArray data;
+ TQByteArray data;
/// The name of the type, or 0 if unknown.
- QCString type;
+ TQCString type;
private:
bool typeCheck( const char* t );
bool typeCheck( const char* t, bool warn );
@@ -121,8 +121,8 @@ class DCOP_EXPORT DCOPArg {
public:
/**
* Creates a DCOPArg for DCOPRef::call().
- * @param t the data that will be written to a QDataStream. It must
- * overload writing to a QDataStream using the "<<"
+ * @param t the data that will be written to a TQDataStream. It must
+ * overload writing to a TQDataStream using the "<<"
* operator
* @param tname_arg the name of the data that will appear in the
* function's signature
@@ -130,13 +130,13 @@ public:
template <class T> DCOPArg( const T& t, const char* tname_arg )
: tname(tname_arg)
{
- QDataStream ds( data, IO_WriteOnly );
+ TQDataStream ds( data, IO_WriteOnly );
ds << t;
}
/**
* Creates a DCOPArg for DCOPRef::call().
- * @param t the data that will be written to a QDataStream. It must
- * overload writing to a QDataStream using the "<<"
+ * @param t the data that will be written to a TQDataStream. It must
+ * overload writing to a TQDataStream using the "<<"
* operator. The name of the type will be determined by
* calling the function dcopTypeName(T) that must be provided
* by you.
@@ -144,18 +144,18 @@ public:
template <class T> DCOPArg( const T& t )
: tname( dcopTypeName(t) )
{
- QDataStream ds( data, IO_WriteOnly );
+ TQDataStream ds( data, IO_WriteOnly );
ds << t;
}
/// The serialized data.
- QByteArray data;
+ TQByteArray data;
/// The signature type name of the data.
const char* tname;
};
inline const char* dcopTypeName( const DCOPArg &arg ) { return arg.tname; }
-inline QDataStream & operator << (QDataStream & str, const DCOPArg& arg )
+inline TQDataStream & operator << (TQDataStream & str, const DCOPArg& arg )
{ str.writeRawBytes( arg.data.data(), arg.data.size() ); return str; }
@@ -176,8 +176,8 @@ inline QDataStream & operator << (QDataStream & str, const DCOPArg& arg )
* ...
* k_dcop:
* DCOPRef giveMeAnotherObject();
- * int doSomething( QString, float, bool );
- * ASYNC pingMe( QCString message );
+ * int doSomething( TQString, float, bool );
+ * ASYNC pingMe( TQCString message );
* UserType userFunction( UserType );
* };
* \endcode
@@ -194,7 +194,7 @@ inline QDataStream & operator << (QDataStream & str, const DCOPArg& arg )
*
* \code
* DCOPRef example( "foo", "example" );
- * int result = example.call( "doSomething", QString("Hello World"), (float)2.5, true );
+ * int result = example.call( "doSomething", TQString("Hello World"), (float)2.5, true );
* \endcode
*
* If it is important for you to know whether the call succeeded or
@@ -202,30 +202,30 @@ inline QDataStream & operator << (QDataStream & str, const DCOPArg& arg )
*
* \code
* DCOPRef example( "foo", "example" );
- * DCOPReply reply = example.call( "doSomething", QString("Hello World"), (float)2.5, true );
+ * DCOPReply reply = example.call( "doSomething", TQString("Hello World"), (float)2.5, true );
* if ( reply.isValid() ) {
* int result = reply;
* // ...
* }
* \endcode
*
- * Note that you must pass a QString for the first argument. If you use a
- * regular char pointer, it will be converted to a QCString.
+ * Note that you must pass a TQString for the first argument. If you use a
+ * regular char pointer, it will be converted to a TQCString.
*
* For curiosity, here is how you would achieve the exactly same
* functionality by using DCOPClient::call() directly:
*
* \code
- * QByteArray data, replyData;
- * QCString replyType;
- * QDataStream arg( data, IO_WriteOnly );
- * arg << QString("hello world" ), (float) 2.5 << true;
+ * TQByteArray data, replyData;
+ * TQCString replyType;
+ * TQDataStream arg( data, IO_WriteOnly );
+ * arg << TQString("hello world" ), (float) 2.5 << true;
* if ( DCOPClient::mainClient()->call( app, obj,
- * "doSomething(QString,float,bool)",
+ * "doSomething(TQString,float,bool)",
* data, replyType, replyData ) ) {
* if ( replyType == "int" ) {
* int result;
- * QDataStream reply( replyData, IO_ReadOnly );
+ * TQDataStream reply( replyData, IO_ReadOnly );
* reply >> result;
* // ...
* }
@@ -238,10 +238,10 @@ inline QDataStream & operator << (QDataStream & str, const DCOPArg& arg )
* dcopTypeName function, for example
*
* \code
- * inline const char* dcopTypeName( const QString& ) { return "QString"; }
+ * inline const char* dcopTypeName( const TQString& ) { return "TQString"; }
* \endcode
*
- * If you use custom data types that do support QDataStream but have
+ * If you use custom data types that do support TQDataStream but have
* no corresponding dcopTypeName overload, you can either provide such
* an overload or use a DCOPArg wrapper that allows you to specify the type.
*
@@ -295,7 +295,7 @@ public:
* by the dcopserver.
* @param obj The name of the dcop object.
*/
- DCOPRef( const QCString& app, const QCString& obj = "" );
+ DCOPRef( const TQCString& app, const TQCString& obj = "" );
/**
* Creates a reference to an existing dcop object
@@ -313,7 +313,7 @@ public:
* @param obj The name of the dcop object
* @param type The object's type
*/
- DCOPRef( const QCString& app, const QCString& obj, const QCString& type );
+ DCOPRef( const TQCString& app, const TQCString& obj, const TQCString& type );
/**
* Tests whether this is a null reference.
@@ -326,25 +326,25 @@ public:
* Name of the application in which the object resides.
* @return the application's id. Can be null or empty if not set.
*/
- QCString app() const;
+ TQCString app() const;
/**
* Object ID of the referenced object.
* @return the id of the referenced object. Can be null or empty if not set.
* @since 3.1
*/
- QCString obj() const;
+ TQCString obj() const;
/**
* @obsolete
*/
- QCString object() const;
+ TQCString object() const;
/**
* Type of the referenced object. May be null (i.e. unknown).
* @return the type of the referenced object, or null if unknown
*/
- QCString type() const;
+ TQCString type() const;
/**
@@ -358,7 +358,7 @@ public:
* @param app the application id.
* @param obj the object id
*/
- void setRef( const QCString& app, const QCString& obj = "" );
+ void setRef( const TQCString& app, const TQCString& obj = "" );
/**
* Changes the referenced object.
@@ -366,7 +366,7 @@ public:
* @param obj the object id
* @param type the object's type
*/
- void setRef( const QCString& app, const QCString& obj, const QCString& type );
+ void setRef( const TQCString& app, const TQCString& obj, const TQCString& type );
/**
@@ -404,7 +404,7 @@ public:
/**
* Calls the function @p fun on the object referenced by this reference.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -414,8 +414,8 @@ public:
* @see DCOPArg
* @since 3.1
*/
- DCOPReply call( const QCString& fun ) {
- QByteArray data;
+ DCOPReply call( const TQCString& fun ) {
+ TQByteArray data;
return callInternal( fun, "()", data );
}
@@ -426,22 +426,22 @@ public:
* the call blocks too long
* @param timeout timeout for the call in miliseconds, or -1 for no timeout
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
* @since 3.2
*/
- DCOPReply callExt( const QCString& fun, EventLoopFlag useEventLoop=NoEventLoop,
+ DCOPReply callExt( const TQCString& fun, EventLoopFlag useEventLoop=NoEventLoop,
int timeout=-1 ) {
- QByteArray data;
+ TQByteArray data;
return callInternal( fun, "()", data, useEventLoop, timeout );
}
/**
* Calls the function @p fun on the object referenced by this reference.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -454,12 +454,12 @@ public:
* @since 3.1
*/
template <class T1>
- DCOPReply call( const QCString& fun, const T1& t1 ) {
- QCString args;
+ DCOPReply call( const TQCString& fun, const T1& t1 ) {
+ TQCString args;
args.sprintf( "(%s)",
dcopTypeName(t1) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1;
return callInternal( fun, args, data );
}
@@ -471,7 +471,7 @@ public:
* the call blocks too long
* @param timeout timeout for the call in miliseconds, or -1 for no timeout
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -480,14 +480,14 @@ public:
* @since 3.2
*/
template <class T1>
- DCOPReply callExt( const QCString& fun,
+ DCOPReply callExt( const TQCString& fun,
EventLoopFlag useEventLoop, int timeout,
const T1& t1) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s)",
dcopTypeName(t1) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1;
return callInternal( fun, args, data, useEventLoop, timeout );
}
@@ -495,7 +495,7 @@ public:
/**
* Calls the function @p fun on the object referenced by this reference.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -510,15 +510,15 @@ public:
* @since 3.1
*/
template <class T1, class T2>
- DCOPReply call( const QCString& fun,
+ DCOPReply call( const TQCString& fun,
const T1& t1,
const T2& t2 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2;
return callInternal( fun, args, data );
}
@@ -530,7 +530,7 @@ public:
* the call blocks too long
* @param timeout timeout for the call in miliseconds, or -1 for no timeout
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -541,16 +541,16 @@ public:
* @since 3.2
*/
template <class T1, class T2>
- DCOPReply callExt( const QCString& fun,
+ DCOPReply callExt( const TQCString& fun,
EventLoopFlag useEventLoop, int timeout,
const T1& t1,
const T2& t2) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2;
return callInternal( fun, args, data, useEventLoop, timeout );
}
@@ -558,7 +558,7 @@ public:
/**
* Calls the function @p fun on the object referenced by this reference.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -575,17 +575,17 @@ public:
* @since 3.1
*/
template <class T1, class T2, class T3>
- DCOPReply call( const QCString& fun,
+ DCOPReply call( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
dcopTypeName(t3) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3;
return callInternal( fun, args, data );
}
@@ -596,7 +596,7 @@ public:
* @param useEventLoop if UseEventLoop, the event loop will be started when
* the call blocks too long
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -610,18 +610,18 @@ public:
* @since 3.2
*/
template <class T1, class T2, class T3>
- DCOPReply callExt( const QCString& fun,
+ DCOPReply callExt( const TQCString& fun,
EventLoopFlag useEventLoop, int timeout,
const T1& t1,
const T2& t2,
const T3& t3) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
dcopTypeName(t3) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3;
return callInternal( fun, args, data, useEventLoop, timeout );
}
@@ -629,7 +629,7 @@ public:
/**
* Calls the function @p fun on the object referenced by this reference.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -648,19 +648,19 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4>
- DCOPReply call( const QCString& fun,
+ DCOPReply call( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
dcopTypeName(t3),
dcopTypeName(t4) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4;
return callInternal( fun, args, data );
}
@@ -671,7 +671,7 @@ public:
* @param useEventLoop if UseEventLoop, the event loop will be started when
* the call blocks too long
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -687,20 +687,20 @@ public:
* @since 3.2
*/
template <class T1,class T2,class T3,class T4>
- DCOPReply callExt( const QCString& fun,
+ DCOPReply callExt( const TQCString& fun,
EventLoopFlag useEventLoop, int timeout,
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
dcopTypeName(t3),
dcopTypeName(t4) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4;
return callInternal( fun, args, data, useEventLoop, timeout );
}
@@ -708,7 +708,7 @@ public:
/**
* Calls the function @p fun on the object referenced by this reference.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -729,21 +729,21 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4,class T5>
- DCOPReply call( const QCString& fun,
+ DCOPReply call( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4,
const T5& t5 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
dcopTypeName(t3),
dcopTypeName(t4),
dcopTypeName(t5) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5;
return callInternal( fun, args, data );
}
@@ -754,7 +754,7 @@ public:
* @param useEventLoop if UseEventLoop, the event loop will be started when
* the call blocks too long
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -772,22 +772,22 @@ public:
* @since 3.2
*/
template <class T1,class T2,class T3,class T4,class T5>
- DCOPReply callExt( const QCString& fun,
+ DCOPReply callExt( const TQCString& fun,
EventLoopFlag useEventLoop, int timeout,
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4,
const T5& t5 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
dcopTypeName(t3),
dcopTypeName(t4),
dcopTypeName(t5) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5;
return callInternal( fun, args, data, useEventLoop, timeout );
}
@@ -795,7 +795,7 @@ public:
/**
* Calls the function @p fun on the object referenced by this reference.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -818,14 +818,14 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4,class T5,class T6>
- DCOPReply call( const QCString& fun,
+ DCOPReply call( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4,
const T5& t5,
const T6& t6 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
@@ -833,8 +833,8 @@ public:
dcopTypeName(t4),
dcopTypeName(t5),
dcopTypeName(t6) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5 << t6;
return callInternal( fun, args, data );
}
@@ -845,7 +845,7 @@ public:
* @param useEventLoop if UseEventLoop, the event loop will be started when
* the call blocks too long
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -865,7 +865,7 @@ public:
* @since 3.2
*/
template <class T1,class T2,class T3,class T4,class T5,class T6>
- DCOPReply callExt( const QCString& fun,
+ DCOPReply callExt( const TQCString& fun,
EventLoopFlag useEventLoop, int timeout,
const T1& t1,
const T2& t2,
@@ -873,7 +873,7 @@ public:
const T4& t4,
const T5& t5,
const T6& t6) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
@@ -881,15 +881,15 @@ public:
dcopTypeName(t4),
dcopTypeName(t5),
dcopTypeName(t6) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5 << t6;
return callInternal( fun, args, data, useEventLoop, timeout );
}
/**
* Calls the function @p fun on the object referenced by this reference.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -914,7 +914,7 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4,class T5,class T6,class T7>
- DCOPReply call( const QCString& fun,
+ DCOPReply call( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
@@ -922,7 +922,7 @@ public:
const T5& t5,
const T6& t6,
const T7& t7 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
@@ -931,8 +931,8 @@ public:
dcopTypeName(t5),
dcopTypeName(t6),
dcopTypeName(t7) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5 << t6 << t7;
return callInternal( fun, args, data );
}
@@ -941,7 +941,7 @@ public:
* Like call(), with additional arguments allowing entering the event loop
* and specifying timeout.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -965,7 +965,7 @@ public:
* @since 3.2
*/
template <class T1,class T2,class T3,class T4,class T5,class T6,class T7>
- DCOPReply callExt( const QCString& fun,
+ DCOPReply callExt( const TQCString& fun,
EventLoopFlag useEventLoop, int timeout,
const T1& t1,
const T2& t2,
@@ -974,7 +974,7 @@ public:
const T5& t5,
const T6& t6,
const T7& t7) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
@@ -983,8 +983,8 @@ public:
dcopTypeName(t5),
dcopTypeName(t6),
dcopTypeName(t7) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5 << t6 << t7;
return callInternal( fun, args, data, useEventLoop, timeout );
}
@@ -992,7 +992,7 @@ public:
/**
* Calls the function @p fun on the object referenced by this reference.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1019,7 +1019,7 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
- DCOPReply call( const QCString& fun,
+ DCOPReply call( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
@@ -1028,7 +1028,7 @@ public:
const T6& t6,
const T7& t7,
const T8& t8 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
@@ -1038,8 +1038,8 @@ public:
dcopTypeName(t6),
dcopTypeName(t7),
dcopTypeName(t8) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5 << t6 << t7 << t8;
return callInternal( fun, args, data );
}
@@ -1067,14 +1067,14 @@ public:
* @param t8 the eigth argument of the function. This can be a
* supported base type or a DCOPArg object.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
* @since 3.2
*/
template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
- DCOPReply callExt( const QCString& fun,
+ DCOPReply callExt( const TQCString& fun,
EventLoopFlag useEventLoop, int timeout,
const T1& t1,
const T2& t2,
@@ -1084,7 +1084,7 @@ public:
const T6& t6,
const T7& t7,
const T8& t8) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
@@ -1094,8 +1094,8 @@ public:
dcopTypeName(t6),
dcopTypeName(t7),
dcopTypeName(t8) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5 << t6 << t7 << t8;
return callInternal( fun, args, data, useEventLoop, timeout );
}
@@ -1104,7 +1104,7 @@ public:
* Calls the function @p fun on the object referenced by this reference.
* Unlike call() this method does not expect a return value.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1113,8 +1113,8 @@ public:
* @see call()
* @since 3.1
*/
- bool send( const QCString& fun ) {
- QByteArray data;
+ bool send( const TQCString& fun ) {
+ TQByteArray data;
return sendInternal( fun, "()", data );
}
@@ -1122,7 +1122,7 @@ public:
* Calls the function @p fun on the object referenced by this reference.
* Unlike call() this method does not expect a return value.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1135,12 +1135,12 @@ public:
* @since 3.1
*/
template <class T1>
- bool send( const QCString& fun, const T1& t1 ) {
- QCString args;
+ bool send( const TQCString& fun, const T1& t1 ) {
+ TQCString args;
args.sprintf( "(%s)",
dcopTypeName(t1) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1;
return sendInternal( fun, args, data );
}
@@ -1148,7 +1148,7 @@ public:
* Calls the function @p fun on the object referenced by this reference.
* Unlike call() this method does not expect a return value.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1163,15 +1163,15 @@ public:
* @since 3.1
*/
template <class T1, class T2>
- bool send( const QCString& fun,
+ bool send( const TQCString& fun,
const T1& t1,
const T2& t2 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2;
return sendInternal( fun, args, data );
}
@@ -1179,7 +1179,7 @@ public:
* Calls the function @p fun on the object referenced by this reference.
* Unlike call() this method does not expect a return value.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1196,17 +1196,17 @@ public:
* @since 3.1
*/
template <class T1, class T2, class T3>
- bool send( const QCString& fun,
+ bool send( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
dcopTypeName(t3) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3;
return sendInternal( fun, args, data );
}
@@ -1214,7 +1214,7 @@ public:
* Calls the function @p fun on the object referenced by this reference.
* Unlike call() this method does not expect a return value.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1233,19 +1233,19 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4>
- bool send( const QCString& fun,
+ bool send( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
dcopTypeName(t3),
dcopTypeName(t4) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4;
return sendInternal( fun, args, data );
}
@@ -1253,7 +1253,7 @@ public:
* Calls the function @p fun on the object referenced by this reference.
* Unlike call() this method does not expect a return value.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1274,21 +1274,21 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4,class T5>
- bool send( const QCString& fun,
+ bool send( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4,
const T5& t5 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
dcopTypeName(t3),
dcopTypeName(t4),
dcopTypeName(t5) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5;
return sendInternal( fun, args, data );
}
@@ -1296,7 +1296,7 @@ public:
* Calls the function @p fun on the object referenced by this reference.
* Unlike call() this method does not expect a return value.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1319,14 +1319,14 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4,class T5,class T6>
- bool send( const QCString& fun,
+ bool send( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4,
const T5& t5,
const T6& t6 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
@@ -1334,8 +1334,8 @@ public:
dcopTypeName(t4),
dcopTypeName(t5),
dcopTypeName(t6) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5 << t6;
return sendInternal( fun, args, data );
}
@@ -1343,7 +1343,7 @@ public:
* Calls the function @p fun on the object referenced by this reference.
* Unlike call() this method does not expect a return value.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1368,7 +1368,7 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4,class T5,class T6,class T7>
- bool send( const QCString& fun,
+ bool send( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
@@ -1376,7 +1376,7 @@ public:
const T5& t5,
const T6& t6,
const T7& t7 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
@@ -1385,8 +1385,8 @@ public:
dcopTypeName(t5),
dcopTypeName(t6),
dcopTypeName(t7) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5 << t6 << t7;
return sendInternal( fun, args, data );
}
@@ -1394,7 +1394,7 @@ public:
* Calls the function @p fun on the object referenced by this reference.
* Unlike call() this method does not expect a return value.
* @param fun the name of the DCOP function. This can be either the
- * full function signature (e.g. "setName(QString)") or
+ * full function signature (e.g. "setName(TQString)") or
* only the function's name (e.g. "setName"). In the
* latter case the exact signature will be guessed from
* the arguments
@@ -1421,7 +1421,7 @@ public:
* @since 3.1
*/
template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
- bool send( const QCString& fun,
+ bool send( const TQCString& fun,
const T1& t1,
const T2& t2,
const T3& t3,
@@ -1430,7 +1430,7 @@ public:
const T6& t6,
const T7& t7,
const T8& t8 ) {
- QCString args;
+ TQCString args;
args.sprintf( "(%s,%s,%s,%s,%s,%s,%s,%s)",
dcopTypeName(t1),
dcopTypeName(t2),
@@ -1440,8 +1440,8 @@ public:
dcopTypeName(t6),
dcopTypeName(t7),
dcopTypeName(t8) );
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << t1 << t2 << t3 << t4 << t5 << t6 << t7 << t8;
return sendInternal( fun, args, data );
}
@@ -1449,14 +1449,14 @@ public:
private:
- DCOPReply callInternal( const QCString& fun, const QCString& args, const QByteArray& data,
+ DCOPReply callInternal( const TQCString& fun, const TQCString& args, const TQByteArray& data,
EventLoopFlag useEventLoop, int timeout );
- DCOPReply callInternal( const QCString& fun, const QCString& args, const QByteArray& data );
- bool sendInternal( const QCString& fun, const QCString& args, const QByteArray& data );
+ DCOPReply callInternal( const TQCString& fun, const TQCString& args, const TQByteArray& data );
+ bool sendInternal( const TQCString& fun, const TQCString& args, const TQByteArray& data );
- QCString m_app;
- QCString m_obj;
- QCString m_type;
+ TQCString m_app;
+ TQCString m_obj;
+ TQCString m_type;
class DCOPRefPrivate;
DCOPRefPrivate *d;
@@ -1465,10 +1465,10 @@ private:
/**
* Writes the reference (NOT the object itself) to the stream.
*/
-DCOP_EXPORT QDataStream& operator<<( QDataStream&, const DCOPRef& ref );
+DCOP_EXPORT TQDataStream& operator<<( TQDataStream&, const DCOPRef& ref );
/**
* Reads a reference from the stream.
*/
-DCOP_EXPORT QDataStream& operator>>( QDataStream&, DCOPRef& ref );
+DCOP_EXPORT TQDataStream& operator>>( TQDataStream&, DCOPRef& ref );
#endif
diff --git a/dcop/dcopserver.cpp b/dcop/dcopserver.cpp
index f64e13303..e6c60c74f 100644
--- a/dcop/dcopserver.cpp
+++ b/dcop/dcopserver.cpp
@@ -48,11 +48,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#endif
#define QT_CLEAN_NAMESPACE 1
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdatastream.h>
-#include <qptrstack.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdatastream.h>
+#include <tqptrstack.h>
+#include <tqtimer.h>
#include "dcopserver.h"
@@ -63,7 +63,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifdef DCOP_LOG
#undef Unsorted
-#include <qdir.h>
+#include <tqdir.h>
#include <string.h>
#endif
@@ -71,9 +71,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
DCOPServer* the_server;
-template class QDict<DCOPConnection>;
-template class QPtrDict<DCOPConnection>;
-template class QPtrList<DCOPListener>;
+template class TQDict<DCOPConnection>;
+template class TQPtrDict<DCOPConnection>;
+template class TQPtrList<DCOPListener>;
#define _DCOPIceSendBegin(x) \
int fd = IceConnectionNumber( x ); \
@@ -82,7 +82,7 @@ template class QPtrList<DCOPListener>;
#define _DCOPIceSendEnd() \
fcntl(fd, F_SETFL, fd_fl);
-static QCString findDcopserverShutdown()
+static TQCString findDcopserverShutdown()
{
#ifdef Q_OS_WIN32
char szPath[512];
@@ -90,24 +90,24 @@ static QCString findDcopserverShutdown()
int ret;
ret = SearchPathA(NULL,"dcopserver_shutdown","exe",sizeof(szPath)/sizeof(szPath[0]),szPath,&pszFilePart);
if(ret != 0)
- return QCString(szPath);
+ return TQCString(szPath);
#else
- QCString path = getenv("PATH");
+ TQCString path = getenv("PATH");
char *dir = strtok(path.data(), ":");
while (dir)
{
- QCString file = dir;
+ TQCString file = dir;
file += "/dcopserver_shutdown";
if (access(file.data(), X_OK) == 0)
return file;
dir = strtok(NULL, ":");
}
- QCString file = DCOP_PATH;
+ TQCString file = DCOP_PATH;
file += "/dcopserver_shutdown";
if (access(file.data(), X_OK) == 0)
return file;
#endif
- return QCString("dcopserver_shutdown");
+ return TQCString("dcopserver_shutdown");
}
static Bool HostBasedAuthProc ( char* /*hostname*/)
@@ -121,30 +121,30 @@ extern IceIOErrorHandler _kde_IceIOErrorHandler;
void DCOPIceWriteChar(register IceConn iceConn, unsigned long nbytes, char *ptr);
}
-static QCString readQCString(QDataStream &ds)
+static TQCString readQCString(TQDataStream &ds)
{
- QCString result;
+ TQCString result;
Q_UINT32 len;
ds >> len;
- QIODevice *device = ds.device();
+ TQIODevice *device = ds.device();
int bytesLeft = device->size()-device->at();
if ((bytesLeft < 0 ) || (len > (uint) bytesLeft))
{
qWarning("Corrupt data!\n");
return result;
}
- result.QByteArray::resize( (uint)len );
+ result.TQByteArray::resize( (uint)len );
if (len > 0)
ds.readRawBytes( result.data(), (uint)len);
return result;
}
-static QByteArray readQByteArray(QDataStream &ds)
+static TQByteArray readQByteArray(TQDataStream &ds)
{
- QByteArray result;
+ TQByteArray result;
Q_UINT32 len;
ds >> len;
- QIODevice *device = ds.device();
+ TQIODevice *device = ds.device();
int bytesLeft = device->size()-device->at();
if ((bytesLeft < 0 ) || (len > (uint) bytesLeft))
{
@@ -247,7 +247,7 @@ qWarning("DCOPServer: DCOPIceWriteChar() Writing %d bytes to %d [%s]", nbytes, f
{
if (conn->outputBlocked)
{
- QByteArray _data(nbytes);
+ TQByteArray _data(nbytes);
memcpy(_data.data(), ptr, nbytes);
#ifdef DCOP_DEBUG
qWarning("DCOPServer: _IceWrite() outputBlocked. Queuing %d bytes.", _data.size());
@@ -261,14 +261,14 @@ qWarning("DCOPServer: _IceWrite() outputBlocked. Queuing %d bytes.", _data.size(
unsigned long nleft = writeIceData(iceConn, nbytes, ptr);
if ((nleft > 0) && conn)
{
- QByteArray _data(nleft);
+ TQByteArray _data(nleft);
memcpy(_data.data(), ptr, nleft);
conn->waitForOutputReady(_data, 0);
return;
}
}
-static void DCOPIceWrite(IceConn iceConn, const QByteArray &_data)
+static void DCOPIceWrite(IceConn iceConn, const TQByteArray &_data)
{
DCOPConnection* conn = the_server->findConn( iceConn );
#ifdef DCOP_DEBUG
@@ -295,7 +295,7 @@ qWarning("DCOPServer: DCOPIceWrite() outputBlocked. Queuing %d bytes.", _data.si
}
}
-void DCOPConnection::waitForOutputReady(const QByteArray &_data, int start)
+void DCOPConnection::waitForOutputReady(const TQByteArray &_data, int start)
{
#ifdef DCOP_DEBUG
qWarning("DCOPServer: waitForOutputReady fd = %d datasize = %d start = %d", socket(), _data.size(), start);
@@ -305,9 +305,9 @@ qWarning("DCOPServer: waitForOutputReady fd = %d datasize = %d start = %d", sock
outputBufferStart = start;
if (!outputBufferNotifier)
{
- outputBufferNotifier = new QSocketNotifier(socket(), Write);
- connect(outputBufferNotifier, SIGNAL(activated(int)),
- the_server, SLOT(slotOutputReady(int)));
+ outputBufferNotifier = new TQSocketNotifier(socket(), Write);
+ connect(outputBufferNotifier, TQT_SIGNAL(activated(int)),
+ the_server, TQT_SLOT(slotOutputReady(int)));
}
outputBufferNotifier->setEnabled(true);
return;
@@ -333,7 +333,7 @@ void DCOPConnection::slotOutputReady()
//assert(outputBlocked);
//assert(!outputBuffer.isEmpty());
- QByteArray data = outputBuffer.first();
+ TQByteArray data = outputBuffer.first();
int fd = socket();
@@ -384,7 +384,7 @@ qWarning("DCOPServer: slotOutputRead() more data to send.");
}
static void DCOPIceSendData(register IceConn _iceConn,
- const QByteArray &_data)
+ const TQByteArray &_data)
{
if (_iceConn->outbufptr > _iceConn->outbuf)
{
@@ -400,8 +400,8 @@ class DCOPListener : public QSocketNotifier
{
public:
DCOPListener( IceListenObj obj )
- : QSocketNotifier( IceGetListenConnectionNumber( obj ),
- QSocketNotifier::Read, 0, 0)
+ : TQSocketNotifier( IceGetListenConnectionNumber( obj ),
+ TQSocketNotifier::Read, 0, 0)
{
listenObj = obj;
}
@@ -410,8 +410,8 @@ public:
};
DCOPConnection::DCOPConnection( IceConn conn )
- : QSocketNotifier( IceConnectionNumber( conn ),
- QSocketNotifier::Read, 0, 0 )
+ : TQSocketNotifier( IceConnectionNumber( conn ),
+ TQSocketNotifier::Read, 0, 0 )
{
iceConn = conn;
notifyRegister = 0;
@@ -580,7 +580,7 @@ SetAuthentication (int count, IceListenObj *_listenObjs,
const char *path;
int original_umask;
int i;
- QCString command;
+ TQCString command;
int fd;
original_umask = umask (0077); /* disallow non-owner access */
@@ -722,11 +722,11 @@ void DCOPServer::processMessage( IceConn iceConn, int opcode,
DCOPMsg *pMsg = 0;
IceReadMessageHeader(iceConn, sizeof(DCOPMsg), DCOPMsg, pMsg);
CARD32 key = pMsg->key;
- QByteArray ba( length );
+ TQByteArray ba( length );
IceReadData(iceConn, length, ba.data() );
- QDataStream ds( ba, IO_ReadOnly );
- QCString fromApp = readQCString(ds);
- QCString toApp = readQCString(ds);
+ TQDataStream ds( ba, IO_ReadOnly );
+ TQCString fromApp = readQCString(ds);
+ TQCString toApp = readQCString(ds);
DCOPConnection* target = findApp( toApp );
int datalen = ba.size();
@@ -744,8 +744,8 @@ void DCOPServer::processMessage( IceConn iceConn, int opcode,
#ifdef DCOP_DEBUG
if (opcode == DCOPSend)
{
- QCString obj = readQCString(ds);
- QCString fun = readQCString(ds);
+ TQCString obj = readQCString(ds);
+ TQCString fun = readQCString(ds);
qWarning("Sending %d bytes from %s to %s. DCOPSend %s", length, fromApp.data(), toApp.data(), fun.data());
}
#endif
@@ -757,12 +757,12 @@ if (opcode == DCOPSend)
DCOPIceSendData(target->iceConn, ba);
_DCOPIceSendEnd();
} else if ( toApp == "DCOPServer" ) {
- QCString obj = readQCString(ds);
- QCString fun = readQCString(ds);
- QByteArray data = readQByteArray(ds);
+ TQCString obj = readQCString(ds);
+ TQCString fun = readQCString(ds);
+ TQByteArray data = readQByteArray(ds);
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
if ( !receive( toApp, obj, fun, data, replyType, replyData, iceConn ) ) {
qWarning("%s failure: object '%s' has no function '%s'", toApp.data(), obj.data(), fun.data() );
}
@@ -770,13 +770,13 @@ if (opcode == DCOPSend)
#ifdef DCOP_DEBUG
if (opcode == DCOPSend)
{
- QCString obj = readQCString(ds);
- QCString fun = readQCString(ds);
+ TQCString obj = readQCString(ds);
+ TQCString fun = readQCString(ds);
qWarning("Sending %d bytes from %s to %s. DCOPSend %s", length, fromApp.data(), toApp.data(), fun.data());
}
#endif
// handle a multicast.
- QAsciiDictIterator<DCOPConnection> aIt(appIds);
+ TQAsciiDictIterator<DCOPConnection> aIt(appIds);
int l = toApp.length()-1;
for ( ; aIt.current(); ++aIt) {
DCOPConnection *client = aIt.current();
@@ -800,11 +800,11 @@ if (opcode == DCOPSend)
DCOPMsg *pMsg = 0;
IceReadMessageHeader(iceConn, sizeof(DCOPMsg), DCOPMsg, pMsg);
CARD32 key = pMsg->key;
- QByteArray ba( length );
+ TQByteArray ba( length );
IceReadData(iceConn, length, ba.data() );
- QDataStream ds( ba, IO_ReadOnly );
- QCString fromApp = readQCString(ds);
- QCString toApp = readQCString(ds);
+ TQDataStream ds( ba, IO_ReadOnly );
+ TQCString fromApp = readQCString(ds);
+ TQCString toApp = readQCString(ds);
DCOPConnection* target = findApp( toApp );
int datalen = ba.size();
@@ -812,8 +812,8 @@ if (opcode == DCOPSend)
#ifdef DCOP_DEBUG
if (opcode == DCOPCall)
{
- QCString obj = readQCString(ds);
- QCString fun = readQCString(ds);
+ TQCString obj = readQCString(ds);
+ TQCString fun = readQCString(ds);
qWarning("Sending %d bytes from %s to %s. DCOPCall %s", length, fromApp.data(), toApp.data(), fun.data());
}
#endif
@@ -828,22 +828,22 @@ if (opcode == DCOPCall)
DCOPIceSendData(target->iceConn, ba);
_DCOPIceSendEnd();
} else {
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
bool b = false;
// DCOPServer itself does not do DCOPFind.
if ( (opcode == DCOPCall) && (toApp == "DCOPServer") ) {
- QCString obj = readQCString(ds);
- QCString fun = readQCString(ds);
- QByteArray data = readQByteArray(ds);
+ TQCString obj = readQCString(ds);
+ TQCString fun = readQCString(ds);
+ TQByteArray data = readQByteArray(ds);
b = receive( toApp, obj, fun, data, replyType, replyData, iceConn );
if ( !b )
qWarning("%s failure: object '%s' has no function '%s'", toApp.data(), obj.data(), fun.data() );
}
if (b) {
- QByteArray reply;
- QDataStream replyStream( reply, IO_WriteOnly );
+ TQByteArray reply;
+ TQDataStream replyStream( reply, IO_WriteOnly );
replyStream << toApp << fromApp << replyType << replyData.size();
int replylen = reply.size() + replyData.size();
IceGetHeader( iceConn, majorOpcode, DCOPReply,
@@ -858,8 +858,8 @@ if (opcode == DCOPCall)
DCOPIceSendData( iceConn, replyData);
_DCOPIceSendEnd();
} else {
- QByteArray reply;
- QDataStream replyStream( reply, IO_WriteOnly );
+ TQByteArray reply;
+ TQDataStream replyStream( reply, IO_WriteOnly );
replyStream << toApp << fromApp;
IceGetHeader( iceConn, majorOpcode, DCOPReplyFailed,
sizeof(DCOPMsg), DCOPMsg, pMsg );
@@ -882,11 +882,11 @@ if (opcode == DCOPCall)
DCOPMsg *pMsg = 0;
IceReadMessageHeader(iceConn, sizeof(DCOPMsg), DCOPMsg, pMsg);
CARD32 key = pMsg->key;
- QByteArray ba( length );
+ TQByteArray ba( length );
IceReadData(iceConn, length, ba.data() );
- QDataStream ds( ba, IO_ReadOnly );
- QCString fromApp = readQCString(ds);
- QCString toApp = readQCString(ds);
+ TQDataStream ds( ba, IO_ReadOnly );
+ TQCString fromApp = readQCString(ds);
+ TQCString toApp = readQCString(ds);
DCOPConnection* connreply = findApp( toApp );
int datalen = ba.size();
@@ -968,7 +968,7 @@ extern "C"
}
DCOPServer::DCOPServer(bool _suicide)
- : QObject(0,0), currentClientNumber(0), appIds(263), clients(263)
+ : TQObject(0,0), currentClientNumber(0), appIds(263), clients(263)
{
serverKey = 42;
@@ -1016,7 +1016,7 @@ DCOPServer::DCOPServer(bool _suicide)
} else {
(void) umask(orig_umask);
// publish available transports.
- QCString fName = DCOPClient::dcopServerFile();
+ TQCString fName = DCOPClient::dcopServerFile();
FILE *f;
if(!(f = ::fopen(fName.data(), "w+"))) {
fprintf (stderr, "Can not create file %s: %s\n",
@@ -1031,10 +1031,10 @@ DCOPServer::DCOPServer(bool _suicide)
fprintf(f, "\n%i\n", getpid());
fclose(f);
#ifndef Q_OS_WIN32
- if (QCString(getenv("DCOPAUTHORITY")).isEmpty())
+ if (TQCString(getenv("DCOPAUTHORITY")).isEmpty())
{
// Create a link named like the old-style (KDE 2.x) naming
- QCString compatName = DCOPClient::dcopServerFileOld();
+ TQCString compatName = DCOPClient::dcopServerFileOld();
::symlink(fName,compatName);
}
#endif // Q_OS_WIN32
@@ -1055,16 +1055,16 @@ DCOPServer::DCOPServer(bool _suicide)
for ( int i = 0; i < numTransports; i++) {
con = new DCOPListener( listenObjs[i] );
listener.append( con );
- connect( con, SIGNAL( activated(int) ), this, SLOT( newClient(int) ) );
+ connect( con, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( newClient(int) ) );
}
char c = 0;
write(ready[1], &c, 1); // dcopserver is started
close(ready[1]);
- m_timer = new QTimer(this);
- connect( m_timer, SIGNAL(timeout()), this, SLOT(slotTerminate()) );
- m_deadConnectionTimer = new QTimer(this);
- connect( m_deadConnectionTimer, SIGNAL(timeout()), this, SLOT(slotCleanDeadConnections()) );
+ m_timer = new TQTimer(this);
+ connect( m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTerminate()) );
+ m_deadConnectionTimer = new TQTimer(this);
+ connect( m_deadConnectionTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCleanDeadConnections()) );
#ifdef Q_OS_WIN
char szEventName[256];
@@ -1081,9 +1081,9 @@ DCOPServer::DCOPServer(bool _suicide)
memset( hostname_buffer, 0, sizeof( hostname_buffer ) );
if ( gethostname( hostname_buffer, 255 ) < 0 )
hostname_buffer[0] = '\0';
- m_logger = new QFile( QString( "%1/.dcop-%2.log" ).arg( QDir::homeDirPath() ).arg( hostname_buffer ) );
+ m_logger = new TQFile( TQString( "%1/.dcop-%2.log" ).arg( TQDir::homeDirPath() ).arg( hostname_buffer ) );
if ( m_logger->open( IO_WriteOnly ) ) {
- m_stream = new QTextStream( m_logger );
+ m_stream = new TQTextStream( m_logger );
}
#endif
}
@@ -1105,7 +1105,7 @@ DCOPServer::~DCOPServer()
#endif
}
-DCOPConnection* DCOPServer::findApp( const QCString& appId )
+DCOPConnection* DCOPServer::findApp( const TQCString& appId )
{
if ( appId.isNull() )
return 0;
@@ -1183,7 +1183,7 @@ void DCOPServer::newClient( int /*socket*/ )
void* DCOPServer::watchConnection( IceConn iceConn )
{
DCOPConnection* con = new DCOPConnection( iceConn );
- connect( con, SIGNAL( activated(int) ), this, SLOT( processData(int) ) );
+ connect( con, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( processData(int) ) );
clients.insert(iceConn, con );
fd_clients.insert( IceConnectionNumber(iceConn), con);
@@ -1206,7 +1206,7 @@ void DCOPServer::removeConnection( void* data )
if (iceConn) {
DCOPConnection* target = clients.find( iceConn );
qWarning("DCOP aborting call from '%s' to '%s'", target ? target->appId.data() : "<unknown>" , conn->appId.data() );
- QByteArray reply;
+ TQByteArray reply;
DCOPMsg *pMsg;
IceGetHeader( iceConn, majorOpcode, DCOPReplyFailed,
sizeof(DCOPMsg), DCOPMsg, pMsg );
@@ -1228,7 +1228,7 @@ void DCOPServer::removeConnection( void* data )
if (iceConn) {
DCOPConnection* target = clients.find( iceConn );
qWarning("DCOP aborting (delayed) call from '%s' to '%s'", target ? target->appId.data() : "<unknown>", conn->appId.data() );
- QByteArray reply;
+ TQByteArray reply;
DCOPMsg *pMsg;
IceGetHeader( iceConn, majorOpcode, DCOPReplyFailed,
sizeof(DCOPMsg), DCOPMsg, pMsg );
@@ -1271,7 +1271,7 @@ void DCOPServer::removeConnection( void* data )
appIds.remove( conn->appId );
- broadcastApplicationRegistration( conn, "applicationRemoved(QCString)", conn->appId );
+ broadcastApplicationRegistration( conn, "applicationRemoved(TQCString)", conn->appId );
}
delete conn;
@@ -1291,10 +1291,10 @@ void DCOPServer::slotTerminate()
#ifndef NDEBUG
fprintf( stderr, "DCOPServer : slotTerminate() -> sending terminateKDE signal.\n" );
#endif
- QByteArray data;
+ TQByteArray data;
dcopSignals->emitSignal(0L /* dcopserver */, "terminateKDE()", data, false);
- disconnect( m_timer, SIGNAL(timeout()), this, SLOT(slotTerminate()) );
- connect( m_timer, SIGNAL(timeout()), this, SLOT(slotSuicide()) );
+ disconnect( m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTerminate()) );
+ connect( m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotSuicide()) );
system(findDcopserverShutdown()+" --nokill");
}
@@ -1318,11 +1318,11 @@ void DCOPServer::slotShutdown()
if (!shutdown)
{
shutdown = true;
- QByteArray data;
+ TQByteArray data;
dcopSignals->emitSignal(0L /* dcopserver */, "terminateKDE()", data, false);
m_timer->start( 10000 ); // if within 10 seconds nothing happens, we'll terminate
- disconnect( m_timer, SIGNAL(timeout()), this, SLOT(slotTerminate()) );
- connect( m_timer, SIGNAL(timeout()), this, SLOT(slotExit()) );
+ disconnect( m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTerminate()) );
+ connect( m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotExit()) );
if (appIds.isEmpty())
slotExit(); // Exit now
}
@@ -1342,9 +1342,9 @@ void DCOPServer::slotExit()
exit(0);
}
-bool DCOPServer::receive(const QCString &/*app*/, const QCString &obj,
- const QCString &fun, const QByteArray& data,
- QCString& replyType, QByteArray &replyData,
+bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
+ const TQCString &fun, const TQByteArray& data,
+ TQCString& replyType, TQByteArray &replyData,
IceConn iceConn)
{
#ifdef DCOP_LOG
@@ -1368,7 +1368,7 @@ bool DCOPServer::receive(const QCString &/*app*/, const QCString &obj,
return true;
}
if ( fun == "setDaemonMode(bool)" ) {
- QDataStream args( data, IO_ReadOnly );
+ TQDataStream args( data, IO_ReadOnly );
if ( !args.atEnd() ) {
Q_INT8 iDaemon;
bool daemon;
@@ -1409,11 +1409,11 @@ bool DCOPServer::receive(const QCString &/*app*/, const QCString &obj,
return true;
}
}
- if ( fun == "registerAs(QCString)" ) {
- QDataStream args( data, IO_ReadOnly );
+ if ( fun == "registerAs(TQCString)" ) {
+ TQDataStream args( data, IO_ReadOnly );
if (!args.atEnd()) {
- QCString app2 = readQCString(args);
- QDataStream reply( replyData, IO_WriteOnly );
+ TQCString app2 = readQCString(args);
+ TQDataStream reply( replyData, IO_WriteOnly );
DCOPConnection* conn = clients.find( iceConn );
if ( conn && !app2.isEmpty() ) {
if ( !conn->appId.isNull() &&
@@ -1422,7 +1422,7 @@ bool DCOPServer::receive(const QCString &/*app*/, const QCString &obj,
}
- QCString oldAppId;
+ TQCString oldAppId;
if ( conn->appId.isNull() )
{
currentClientNumber++;
@@ -1443,7 +1443,7 @@ bool DCOPServer::receive(const QCString &/*app*/, const QCString &obj,
if ( appIds.find( app2 ) != 0 ) {
// we already have this application, unify
int n = 1;
- QCString tmp;
+ TQCString tmp;
do {
n++;
tmp.setNum( n );
@@ -1462,18 +1462,18 @@ bool DCOPServer::receive(const QCString &/*app*/, const QCString &obj,
if( !oldAppId.isEmpty())
broadcastApplicationRegistration( conn,
- "applicationRemoved(QCString)", oldAppId );
- broadcastApplicationRegistration( conn, "applicationRegistered(QCString)", conn->appId );
+ "applicationRemoved(TQCString)", oldAppId );
+ broadcastApplicationRegistration( conn, "applicationRegistered(TQCString)", conn->appId );
}
- replyType = "QCString";
+ replyType = "TQCString";
reply << conn->appId;
return true;
}
}
else if ( fun == "registeredApplications()" ) {
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
QCStringList applications;
- QAsciiDictIterator<DCOPConnection> it( appIds );
+ TQAsciiDictIterator<DCOPConnection> it( appIds );
while ( it.current() ) {
applications << it.currentKey();
++it;
@@ -1481,18 +1481,18 @@ bool DCOPServer::receive(const QCString &/*app*/, const QCString &obj,
replyType = "QCStringList";
reply << applications;
return true;
- } else if ( fun == "isApplicationRegistered(QCString)" ) {
- QDataStream args( data, IO_ReadOnly );
+ } else if ( fun == "isApplicationRegistered(TQCString)" ) {
+ TQDataStream args( data, IO_ReadOnly );
if (!args.atEnd()) {
- QCString s = readQCString(args);
- QDataStream reply( replyData, IO_WriteOnly );
+ TQCString s = readQCString(args);
+ TQDataStream reply( replyData, IO_WriteOnly );
int b = ( findApp( s ) != 0 );
replyType = "bool";
reply << b;
return true;
}
} else if ( fun == "setNotifications(bool)" ) {
- QDataStream args( data, IO_ReadOnly );
+ TQDataStream args( data, IO_ReadOnly );
if (!args.atEnd()) {
Q_INT8 notifyActive;
args >> notifyActive;
@@ -1506,38 +1506,38 @@ bool DCOPServer::receive(const QCString &/*app*/, const QCString &obj,
replyType = "void";
return true;
}
- } else if ( fun == "connectSignal(QCString,QCString,QCString,QCString,QCString,bool)") {
+ } else if ( fun == "connectSignal(TQCString,TQCString,TQCString,TQCString,TQCString,bool)") {
DCOPConnection* conn = clients.find( iceConn );
if (!conn) return false;
- QDataStream args(data, IO_ReadOnly );
+ TQDataStream args(data, IO_ReadOnly );
if (args.atEnd()) return false;
- QCString sender = readQCString(args);
- QCString senderObj = readQCString(args);
- QCString signal = readQCString(args);
- QCString receiverObj = readQCString(args);
- QCString slot = readQCString(args);
+ TQCString sender = readQCString(args);
+ TQCString senderObj = readQCString(args);
+ TQCString signal = readQCString(args);
+ TQCString receiverObj = readQCString(args);
+ TQCString slot = readQCString(args);
Q_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";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << (Q_INT8) (b?1:0);
return true;
- } else if ( fun == "disconnectSignal(QCString,QCString,QCString,QCString,QCString)") {
+ } else if ( fun == "disconnectSignal(TQCString,TQCString,TQCString,TQCString,TQCString)") {
DCOPConnection* conn = clients.find( iceConn );
if (!conn) return false;
- QDataStream args(data, IO_ReadOnly );
+ TQDataStream args(data, IO_ReadOnly );
if (args.atEnd()) return false;
- QCString sender = readQCString(args);
- QCString senderObj = readQCString(args);
- QCString signal = readQCString(args);
- QCString receiverObj = readQCString(args);
- QCString slot = readQCString(args);
+ TQCString sender = readQCString(args);
+ TQCString senderObj = readQCString(args);
+ TQCString signal = readQCString(args);
+ TQCString receiverObj = readQCString(args);
+ TQCString slot = readQCString(args);
//qDebug("DCOPServer: disconnectSignal(sender = %s senderObj = %s signal = %s recvObj = %s slot = %s)", sender.data(), senderObj.data(), signal.data(), receiverObj.data(), slot.data());
bool b = dcopSignals->disconnectSignal(sender, senderObj, signal, conn, receiverObj, slot);
replyType = "bool";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << (Q_INT8) (b?1:0);
return true;
}
@@ -1545,16 +1545,16 @@ bool DCOPServer::receive(const QCString &/*app*/, const QCString &obj,
return false;
}
-void DCOPServer::broadcastApplicationRegistration( DCOPConnection* conn, const QCString type,
- const QCString& appId )
+void DCOPServer::broadcastApplicationRegistration( DCOPConnection* conn, const TQCString type,
+ const TQCString& appId )
{
- QByteArray data;
- QDataStream datas( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream datas( data, IO_WriteOnly );
datas << appId;
- QPtrDictIterator<DCOPConnection> it( clients );
- QByteArray ba;
- QDataStream ds( ba, IO_WriteOnly );
- ds <<QCString("DCOPServer") << QCString("") << QCString("")
+ TQPtrDictIterator<DCOPConnection> it( clients );
+ TQByteArray ba;
+ TQDataStream ds( ba, IO_WriteOnly );
+ ds <<TQCString("DCOPServer") << TQCString("") << TQCString("")
<< type << data;
int datalen = ba.size();
DCOPMsg *pMsg = 0;
@@ -1574,12 +1574,12 @@ void DCOPServer::broadcastApplicationRegistration( DCOPConnection* conn, const Q
}
void
-DCOPServer::sendMessage(DCOPConnection *conn, const QCString &sApp,
- const QCString &rApp, const QCString &rObj,
- const QCString &rFun, const QByteArray &data)
+DCOPServer::sendMessage(DCOPConnection *conn, const TQCString &sApp,
+ const TQCString &rApp, const TQCString &rObj,
+ const TQCString &rFun, const TQByteArray &data)
{
- QByteArray ba;
- QDataStream ds( ba, IO_WriteOnly );
+ TQByteArray ba;
+ TQDataStream ds( ba, IO_WriteOnly );
ds << sApp << rApp << rObj << rFun << data;
int datalen = ba.size();
DCOPMsg *pMsg = 0;
@@ -1609,13 +1609,13 @@ void IoErrorHandler ( IceConn iceConn)
the_server->ioError( iceConn );
}
-static bool isRunning(const QCString &fName, bool printNetworkId = false)
+static bool isRunning(const TQCString &fName, bool printNetworkId = false)
{
if (::access(fName.data(), R_OK) == 0) {
- QFile f(fName);
+ TQFile f(fName);
f.open(IO_ReadOnly);
int size = QMIN( 1024, f.size() ); // protection against a huge file
- QCString contents( size+1 );
+ TQCString contents( size+1 );
bool ok = f.readBlock( contents.data(), size ) == size;
contents[size] = '\0';
int pos = contents.find('\n');
@@ -1692,12 +1692,12 @@ extern "C" DCOP_EXPORT int kdemain( int argc, char* argv[] )
if (isRunning(DCOPClient::dcopServerFile()))
return 0;
#ifndef Q_OS_WIN32
- if (QCString(getenv("DCOPAUTHORITY")).isEmpty() &&
+ if (TQCString(getenv("DCOPAUTHORITY")).isEmpty() &&
isRunning(DCOPClient::dcopServerFileOld()))
{
// Make symlink for compatibility
- QCString oldFile = DCOPClient::dcopServerFileOld();
- QCString newFile = DCOPClient::dcopServerFile();
+ TQCString oldFile = DCOPClient::dcopServerFileOld();
+ TQCString newFile = DCOPClient::dcopServerFile();
symlink(oldFile.data(), newFile.data());
return 0;
}
@@ -1766,7 +1766,7 @@ extern "C" DCOP_EXPORT int kdemain( int argc, char* argv[] )
#endif
putenv(strdup("SESSION_MANAGER="));
- QApplication a( argc, argv, false );
+ TQApplication a( argc, argv, false );
IceSetIOErrorHandler (IoErrorHandler );
DCOPServer *server = new DCOPServer(suicide); // this sets the_server
@@ -1774,8 +1774,8 @@ extern "C" DCOP_EXPORT int kdemain( int argc, char* argv[] )
#ifdef Q_OS_WIN
SetConsoleCtrlHandler(DCOPServer::dcopServerConsoleProc,TRUE);
#else
- QSocketNotifier DEATH(pipeOfDeath[0], QSocketNotifier::Read, 0, 0);
- server->connect(&DEATH, SIGNAL(activated(int)), SLOT(slotShutdown()));
+ TQSocketNotifier DEATH(pipeOfDeath[0], TQSocketNotifier::Read, 0, 0);
+ server->connect(&DEATH, TQT_SIGNAL(activated(int)), TQT_SLOT(slotShutdown()));
#endif
int ret = a.exec();
diff --git a/dcop/dcopserver.h b/dcop/dcopserver.h
index 5b7f995b6..343a2bc34 100644
--- a/dcop/dcopserver.h
+++ b/dcop/dcopserver.h
@@ -22,17 +22,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef DCOPSERVER_H
#define DCOPSERVER_H "$Id$"
-#include <qobject.h>
-
-#include <qstring.h>
-#include <qsocketnotifier.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qcstring.h>
-#include <qdict.h>
-#include <qptrdict.h>
-#include <qintdict.h>
-#include <qapplication.h>
+#include <tqobject.h>
+
+#include <tqstring.h>
+#include <tqsocketnotifier.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
+#include <tqdict.h>
+#include <tqptrdict.h>
+#include <tqintdict.h>
+#include <tqapplication.h>
#define INT32 QINT32
#ifdef Q_WS_X11
@@ -61,7 +61,7 @@ class QTextStream;
class QFile;
#endif
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
/**
* @internal
@@ -76,14 +76,14 @@ public:
// Add the data from offset @p start in @p _data to the output
// buffer and schedule it for later transmission.
- void waitForOutputReady(const QByteArray &_data, int start);
+ void waitForOutputReady(const TQByteArray &_data, int start);
// Called from DCOPServer::slotOutputReady()
// Flush the output buffer.
void slotOutputReady();
- QCString appId;
- QCString plainAppId;
+ TQCString appId;
+ TQCString plainAppId;
IceConn iceConn;
int notifyRegister;
/**
@@ -97,15 +97,15 @@ public:
* This allows us to do proper bookkeeping in case client A, client B
* or both unregister during the call.
*/
- QPtrList <_IceConn> waitingOnReply;
- QPtrList <_IceConn> waitingForReply;
- QPtrList <_IceConn> waitingForDelayedReply;
+ TQPtrList <_IceConn> waitingOnReply;
+ TQPtrList <_IceConn> waitingForReply;
+ TQPtrList <_IceConn> waitingForDelayedReply;
DCOPSignalConnectionList *_signalConnectionList;
bool daemon;
bool outputBlocked;
- QValueList <QByteArray> outputBuffer;
+ TQValueList <TQByteArray> outputBuffer;
unsigned long outputBufferStart;
- QSocketNotifier *outputBufferNotifier;
+ TQSocketNotifier *outputBufferNotifier;
};
@@ -124,17 +124,17 @@ public:
void processMessage( IceConn iceConn, int opcode, unsigned long length, Bool swap);
void ioError( IceConn iceConn );
- bool receive(const QCString &app, const QCString &obj,
- const QCString &fun, const QByteArray& data,
- QCString& replyType, QByteArray &replyData, IceConn iceConn);
+ bool receive(const TQCString &app, const TQCString &obj,
+ const TQCString &fun, const TQByteArray& data,
+ TQCString& replyType, TQByteArray &replyData, IceConn iceConn);
- DCOPConnection *findApp(const QCString &appId);
+ DCOPConnection *findApp(const TQCString &appId);
DCOPConnection *findConn(IceConn iceConn)
{ return clients.find(iceConn); }
- void sendMessage(DCOPConnection *conn, const QCString &sApp,
- const QCString &rApp, const QCString &rObj,
- const QCString &rFun, const QByteArray &data);
+ void sendMessage(DCOPConnection *conn, const TQCString &sApp,
+ const TQCString &rApp, const TQCString &rObj,
+ const TQCString &rFun, const TQByteArray &data);
private slots:
void newClient( int socket );
@@ -153,21 +153,21 @@ private:
static DWORD WINAPI TerminatorThread(void * pParam);
#endif
private:
- void broadcastApplicationRegistration( DCOPConnection* conn, const QCString type,
- const QCString& data );
+ void broadcastApplicationRegistration( DCOPConnection* conn, const TQCString type,
+ const TQCString& data );
bool suicide;
bool shutdown;
int majorOpcode;
int currentClientNumber;
CARD32 serverKey;
DCOPSignals *dcopSignals;
- QTimer *m_timer;
- QTimer *m_deadConnectionTimer;
- QPtrList<DCOPListener> listener;
- QAsciiDict<DCOPConnection> appIds; // index on app id
- QPtrDict<DCOPConnection> clients; // index on iceConn
- QIntDict<DCOPConnection> fd_clients; // index on fd
- QPtrList<_IceConn> deadConnections;
+ TQTimer *m_timer;
+ TQTimer *m_deadConnectionTimer;
+ TQPtrList<DCOPListener> listener;
+ TQAsciiDict<DCOPConnection> appIds; // index on app id
+ TQPtrDict<DCOPConnection> clients; // index on iceConn
+ TQIntDict<DCOPConnection> fd_clients; // index on fd
+ TQPtrList<_IceConn> deadConnections;
#ifdef Q_OS_WIN
HANDLE m_evTerminate;
@@ -176,8 +176,8 @@ private:
#endif
#ifdef DCOP_LOG
- QTextStream *m_stream;
- QFile *m_logger;
+ TQTextStream *m_stream;
+ TQFile *m_logger;
#endif
};
diff --git a/dcop/dcopserver_shutdown.c b/dcop/dcopserver_shutdown.c
index a9d7057ad..46a847660 100644
--- a/dcop/dcopserver_shutdown.c
+++ b/dcop/dcopserver_shutdown.c
@@ -52,9 +52,9 @@ static char *getDisplay()
char *screen;
char *colon;
/*
- don't test for a value from qglobal.h but instead distinguish
+ don't test for a value from tqglobal.h but instead distinguish
Qt/X11 from Qt/Embedded by the fact that Qt/E apps have -DQWS
- on the commandline (which in qglobal.h however triggers Q_WS_QWS,
+ on the commandline (which in tqglobal.h however triggers Q_WS_QWS,
but we don't want to include that here) (Simon)
#ifdef Q_WS_X11
*/
diff --git a/dcop/dcopserver_shutdown_win.cpp b/dcop/dcopserver_shutdown_win.cpp
index 5e9c6b9ca..ebc7897da 100644
--- a/dcop/dcopserver_shutdown_win.cpp
+++ b/dcop/dcopserver_shutdown_win.cpp
@@ -48,13 +48,13 @@
#endif
#define QT_CLEAN_NAMESPACE 1
-#include <qfile.h>
+#include <tqfile.h>
#include <dcopclient.h>
#define BUFFER_SIZE 4096
-extern QCString dcopServerFile(const QCString &hostname, bool old);
+extern TQCString dcopServerFile(const TQCString &hostname, bool old);
static char *getDisplay()
{
@@ -63,9 +63,9 @@ static char *getDisplay()
char *screen;
char *colon;
/*
- don't test for a value from qglobal.h but instead distinguish
+ don't test for a value from tqglobal.h but instead distinguish
Qt/X11 from Qt/Embedded by the fact that Qt/E apps have -DQWS
- on the commandline (which in qglobal.h however triggers Q_WS_QWS,
+ on the commandline (which in tqglobal.h however triggers Q_WS_QWS,
but we don't want to include that here) (Simon)
#ifdef Q_WS_X11
*/
@@ -131,8 +131,8 @@ static void killDCOPWin(pid_t pid)
static void cleanupDCOP(int dont_kill_dcop, int wait_for_exit)
{
- QCString host;
- QCString strDCOPServer = DCOPClient::dcopServerFile(host);
+ TQCString host;
+ TQCString strDCOPServer = DCOPClient::dcopServerFile(host);
if(strDCOPServer.isEmpty())
{
@@ -142,10 +142,10 @@ static void cleanupDCOP(int dont_kill_dcop, int wait_for_exit)
printf("server file %s\n",(const char *)strDCOPServer);
pid_t pid = 0;
- QFile f(strDCOPServer);
+ TQFile f(strDCOPServer);
if(f.open(IO_ReadOnly))
{
- QString str;
+ TQString str;
while(f.readLine(str,2048))
{
pid = str.toULong();
@@ -156,7 +156,7 @@ static void cleanupDCOP(int dont_kill_dcop, int wait_for_exit)
}
f.close();
/* Clean up .DCOPserver file */
- QFile::remove(strDCOPServer);
+ TQFile::remove(strDCOPServer);
printf("remove server file %s\n",(const char *)strDCOPServer);
if(pid)
@@ -200,7 +200,7 @@ static void cleanupDCOP(int dont_kill_dcop, int wait_for_exit)
int main(int argc, char **argv)
{
- QCString host;
+ TQCString host;
int dont_kill_dcop = (argc == 2) && (strcmp(argv[1], "--nokill") == 0);
int wait_for_exit = (argc == 2) && (strcmp(argv[1], "--wait") == 0);
diff --git a/dcop/dcopserver_win.cpp b/dcop/dcopserver_win.cpp
index 6d6c37859..4e6bc5e9f 100644
--- a/dcop/dcopserver_win.cpp
+++ b/dcop/dcopserver_win.cpp
@@ -19,7 +19,7 @@
//this file is included by dcopserver.cpp
-#include <qeventloop.h>
+#include <tqeventloop.h>
DWORD WINAPI DCOPServer::TerminatorThread(void * pParam)
{
@@ -35,7 +35,7 @@ DWORD WINAPI DCOPServer::TerminatorThread(void * pParam)
// Wait for main thread to tell us to realy terminate now
// Need some further event processing to get the timer signals
while(WaitForSingleObject(server->m_evTerminate,100) != WAIT_OBJECT_0)
- QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput|QEventLoop::ExcludeSocketNotifiers);
+ TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput|TQEventLoop::ExcludeSocketNotifiers);
fprintf( stderr, "DCOPServer : terminated event signaled the last time\n" );
}
fprintf( stderr, "DCOPServer : terminate thread teminated\n" );
diff --git a/dcop/dcopsignals.cpp b/dcop/dcopsignals.cpp
index 05d674107..437051a55 100644
--- a/dcop/dcopsignals.cpp
+++ b/dcop/dcopsignals.cpp
@@ -22,7 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <dcopserver.h>
#include <dcopsignals.h>
-template class QPtrList<DCOPSignalConnection>;
+template class TQPtrList<DCOPSignalConnection>;
DCOPSignals::DCOPSignals()
{
@@ -35,10 +35,10 @@ DCOPSignals::DCOPSignals()
* If "excludeSelf" is true, signal is never sent to "conn" itself.
*/
void
-DCOPSignals::emitSignal( DCOPConnection *conn, const QCString &_fun, const QByteArray &data, bool excludeSelf)
+DCOPSignals::emitSignal( DCOPConnection *conn, const TQCString &_fun, const TQByteArray &data, bool excludeSelf)
{
- QCString senderObj;
- QCString fun = _fun;
+ TQCString senderObj;
+ TQCString fun = _fun;
int i = fun.find('#');
if (i > -1)
{
@@ -76,7 +76,7 @@ DCOPSignals::emitSignal( DCOPConnection *conn, const QCString &_fun, const QByte
doSend = false;
if (doSend)
{
- the_server->sendMessage(current->recvConn, conn ? conn->appId : QCString("DCOPServer"),
+ the_server->sendMessage(current->recvConn, conn ? conn->appId : TQCString("DCOPServer"),
current->recvConn->appId, current->recvObj,
current->slot, data);
}
@@ -94,13 +94,13 @@ DCOPSignals::emitSignal( DCOPConnection *conn, const QCString &_fun, const QByte
* "conn" unregisters.
*/
bool
-DCOPSignals::connectSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- DCOPConnection *conn, const QCString &receiverObj,
- const QCString &slot, bool Volatile)
+DCOPSignals::connectSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ DCOPConnection *conn, const TQCString &receiverObj,
+ const TQCString &slot, bool Volatile)
{
// TODO: Check if signal and slot match
- QCString signalArgs, slotArgs;
+ TQCString signalArgs, slotArgs;
int i,j;
i = signal.find('(');
if (i < 0) return false;
@@ -166,10 +166,10 @@ DCOPSignals::connectSignal( const QCString &sender, const QCString &senderObj,
* are disconnected.
*/
bool
-DCOPSignals::disconnectSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- DCOPConnection *conn, const QCString &receiverObj,
- const QCString &slot)
+DCOPSignals::disconnectSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ DCOPConnection *conn, const TQCString &receiverObj,
+ const TQCString &slot)
{
if (sender.isEmpty() && signal.isEmpty())
{
@@ -228,7 +228,7 @@ DCOPSignals::disconnectSignal( const QCString &sender, const QCString &senderObj
* All volatile connections for which "conn"/"obj" is the sender.
*/
void
-DCOPSignals::removeConnections(DCOPConnection *conn, const QCString &obj)
+DCOPSignals::removeConnections(DCOPConnection *conn, const TQCString &obj)
{
DCOPSignalConnectionList *list = conn->_signalConnectionList;
if (!list)
diff --git a/dcop/dcopsignals.h b/dcop/dcopsignals.h
index 142d713cb..f3aae683e 100644
--- a/dcop/dcopsignals.h
+++ b/dcop/dcopsignals.h
@@ -22,10 +22,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef DCOPSIGNALS_H
#define DCOPSIGNALS_H "$Id$"
-#include <qdict.h>
-#include <qasciidict.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqdict.h>
+#include <tqasciidict.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
class DCOPConnection;
@@ -37,18 +37,18 @@ class DCOPConnection;
class DCOP_EXPORT DCOPSignalConnection
{
public:
- QCString sender; // Sender client, empty means any client
+ TQCString sender; // Sender client, empty means any client
DCOPConnection *senderConn; //Sender client.
- QCString senderObj; // Object that sends the signal.
- QCString signal; // Signal name. Connections are sorted on signal name.
+ TQCString senderObj; // Object that sends the signal.
+ TQCString signal; // Signal name. Connections are sorted on signal name.
DCOPConnection *recvConn; // Client that wants to receive the signal
- QCString recvObj; // Object that wants to receive the signal
- QCString slot; // Function to send to in the object.
+ TQCString recvObj; // Object that wants to receive the signal
+ TQCString slot; // Function to send to in the object.
};
/** \internal */
-class DCOP_EXPORT DCOPSignalConnectionList : public QPtrList<DCOPSignalConnection>
+class DCOP_EXPORT DCOPSignalConnectionList : public TQPtrList<DCOPSignalConnection>
{
public:
DCOPSignalConnectionList() { };
@@ -70,7 +70,7 @@ public:
*
* If "excludeSelf" is true, signal is never send to "conn" itself.
*/
- void emitSignal( DCOPConnection *conn, const QCString &fun, const QByteArray &data, bool excludeSelf);
+ void emitSignal( DCOPConnection *conn, const TQCString &fun, const TQByteArray &data, bool excludeSelf);
/**
* Connects "signal" of the client named "sender" with the "slot" of
@@ -86,10 +86,10 @@ public:
* An attempt to create a Volatile connection to a non-existing client
* results in a failure.
*/
- bool connectSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- DCOPConnection *conn, const QCString &receiverObj,
- const QCString &slot, bool Volatile);
+ bool connectSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ DCOPConnection *conn, const TQCString &receiverObj,
+ const TQCString &slot, bool Volatile);
/**
* Disconnects "signal" of the client named "sender" from the "slot" of
@@ -100,10 +100,10 @@ public:
*
* Returns true if successful, false if no connection was found.
*/
- bool disconnectSignal( const QCString &sender, const QCString &senderObj,
- const QCString &signal,
- DCOPConnection *conn, const QCString &receiverObj,
- const QCString &slot);
+ bool disconnectSignal( const TQCString &sender, const TQCString &senderObj,
+ const TQCString &signal,
+ DCOPConnection *conn, const TQCString &receiverObj,
+ const TQCString &slot);
/**
* Removes all connections related to the "conn" client.
@@ -111,7 +111,7 @@ public:
* All connections for which "conn" is the receiver.
* All volatile connections for which "conn" is the sender.
*/
- void removeConnections(DCOPConnection *conn, const QCString &obj=0);
+ void removeConnections(DCOPConnection *conn, const TQCString &obj=0);
/*
@@ -124,7 +124,7 @@ public:
* a given signal. The connections in this list may specify different
* senders and receiving clients/objects.
*/
- QAsciiDict<DCOPSignalConnectionList> connections;
+ TQAsciiDict<DCOPSignalConnectionList> connections;
};
//
diff --git a/dcop/dcopstub.cpp b/dcop/dcopstub.cpp
index 8f69b1abe..903ed0bc5 100644
--- a/dcop/dcopstub.cpp
+++ b/dcop/dcopstub.cpp
@@ -33,12 +33,12 @@ public:
DCOPClient* dcopClient;
};
-DCOPStub::DCOPStub( const QCString& app, const QCString& obj )
+DCOPStub::DCOPStub( const TQCString& app, const TQCString& obj )
: m_app( app ), m_obj( obj ), m_status( CallSucceeded ),d(0)
{
}
-DCOPStub::DCOPStub( DCOPClient* client, const QCString& app, const QCString& obj )
+DCOPStub::DCOPStub( DCOPClient* client, const TQCString& app, const TQCString& obj )
: m_app( app ), m_obj( obj ), m_status( CallSucceeded ),d(0)
{
if ( client ) {
@@ -84,12 +84,12 @@ void DCOPStub::callFailed()
setStatus( CallFailed );
}
-QCString DCOPStub::app() const
+TQCString DCOPStub::app() const
{
return m_app;
}
-QCString DCOPStub::obj() const
+TQCString DCOPStub::obj() const
{
return m_obj;
}
diff --git a/dcop/dcopstub.h b/dcop/dcopstub.h
index 1ab46af24..df55e0f72 100644
--- a/dcop/dcopstub.h
+++ b/dcop/dcopstub.h
@@ -29,7 +29,7 @@ class DCOPStubPrivate;
#include <stdlib.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
/**
@@ -46,7 +46,7 @@ public:
@param app the application id
@param obj the object id
*/
- DCOPStub( const QCString& app, const QCString& obj );
+ DCOPStub( const TQCString& app, const TQCString& obj );
/**
Creates a DCOPStub for application @p app and object @p obj
@@ -55,7 +55,7 @@ public:
@param app the application id
@param obj the object id
*/
- DCOPStub( DCOPClient* client, const QCString& app, const QCString& obj );
+ DCOPStub( DCOPClient* client, const TQCString& app, const TQCString& obj );
/**
Creates a DCOPStub for application ref.app() and object ref.obj()
@@ -68,12 +68,12 @@ public:
Return the application id.
@return the application id
*/
- QCString app() const;
+ TQCString app() const;
/**
Return the object id.
@return the object id
*/
- QCString obj() const;
+ TQCString obj() const;
enum Status{ CallSucceeded, CallFailed };
/**
@@ -132,8 +132,8 @@ protected:
DCOPStub( never_use_t ) { abort(); }
private:
- QCString m_app;
- QCString m_obj;
+ TQCString m_app;
+ TQCString m_obj;
Status m_status;
protected:
diff --git a/dcop/dcoptypes.h b/dcop/dcoptypes.h
index 60a121926..62e3a4e0f 100644
--- a/dcop/dcoptypes.h
+++ b/dcop/dcoptypes.h
@@ -34,38 +34,38 @@ inline const char* dcopTypeName( long ) { return "long int"; }
inline const char* dcopTypeName( ulong ) { return "ulong"; }
inline const char* dcopTypeName( double ) { return "double"; }
inline const char* dcopTypeName( float ) { return "float"; }
-inline const char* dcopTypeName( const char* ) { return "QCString"; }
+inline const char* dcopTypeName( const char* ) { return "TQCString"; }
// dcop specialities
class DCOPRef; inline const char* dcopTypeName( const DCOPRef& ) { return "DCOPRef"; }
// Qt variant types
-class QString; inline const char* dcopTypeName( const QString& ) { return "QString"; }
-class QCString; inline const char* dcopTypeName( const QCString& ) { return "QCString"; }
-class QFont; inline const char* dcopTypeName( const QFont& ) { return "QFont"; }
-class QPixmap; inline const char* dcopTypeName( const QPixmap& ) { return "QPixmap"; }
-class QBrush; inline const char* dcopTypeName( const QBrush& ) { return "QBrush"; }
-class QRect; inline const char* dcopTypeName( const QRect& ) { return "QRect"; }
-class QPoint; inline const char* dcopTypeName( const QPoint& ) { return "QPoint"; }
-class QImage; inline const char* dcopTypeName( const QImage& ) { return "QImage"; }
-class QSize; inline const char* dcopTypeName( const QSize& ) { return "QSize"; }
-class QColor; inline const char* dcopTypeName( const QColor& ) { return "QColor"; }
-class QPalette; inline const char* dcopTypeName( const QPalette& ) { return "QPalette"; }
-class QColorGroup; inline const char* dcopTypeName( const QColorGroup& ) { return "QColorGroup"; }
-class QIconSet; inline const char* dcopTypeName( const QIconSet& ) { return "QIconSet"; }
-class QDataStream; inline const char* dcopTypeName( const QDataStream& ) { return "QDataStream"; }
-class QPointArray; inline const char* dcopTypeName( const QPointArray& ) { return "QPointArray"; }
-class QRegion; inline const char* dcopTypeName( const QRegion& ) { return "QRegion"; }
-class QBitmap; inline const char* dcopTypeName( const QBitmap& ) { return "QBitmap"; }
-class QCursor; inline const char* dcopTypeName( const QCursor& ) { return "QCursor"; }
-class QStringList; inline const char* dcopTypeName( const QStringList& ) { return "QStringList"; }
-class QSizePolicy; inline const char* dcopTypeName( const QSizePolicy& ) { return "QSizePolicy"; }
-class QDate; inline const char* dcopTypeName( const QDate& ) { return "QDate"; }
-class QTime; inline const char* dcopTypeName( const QTime& ) { return "QTime"; }
-class QDateTime; inline const char* dcopTypeName( const QDateTime& ) { return "QDateTime"; }
-class QBitArray; inline const char* dcopTypeName( const QBitArray& ) { return "QBitArray"; }
-class QKeySequence; inline const char* dcopTypeName( const QKeySequence& ) { return "QKeySequence"; }
-class QVariant; inline const char* dcopTypeName( const QVariant& ) { return "QVariant"; }
+class QString; inline const char* dcopTypeName( const TQString& ) { return "TQString"; }
+class QCString; inline const char* dcopTypeName( const TQCString& ) { return "TQCString"; }
+class QFont; inline const char* dcopTypeName( const TQFont& ) { return "TQFont"; }
+class QPixmap; inline const char* dcopTypeName( const TQPixmap& ) { return "TQPixmap"; }
+class QBrush; inline const char* dcopTypeName( const TQBrush& ) { return "TQBrush"; }
+class QRect; inline const char* dcopTypeName( const TQRect& ) { return "TQRect"; }
+class QPoint; inline const char* dcopTypeName( const TQPoint& ) { return "TQPoint"; }
+class QImage; inline const char* dcopTypeName( const TQImage& ) { return "TQImage"; }
+class QSize; inline const char* dcopTypeName( const TQSize& ) { return "TQSize"; }
+class QColor; inline const char* dcopTypeName( const TQColor& ) { return "TQColor"; }
+class QPalette; inline const char* dcopTypeName( const TQPalette& ) { return "TQPalette"; }
+class QColorGroup; inline const char* dcopTypeName( const TQColorGroup& ) { return "TQColorGroup"; }
+class QIconSet; inline const char* dcopTypeName( const TQIconSet& ) { return "TQIconSet"; }
+class QDataStream; inline const char* dcopTypeName( const TQDataStream& ) { return "TQDataStream"; }
+class QPointArray; inline const char* dcopTypeName( const TQPointArray& ) { return "TQPointArray"; }
+class QRegion; inline const char* dcopTypeName( const TQRegion& ) { return "TQRegion"; }
+class QBitmap; inline const char* dcopTypeName( const TQBitmap& ) { return "TQBitmap"; }
+class QCursor; inline const char* dcopTypeName( const TQCursor& ) { return "TQCursor"; }
+class QStringList; inline const char* dcopTypeName( const TQStringList& ) { return "TQStringList"; }
+class QSizePolicy; inline const char* dcopTypeName( const TQSizePolicy& ) { return "TQSizePolicy"; }
+class QDate; inline const char* dcopTypeName( const TQDate& ) { return "TQDate"; }
+class QTime; inline const char* dcopTypeName( const TQTime& ) { return "TQTime"; }
+class QDateTime; inline const char* dcopTypeName( const TQDateTime& ) { return "TQDateTime"; }
+class QBitArray; inline const char* dcopTypeName( const TQBitArray& ) { return "TQBitArray"; }
+class QKeySequence; inline const char* dcopTypeName( const TQKeySequence& ) { return "TQKeySequence"; }
+class QVariant; inline const char* dcopTypeName( const TQVariant& ) { return "TQVariant"; }
// And some KDE types
class KURL; inline const char* dcopTypeName( const KURL& ) { return "KURL"; }
diff --git a/dcop/kdatastream.h b/dcop/kdatastream.h
index 2d9b65210..f8502aaab 100644
--- a/dcop/kdatastream.h
+++ b/dcop/kdatastream.h
@@ -1,15 +1,15 @@
#ifndef __kdatastream__h
#define __kdatastream__h
-#include <qdatastream.h>
+#include <tqdatastream.h>
-inline QDataStream & operator << (QDataStream & str, bool b)
+inline TQDataStream & operator << (TQDataStream & str, bool b)
{
str << Q_INT8(b);
return str;
}
-inline QDataStream & operator >> (QDataStream & str, bool & b)
+inline TQDataStream & operator >> (TQDataStream & str, bool & b)
{
Q_INT8 l;
str >> l;
@@ -18,7 +18,7 @@ inline QDataStream & operator >> (QDataStream & str, bool & b)
}
#if QT_VERSION < 0x030200 && !defined(Q_WS_WIN) && !defined(Q_WS_MAC)
-inline QDataStream & operator << (QDataStream & str, long long int ll)
+inline TQDataStream & operator << (TQDataStream & str, long long int ll)
{
Q_UINT32 l1,l2;
l1 = ll & 0xffffffffLL;
@@ -27,7 +27,7 @@ inline QDataStream & operator << (QDataStream & str, long long int ll)
return str;
}
-inline QDataStream & operator >> (QDataStream & str, long long int&ll)
+inline TQDataStream & operator >> (TQDataStream & str, long long int&ll)
{
Q_UINT32 l1,l2;
str >> l1 >> l2;
@@ -35,7 +35,7 @@ inline QDataStream & operator >> (QDataStream & str, long long int&ll)
return str;
}
-inline QDataStream & operator << (QDataStream & str, unsigned long long int ll)
+inline TQDataStream & operator << (TQDataStream & str, unsigned long long int ll)
{
Q_UINT32 l1,l2;
l1 = ll & 0xffffffffLL;
@@ -44,7 +44,7 @@ inline QDataStream & operator << (QDataStream & str, unsigned long long int ll)
return str;
}
-inline QDataStream & operator >> (QDataStream & str, unsigned long long int &ll)
+inline TQDataStream & operator >> (TQDataStream & str, unsigned long long int &ll)
{
Q_UINT32 l1,l2;
str >> l1 >> l2;
diff --git a/dcop/testdcop.cpp b/dcop/testdcop.cpp
index a718442fc..e43b41c31 100644
--- a/dcop/testdcop.cpp
+++ b/dcop/testdcop.cpp
@@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <testdcop.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <assert.h>
@@ -35,31 +35,31 @@ DCOPClientTransaction *countDownAction2 = 0;
int countDownCount2 = 0;
DCOPClient *client = 0;
-bool MyDCOPObject::process(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData)
+bool MyDCOPObject::process(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData)
{
qDebug("in MyDCOPObject::process, fun = %s", fun.data());
// note "fun" is normlized here (i.e. whitespace clean)
- if (fun == "aFunction(QString,int)") {
- QDataStream args(data, IO_ReadOnly);
- QString arg1;
+ if (fun == "aFunction(TQString,int)") {
+ TQDataStream args(data, IO_ReadOnly);
+ TQString arg1;
int arg2;
args >> arg1 >> arg2;
function(arg1, arg2);
replyType = "void";
return true;
}
- if (fun == "canLaunchRockets(QRect)") {
- QDataStream args(data, IO_ReadOnly);
- QRect arg1;
+ if (fun == "canLaunchRockets(TQRect)") {
+ TQDataStream args(data, IO_ReadOnly);
+ TQRect arg1;
args >> arg1;
printf("Rect x = %d, y = %d, w = %d, h = %d\n", arg1.x(), arg1.y(), arg1.width(), arg1.height());
- replyType = "QRect";
- QDataStream reply( replyData, IO_WriteOnly );
- QRect r(10,20,100,200);
+ replyType = "TQRect";
+ TQDataStream reply( replyData, IO_WriteOnly );
+ TQRect r(10,20,100,200);
reply << r;
return true;
}
@@ -74,9 +74,9 @@ bool MyDCOPObject::process(const QCString &fun, const QByteArray &data,
qDebug("countDown() countDownAction = %p", countDownAction);
if (countDownAction2)
{
- replyType = "QString";
- QDataStream reply( replyData, IO_WriteOnly );
- reply << QString("Hey");
+ replyType = "TQString";
+ TQDataStream reply( replyData, IO_WriteOnly );
+ reply << TQString("Hey");
return true;
}
@@ -84,13 +84,13 @@ qDebug("countDown() countDownAction = %p", countDownAction);
{
countDownCount = 10;
countDownAction = client->beginTransaction();
- QTimer::singleShot(1000, this, SLOT(slotTimeout()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(slotTimeout()));
}
else
{
countDownCount2 = 10;
countDownAction2 = client->beginTransaction();
- QTimer::singleShot(1000, this, SLOT(slotTimeout2()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(slotTimeout2()));
}
return true;
}
@@ -104,16 +104,16 @@ void MyDCOPObject::slotTimeout()
countDownCount--;
if (countDownCount == 0)
{
- QCString replyType = "QString";
- QByteArray replyData;
- QDataStream reply( replyData, IO_WriteOnly );
- reply << QString("Hello World");
+ TQCString replyType = "TQString";
+ TQByteArray replyData;
+ TQDataStream reply( replyData, IO_WriteOnly );
+ reply << TQString("Hello World");
client->endTransaction(countDownAction, replyType, replyData);
countDownAction = 0;
}
else
{
- QTimer::singleShot(1000, this, SLOT(slotTimeout()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(slotTimeout()));
}
}
@@ -123,36 +123,36 @@ void MyDCOPObject::slotTimeout2()
countDownCount2--;
if (countDownCount2 == 0)
{
- QCString replyType = "QString";
- QByteArray replyData;
- QDataStream reply( replyData, IO_WriteOnly );
- reply << QString("Hello World");
+ TQCString replyType = "TQString";
+ TQByteArray replyData;
+ TQDataStream reply( replyData, IO_WriteOnly );
+ reply << TQString("Hello World");
client->endTransaction(countDownAction2, replyType, replyData);
countDownAction2 = 0;
}
else
{
- QTimer::singleShot(1000, this, SLOT(slotTimeout2()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(slotTimeout2()));
}
}
QCStringList MyDCOPObject::functions()
{
QCStringList result = DCOPObject::functions();
- result << "QRect canLaunchRockets(QRect)";
+ result << "TQRect canLaunchRockets(TQRect)";
return result;
}
-TestObject::TestObject(const QCString& app)
+TestObject::TestObject(const TQCString& app)
: m_app(app)
{
- QTimer::singleShot(2500, this, SLOT(slotTimeout()));
+ TQTimer::singleShot(2500, this, TQT_SLOT(slotTimeout()));
}
void TestObject::slotTimeout()
{
- QCString replyType;
- QByteArray data, reply;
+ TQCString replyType;
+ TQByteArray data, reply;
qWarning("#3 Calling countDown");
if (!client->call(m_app, "object1", "countDown()", data, replyType, reply))
@@ -162,13 +162,13 @@ void TestObject::slotTimeout()
}
-void TestObject::slotCallBack(int callId, const QCString &replyType, const QByteArray &replyData)
+void TestObject::slotCallBack(int callId, const TQCString &replyType, const TQByteArray &replyData)
{
qWarning("Call Back! callId = %d", callId);
qWarning("Type = %s", replyType.data());
- QDataStream args(replyData, IO_ReadOnly);
- QString arg1;
+ TQDataStream args(replyData, IO_ReadOnly);
+ TQString arg1;
args >> arg1;
qWarning("Value = %s", arg1.latin1());
@@ -180,21 +180,21 @@ void TestObject::slotCallBack(int callId, const QCString &replyType, const QByte
int main(int argc, char **argv)
{
- QApplication app(argc, argv, "testdcop");
+ TQApplication app(argc, argv, "testdcop");
- QCString replyType;
- QByteArray data, reply;
+ TQCString replyType;
+ TQByteArray data, reply;
client = new DCOPClient();
if (argc == 2)
{
- QCString appId = argv[1];
+ TQCString appId = argv[1];
TestObject obj(appId);
qWarning("#1 Calling countDown");
- int result = client->callAsync(appId, "object1", "countDown()", data, &obj, SLOT(slotCallBack(int, const QCString&, const QByteArray&)));
+ int result = client->callAsync(appId, "object1", "countDown()", data, &obj, TQT_SLOT(slotCallBack(int, const TQCString&, const TQByteArray&)));
qDebug("#1 countDown() call id = %d", result);
qWarning("#2 Calling countDown");
- result = client->callAsync(appId, "object1", "countDown()", data, &obj, SLOT(slotCallBack(int, const QCString&, const QByteArray&)));
+ result = client->callAsync(appId, "object1", "countDown()", data, &obj, TQT_SLOT(slotCallBack(int, const TQCString&, const TQByteArray&)));
qDebug("#2 countDown() call id = %d", result);
app.exec();
@@ -209,18 +209,18 @@ int main(int argc, char **argv)
if ( client->isApplicationRegistered( app.name() ) )
qDebug("indeed, we are registered!");
- QDataStream dataStream( data, IO_WriteOnly );
+ TQDataStream dataStream( data, IO_WriteOnly );
dataStream << (int) 43;
- client->emitDCOPSignal("alive(int,QCString)", data);
+ client->emitDCOPSignal("alive(int,TQCString)", data);
MyDCOPObject *obj1 = new MyDCOPObject("object1");
- bool connectResult = client->connectDCOPSignal("", "alive(int , QCString)", "object1", "isAliveSlot(int)", false);
+ bool connectResult = client->connectDCOPSignal("", "alive(int , TQCString)", "object1", "isAliveSlot(int)", false);
qDebug("connectDCOPSignal returns %s", connectResult ? "true" : "false");
- QDataStream ds(data, IO_WriteOnly);
- ds << QString("fourty-two") << 42;
- if (!client->call(app.name(), "object1", "aFunction(QString,int)", data, replyType, reply)) {
+ TQDataStream ds(data, IO_WriteOnly);
+ ds << TQString("fourty-two") << 42;
+ if (!client->call(app.name(), "object1", "aFunction(TQString,int)", data, replyType, reply)) {
qDebug("I couldn't call myself");
assert( 0 );
}
@@ -229,22 +229,22 @@ int main(int argc, char **argv)
assert( replyType == "void" );
}
- client->send(app.name(), "object1", "aFunction(QString,int)", data );
+ client->send(app.name(), "object1", "aFunction(TQString,int)", data );
int n = client->registeredApplications().count();
qDebug("number of attached applications = %d", n );
- QObject::connect( client, SIGNAL( applicationRegistered( const QCString&)),
- obj1, SLOT( registered( const QCString& )));
+ TQObject::connect( client, TQT_SIGNAL( applicationRegistered( const TQCString&)),
+ obj1, TQT_SLOT( registered( const TQCString& )));
- QObject::connect( client, SIGNAL( applicationRemoved( const QCString&)),
- obj1, SLOT( unregistered( const QCString& )));
+ TQObject::connect( client, TQT_SIGNAL( applicationRemoved( const TQCString&)),
+ obj1, TQT_SLOT( unregistered( const TQCString& )));
// Enable the above signals
client->setNotifications( true );
- QCString foundApp;
- QCString foundObj;
+ TQCString foundApp;
+ TQCString foundObj;
// Find a object called "object1" in any application that
// meets the criteria "canLaunchRockets()"
@@ -272,10 +272,10 @@ int main(int argc, char **argv)
qDebug("I2 registered as '%s'", client2->appId().data() );
qDebug("Sending to object1");
- client2->send(app.name(), "object1", "aFunction(QString,int)", data );
+ client2->send(app.name(), "object1", "aFunction(TQString,int)", data );
qDebug("Calling object1");
- if (!client2->call(app.name(), "object1", "aFunction(QString,int)", data, replyType, reply))
+ if (!client2->call(app.name(), "object1", "aFunction(TQString,int)", data, replyType, reply))
qDebug("I couldn't call myself");
else
qDebug("return type was '%s'", replyType.data() );
diff --git a/dcop/testdcop.h b/dcop/testdcop.h
index 935924d79..135812e39 100644
--- a/dcop/testdcop.h
+++ b/dcop/testdcop.h
@@ -26,12 +26,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef _TESTDCOP_H_
#define _TESTDCOP_H_
-#include <qapplication.h>
-#include <qbitarray.h>
+#include <tqapplication.h>
+#include <tqbitarray.h>
#include <dcopclient.h>
#include <dcopobject.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <stdio.h>
/**
@@ -45,32 +45,32 @@ class TestObject : public QObject
{
Q_OBJECT
public:
- TestObject(const QCString &app);
+ TestObject(const TQCString &app);
public slots:
void slotTimeout();
- void slotCallBack(int, const QCString&, const QByteArray&);
+ void slotCallBack(int, const TQCString&, const TQByteArray&);
private:
- QCString m_app;
+ TQCString m_app;
};
-class MyDCOPObject : public QObject, public DCOPObject
+class MyDCOPObject : public TQObject, public DCOPObject
{
Q_OBJECT
public:
- MyDCOPObject(const QCString &name) : DCOPObject(name) {}
- bool process(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData);
- void function(const QString &arg1, int arg2) { qDebug("function got arg: %s and %d", arg1.utf8().data(), arg2); }
+ MyDCOPObject(const TQCString &name) : DCOPObject(name) {}
+ bool process(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData);
+ void function(const TQString &arg1, int arg2) { qDebug("function got arg: %s and %d", arg1.utf8().data(), arg2); }
public slots:
void slotTimeout();
void slotTimeout2();
- void registered(const QCString &appName)
+ void registered(const TQCString &appName)
{ printf("REGISTER: %s\n", appName.data()); }
- void unregistered(const QCString &appName)
+ void unregistered(const TQCString &appName)
{ printf("UNREGISTER: %s\n", appName.data()); }
QCStringList functions();
};
diff --git a/dcop/tests/driver.cpp b/dcop/tests/driver.cpp
index ac06d2873..147d2a748 100644
--- a/dcop/tests/driver.cpp
+++ b/dcop/tests/driver.cpp
@@ -3,8 +3,8 @@
#include <iostream>
#include <dcopclient.h>
#include <kcmdlineargs.h>
-#include <qtimer.h>
-#include <qtimer.h>
+#include <tqtimer.h>
+#include <tqtimer.h>
using namespace std;
@@ -20,7 +20,7 @@ Driver::Driver(const char* app)
}
-QTextStream output( fopen( "driver.returns", "w" ) , IO_WriteOnly );
+TQTextStream output( fopen( "driver.returns", "w" ) , IO_WriteOnly );
#include <iostream>
void Driver::test()
{
@@ -39,7 +39,7 @@ void Driver::test()
}
++count;
- QTimer::singleShot( 100, this, SLOT( test() ) );
+ TQTimer::singleShot( 100, this, TQT_SLOT( test() ) );
}
#include "driver.moc"
@@ -58,7 +58,7 @@ int main(int argc, char** argv)
app.dcopClient()->attach( );
app.dcopClient()->registerAs( "TestAppDriver" );
Driver * object = new Driver( appname );
- QTimer::singleShot( 10, object, SLOT( test() ) );
+ TQTimer::singleShot( 10, object, TQT_SLOT( test() ) );
return app.exec();
}
diff --git a/dcop/tests/driver.h b/dcop/tests/driver.h
index ee4d5df57..3565d88ab 100644
--- a/dcop/tests/driver.h
+++ b/dcop/tests/driver.h
@@ -1,11 +1,11 @@
#ifndef _OPT_KDECVS_SRC_KDELIBS_DCOP_TEST_TESTER_H
#define _OPT_KDECVS_SRC_KDELIBS_DCOP_TEST_TESTER_H
#include "test_stub.h"
-#include <qobject.h>
+#include <tqobject.h>
-class Driver : public QObject, public Test_stub
+class Driver : public TQObject, public Test_stub
{
Q_OBJECT
diff --git a/dcop/tests/test.cpp b/dcop/tests/test.cpp
index 025230547..7f5114071 100644
--- a/dcop/tests/test.cpp
+++ b/dcop/tests/test.cpp
@@ -16,7 +16,7 @@ using namespace std;
void batch()
{
- QTextStream output( fopen( "batch.returns", "w" ) , IO_WriteOnly );
+ TQTextStream output( fopen( "batch.returns", "w" ) , IO_WriteOnly );
Test* object = new Test;
#include "batch.generated"
}