Fix bug#549 - "QGraphicsWidget::getContentsMargins() and QGraphicsWidget::getWindowFrameMargins() not available"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
This commit is contained in:
parent
09840da111
commit
85715f3fc3
3 changed files with 59 additions and 4 deletions
|
|
@ -4834,10 +4834,48 @@
|
||||||
</object-type>
|
</object-type>
|
||||||
<!-- a QObject so main-thread delete redundant -->
|
<!-- a QObject so main-thread delete redundant -->
|
||||||
<object-type name="QGraphicsWidget">
|
<object-type name="QGraphicsWidget">
|
||||||
<!-- FIXME: What to do with this function? -->
|
<modify-function signature="getContentsMargins(qreal*,qreal*,qreal*,qreal*)const">
|
||||||
<modify-function signature="getContentsMargins(qreal*,qreal*,qreal*,qreal*)const" remove="all" />
|
<modify-argument index="return">
|
||||||
<!-- FIXME: What to do with this function? -->
|
<replace-type modified-type="PyObject" />
|
||||||
<modify-function signature="getWindowFrameMargins(qreal*,qreal*,qreal*,qreal*)const" remove="all" />
|
</modify-argument>
|
||||||
|
<modify-argument index="1">
|
||||||
|
<remove-argument/>
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="2">
|
||||||
|
<remove-argument/>
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument/>
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="4">
|
||||||
|
<remove-argument/>
|
||||||
|
</modify-argument>
|
||||||
|
|
||||||
|
<inject-code class="target" position="beginning">
|
||||||
|
<insert-template name="fix_qreal*,qreal*,qreal*,qreal*"/>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="getWindowFrameMargins(qreal*,qreal*,qreal*,qreal*)const">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="PyObject" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="1">
|
||||||
|
<remove-argument/>
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="2">
|
||||||
|
<remove-argument/>
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument/>
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="4">
|
||||||
|
<remove-argument/>
|
||||||
|
</modify-argument>
|
||||||
|
|
||||||
|
<inject-code class="target" position="beginning">
|
||||||
|
<insert-template name="fix_qreal*,qreal*,qreal*,qreal*"/>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
<!-- a QObject so main-thread delete redundant -->
|
<!-- a QObject so main-thread delete redundant -->
|
||||||
<!-- Duplicate function to QObject::children() to override accidental shadowing which is not present in Jambi -->
|
<!-- Duplicate function to QObject::children() to override accidental shadowing which is not present in Jambi -->
|
||||||
<modify-function signature="children()const" remove="all"/>
|
<modify-function signature="children()const" remove="all"/>
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ PYSIDE_TEST(bug_480.py)
|
||||||
PYSIDE_TEST(bug_500.py)
|
PYSIDE_TEST(bug_500.py)
|
||||||
PYSIDE_TEST(bug_512.py)
|
PYSIDE_TEST(bug_512.py)
|
||||||
PYSIDE_TEST(bug_525.py)
|
PYSIDE_TEST(bug_525.py)
|
||||||
|
PYSIDE_TEST(bug_549.py)
|
||||||
PYSIDE_TEST(customproxywidget_test.py)
|
PYSIDE_TEST(customproxywidget_test.py)
|
||||||
PYSIDE_TEST(deepcopy_test.py)
|
PYSIDE_TEST(deepcopy_test.py)
|
||||||
PYSIDE_TEST(float_to_int_implicit_conversion_test.py)
|
PYSIDE_TEST(float_to_int_implicit_conversion_test.py)
|
||||||
|
|
|
||||||
16
tests/QtGui/bug_549.py
Normal file
16
tests/QtGui/bug_549.py
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
from PySide.QtGui import *
|
||||||
|
|
||||||
|
class TestBug549(unittest.TestCase):
|
||||||
|
def testBug(self):
|
||||||
|
app = QApplication([])
|
||||||
|
w = QGraphicsWidget()
|
||||||
|
w.setContentsMargins(1, 2, 3, 4)
|
||||||
|
self.assertEquals(w.getContentsMargins(), (1, 2, 3, 4))
|
||||||
|
w.setWindowFrameMargins(5, 6, 7, 8)
|
||||||
|
self.assertEquals(w.getWindowFrameMargins(), (5, 6, 7, 8))
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue