[PyKDE] Bug in QStringList ([] access)

Andreas Gerstlauer gerstl at ics.uci.edu
Thu Mar 28 07:13:01 GMT 2002


I just installed the latest version (3.1) of sip and PyQt
and it seems that there is a bug in qstringlist.sip,
specifically the __getitem__(int) method.
If I read that correctly, the idx parameter is missing
from the sipParseArgs call and the attached patch should
fix that.

Andreas

-------------- next part --------------
Index: qstringlist.sip
===================================================================
RCS file: /home/cvs/public/PyQt/qstringlist.sip,v
retrieving revision 1.7
diff -u -r1.7 qstringlist.sip
--- qstringlist.sip	24 Feb 2002 01:36:06 -0000	1.7
+++ qstringlist.sip	28 Mar 2002 06:02:04 -0000
@@ -80,7 +80,7 @@
 		QStringList *ptr;
 		int idx;
 
-		if (sipParseArgs(&sipArgsParsed,sipArgs,"ni",&sipSelfObj,sipClass_QStringList,&ptr))
+		if (sipParseArgs(&sipArgsParsed,sipArgs,"ni",&sipSelfObj,sipClass_QStringList,&ptr,&idx))
 		{
 			if (idx < 0 || idx >= ptr -> count())
 			{


More information about the PyQt mailing list