[PATCH] kdcop-patch implementing QStringList QValueList<QCstring> data types

Ralf Habacker ralf.habacker at freenet.de
Wed Jan 14 17:18:56 GMT 2004


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 


<Changelog>---------------------------------------------------
QStringList QValueList<QCstring> data type implementation  

<snip>-----------------------------------------------------------
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 <kglobal.h>
 #include <kiconloader.h>
 #include <klineedit.h>
+#include <keditlistbox.h>
 #include <klistbox.h>

 #include <qtimer.h>
@@ -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<QCString>" )
+      {
+        QLabel* n = new QLabel( names[i-1], mydialog );
+        grid->addWidget( n, i, 0 );
+        QLabel* l = new QLabel( "QValueList<QCString>", 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<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" )
       {
         KLineEdit* e = (KLineEdit*)wl.at( i );

<snip>-----------------------------------------------------------







More information about the kde-core-devel mailing list