Remove private API use from video orientation handler
The QPA header isn't needed anymore, as nativeOrientation was added as a QScreen property in 5.2. Change-Id: I7cd00feae769175fd0c4be65b503e74ee910814a Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
This commit is contained in:
committed by
Yoann Lopes
parent
f420ac286a
commit
085362ab0f
@@ -35,7 +35,6 @@
|
|||||||
|
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
#include <qpa/qplatformscreen.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@@ -63,9 +62,8 @@ int QVideoOutputOrientationHandler::currentOrientation() const
|
|||||||
void QVideoOutputOrientationHandler::screenOrientationChanged(Qt::ScreenOrientation orientation)
|
void QVideoOutputOrientationHandler::screenOrientationChanged(Qt::ScreenOrientation orientation)
|
||||||
{
|
{
|
||||||
const QScreen *screen = QGuiApplication::primaryScreen();
|
const QScreen *screen = QGuiApplication::primaryScreen();
|
||||||
const QPlatformScreen *platformScreen = screen->handle();
|
|
||||||
|
|
||||||
const int angle = (360 - screen->angleBetween(platformScreen->nativeOrientation(), orientation)) % 360;
|
const int angle = (360 - screen->angleBetween(screen->nativeOrientation(), orientation)) % 360;
|
||||||
|
|
||||||
if (angle == m_currentOrientation)
|
if (angle == m_currentOrientation)
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user