summaryrefslogtreecommitdiffstats
path: root/dcop/client
diff options
context:
space:
mode:
Diffstat (limited to 'dcop/client')
-rw-r--r--dcop/client/README.dcop8
-rw-r--r--dcop/client/dcop.cpp44
-rw-r--r--dcop/client/dcopfind.cpp20
-rw-r--r--dcop/client/dcopstart.cpp2
-rw-r--r--dcop/client/marshall.cpp38
5 files changed, 56 insertions, 56 deletions
diff --git a/dcop/client/README.dcop b/dcop/client/README.dcop
index 8868b1c55..e352cb439 100644
--- a/dcop/client/README.dcop
+++ b/dcop/client/README.dcop
@@ -21,7 +21,7 @@ exit-code of '0' means success. An exit-code of '1' means error, the error
msg is printed to stderr and no data is printed to stdout.
-dcoptqfind [-l] [-a] <app-id> [<object-id> [<select_func> [args]]]
+dcopfind [-l] [-a] <app-id> [<object-id> [<select_func> [args]]]
Finds an existing DCOP application/object. The select_func can be used to
select a specific single instance out of many based on some criteria.
@@ -38,7 +38,7 @@ With the -a option it prints out "<app-id>" instead of a DCOPRef.
With the -l option it calls "dcopstart <app-id>" if no object is found,
stripping off any wildcard from the <app-id>. If the dcopstart command is
-successful the tqfind command is repeated, if the dcopstart command fails, an
+successful the find command is repeated, if the dcopstart command fails, an
error message is printed to stderr and the command exits with exit-code '2'.
The default selection criteria is "any". Applications can declare their own
@@ -46,7 +46,7 @@ select_func as they see fit, e.g. konqueror could declare
"isDoingProtocol(QString protocol)" and then the following command would
select a konqueror mainwindow that is currently handling the help-protocol:
- "dcoptqfind 'konqueror*' 'konqueror-mainwindow*' 'isDoingProtocol(QString
+ "dcopfind 'konqueror*' 'konqueror-mainwindow*' 'isDoingProtocol(QString
protocol)' help"
@@ -57,7 +57,7 @@ In addtion to the current syntax of
dcop <appid> <object> <function> args
you will now also be able to use <dcopref> to make calls with <dcopref> being
-"DCOPRef(<appid>, <objectid>)" as returned by dcoptqfind.
+"DCOPRef(<appid>, <objectid>)" as returned by dcopfind.
Additional utilities:
diff --git a/dcop/client/dcop.cpp b/dcop/client/dcop.cpp
index 86b63cba6..1d167ce70 100644
--- a/dcop/client/dcop.cpp
+++ b/dcop/client/dcop.cpp
@@ -158,9 +158,9 @@ void queryFunctions( const char* app, const char* obj )
int callFunction( const char* app, const char* obj, const char* func, const QCStringList args )
{
- TQString f = func; // Qt is better with tqunicode strings, so use one.
- int left = f.tqfind( '(' );
- int right = f.tqfind( ')' );
+ TQString f = func; // Qt is better with unicode strings, so use one.
+ int left = f.find( '(' );
+ int right = f.find( ')' );
if ( right < left )
{
@@ -181,12 +181,12 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
return( 1 );
}
for ( QCStringList::Iterator it = funcs.begin(); it != funcs.end(); ++it ) {
- int l = (*it).tqfind( '(' );
+ int l = (*it).find( '(' );
int s;
if (l > 0)
- s = (*it).tqfindRev( ' ', l);
+ s = (*it).findRev( ' ', l);
else
- s = (*it).tqfind( ' ' );
+ s = (*it).find( ' ' );
if ( s < 0 )
s = 0;
@@ -195,8 +195,8 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
if ( l > 0 && (*it).mid( s, l - s ) == func ) {
realfunc = (*it).mid( s );
- const TQString arguments = (*it).mid(l+1,(*it).tqfind( ')' )-l-1);
- uint a = arguments.tqcontains(',');
+ const TQString arguments = (*it).mid(l+1,(*it).find( ')' )-l-1);
+ uint a = arguments.contains(',');
if ( (a==0 && !arguments.isEmpty()) || a>0)
a++;
if ( a == args.count() )
@@ -209,8 +209,8 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
return( 1 );
}
f = realfunc;
- left = f.tqfind( '(' );
- right = f.tqfind( ')' );
+ left = f.find( '(' );
+ right = f.find( ')' );
}
doit:
@@ -230,7 +230,7 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
TQString lt = (*it).simplifyWhiteSpace();
- int s = lt.tqfind(' ');
+ int s = lt.find(' ');
// If there are spaces in the name, there may be two
// reasons: the parameter name is still there, ie.
@@ -250,7 +250,7 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
//
s=1;
- while (s < static_cast<int>(partl.count()) && intTypes.tqcontains(partl[s]))
+ while (s < static_cast<int>(partl.count()) && intTypes.contains(partl[s]))
{
s++;
}
@@ -345,7 +345,7 @@ void showHelp( int exitCode = 0 )
<< " in bash, but because no new dcop instance has to be started" << endl
<< " for each line this is generally much faster, especially for" << endl
<< " the slower GNU dynamic linkers." << endl
- << " The '%1' placeholder cannot be used to tqreplace e.g. the" << endl
+ << " The '%1' placeholder cannot be used to replace e.g. the" << endl
<< " program, object or method name." << endl
<< " --user <user> Connect to the given user's DCOP server. This option will" << endl
<< " ignore the values of the environment vars $DCOPSERVER and" << endl
@@ -464,9 +464,9 @@ int runDCOP( QCStringList args, UserList users, Session session,
QCStringList params;
DCOPClient *client = 0L;
int retval = 0;
- if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 )
+ if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 )
{
- int delimPos = args[ 0 ].tqfindRev( ',' );
+ int delimPos = args[ 0 ].findRev( ',' );
if( delimPos == -1 )
{
cerr_ << "Error: '" << args[ 0 ]
@@ -569,7 +569,7 @@ int runDCOP( QCStringList args, UserList users, Session session,
}
else if( !sessionName.isEmpty() )
{
- if( sessions.tqcontains( sessionName ) )
+ if( sessions.contains( sessionName ) )
{
sessions.clear();
sessions.append( sessionName );
@@ -625,7 +625,7 @@ int runDCOP( QCStringList args, UserList users, Session session,
continue;
else
{
- cerr_ << "WARNING: Cannot tqfind ICE authority file "
+ cerr_ << "WARNING: Cannot find ICE authority file "
<< iceFile << "!" << endl
<< "Please check permissions or set the $ICEAUTHORITY"
<< " variable manually before" << endl
@@ -706,12 +706,12 @@ int runDCOP( QCStringList args, UserList users, Session session,
sendUserTime( app );
if( readStdin )
{
- QCStringList::Iterator tqreplaceArg = params.end();
+ QCStringList::Iterator replaceArg = params.end();
QCStringList::Iterator it = params.begin();
for( ; it != params.end(); ++it )
if( *it == "%1" )
- tqreplaceArg = it;
+ replaceArg = it;
// Read from stdin until EOF and call function for each
// read line
@@ -719,8 +719,8 @@ int runDCOP( QCStringList args, UserList users, Session session,
{
TQString buf = cin_.readLine();
- if( tqreplaceArg != params.end() )
- *tqreplaceArg = buf.local8Bit();
+ if( replaceArg != params.end() )
+ *replaceArg = buf.local8Bit();
if( !buf.isNull() )
{
@@ -861,7 +861,7 @@ int main( int argc, char** argv )
if (prog[prog.length()-1] != '*')
{
// Strip a trailing -<PID> part.
- int i = prog.tqfindRev('-');
+ int i = prog.findRev('-');
if ((i >= 0) && prog.mid(i+1).toLong())
{
prog = prog.left(i);
diff --git a/dcop/client/dcopfind.cpp b/dcop/client/dcopfind.cpp
index c8feb5936..cd3e4d517 100644
--- a/dcop/client/dcopfind.cpp
+++ b/dcop/client/dcopfind.cpp
@@ -38,11 +38,11 @@ static DCOPClient* dcop = 0;
static bool bAppIdOnly = 0;
static bool bLaunchApp = 0;
-bool tqfindObject( const char* app, const char* obj, const char* func, QCStringList args )
+bool findObject( const char* app, const char* obj, const char* func, QCStringList args )
{
- TQString f = func; // Qt is better with tqunicode strings, so use one.
- int left = f.tqfind( '(' );
- int right = f.tqfind( ')' );
+ TQString f = func; // Qt is better with unicode strings, so use one.
+ int left = f.find( '(' );
+ int right = f.find( ')' );
if ( right < left )
{
@@ -66,7 +66,7 @@ bool tqfindObject( const char* app, const char* obj, const char* func, QCStringL
for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
TQString lt = (*it).simplifyWhiteSpace();
- int s = lt.tqfind(' ');
+ int s = lt.find(' ');
// If there are spaces in the name, there may be two
// reasons: the parameter name is still there, ie.
@@ -86,7 +86,7 @@ bool tqfindObject( const char* app, const char* obj, const char* func, QCStringL
//
s=1;
- while (s < (int)partl.count() && intTypes.tqcontains(partl[s]))
+ while (s < (int)partl.count() && intTypes.contains(partl[s]))
{
s++;
}
@@ -139,7 +139,7 @@ bool tqfindObject( const char* app, const char* obj, const char* func, QCStringL
TQCString foundApp;
TQCString foundObj;
- if ( dcop->tqfindObject( app, obj, f.latin1(), data, foundApp, foundObj) )
+ if ( dcop->findObject( app, obj, f.latin1(), data, foundApp, foundObj) )
{
if (bAppIdOnly)
puts(foundApp.data());
@@ -192,7 +192,7 @@ bool launchApp(TQString app)
void usage()
{
- fprintf( stderr, "Usage: dcoptqfind [-l] [-a] application [object [function [arg1] [arg2] [arg3] ... ] ] ] \n" );
+ fprintf( stderr, "Usage: dcopfind [-l] [-a] application [object [function [arg1] [arg2] [arg3] ... ] ] ] \n" );
exit(0);
}
@@ -267,7 +267,7 @@ int main( int argc, char** argv )
QCStringList params;
for( int i = 0; i < argc; i++ )
params.append( args[ i ] );
- bool ok = tqfindObject( app, objid, function, params );
+ bool ok = findObject( app, objid, function, params );
if (ok)
return 0;
if (bLaunchApp)
@@ -275,7 +275,7 @@ int main( int argc, char** argv )
ok = launchApp(app);
if (!ok)
return 2;
- ok = tqfindObject( app, objid, function, params );
+ ok = findObject( app, objid, function, params );
}
return 1;
diff --git a/dcop/client/dcopstart.cpp b/dcop/client/dcopstart.cpp
index f46531735..5741ef775 100644
--- a/dcop/client/dcopstart.cpp
+++ b/dcop/client/dcopstart.cpp
@@ -33,7 +33,7 @@ static DCOPClient* dcop = 0;
void startApp(const char *_app, int argc, const char **args)
{
const char *function = 0;
- TQString app = TQString::tqfromLatin1(_app);
+ TQString app = TQString::fromLatin1(_app);
if (app.endsWith(".desktop"))
function = "start_service_by_desktop_path(TQString,TQStringList)";
else
diff --git a/dcop/client/marshall.cpp b/dcop/client/marshall.cpp
index 1e3c8d887..f9b7955f2 100644
--- a/dcop/client/marshall.cpp
+++ b/dcop/client/marshall.cpp
@@ -102,12 +102,12 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
{
TQCString result;
- if ( type == "int" || type == "TQ_INT32" )
+ if ( type == "int" || type == "Q_INT32" )
{
int i;
stream >> i;
result.setNum( i );
- } else if ( type == "uint" || type == "TQ_UINT32" || type == "unsigned int" )
+ } else if ( type == "uint" || type == "Q_UINT32" || type == "unsigned int" )
{
uint i;
stream >> i;
@@ -132,12 +132,12 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
double d;
stream >> d;
result.setNum( d, 'f' );
- } else if ( type == "TQ_INT64" ) {
- TQ_INT64 i;
+ } else if ( type == "Q_INT64" ) {
+ Q_INT64 i;
stream >> i;
result.sprintf( "%lld", i );
- } else if ( type == "TQ_UINT64" ) {
- TQ_UINT64 i;
+ } else if ( type == "Q_UINT64" ) {
+ Q_UINT64 i;
stream >> i;
result.sprintf( "%llu", i );
} else if ( type == "bool" )
@@ -190,7 +190,7 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
result.sprintf( "%dx%d+%d+%d", r.width(), r.height(), r.x(), r.y() );
} else if ( type == "TQVariant" )
{
- TQ_INT32 type;
+ Q_INT32 type;
stream >> type;
return demarshal( stream, TQVariant::typeToName( (TQVariant::Type)type ) );
} else if ( type == "DCOPRef" )
@@ -205,7 +205,7 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
result = r.url().local8Bit();
} else if ( type.left( 11 ) == "TQValueList<" )
{
- if ( (uint)type.tqfind( '>', 11 ) != type.length() - 1 )
+ if ( (uint)type.find( '>', 11 ) != type.length() - 1 )
return result;
TQString nestedType = type.mid( 11, type.length() - 12 );
@@ -213,10 +213,10 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
if ( nestedType.isEmpty() )
return result;
- TQ_UINT32 count;
+ Q_UINT32 count;
stream >> count;
- TQ_UINT32 i = 0;
+ Q_UINT32 i = 0;
for (; i < count; ++i )
{
TQCString arg = demarshal( stream, nestedType );
@@ -227,21 +227,21 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
}
} else if ( type.left( 5 ) == "TQMap<" )
{
- int commaPos = type.tqfind( ',', 5 );
+ int commaPos = type.find( ',', 5 );
if ( commaPos == -1 )
return result;
- if ( (uint)type.tqfind( '>', commaPos ) != type.length() - 1 )
+ if ( (uint)type.find( '>', commaPos ) != type.length() - 1 )
return result;
TQString keyType = type.mid( 5, commaPos - 5 );
TQString valueType = type.mid( commaPos + 1, type.length() - commaPos - 2 );
- TQ_UINT32 count;
+ Q_UINT32 count;
stream >> count;
- TQ_UINT32 i = 0;
+ Q_UINT32 i = 0;
for (; i < count; ++i )
{
TQCString key = demarshal( stream, keyType );
@@ -291,15 +291,15 @@ void marshall( TQDataStream &arg, QCStringList args, uint &i, TQString type )
arg << s.toUInt();
else if ( type == "unsigned int" )
arg << s.toUInt();
- else if ( type == "TQ_INT32" )
+ else if ( type == "Q_INT32" )
arg << s.toInt();
- else if ( type == "TQ_INT64" ) {
+ else if ( type == "Q_INT64" ) {
TQVariant qv = TQVariant( s );
arg << qv.toLongLong();
}
- else if ( type == "TQ_UINT32" )
+ else if ( type == "Q_UINT32" )
arg << s.toUInt();
- else if ( type == "TQ_UINT64" ) {
+ else if ( type == "Q_UINT64" ) {
TQVariant qv = TQVariant( s );
arg << qv.toULongLong();
}
@@ -376,7 +376,7 @@ void marshall( TQDataStream &arg, QCStringList args, uint &i, TQString type )
marshall( dummy_arg, args, j, type );
count++;
}
- arg << (TQ_UINT32) count;
+ arg << (Q_UINT32) count;
// Parse the list for real
while (true) {
if( i > args.count() )