Re: [PyQt] Updating the windows installer for Qt 4.4

2008-05-14 Thread Giovanni Bajo

On 5/13/2008 2:43 PM, Phil Thompson wrote:


Let me think about this a bit more. My problem wasn't with the single 
installer in itself, it was the big static build which is too inflexible and 
getting more difficult to create.


My own concerns is about having PyQt and Qt installed within different 
directories. The question list was meant to show how many questions 
could be raised and how much confusion can be created by dividing Qt 
from PyQt. All those questions ceased when you merged the two together, 
and I'd hope we won't go back there.


I'm instead totally agnostic whether to build it as a single static 
_qt.pyd or with .pyd + Qt's .dll files. The former gives you a much 
smaller installer file which might be a feature; the latter gives more 
flexibility to final users. Either way it's fine.

--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] SIP, multiple constructors and exceptions

2008-05-14 Thread Andrew Perella
When a class is wrapped with multiple constructors, the generated sip
binding code does not raise an exception if the python calling code does not
provide matching arguments.

Is this by design?

 

 

Eg:

 

extern C {static void *init_CutScenePythonState(sipWrapper *, PyObject *,
sipWrapper **, int *);}

static void *init_CutScenePythonState(sipWrapper *sipSelf,PyObject
*sipArgs,sipWrapper **,int *sipArgsParsed)

{

sipCutScenePythonState *sipCpp = 0;

 

if (!sipCpp)

{

if (sipParseArgs(sipArgsParsed,sipArgs,))

{

sipCpp = new sipCutScenePythonState();

}

}

 

if (!sipCpp)

{

const CutScenePythonState * a0;

 

if
(sipParseArgs(sipArgsParsed,sipArgs,JA,sipClass_CutScenePythonState,a0))

{

sipCpp = new sipCutScenePythonState(*a0);

}

}

 

if (sipCpp)

sipCpp-sipPySelf = sipSelf;

// NO EXCEPTION RAISED HERE IF sipCPP is NULL!

 

 

return sipCpp;

}

 

 

Cheers,

Andrew

 

Dr A J Perella

Chief Software Architect

Eutechnyx Ltd.

 

http://www.eutechnyx.com

 


This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. No communication sent by e-mail to or from 
Eutechnyx is intended to give rise to contractual or other legal liability, 
apart from liability which cannot be excluded under English law. 

This email has been scanned for all known viruses by the Email Protection 
Agency.


www.eutechnyx.com Eutechnyx Limited. Registered in England No: 2172322

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] Perhaps a bug with virtual methods?

2008-05-14 Thread Andrew Perella
Suppose I have the following sip definitions:

 

class A

{

public:

 virtual void Enter();

};

class B:A

{

public:



};

class C: B

{

public:



};

 

 

The generated code produces an Enter() method of the sip wrapped C class
where if the method is not passed onto python it calls the baseclass
A:Enter() rather than B:Enter()

 

void sipC::Enter()

{

typedef void (*sipVH_Game_2)(sip_gilstate_t,PyObject *);

 

sip_gilstate_t sipGILState;

PyObject *meth;

 

meth =
sipIsPyMethod(sipGILState,sipPyMethods[0],sipPySelf,NULL,sipNm_States_Ente
r);

 

if (!meth)

{

A::Enter();

return;

}

 

 
((sipVH_Game_2)(sipModuleAPI_States_Game-em_virthandlers[2]))(sipGILState,m
eth);

}

 

This seems like a big problem. Have I missed something?

 

Cheers,

Andrew

 


This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. No communication sent by e-mail to or from 
Eutechnyx is intended to give rise to contractual or other legal liability, 
apart from liability which cannot be excluded under English law. 

This email has been scanned for all known viruses by the Email Protection 
Agency.


www.eutechnyx.com Eutechnyx Limited. Registered in England No: 2172322

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] configuring pykde4, error

2008-05-14 Thread Darren Dale
I am working on compiling pykde4-4.0.2-1. I have installed qt-4.4_rc1 (I know 
the final version is out, gentoo hasnt included it yet in their package 
manager) sip-4.7.5, qscintilla-2.2, and PyQt4-4.4.

When I run configure.py, I get an error:

Generating the C++ source for the kdecore module...
sip: sip/kdecore/typedefs.sip:263: %MappedType template for this type has 
already been defined
Error: Unable to create the C++ code.

Has anyone been able to build PyKDE-4.0.2-1 with the most recent 
sip/QScintilla/Qt/PyQt4 environment? Is there a PyKDE-4.0.3 available? 
(kubuntu lists it in their package manager, but I havent been able to find 
the sources.)

Thanks,
Darren
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] QItemDelegate Subclass

2008-05-14 Thread Baba-k

Hey Guys,

I'm trying to write a simple QItemDelegate subclass but am having some
problems, and was wondering if anyone might be able to help me out and shed
some light on what I could be doing wrong?
For the most part it works as expected, until it comes to signals,
specifically the closeEditor signal. My class is essentially this but with a
couple of extra methods:

class delegate( QtGui.QItemDelegate ):
def __init__(self, parent = None):
   QtGui.QItemDelegate.__init__(self, parent)

def createEditor( self, parent, option, index ):
   editor = QtGui.QItemDelegate.createEditor(self, parent,
option, index)
   QtCore.QObject.connect(editor, QtCore.SIGNAL(editingFinished 
()),
self.endEditor)

def endEditor( self ):
  print closing editor
  editor = self.sender()
  self.emit(QtCore.SIGNAL(closeEditor (QWidget
*,QAbstractItemDelegate::EndEditHint = QAbstractItemDelegate.NoHint)),
editor)

When its time to call the endEditor method it gets called but the editor
remains open, the only way I'm able to get it to close it is by directly
calling 'editor.close()'. 

Any comments/suggestions would be greatly appreciated.
thanks alot
babak

-- 
View this message in context: 
http://www.nabble.com/QItemDelegate-Subclass-tp17237222p17237222.html
Sent from the PyQt mailing list archive at Nabble.com.

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] configuring pykde4, error

2008-05-14 Thread Jim Bublitz
On Wednesday 14 May 2008 10:27, Darren Dale wrote:
 I am working on compiling pykde4-4.0.2-1. I have installed qt-4.4_rc1 (I
 know the final version is out, gentoo hasnt included it yet in their
 package manager) sip-4.7.5, qscintilla-2.2, and PyQt4-4.4.

 When I run configure.py, I get an error:

 Generating the C++ source for the kdecore module...
 sip: sip/kdecore/typedefs.sip:263: %MappedType template for this type has
 already been defined
 Error: Unable to create the C++ code.

 Has anyone been able to build PyKDE-4.0.2-1 with the most recent
 sip/QScintilla/Qt/PyQt4 environment? Is there a PyKDE-4.0.3 available?
 (kubuntu lists it in their package manager, but I havent been able to find
 the sources.)

I have my development machine on a different project at the moment, so I can't 
check this explicitly, but the likely problem is that PyQt4 has added a 
definition for a template type that wasn't provided previously.

The fix would be to comment out (/* .. */, not Python comment) the entire 
%MappedType block begining at the line indicated (including any preceding 
template annotation) in sip/kdecore/typedefs.sip.

Jim
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] Problem building PyQt 4.4 on Mac OS X (10.4.11)

2008-05-14 Thread Romuald Riem

Hello,

I'm trying to build and install PyQt 4.4 on Mac os 10.4.11.
I use Python 2.5 and Qt 4.4 (GPL version). I installed PyQt 4.3.3  
without any problem.


I use default values (and the link to qmake) with configure.py

The only strange thing at this step is this message:
...
QtDesigner module disabled with universal binaries.


Make ended after a while with this messages:

g++ -headerpad_max_install_names -bundle -F/Library/Frameworks - 
framework Python -arch ppc -arch i386 -Wl,-syslibroot,/Developer/SDKs/ 
MacOSX10.4u.sdk -o QtHelp.so sipQtHelpcmodule.o sipQtHelpQMap.o  
sipQtHelpQList.o sipQtHelpQHelpSearchResultWidget.o  
sipQtHelpQHelpSearchQueryWidget.o sipQtHelpQHelpSearchEngine.o  
sipQtHelpQHelpSearchQuery.o sipQtHelpQHelpIndexWidget.o  
sipQtHelpQHelpIndexModel.o sipQtHelpQHelpEngineCore.o  
sipQtHelpQHelpEngine.o sipQtHelpQHelpContentWidget.o  
sipQtHelpQHelpContentModel.o sipQtHelpQHelpContentItem.o -F/Library/ 
Frameworks -L/Library/Frameworks -framework QtHelp -lQtCLucene - 
framework QtSql -framework QtXml -framework QtGui -framework Carbon - 
framework AppKit -framework QtCore -lz -lm -framework  
ApplicationServices -framework QtGui -framework Carbon -framework  
AppKit -framework QtCore -lz -lm -framework ApplicationServices - 
framework QtCore -lz -lm -framework ApplicationServices

/usr/bin/ld: for architecture i386
/usr/bin/ld: can't locate file for: -lQtCLucene
collect2: ld returned 1 exit status
/usr/bin/ld: for architecture ppc
/usr/bin/ld: can't locate file for: -lQtCLucene
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//cc49FS6U.out (No such file or  
directory)

make[1]: *** [QtHelp.so] Error 1
make: *** [all] Error 2



The PyQt-mac-gpl-4.4.1-snapshot-20080513 gaves the same results.


Can somebody help me to solve this problem ?


Thanks in advance

Romuald Riem
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] configuring pykde4, error

2008-05-14 Thread Darren Dale
On Wednesday 14 May 2008 01:58:37 pm Jim Bublitz wrote:
 On Wednesday 14 May 2008 10:27, Darren Dale wrote:
  I am working on compiling pykde4-4.0.2-1. I have installed qt-4.4_rc1 (I
  know the final version is out, gentoo hasnt included it yet in their
  package manager) sip-4.7.5, qscintilla-2.2, and PyQt4-4.4.
 
  When I run configure.py, I get an error:
 
  Generating the C++ source for the kdecore module...
  sip: sip/kdecore/typedefs.sip:263: %MappedType template for this type has
  already been defined
  Error: Unable to create the C++ code.
 
  Has anyone been able to build PyKDE-4.0.2-1 with the most recent
  sip/QScintilla/Qt/PyQt4 environment? Is there a PyKDE-4.0.3 available?
  (kubuntu lists it in their package manager, but I havent been able to
  find the sources.)

 I have my development machine on a different project at the moment, so I
 can't check this explicitly, but the likely problem is that PyQt4 has added
 a definition for a template type that wasn't provided previously.

 The fix would be to comment out (/* .. */, not Python comment) the entire
 %MappedType block begining at the line indicated (including any preceding
 template annotation) in sip/kdecore/typedefs.sip.

Thank you Jim, it looks like commenting that part out worked. I also had to 
do:

cp extra/kde402 extra/kde403

and for good measure:

cp extra/kde402 extra/kde404

in order to avoid some errors like:
In file included from sipkdecoreQPair.cpp:7:
sip/kdecore/ksycocafactory.sip:26:28: error: ksycocafactory.h: No such file or 
directory

However, now when I run make I get an error that I am unable to diagnose on my 
own again:

g++ -c -Wno-deprecated-declarations -pipe -fPIC -O2 -march=k8 -mtune=k8 -pipe 
-fomit-frame-pointer -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB 
-DQT_GUI_LIB -I. -I../extra/kde403 -I/usr/kde/4.0/include 
-I/usr/kde/4.0/include/QtCore -I/usr/kde/4.0/include/QtGui 
-I/usr/kde/4.0/include/QtNetwork -I/usr/kde/4.0/include/sonnet 
-I/usr/include/python2.5 -I/usr/share/qt4/mkspecs/default 
-I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 
-I/usr/X11R6/include -o 
sipkdecoreKCharMacroExpander.o sipkdecoreKCharMacroExpander.cpp
/usr/kde/4.0/include/kmacroexpander.h: In member function 'KMacroExpanderBase 
KMacroExpanderBase::operator=(const KMacroExpanderBase)':
/usr/kde/4.0/include/kmacroexpander.h:39: error: non-static const 
member 'KMacroExpanderBasePrivate* const KMacroExpanderBase::d', can't use 
default assignment operator
/usr/kde/4.0/include/kmacroexpander.h: In member function 'KCharMacroExpander 
KCharMacroExpander::operator=(const KCharMacroExpander)':
/usr/kde/4.0/include/kmacroexpander.h:224: note: synthesized 
method 'KMacroExpanderBase KMacroExpanderBase::operator=(const 
KMacroExpanderBase)' first required here
sipkdecoreKCharMacroExpander.cpp: In function 'void 
assign_KCharMacroExpander(void*, const void*)':
sipkdecoreKCharMacroExpander.cpp:279: note: synthesized 
method 'KCharMacroExpander KCharMacroExpander::operator=(const 
KCharMacroExpander)' first required here
make[1]: *** [sipkdecoreKCharMacroExpander.o] Error 1
make[1]: Leaving directory `/home/share/packages/PyKDE4-4.0.2-1/kdecore'
make: *** [all] Error 2

I'm running 64-bit gentoo linux, gcc-4.2.3. Do you have any advice?

Thanks,
Darren
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Problem building PyQt 4.4 on Mac OS X (10.4.11)

2008-05-14 Thread Hans-Peter Jansen
Am Mittwoch, 14. Mai 2008 schrieb Romuald Riem:
 Hello,

 I'm trying to build and install PyQt 4.4 on Mac os 10.4.11.
 I use Python 2.5 and Qt 4.4 (GPL version). I installed PyQt 4.3.3
 without any problem.

 I use default values (and the link to qmake) with configure.py

 The only strange thing at this step is this message:
 ...
 QtDesigner module disabled with universal binaries.
 

 Make ended after a while with this messages:
 
 g++ -headerpad_max_install_names -bundle -F/Library/Frameworks -
 framework Python -arch ppc -arch i386 -Wl,-syslibroot,/Developer/SDKs/
 MacOSX10.4u.sdk -o QtHelp.so sipQtHelpcmodule.o sipQtHelpQMap.o
 sipQtHelpQList.o sipQtHelpQHelpSearchResultWidget.o
 sipQtHelpQHelpSearchQueryWidget.o sipQtHelpQHelpSearchEngine.o
 sipQtHelpQHelpSearchQuery.o sipQtHelpQHelpIndexWidget.o
 sipQtHelpQHelpIndexModel.o sipQtHelpQHelpEngineCore.o
 sipQtHelpQHelpEngine.o sipQtHelpQHelpContentWidget.o
 sipQtHelpQHelpContentModel.o sipQtHelpQHelpContentItem.o -F/Library/
 Frameworks -L/Library/Frameworks -framework QtHelp -lQtCLucene -
 framework QtSql -framework QtXml -framework QtGui -framework Carbon -
 framework AppKit -framework QtCore -lz -lm -framework
 ApplicationServices -framework QtGui -framework Carbon -framework
 AppKit -framework QtCore -lz -lm -framework ApplicationServices -
 framework QtCore -lz -lm -framework ApplicationServices
 /usr/bin/ld: for architecture i386
 /usr/bin/ld: can't locate file for: -lQtCLucene
 collect2: ld returned 1 exit status
 /usr/bin/ld: for architecture ppc
 /usr/bin/ld: can't locate file for: -lQtCLucene
 collect2: ld returned 1 exit status
 lipo: can't open input file: /var/tmp//cc49FS6U.out (No such file or
 directory)
 make[1]: *** [QtHelp.so] Error 1
 make: *** [all] Error 2

blind guess: replace -lQtCLucene with -framework QtCLucene in the offending 
Makefile..

Pete
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] configuring pykde4, error

2008-05-14 Thread Jim Bublitz
On Wednesday 14 May 2008 12:09, Darren Dale wrote:
 On Wednesday 14 May 2008 01:58:37 pm Jim Bublitz wrote:
  On Wednesday 14 May 2008 10:27, Darren Dale wrote:
   I am working on compiling pykde4-4.0.2-1. I have installed qt-4.4_rc1
   (I know the final version is out, gentoo hasnt included it yet in their
   package manager) sip-4.7.5, qscintilla-2.2, and PyQt4-4.4.
  
   When I run configure.py, I get an error:
  
   Generating the C++ source for the kdecore module...
   sip: sip/kdecore/typedefs.sip:263: %MappedType template for this type
   has already been defined
   Error: Unable to create the C++ code.
  
   Has anyone been able to build PyKDE-4.0.2-1 with the most recent
   sip/QScintilla/Qt/PyQt4 environment? Is there a PyKDE-4.0.3 available?
   (kubuntu lists it in their package manager, but I havent been able to
   find the sources.)
 
  I have my development machine on a different project at the moment, so I
  can't check this explicitly, but the likely problem is that PyQt4 has
  added a definition for a template type that wasn't provided previously.
 
  The fix would be to comment out (/* .. */, not Python comment) the entire
  %MappedType block begining at the line indicated (including any preceding
  template annotation) in sip/kdecore/typedefs.sip.

 Thank you Jim, it looks like commenting that part out worked. I also had to
 do:

 cp extra/kde402 extra/kde403

 and for good measure:

 cp extra/kde402 extra/kde404

 in order to avoid some errors like:
 In file included from sipkdecoreQPair.cpp:7:
 sip/kdecore/ksycocafactory.sip:26:28: error: ksycocafactory.h: No such file
 or directory

 However, now when I run make I get an error that I am unable to diagnose on
 my own again:

 g++ -c -Wno-deprecated-declarations -pipe -fPIC -O2 -march=k8 -mtune=k8
 -pipe -fomit-frame-pointer -Wall -W -D_REENTRANT -DQT_NO_DEBUG
 -DQT_CORE_LIB -DQT_GUI_LIB -I. -I../extra/kde403 -I/usr/kde/4.0/include
 -I/usr/kde/4.0/include/QtCore -I/usr/kde/4.0/include/QtGui
 -I/usr/kde/4.0/include/QtNetwork -I/usr/kde/4.0/include/sonnet
 -I/usr/include/python2.5 -I/usr/share/qt4/mkspecs/default
 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4
 -I/usr/X11R6/include -o sipkdecoreKCharMacroExpander.o
 sipkdecoreKCharMacroExpander.cpp
 /usr/kde/4.0/include/kmacroexpander.h: In member function
 'KMacroExpanderBase KMacroExpanderBase::operator=(const
 KMacroExpanderBase)':
 /usr/kde/4.0/include/kmacroexpander.h:39: error: non-static const
 member 'KMacroExpanderBasePrivate* const KMacroExpanderBase::d', can't use
 default assignment operator
 /usr/kde/4.0/include/kmacroexpander.h: In member function
 'KCharMacroExpander KCharMacroExpander::operator=(const
 KCharMacroExpander)':
 /usr/kde/4.0/include/kmacroexpander.h:224: note: synthesized
 method 'KMacroExpanderBase KMacroExpanderBase::operator=(const
 KMacroExpanderBase)' first required here
 sipkdecoreKCharMacroExpander.cpp: In function 'void
 assign_KCharMacroExpander(void*, const void*)':
 sipkdecoreKCharMacroExpander.cpp:279: note: synthesized
 method 'KCharMacroExpander KCharMacroExpander::operator=(const
 KCharMacroExpander)' first required here
 make[1]: *** [sipkdecoreKCharMacroExpander.o] Error 1
 make[1]: Leaving directory `/home/share/packages/PyKDE4-4.0.2-1/kdecore'
 make: *** [all] Error 2

 I'm running 64-bit gentoo linux, gcc-4.2.3. Do you have any advice?


That's an odd one - check sip/kdecore/kmacroexpander.sip for any instances of 
operator = and remove them - shouldn't be there, but they may get picked up 
in the KDE svn version by mistake (automatically generated code). If you find 
those, remove them.

Otherwise, go into sip/kdecore/kdecoremod.sip.in and comment out (//) the line

%Include kmacroexpander.sip

It's not a particularly useful set of classes and nothing else depends on it 
in PyKDE as far as I know.

I actually looked at the code for this one - forgot I could just mount the 
PyKDE partition and view it.

Jim

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] configuring pykde4, error

2008-05-14 Thread Darren Dale
On Wednesday 14 May 2008 04:14:43 pm Jim Bublitz wrote:
 On Wednesday 14 May 2008 12:09, Darren Dale wrote:
  On Wednesday 14 May 2008 01:58:37 pm Jim Bublitz wrote:
   On Wednesday 14 May 2008 10:27, Darren Dale wrote:
  However, now when I run make I get an error that I am unable to diagnose
  on my own again:
 
  g++ -c -Wno-deprecated-declarations -pipe -fPIC -O2 -march=k8 -mtune=k8
  -pipe -fomit-frame-pointer -Wall -W -D_REENTRANT -DQT_NO_DEBUG
  -DQT_CORE_LIB -DQT_GUI_LIB -I. -I../extra/kde403 -I/usr/kde/4.0/include
  -I/usr/kde/4.0/include/QtCore -I/usr/kde/4.0/include/QtGui
  -I/usr/kde/4.0/include/QtNetwork -I/usr/kde/4.0/include/sonnet
  -I/usr/include/python2.5 -I/usr/share/qt4/mkspecs/default
  -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4
  -I/usr/X11R6/include -o sipkdecoreKCharMacroExpander.o
  sipkdecoreKCharMacroExpander.cpp
  /usr/kde/4.0/include/kmacroexpander.h: In member function
  'KMacroExpanderBase KMacroExpanderBase::operator=(const
  KMacroExpanderBase)':
  /usr/kde/4.0/include/kmacroexpander.h:39: error: non-static const
  member 'KMacroExpanderBasePrivate* const KMacroExpanderBase::d', can't
  use default assignment operator
  /usr/kde/4.0/include/kmacroexpander.h: In member function
  'KCharMacroExpander KCharMacroExpander::operator=(const
  KCharMacroExpander)':
  /usr/kde/4.0/include/kmacroexpander.h:224: note: synthesized
  method 'KMacroExpanderBase KMacroExpanderBase::operator=(const
  KMacroExpanderBase)' first required here
  sipkdecoreKCharMacroExpander.cpp: In function 'void
  assign_KCharMacroExpander(void*, const void*)':
  sipkdecoreKCharMacroExpander.cpp:279: note: synthesized
  method 'KCharMacroExpander KCharMacroExpander::operator=(const
  KCharMacroExpander)' first required here
  make[1]: *** [sipkdecoreKCharMacroExpander.o] Error 1
  make[1]: Leaving directory `/home/share/packages/PyKDE4-4.0.2-1/kdecore'
  make: *** [all] Error 2
 
  I'm running 64-bit gentoo linux, gcc-4.2.3. Do you have any advice?

 That's an odd one - check sip/kdecore/kmacroexpander.sip for any instances
 of operator = and remove them - shouldn't be there, but they may get
 picked up in the KDE svn version by mistake (automatically generated code).
 If you find those, remove them.

There were no instances of operator in kmacroexpander.sip

 Otherwise, go into sip/kdecore/kdecoremod.sip.in and comment out (//) the
 line

 %Include kmacroexpander.sip

That helped, but I run into a similar error later in 
sipkdecoreKMimeTypeTrader:

g++ -c -Wno-deprecated-declarations -pipe -fPIC -O2 -march=k8 -mtune=k8 -pipe 
-fomit-frame-pointer -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB 
-DQT_GUI_LIB -I. -I../extra/kde403 -I/usr/kde/4.0/include 
-I/usr/kde/4.0/include/QtCore -I/usr/kde/4.0/include/QtGui 
-I/usr/kde/4.0/include/QtNetwork -I/usr/kde/4.0/include/sonnet 
-I/usr/include/python2.5 -I/usr/share/qt4/mkspecs/default 
-I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 
-I/usr/X11R6/include -o 
sipkdecoreKMimeTypeTrader.o sipkdecoreKMimeTypeTrader.cpp
/usr/kde/4.0/include/kmimetypetrader.h: In member function 'KMimeTypeTrader 
KMimeTypeTrader::operator=(const KMimeTypeTrader)':
/usr/kde/4.0/include/kmimetypetrader.h:43: error: non-static const 
member 'KMimeTypeTrader::Private* const KMimeTypeTrader::d', can't use 
default assignment operator
sipkdecoreKMimeTypeTrader.cpp: In function 'void assign_KMimeTypeTrader(void*, 
const void*)':
sipkdecoreKMimeTypeTrader.cpp:281: note: synthesized method 'KMimeTypeTrader 
KMimeTypeTrader::operator=(const KMimeTypeTrader)' first required here
make[1]: *** [sipkdecoreKMimeTypeTrader.o] Error 1
make[1]: Leaving directory `/home/share/packages/PyKDE4-4.0.2-1/kdecore'
make: *** [all] Error 2

kmimetypetrader.sip didnt have any instances of operator either. I tried 
commenting that entry out of kdecoremod.sip.in as well. That got me even 
further along:

g++ -c -Wno-deprecated-declarations -pipe -fPIC -O2 -march=k8 -mtune=k8 -pipe 
-fomit-frame-pointer -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB 
-DQT_GUI_LIB -I. -I../extra/kde403 -I/usr/kde/4.0/include 
-I/usr/kde/4.0/include/QtCore -I/usr/kde/4.0/include/QtGui 
-I/usr/kde/4.0/include/QtNetwork -I/usr/kde/4.0/include/sonnet 
-I/usr/include/python2.5 -I/usr/share/qt4/mkspecs/default 
-I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 
-I/usr/X11R6/include -o 
sipkdecoreKSocketFactory.o sipkdecoreKSocketFactory.cpp
/usr/share/sip/QtNetwork/qtcpsocket.sip:42:24: error: qtcpsocket.h: No such 
file or directory
/usr/share/sip/QtNetwork/qtcpserver.sip:42:24: error: qtcpserver.h: No such 
file or directory
/usr/share/sip/QtNetwork/qhostaddress.sip:46:26: error: qhostaddress.h: No 
such file or directory
/usr/share/sip/QtNetwork/qudpsocket.sip:46:24: error: qudpsocket.h: No such 
file or directory
/usr/share/sip/QtNetwork/qnetworkproxy.sip:42:27: error: qnetworkproxy.h: No 
such file or directory
make[1]: *** [sipkdecoreKSocketFactory.o] Error 

[PyQt] [PyQt4] Wrong QtCore.QLibraryInfo.BinariesPath on Windows

2008-05-14 Thread IloChab
I have an application that uses QtCore.QLibraryInfo.BinariesPath() to locate
Qt4 assistant and show a customized help.

On linux I have no problem but on Windows I get a wrong translation.

On windows I just installed :
* qt-win-opensource-4.3.4-mingw.exe
* PyQt-Py2.5-gpl-4.3.3-2.exe
and I didn't set anything into my environment.

On my system I find assistant executable into two directories:
   C:\Ptython2.5
   C:\Qt\4.3.4\bin
while QtCore.QLibraryInfo.BinariesPath() returns:
   C:/Python2.5/PyQt4/bin
witch doesn't exist in the last level(bin).

What is the correct thing to do to launch assistant.exe on windows?

Thank for your help.

Licia
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] Getting QGraphicsWidget from methods that return QGraphicsItems

2008-05-14 Thread Aron Bierbaum
I have been having problems when trying to iterate over a list
returned from QGraphicsScene.items(). It appears that even though I
add a QGraphicsWidget instance, I never get it back out. I actually
traced this down when trying to add support to PyQt for Qt 4.4 a few
months ago. The following needs to be added to qgraphicsitem.sip


%ConvertToSubClassCode
switch (sipCpp-type())
{
case 2:
sipClass = sipClass_QGraphicsPathItem;
break;
...

case 9:
sipClass = sipClass_QGraphicsSimpleTextItem;
break;

case 10:
sipClass = sipClass_QGraphicsItemGroup;
break;

default:
sipClass = 0;
}
%End


Thanks,
Aron
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] Re: Getting QGraphicsWidget from methods that return QGraphicsItems

2008-05-14 Thread Aron Bierbaum
Sorry, I forgot to include the new code:

case 11:
// We need to explicitly cast because of the multiple inheritance.
*sipCppRet = static_castQGraphicsWidget *(sipCpp);
sipClass = sipClass_QGraphicsWidget;
break;

case 12:
// We need to explicitly cast because of the multiple inheritance.
*sipCppRet = static_castQGraphicsProxyWidget *(sipCpp);
sipClass = sipClass_QGraphicsProxyWidget;
break;


-Aron

On Wed, May 14, 2008 at 4:52 PM, Aron Bierbaum [EMAIL PROTECTED] wrote:
 I have been having problems when trying to iterate over a list
 returned from QGraphicsScene.items(). It appears that even though I
 add a QGraphicsWidget instance, I never get it back out. I actually
 traced this down when trying to add support to PyQt for Qt 4.4 a few
 months ago. The following needs to be added to qgraphicsitem.sip


 %ConvertToSubClassCode
switch (sipCpp-type())
{
case 2:
sipClass = sipClass_QGraphicsPathItem;
break;
...

case 9:
sipClass = sipClass_QGraphicsSimpleTextItem;
break;

case 10:
sipClass = sipClass_QGraphicsItemGroup;
break;

default:
sipClass = 0;
}
 %End


 Thanks,
 Aron

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] configuring pykde4, error

2008-05-14 Thread Jim Bublitz
On Wednesday 14 May 2008 13:54, Darren Dale wrote:
 On Wednesday 14 May 2008 04:14:43 pm Jim Bublitz wrote:
  On Wednesday 14 May 2008 12:09, Darren Dale wrote:
   On Wednesday 14 May 2008 01:58:37 pm Jim Bublitz wrote:
On Wednesday 14 May 2008 10:27, Darren Dale wrote:

 g++ -c -Wno-deprecated-declarations -pipe -fPIC -O2 -march=k8 -mtune=k8
 -pipe -fomit-frame-pointer -Wall -W -D_REENTRANT -DQT_NO_DEBUG
 -DQT_CORE_LIB -DQT_GUI_LIB -I. -I../extra/kde403 -I/usr/kde/4.0/include
 -I/usr/kde/4.0/include/QtCore -I/usr/kde/4.0/include/QtGui
 -I/usr/kde/4.0/include/QtNetwork -I/usr/kde/4.0/include/sonnet
 -I/usr/include/python2.5 -I/usr/share/qt4/mkspecs/default
 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4
 -I/usr/X11R6/include -o sipkdecoreKSocketFactory.o
 sipkdecoreKSocketFactory.cpp
 /usr/share/sip/QtNetwork/qtcpsocket.sip:42:24: error: qtcpsocket.h: No such
 file or directory
 /usr/share/sip/QtNetwork/qtcpserver.sip:42:24: error: qtcpserver.h: No such
 file or directory
 /usr/share/sip/QtNetwork/qhostaddress.sip:46:26: error: qhostaddress.h: No
 such file or directory
 /usr/share/sip/QtNetwork/qudpsocket.sip:46:24: error: qudpsocket.h: No such
 file or directory
 /usr/share/sip/QtNetwork/qnetworkproxy.sip:42:27: error: qnetworkproxy.h:
 No such file or directory
 make[1]: *** [sipkdecoreKSocketFactory.o] Error 1
 make[1]: Leaving directory `/home/share/packages/PyKDE4-4.0.2-1/kdecore'
 make: *** [all] Error 2

 I searched for qtcpsocket.h and came up with:
 /usr/include/qt4/Qt/qtcpsocket.h
 /usr/include/qt4/QtNetwork/qtcpsocket.h

 gentoo is splitting qt-4.4 into seperately installable modules. I don't
 know if that is surprising to anyone or not, is this a nonstandard location
 for qt headers? I didn't see an option in configure.py to direct make to
 the qt headers. Have I overlooked anything?

Around line 100 in configure.py there's a Python dict where the keys are the 
module name and the values are a list of include paths - QtNetwork should be 
in the list for kdecore.

What you're showing above for an include path is:

  -I/usr/kde/4.0/include/QtNetwork

Does that path really exist? I'm not sure how configure.py is coming up with 
that - notice that you have what look like correct qt4 paths farther down, 
but none for QtNetwork.

Just from a quick look at my Qt4.3 install, it looks like the Qt/ directory 
just duplicates the files from QtNetwork/, so I don't think that Qt/ needs to 
be included.

What would help is if a) you could post a copy of the info at the beginning of 
configure.py's run - where it thinks everything is. It should be finding the 
Qt directories from your PyQt4 installation (there should be a pyqtconfig.py 
file in site-packages/ or site-packages/PyQt4 that has the paths from the 
PyQt4 install)  - it doesn't actually look for those; and b) around line 607 
in configure.py, there should be a statement:

   if incdir.startswith ('Q'):

If you could add:

   print incdir, opt_qt_inc_dir

*before* that 'if' stmt, it should indicate if QtNetwork is being added as an 
include path. A print statement after the 'if' (in it's block) would indicate 
whether the include path is being added to the Makefile.

It seems like the directory layout isn't something configure.py is expecting.

Jim
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] [PyQt3] QRegion.rects() missing

2008-05-14 Thread Hans-Peter Jansen
Am Mittwoch, 14. Mai 2008 schrieb Hans-Peter Jansen:
 Am Mittwoch, 14. Mai 2008 schrieb Phil Thompson:
  On Saturday 10 May 2008 22:43:34 Hans-Peter Jansen wrote:
   Hi,
  
   for optimizing reasons, I'm desperately missing the QRegion.rects()
   method. Background is a special double buffering widget, where bitblt
   in the paintEvent reimplementation of the full event.rect() is
   painfully slow, while only a margin area is really modified. The only
   way to really get at the these areas is QRegion.rects(), which is not
   implemented in PyQt3. (By the way, even the deactivated signature in
   sip/qt/qregion.sip is wrong, QRegion.rects() returns a
   QMemArrayQRect, not a QArrayRect (anymore?)).
 
  Just pasting in the QListTYPE implementation from PyQt4 into PyQt3's
  qmemarray.sip should work - and change the QList etc to QMemArray.

Phil, as promised, here's the patch. Works like a charm. I'm sure that 
without your help, I wouldn't have managed to solve this on my own. With 
your hints, it was a piece of cake... :-)

Thanks a lot,

Pete
--- PyQt-x11-gpl-3.17.4/sip/qt/qregion.sip.orig	2007-12-06 15:28:07.0 +0100
+++ PyQt-x11-gpl-3.17.4/sip/qt/qregion.sip	2008-05-14 23:40:14.659129172 +0200
@@ -100,7 +100,7 @@ public:
 	QRegion eor(const QRegion ) const;
 
 	QRect boundingRect() const;
-//	QArrayQRect rects() const;
+	QMemArrayQRect rects() const;
 %If (Qt_2_2_0 -)
 //	void setRects(const QRect *,int);
 %End
--- PyQt-x11-gpl-3.17.4/sip/qt/qmemarray.sip.orig	2007-12-06 15:28:07.0 +0100
+++ PyQt-x11-gpl-3.17.4/sip/qt/qmemarray.sip	2008-05-15 00:05:08.247037196 +0200
@@ -89,4 +89,81 @@ converted to and from Python lists of th
 %End
 };
 
+// QMemArrayTYPE is implemented as a Python list.
+templateTYPE
+%MappedType QMemArrayTYPE
+{
+%TypeHeaderCode
+#include qmemarray.h
+%End
+
+%ConvertFromTypeCode
+// Create the list.
+PyObject *l;
+
+if ((l = PyList_New(sipCpp-size())) == NULL)
+return NULL;
+
+// Set the list elements.
+for (uint i = 0; i  sipCpp-size(); ++i)
+{
+TYPE *t = new TYPE(sipCpp-at(i));
+PyObject *tobj;
+
+if ((tobj = sipConvertFromNewInstance(t, sipClass_TYPE, sipTransferObj)) == NULL)
+{
+Py_DECREF(l);
+delete t;
+
+return NULL;
+}
+
+PyList_SET_ITEM(l, i, tobj);
+}
+
+return l;
+%End
+
+%ConvertToTypeCode
+// Check the type if that is all that is required.
+if (sipIsErr == NULL)
+{
+if (!PyList_Check(sipPy))
+return 0;
+
+for (int i = 0; i  PyList_GET_SIZE(sipPy); ++i)
+if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_TYPE, SIP_NOT_NONE))
+return 0;
+
+return 1;
+}
+
+QMemArrayTYPE *ql = new QMemArrayTYPE;
+
+for (int i = 0; i  PyList_GET_SIZE(sipPy); ++i)
+{
+int state;
+TYPE *t = reinterpret_castTYPE *(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_TYPE, sipTransferObj, SIP_NOT_NONE, state, sipIsErr));
+
+if (*sipIsErr)
+{
+sipReleaseInstance(t, sipClass_TYPE, state);
+
+delete ql;
+return 0;
+}
+
+uint idx = ql-size();
+ql-resize(idx + 1);
+(*ql)[idx] = *t;
+
+sipReleaseInstance(t, sipClass_TYPE, state);
+}
+
+*sipCppPtr = ql;
+
+return sipGetState(sipTransferObj);
+%End
+};
+
 %End
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt