Rename QScreenPrivate::updateHighDpi()
The function updates the cached QScreen geometry; rename it to updateGeometry(). Change-Id: I56077807baa6c515769017dbb842eed10b1d1357 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
a0b34a86b6
commit
5699a1f909
@ -532,7 +532,7 @@ void QHighDpiScaling::setGlobalFactor(qreal factor)
|
||||
m_active = m_globalScalingActive || m_screenFactorSet || m_platformPluginDpiScalingActive ;
|
||||
const auto screens = QGuiApplication::screens();
|
||||
for (QScreen *screen : screens)
|
||||
screen->d_func()->updateHighDpi();
|
||||
screen->d_func()->updateGeometry();
|
||||
}
|
||||
|
||||
static const char scaleFactorProperty[] = "_q_scaleFactor";
|
||||
|
@ -48,7 +48,7 @@ void QScreenPrivate::updateGeometriesWithSignals()
|
||||
{
|
||||
const QRect oldGeometry = geometry;
|
||||
const QRect oldAvailableGeometry = availableGeometry;
|
||||
updateHighDpi();
|
||||
updateGeometry();
|
||||
emitGeometryChangeSignals(oldGeometry != geometry, oldAvailableGeometry != availableGeometry);
|
||||
}
|
||||
|
||||
@ -85,11 +85,11 @@ void QScreenPrivate::setPlatformScreen(QPlatformScreen *screen)
|
||||
if (refreshRate < 1.0)
|
||||
refreshRate = 60.0;
|
||||
|
||||
updateHighDpi();
|
||||
updateGeometry();
|
||||
updatePrimaryOrientation(); // derived from the geometry
|
||||
}
|
||||
|
||||
void QScreenPrivate::updateHighDpi()
|
||||
void QScreenPrivate::updateGeometry()
|
||||
{
|
||||
qreal scaleFactor = QHighDpiScaling::factor(platformScreen);
|
||||
QRect nativeGeometry = platformScreen->geometry();
|
||||
|
@ -29,7 +29,7 @@ class QScreenPrivate : public QObjectPrivate
|
||||
Q_DECLARE_PUBLIC(QScreen)
|
||||
public:
|
||||
void setPlatformScreen(QPlatformScreen *screen);
|
||||
void updateHighDpi();
|
||||
void updateGeometry();
|
||||
|
||||
void updatePrimaryOrientation();
|
||||
void updateGeometriesWithSignals();
|
||||
|
@ -752,7 +752,7 @@ void QWindowSystemInterface::handleScreenAdded(QPlatformScreen *ps, bool isPrima
|
||||
|
||||
QGuiApplicationPrivate::resetCachedDevicePixelRatio();
|
||||
QHighDpiScaling::updateHighDpiScaling();
|
||||
screen->d_func()->updateHighDpi();
|
||||
screen->d_func()->updateGeometry();
|
||||
|
||||
emit qGuiApp->screenAdded(screen);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user