summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp')
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
index c145623240..b8e729eb7c 100644
--- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -287,6 +287,7 @@ private slots:
void taskQTBUG_5904_crashWithDeviceCoordinateCache();
void taskQT657_paintIntoCacheWithTransparentParts();
void taskQTBUG_7863_paintIntoCacheWithTransparentParts();
+ void taskQT_3674_doNotCrash();
};
void tst_QGraphicsScene::initTestCase()
@@ -4565,6 +4566,25 @@ void tst_QGraphicsScene::taskQTBUG_7863_paintIntoCacheWithTransparentParts()
}
}
+void tst_QGraphicsScene::taskQT_3674_doNotCrash()
+{
+ QGraphicsScene scene;
+
+ QGraphicsView view(&scene);
+ view.resize(200, 200);
+
+ QPixmap pixmap(view.size());
+ QPainter painter(&pixmap);
+ view.render(&painter);
+ painter.end();
+
+ scene.addItem(new QGraphicsWidget);
+ scene.setBackgroundBrush(Qt::green);
+
+ QApplication::processEvents();
+ QApplication::processEvents();
+}
+
void tst_QGraphicsScene::zeroScale()
{
//should not crash