From kde-core-devel Wed Jan 14 17:18:56 2004 From: Ralf Habacker Date: Wed, 14 Jan 2004 17:18:56 +0000 To: kde-core-devel Subject: [PATCH] kdcop-patch implementing QStringList QValueList Message-Id: <200401141818.56927.ralf.habacker () freenet ! de> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=107410108311352 Hi, while testing the kde 3.1.4 cygwin port I recognized that the above mentioned types are missing, so I implemented them. One question: Could this patch be applied to the kde 3.1 branch and the kde 3.2. The reason for this is, that currently we are working on the stable kde 3.1 branch, but will switch to kde 3.2 when it will be stable too. I have tried, it is patchabel for both branches. Regards Ralf --------------------------------------------------- QStringList QValueList data type implementation ----------------------------------------------------------- Index: kdcop/kdcopwindow.cpp =================================================================== RCS file: /home/kde/kdebase/kdcop/kdcopwindow.cpp,v retrieving revision 1.33 diff -u -3 -p -B -u -r1.33 kdcopwindow.cpp --- kdcop/kdcopwindow.cpp 25 Jul 2002 19:45:12 -0000 1.33 +++ kdcop/kdcopwindow.cpp 14 Jan 2004 17:17:31 -0000 @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -444,6 +445,26 @@ void KDCOPWindow::slotCallFunction( QLis grid->addWidget( e, i, 2 ); wl.append( e ); } + else if ( type == "QStringList" ) + { + QLabel* n = new QLabel( names[i-1], mydialog ); + grid->addWidget( n, i, 0 ); + QLabel* l = new QLabel( "QStringList", mydialog ); + grid->addWidget( l, i, 1 ); + KEditListBox* e = new KEditListBox ( mydialog ); + grid->addWidget( e, i, 2 ); + wl.append( e ); + } + else if ( type == "QValueList" ) + { + QLabel* n = new QLabel( names[i-1], mydialog ); + grid->addWidget( n, i, 0 ); + QLabel* l = new QLabel( "QValueList", mydialog ); + grid->addWidget( l, i, 1 ); + KEditListBox* e = new KEditListBox ( mydialog ); + grid->addWidget( e, i, 2 ); + wl.append( e ); + } else if ( type == "KURL" ) { QLabel* n = new QLabel( names[i-1], mydialog ); @@ -536,6 +557,17 @@ void KDCOPWindow::slotCallFunction( QLis KLineEdit* e = (KLineEdit*)wl.at( i ); arg << e->text(); } + else if( type == "QStringList" ) + { + KEditListBox* e = (KEditListBox*)wl.at( i ); + arg << e->items(); + } + else if( type == "QValueList" ) + { + KEditListBox* e = (KEditListBox*)wl.at( i ); + for (int i = 0; i < e->count(); i++) + arg << QCString( e->text(i).local8Bit() ); + } else if( type == "KURL" ) { KLineEdit* e = (KLineEdit*)wl.at( i ); -----------------------------------------------------------