summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformsurface.h
diff options
context:
space:
mode:
authorJesus Fernandez <jesus.fernandez@qt.io>2017-04-25 14:22:13 +0200
committerJesus Fernandez <Jesus.Fernandez@qt.io>2017-09-04 11:36:50 +0000
commit3f1ac5899476307923686166705812c24a2e3578 (patch)
treeeaeb3d40be3d97e9161977a31825f13f07293d0c /src/gui/kernel/qplatformsurface.h
parentfefdb8466265d632675c50c53a027a86ca1af4a2 (diff)
Add QPlatformSurface::screen() const
Classes inheriting QPlatformSurface need to return the QPlatformScreen to allow the platform integration plugin to know information about the used screen by the surface. QPlatformSurface and QPlatformWindow had the same function defined, but it was not possible to call it without casting the QPlatformSurface pointer. Change-Id: I1f93fe7c13ebbc51769677038edeca4de5db0024 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/kernel/qplatformsurface.h')
-rw-r--r--src/gui/kernel/qplatformsurface.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatformsurface.h b/src/gui/kernel/qplatformsurface.h
index 5a1e4fe82d..76e8767a05 100644
--- a/src/gui/kernel/qplatformsurface.h
+++ b/src/gui/kernel/qplatformsurface.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -56,6 +56,7 @@
QT_BEGIN_NAMESPACE
+class QPlatformScreen;
class Q_GUI_EXPORT QPlatformSurface
{
@@ -64,6 +65,7 @@ public:
virtual QSurfaceFormat format() const = 0;
QSurface *surface() const;
+ virtual QPlatformScreen *screen() const = 0;
private:
explicit QPlatformSurface(QSurface *surface);