diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2018-12-10 15:00:58 +0100 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2018-12-22 21:51:38 +0000 |
commit | 6881699d7605c29f61d6809c9fa9eb04807bef9e (patch) | |
tree | 6c526cc75d60d55a83d9f4aafe264c199d95d576 /src/gui | |
parent | 4a0ed282cf49c41cc8f77d71be11acc3911ccb13 (diff) |
Fix layering violation in isForeignWindow()
QPlatformWindow::isForeignWindow() should return whether
the native window is of the foreign window type, or
false if the platform (plugin) does not support this
concept.
It should not call QWindow::type(), since that function
may itself be implemented in terms of isForeignWindow().
Change-Id: Ib67a5a44c5c1db0acb4d3bc155e187f8164146d1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qplatformwindow.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatformwindow.h b/src/gui/kernel/qplatformwindow.h index 1590a10554..075ac0f82b 100644 --- a/src/gui/kernel/qplatformwindow.h +++ b/src/gui/kernel/qplatformwindow.h @@ -108,7 +108,7 @@ public: virtual bool isActive() const; virtual bool isAncestorOf(const QPlatformWindow *child) const; virtual bool isEmbedded() const; - virtual bool isForeignWindow() const { return window()->type() == Qt::ForeignWindow; }; + virtual bool isForeignWindow() const { return false; }; virtual QPoint mapToGlobal(const QPoint &pos) const; virtual QPoint mapFromGlobal(const QPoint &pos) const; |