From 01e1df90a7debd333314720fdd5cf6cd9964d796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 14 Mar 2019 00:36:34 +0100 Subject: Move screen maintenance functions from QPlatformIntegration to QWSI QWindowSystemInterface is the de facto API for any plumbing going from the platform plugin to QtGui. Having the functions as protected members of QPlatformIntegration was idiosyncratic, and resulted in awkward workarounds to be able to call the functions from outside of the QPlatformIntegration subclass. The functions in QPlatformIntegration have been left in, but deprecated so that platform plugins outside of qtbase have a chance to move over to the new QWSI API before they are removed. Change-Id: I327fec460db6b0faaf0ae2a151c20aa30dbe7182 Reviewed-by: Gatis Paeglis --- src/gui/kernel/qplatformintegration.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/gui/kernel/qplatformintegration.h') diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h index efb1481f6d..1179daeb32 100644 --- a/src/gui/kernel/qplatformintegration.h +++ b/src/gui/kernel/qplatformintegration.h @@ -190,7 +190,9 @@ public: #endif virtual void setApplicationIcon(const QIcon &icon) const; - void removeScreen(QScreen *screen); +#if QT_DEPRECATED_SINCE(5, 12) + QT_DEPRECATED_X("Use QWindowSystemInterface::handleScreenRemoved") void removeScreen(QScreen *screen); +#endif virtual void beep() const; @@ -199,9 +201,11 @@ public: #endif protected: - void screenAdded(QPlatformScreen *screen, bool isPrimary = false); - void destroyScreen(QPlatformScreen *screen); - void setPrimaryScreen(QPlatformScreen *newPrimary); +#if QT_DEPRECATED_SINCE(5, 12) + QT_DEPRECATED_X("Use QWindowSystemInterface::handleScreenAdded") void screenAdded(QPlatformScreen *screen, bool isPrimary = false); + QT_DEPRECATED_X("Use QWindowSystemInterface::handleScreenRemoved") void destroyScreen(QPlatformScreen *screen); + QT_DEPRECATED_X("Use QWindowSystemInterface::handlePrimaryScreenChanged") void setPrimaryScreen(QPlatformScreen *newPrimary); +#endif }; QT_END_NAMESPACE -- cgit v1.2.3 From 7a64ffb7738dc975b5008800901c8cd8ab238a0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 21 Mar 2019 12:01:51 +0100 Subject: Remove deprecated screen maintenance functions in QPlatformIntegration The logic for removing QScreens from QGuiApplicationPrivate has been moved into the QScreen destructor, similar to QWindow. Change-Id: I18ad57d8dcf9f765c47be7c082bf075af3ebe69c Reviewed-by: Friedemann Kleint Reviewed-by: Lars Knoll --- src/gui/kernel/qplatformintegration.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/gui/kernel/qplatformintegration.h') diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h index 6950bbaf72..389b35dbc0 100644 --- a/src/gui/kernel/qplatformintegration.h +++ b/src/gui/kernel/qplatformintegration.h @@ -192,10 +192,6 @@ public: #endif virtual void setApplicationIcon(const QIcon &icon) const; -#if QT_DEPRECATED_SINCE(5, 12) - QT_DEPRECATED_X("Use QWindowSystemInterface::handleScreenRemoved") void removeScreen(QScreen *screen); -#endif - virtual void beep() const; #if QT_CONFIG(vulkan) || defined(Q_CLANG_QDOC) @@ -204,12 +200,6 @@ public: protected: QPlatformIntegration() = default; - -#if QT_DEPRECATED_SINCE(5, 12) - QT_DEPRECATED_X("Use QWindowSystemInterface::handleScreenAdded") void screenAdded(QPlatformScreen *screen, bool isPrimary = false); - QT_DEPRECATED_X("Use QWindowSystemInterface::handleScreenRemoved") void destroyScreen(QPlatformScreen *screen); - QT_DEPRECATED_X("Use QWindowSystemInterface::handlePrimaryScreenChanged") void setPrimaryScreen(QPlatformScreen *newPrimary); -#endif }; QT_END_NAMESPACE -- cgit v1.2.3 From 300940a6c9eb0f74cefda7d76a5d19f56ec50253 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Fri, 29 Mar 2019 10:11:27 +0100 Subject: 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 --- src/gui/kernel/qplatformintegration.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/gui/kernel/qplatformintegration.h') diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h index b764bd2617..048ea1139c 100644 --- a/src/gui/kernel/qplatformintegration.h +++ b/src/gui/kernel/qplatformintegration.h @@ -192,6 +192,10 @@ public: #endif virtual void setApplicationIcon(const QIcon &icon) const; +#if QT_DEPRECATED_SINCE(5, 12) + QT_DEPRECATED_X("Use QWindowSystemInterface::handleScreenRemoved") void removeScreen(QScreen *screen); +#endif + virtual void beep() const; #if QT_CONFIG(vulkan) || defined(Q_CLANG_QDOC) @@ -200,6 +204,12 @@ public: protected: QPlatformIntegration() = default; + +#if QT_DEPRECATED_SINCE(5, 12) + QT_DEPRECATED_X("Use QWindowSystemInterface::handleScreenAdded") void screenAdded(QPlatformScreen *screen, bool isPrimary = false); + QT_DEPRECATED_X("Use QWindowSystemInterface::handleScreenRemoved") void destroyScreen(QPlatformScreen *screen); + QT_DEPRECATED_X("Use QWindowSystemInterface::handlePrimaryScreenChanged") void setPrimaryScreen(QPlatformScreen *newPrimary); +#endif }; QT_END_NAMESPACE -- cgit v1.2.3 From ad313595e0662fa2e91676feef65aad5b4525a86 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Sat, 30 Mar 2019 21:52:42 +0100 Subject: Revert "Revert "Remove deprecated screen maintenance functions in QPlatformIntegration"" This reverts commit 300940a6c9eb0f74cefda7d76a5d19f56ec50253. The fixes for leaf modules landed already. Task-number: QTBUG-74816 Change-Id: I1c7f0705c20d030419ceedca485106af73946b3c Reviewed-by: Jesus Fernandez --- src/gui/kernel/qplatformintegration.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/gui/kernel/qplatformintegration.h') diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h index 048ea1139c..b764bd2617 100644 --- a/src/gui/kernel/qplatformintegration.h +++ b/src/gui/kernel/qplatformintegration.h @@ -192,10 +192,6 @@ public: #endif virtual void setApplicationIcon(const QIcon &icon) const; -#if QT_DEPRECATED_SINCE(5, 12) - QT_DEPRECATED_X("Use QWindowSystemInterface::handleScreenRemoved") void removeScreen(QScreen *screen); -#endif - virtual void beep() const; #if QT_CONFIG(vulkan) || defined(Q_CLANG_QDOC) @@ -204,12 +200,6 @@ public: protected: QPlatformIntegration() = default; - -#if QT_DEPRECATED_SINCE(5, 12) - QT_DEPRECATED_X("Use QWindowSystemInterface::handleScreenAdded") void screenAdded(QPlatformScreen *screen, bool isPrimary = false); - QT_DEPRECATED_X("Use QWindowSystemInterface::handleScreenRemoved") void destroyScreen(QPlatformScreen *screen); - QT_DEPRECATED_X("Use QWindowSystemInterface::handlePrimaryScreenChanged") void setPrimaryScreen(QPlatformScreen *newPrimary); -#endif }; QT_END_NAMESPACE -- cgit v1.2.3