De-inline QScreenPrivate::updateHighDpi()

Make it easier to reason about the flow of high-DPI scaling when the
implementation is not "hidden" away in a private header.

Change-Id: I6350798c43ead213323f8e01d9761f2d185c6b00
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
bb10
Tor Arne Vestbø 2022-09-07 13:29:36 +02:00
parent 778dcaa50d
commit 1032bf9fdb
2 changed files with 6 additions and 5 deletions

View File

@ -89,6 +89,11 @@ void QScreenPrivate::setPlatformScreen(QPlatformScreen *screen)
updatePrimaryOrientation(); // derived from the geometry
}
void QScreenPrivate::updateHighDpi()
{
geometry = platformScreen->deviceIndependentGeometry();
availableGeometry = QHighDpi::fromNative(platformScreen->availableGeometry(), QHighDpiScaling::factor(platformScreen), geometry.topLeft());
}
/*!
Destroys the screen.

View File

@ -29,11 +29,7 @@ class QScreenPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QScreen)
public:
void setPlatformScreen(QPlatformScreen *screen);
void updateHighDpi()
{
geometry = platformScreen->deviceIndependentGeometry();
availableGeometry = QHighDpi::fromNative(platformScreen->availableGeometry(), QHighDpiScaling::factor(platformScreen), geometry.topLeft());
}
void updateHighDpi();
void updatePrimaryOrientation();
void updateGeometriesWithSignals();