Version: (using KDE KDE 3.1.2) Installed from: Gentoo Packages Compiler: gcc-3.2.2 -march=pentium3 -O3 -pipe OS: Linux I have the need to invoke a method of a dcop object which takes a QStringList a parameter: mario@gecko scripts $ dcop $CVSSERVICE CvsService <snip> DCOPRef commit(QStringList files,QString commitMessage,bool recursive) <snip> There is no way: whatever syntax I use, with single or double quotes, doesn't work. For example: mario@gecko scripts $ dcop $CVSSERVICE CvsService commit 'src/cvstest.cpp' 'just a try' false Not enough arguments. The message is always the same. I tried the graphical kdcop utility but when I try to call this method it shows a message box which reads: "Cannot handle datatype QStringList": it seems it is the same for comandl-ine dcop ...
Hi Mario, Wow! I never expected someone would really use my cvs dcop service outside of Cervisia. :-) The following worked for me: dcop $CVSSERVICE CvsService commit [ 'src/cvstest.cpp' 'just a try' ] false So you have to mark the start and the end of the QStringList with brackets. Also see for more information: http://lists.kde.org/?l=kde-core-devel&m=100449158108893&w=2 Bye Christian
Hey Christian, this was a fast reply. And you are right too :) It works!!! Blame on me that didn't search the mailing lists ;( Another point for command line (dcop) Vs GUI tool (kdcop) ;) Thanks! Should it closed as a WORKSFORME or INVALID?
I changed the component to 'kdcop' since kdcop can't handle QStringList arguments as Mario described above. I think it would be good if the GUI Tool handles the same data types as the command line client. Bye Christian
Still there post 3.2 - if you click on a method that needs a QStringList, kdcop tells you it doesn't support that datatype. Since the command-line tool _does_ support it, this makes kdcop much less useful than it might be. The more so because the CLI dcop doesn't handle disambiguating overloaded DCOP methods well (viz. klauncher). [Summary changed with JJ: because I think this is a good QA Team / starter's job.] [OS changed because it's more general.]
Created attachment 4474 [details] Proposed Implementation This patch was proposed by Ralf Habacker on kde-core-devel on 01/14/04. (see http://lists.kde.org/?l=kde-core-devel&m=107410108311352&w=2) Simon Hausmann said that it was okay to commit but nothing happened.
Subject: kdebase/kdcop CVS commit by cloose: Support for QStringList and QValueList<QCString>. Original patch by Ralf Habacker (http://lists.kde.org/?l=kde-core-devel&m=107410108311352&w=2). Slightly modified and tested by me. CCMAIL: ralf.habacker@freenet.de CCMAIL: 58816-done@bugs.kde.org M +33 -1 kdcopwindow.cpp 1.43 --- kdebase/kdcop/kdcopwindow.cpp #1.42:1.43 @@ -21,4 +21,5 @@ #include <kiconloader.h> #include <klineedit.h> +#include <keditlistbox.h> #include <klistbox.h> #include <kdialogbase.h> @@ -466,4 +467,24 @@ void KDCOPWindow::slotCallFunction( QLis wl.append( e ); } + else if ( type == "QStringList" ) + { + QLabel* n = new QLabel( names[i-1], frame ); + grid->addWidget( n, i, 0 ); + QLabel* l = new QLabel( "QStringList", frame ); + grid->addWidget( l, i, 1 ); + KEditListBox* e = new KEditListBox ( frame ); + grid->addWidget( e, i, 2 ); + wl.append( e ); + } + else if ( type == "QValueList<QCString>" ) + { + QLabel* n = new QLabel( names[i-1], frame ); + grid->addWidget( n, i, 0 ); + QLabel* l = new QLabel( "QValueList<QCString>", frame ); + grid->addWidget( l, i, 1 ); + KEditListBox* e = new KEditListBox ( frame ); + grid->addWidget( e, i, 2 ); + wl.append( e ); + } else if ( type == "KURL" ) { @@ -552,4 +573,15 @@ void KDCOPWindow::slotCallFunction( QLis arg << e->text(); } + else if( type == "QStringList" ) + { + KEditListBox* e = (KEditListBox*)wl.at( i ); + arg << e->items(); + } + else if( type == "QValueList<QCString>" ) + { + KEditListBox* e = (KEditListBox*)wl.at( i ); + for (int i = 0; i < e->count(); i++) + arg << QCString( e->text(i).local8Bit() ); + } else if( type == "KURL" ) {