diff options
-rw-r--r-- | PySide/QtGui/typesystem_gui_common.xml | 5 | ||||
-rw-r--r-- | tests/QtGui/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/QtGui/bug_1077.py | 17 |
3 files changed, 23 insertions, 0 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml index 4b0785b23..755f4a971 100644 --- a/PySide/QtGui/typesystem_gui_common.xml +++ b/PySide/QtGui/typesystem_gui_common.xml @@ -2685,6 +2685,11 @@ <parent index="this" action="add"/> </modify-argument> </modify-function> + <modify-function signature="document() const"> + <modify-argument index="this"> + <parent index="return" action="add"/> + </modify-argument> + </modify-function> </object-type> <object-type name="QTableView"> <modify-function signature="setHorizontalHeader(QHeaderView*)"> diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt index acb9a67ee..1d95576f5 100644 --- a/tests/QtGui/CMakeLists.txt +++ b/tests/QtGui/CMakeLists.txt @@ -80,6 +80,7 @@ PYSIDE_TEST(bug_998.py) PYSIDE_TEST(bug_1002.py) PYSIDE_TEST(bug_1006.py) PYSIDE_TEST(bug_1048.py) +PYSIDE_TEST(bug_1077.py) PYSIDE_TEST(customproxywidget_test.py) PYSIDE_TEST(deepcopy_test.py) PYSIDE_TEST(event_filter_test.py) diff --git a/tests/QtGui/bug_1077.py b/tests/QtGui/bug_1077.py new file mode 100644 index 000000000..231ce1e04 --- /dev/null +++ b/tests/QtGui/bug_1077.py @@ -0,0 +1,17 @@ +''' unit test for BUG #1077 ''' + +from PySide import QtCore, QtGui +import time + +class Highlighter(QtGui.QSyntaxHighlighter): + def __init__(self, parent, mode): + QtGui.QSyntaxHighlighter.__init__(self, parent) + self.tstamp = time.time() + +if __name__ == "__main__": + app = QtGui.QApplication([]) + python = QtGui.QTextEdit() + python.setWindowTitle("python") + hl = Highlighter(python.document(), "python") + python.show() + text = hl.document() |