PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 163 - Missing copy ctor for QRect
: Missing copy ctor for QRect
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: PySide
: HEAD
: All All
: P5 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2010-02-23 09:25 EET by Bruno Araujo
Modified: 2010-05-04 18:43 EEST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno Araujo 2010-02-23 09:25:33 EET
TypeError: 'PySide.QtCore.QRect' called with wrong argument types:
  PySide.QtCore.QRect(QRect)
Supported signatures:
  PySide.QtCore.QRect()
  PySide.QtCore.QRect(PySide.QtCore.QPoint, PySide.QtCore.QPoint)
  PySide.QtCore.QRect(PySide.QtCore.QPoint, PySide.QtCore.QSize)
  PySide.QtCore.QRect(int, int, int, int)

A copy constructor should be available for QRect, in the same lines of QPoint.
Comment 1 Bruno Araujo 2010-02-23 09:41:24 EET
An attempted fix was to add the following tag in the corresponding typesystem
entry for QRect:

    <add-function signature="QRect(PyObject*)">
        <inject-code class="target" position="beginning">
        %TYPE ptr = %CONVERTTOCPP[%TYPE](%PYARG_1);
        cptr = new %TYPE(ptr.x(), ptr.y(), ptr.width(), ptr.height());
        </inject-code>
    </add-function>

However, this causes a Boost exception in the generation phase:

[/] (360/360) Detecting inconsistencies in typesystem for
QFlags<QTextStream::NumberFlag>
terminate called after throwing an instance of 'boost::not_a_dag'
  what():  The graph must be a DAG.
/bin/sh: line 1:  4623 Aborted
Comment 2 Marcelo Lira 2010-04-01 15:26:10 EEST
Fixed in apiextractor/96521117 and shiboken/306a4e24.