[PATCH] dcop broken since 31-Jul-02

Melchior FRANZ a8603365 at unet.univie.ac.at
Tue Aug 6 09:55:19 BST 2002


The commit from 31-Jul-02 to the dcop/client directory broke dcop. Try this:

  $ kcontrol&
  $ dcop kcontrol kcontrol-mainwindow#1 move 100 100
  arguments do not match

"Arguments do not match"? BS!

  $ dcop kcontrol kcontrol-mainwindow#1|grep move
  void move(int newX,int newY)


The reason is, that the number of arguments is now not counted any more. A patch
like the following is required to fix the bug. (I hope I haven't missed another
instance.)

m.




Index: dcop.cpp
===================================================================
RCS file: /cvs/kdelibs/dcop/client/dcop.cpp,v
retrieving revision 1.28
diff -u -3 -p -r1.28 dcop.cpp
--- dcop.cpp    2002/08/01 13:00:19     1.28
+++ dcop.cpp    2002/08/06 08:38:47
@@ -272,7 +272,7 @@ void callFunction( const char* app, cons
     QDataStream arg(data, IO_WriteOnly);

     uint i = 0;
-    for( QStringList::Iterator it = types.begin(); it != types.end(); ++it )
+    for( QStringList::Iterator it = types.begin(); it != types.end(); ++it, i++ )
         marshall( arg, args, i, *it );

     if ( i != args.count() )
Index: dcopfind.cpp
===================================================================
RCS file: /cvs/kdelibs/dcop/client/dcopfind.cpp,v
retrieving revision 1.5
diff -u -3 -p -r1.5 dcopfind.cpp
--- dcopfind.cpp        2002/07/31 20:19:25     1.5
+++ dcopfind.cpp        2002/08/06 08:38:47
@@ -127,7 +127,7 @@ bool findObject( const char* app, const
     QDataStream arg(data, IO_WriteOnly);

     int i = 0;
-    for ( QStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
+    for ( QStringList::Iterator it = types.begin(); it != types.end(); ++it, i++ ) {
         marshall(arg, args, i, *it);
     }
     if ( (uint) i != args.count() ) {





More information about the kde-core-devel mailing list