aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-01-05 14:10:38 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:51:43 -0300
commitcfeea7ec045c1f9e7d4652ed2f672db2977de3a8 (patch)
treebc47cdce5c2ab924ec3a202a70db6fdcd6340a46 /tests
parentbcb6a2eb75a85cba86c92ccb61ae6e34123758ee (diff)
Fix bug#557 - "Segmentation fault in QDeclarativeComponent.loadUrl()"
The signature QDeclarativeComponent(QObject*) should not exist, it's not documented and just creates a useless QDeclarativeComponent when used, useless in the sense that it will segfault when used. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/QtDeclarative/CMakeLists.txt1
-rw-r--r--tests/QtDeclarative/bug_557.py14
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/QtDeclarative/CMakeLists.txt b/tests/QtDeclarative/CMakeLists.txt
index 5cd53e964..84bc4957b 100644
--- a/tests/QtDeclarative/CMakeLists.txt
+++ b/tests/QtDeclarative/CMakeLists.txt
@@ -1,5 +1,6 @@
PYSIDE_TEST(bug_451.py)
PYSIDE_TEST(bug_456.py)
+PYSIDE_TEST(bug_557.py)
PYSIDE_TEST(qdeclarativenetwork_test.py)
PYSIDE_TEST(qdeclarativeview_test.py)
PYSIDE_TEST(connect_python_qml.py)
diff --git a/tests/QtDeclarative/bug_557.py b/tests/QtDeclarative/bug_557.py
new file mode 100644
index 000000000..c78aaf15d
--- /dev/null
+++ b/tests/QtDeclarative/bug_557.py
@@ -0,0 +1,14 @@
+from PySide.QtCore import *
+from PySide.QtGui import *
+from PySide.QtDeclarative import *
+
+import sys
+
+app = QApplication(sys.argv)
+
+engine = QDeclarativeEngine()
+component = QDeclarativeComponent(engine)
+
+# This should segfault if the QDeclarativeComponent has not QDeclarativeEngine
+component.loadUrl(QUrl.fromLocalFile('foo.qml'))
+