diff options
author | Tasuku Suzuki <stasuku@gmail.com> | 2013-01-17 18:46:45 +0900 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-18 18:19:16 +0100 |
commit | 9e604dcd07d5b943520ab2a3d472bd23fdd577ec (patch) | |
tree | c627d6ff4f9b8ade492772f98ba4c0beacf6848a /tests/auto/quick/qquickpathview/tst_qquickpathview.cpp | |
parent | 0d17d4a19c07e475920dcb0d0c57a8717ba98844 (diff) |
Fix crash in PathView
Change-Id: I259e7af1755ff9615782bbce03fc41ea1957cab3
Task-number: QTBUG-29176
Reviewed-by: Alan Alpert <aalpert@rim.com>
Diffstat (limited to 'tests/auto/quick/qquickpathview/tst_qquickpathview.cpp')
-rw-r--r-- | tests/auto/quick/qquickpathview/tst_qquickpathview.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp index a7e0f2feb4..8821203902 100644 --- a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp +++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp @@ -118,6 +118,7 @@ private slots: void pathUpdateOnStartChanged(); void package(); void emptyModel(); + void emptyPath(); void closed(); void pathUpdate(); void visualDataModel(); @@ -1373,6 +1374,19 @@ void tst_QQuickPathView::emptyModel() delete window; } +void tst_QQuickPathView::emptyPath() +{ + QQuickView *window = createView(); + + window->setSource(testFileUrl("emptypath.qml")); + qApp->processEvents(); + + QQuickPathView *pathview = qobject_cast<QQuickPathView*>(window->rootObject()); + QVERIFY(pathview != 0); + + delete window; +} + void tst_QQuickPathView::closed() { QQmlEngine engine; |