From 3f1ac5899476307923686166705812c24a2e3578 Mon Sep 17 00:00:00 2001 From: Jesus Fernandez Date: Tue, 25 Apr 2017 14:22:13 +0200 Subject: 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 Reviewed-by: Laszlo Agocs --- src/gui/kernel/qplatformsurface.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gui/kernel/qplatformsurface.h') 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); -- cgit v1.2.3