summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/multimedia/base/qgraphicsvideoitem.cpp16
-rw-r--r--src/multimedia/base/qvideowidget.cpp3
-rw-r--r--tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp2
-rw-r--r--tests/auto/qvideowidget/tst_qvideowidget.cpp6
4 files changed, 5 insertions, 22 deletions
diff --git a/src/multimedia/base/qgraphicsvideoitem.cpp b/src/multimedia/base/qgraphicsvideoitem.cpp
index 3cd0449..8aba269 100644
--- a/src/multimedia/base/qgraphicsvideoitem.cpp
+++ b/src/multimedia/base/qgraphicsvideoitem.cpp
@@ -408,21 +408,7 @@ void QGraphicsVideoItem::paint(
*/
QVariant QGraphicsVideoItem::itemChange(GraphicsItemChange change, const QVariant &value)
{
- Q_D(QGraphicsVideoItem);
-
- if (change == ItemVisibleChange && d->outputControl != 0 && d->rendererControl != 0) {
- if (value.toBool()) {
- d->outputControl->setOutput(QVideoOutputControl::RendererOutput);
-
- return d->outputControl->output() == QVideoOutputControl::RendererOutput;
- } else {
- d->outputControl->setOutput(QVideoOutputControl::NoOutput);
-
- return value;
- }
- } else {
- return QGraphicsItem::itemChange(change, value);
- }
+ return QGraphicsItem::itemChange(change, value);
}
QT_END_NAMESPACE
diff --git a/src/multimedia/base/qvideowidget.cpp b/src/multimedia/base/qvideowidget.cpp
index 31cfd8d..5df245e 100644
--- a/src/multimedia/base/qvideowidget.cpp
+++ b/src/multimedia/base/qvideowidget.cpp
@@ -868,9 +868,6 @@ void QVideoWidget::hideEvent(QHideEvent *event)
if (d->currentBackend)
d->currentBackend->hideEvent(event);
- if (d->outputControl)
- d->outputControl->setOutput(QVideoOutputControl::NoOutput);
-
QWidget::hideEvent(event);
}
diff --git a/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp b/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp
index 2427d64..7fb6005 100644
--- a/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp
+++ b/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp
@@ -357,7 +357,7 @@ void tst_QGraphicsVideoItem::show()
QVERIFY(object.testService->rendererControl->surface() != 0);
item->hide();
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::RendererOutput);
item->show();
QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::RendererOutput);
diff --git a/tests/auto/qvideowidget/tst_qvideowidget.cpp b/tests/auto/qvideowidget/tst_qvideowidget.cpp
index 37676cf..e30d16b 100644
--- a/tests/auto/qvideowidget/tst_qvideowidget.cpp
+++ b/tests/auto/qvideowidget/tst_qvideowidget.cpp
@@ -653,7 +653,7 @@ void tst_QVideoWidget::showWindowControl()
widget.hide();
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::WindowOutput);
}
void tst_QVideoWidget::showWidgetControl()
@@ -677,7 +677,7 @@ void tst_QVideoWidget::showWidgetControl()
widget.hide();
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::WidgetOutput);
QCOMPARE(object.testService->widgetControl->videoWidget()->isVisible(), false);
}
@@ -702,7 +702,7 @@ void tst_QVideoWidget::showRendererControl()
widget.hide();
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
+ QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::RendererOutput);
}
void tst_QVideoWidget::aspectRatioWindowControl()