diff options
Diffstat (limited to 'src/gui/kernel/qguiapplication_p.h')
-rw-r--r-- | src/gui/kernel/qguiapplication_p.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 042a36c31f..63646dcd50 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -311,6 +311,8 @@ public: static void setApplicationState(Qt::ApplicationState state, bool forcePropagate = false); + static void resetCachedDevicePixelRatio(); + protected: virtual void notifyThemeChanged(); virtual void sendApplicationPaletteChange(bool toAllWidgets = false, const char *className = nullptr); @@ -331,6 +333,10 @@ private: bool ownGlobalShareContext; static QInputDeviceManager *m_inputDeviceManager; + + // Cache the maximum device pixel ratio, to iterate through the screen list + // only the first time it's required, or when devices are added or removed. + static qreal m_maxDevicePixelRatio; }; Q_GUI_EXPORT uint qHash(const QGuiApplicationPrivate::ActiveTouchPointsKey &k); |