diff options
author | Liang Qi <liang.qi@qt.io> | 2019-03-29 10:11:27 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-03-29 20:55:24 +0000 |
commit | 300940a6c9eb0f74cefda7d76a5d19f56ec50253 (patch) | |
tree | b17f5a6f4289890872a17e29f682d46e302b69cd /src/gui/kernel/qplatformintegration.cpp | |
parent | 6ed2ea86db63c72a38a60543da5a95d3543d39b1 (diff) |
Revert "Remove deprecated screen maintenance functions in QPlatformIntegration"
This reverts commit 7a64ffb7738dc975b5008800901c8cd8ab238a0f.
This change landed in 5.13 too early, so there is no baseline with both APIs in
dev. This will be reverted later when the fixes for leaf modules landed.
Task-number: QTBUG-74816
Change-Id: Ie5ee41fbf6be53b8fcb4289ac1ec3974e5bf6e42
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Diffstat (limited to 'src/gui/kernel/qplatformintegration.cpp')
-rw-r--r-- | src/gui/kernel/qplatformintegration.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp index 490cfc6178..6ae6e4a528 100644 --- a/src/gui/kernel/qplatformintegration.cpp +++ b/src/gui/kernel/qplatformintegration.cpp @@ -462,6 +462,44 @@ QList<int> QPlatformIntegration::possibleKeys(const QKeyEvent *) const return QList<int>(); } +/*! + \deprecated Use QWindowSystemInterface::handleScreenAdded instead. +*/ +void QPlatformIntegration::screenAdded(QPlatformScreen *ps, bool isPrimary) +{ + QWindowSystemInterface::handleScreenAdded(ps, isPrimary); +} + +/*! + \deprecated Use QWindowSystemInterface::handleScreenRemoved instead. +*/ +void QPlatformIntegration::removeScreen(QScreen *screen) +{ + const bool wasPrimary = (!QGuiApplicationPrivate::screen_list.isEmpty() && QGuiApplicationPrivate::screen_list.at(0) == screen); + QGuiApplicationPrivate::screen_list.removeOne(screen); + + QGuiApplicationPrivate::resetCachedDevicePixelRatio(); + + if (wasPrimary && qGuiApp && !QGuiApplicationPrivate::screen_list.isEmpty()) + emit qGuiApp->primaryScreenChanged(QGuiApplicationPrivate::screen_list.at(0)); +} + +/*! + \deprecated Use QWindowSystemInterface::handleScreenRemoved instead. +*/ +void QPlatformIntegration::destroyScreen(QPlatformScreen *platformScreen) +{ + QWindowSystemInterface::handleScreenRemoved(platformScreen); +} + +/*! + \deprecated Use QWindowSystemInterface::handlePrimaryScreenChanged instead. +*/ +void QPlatformIntegration::setPrimaryScreen(QPlatformScreen *newPrimary) +{ + QWindowSystemInterface::handlePrimaryScreenChanged(newPrimary); +} + QStringList QPlatformIntegration::themeNames() const { return QStringList(); |