Fix memory leak in tst_qgraphicsproxywidget
QStyle was created but never removed Change-Id: I55011377afd475af28e4ce2cf657e435dd37c96a Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This commit is contained in:
parent
885720aa1b
commit
25b72a63ff
@ -415,6 +415,7 @@ void tst_QGraphicsProxyWidget::setWidget()
|
||||
QGraphicsScene scene;
|
||||
QGraphicsView view(&scene);
|
||||
view.show();
|
||||
QScopedPointer<QStyle> style(QStyleFactory::create(QLatin1String("Fusion")));
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&view));
|
||||
QPointer<SubQGraphicsProxyWidget> proxy = new SubQGraphicsProxyWidget;
|
||||
SubQGraphicsProxyWidget parentProxy;
|
||||
@ -437,7 +438,7 @@ void tst_QGraphicsProxyWidget::setWidget()
|
||||
#endif
|
||||
widget->setPalette(QPalette(Qt::magenta));
|
||||
widget->setLayoutDirection(Qt::RightToLeft);
|
||||
widget->setStyle(QStyleFactory::create(QLatin1String("Fusion")));
|
||||
widget->setStyle(style.data());
|
||||
widget->setFont(QFont("Times"));
|
||||
widget->setVisible(true);
|
||||
QApplication::setActiveWindow(widget);
|
||||
|
Loading…
Reference in New Issue
Block a user