From 16c2622fe7e8e43bdb6447399c816cd22c3c2f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 11 Jan 2012 13:16:24 +0100 Subject: Made it possible to report screen changes through QWindowSystemInterface. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes it possible for platform plugin independent code (such as generic plugins) to report changes to screen properties. An example would be an accelerometer plugin that reports orientation changes without knowing anything about the windowing system. Change-Id: I984984b6d064327772c264bc942269422451da37 Reviewed-by: Jørgen Lind --- src/gui/kernel/qplatformintegration_qpa.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gui/kernel/qplatformintegration_qpa.cpp') diff --git a/src/gui/kernel/qplatformintegration_qpa.cpp b/src/gui/kernel/qplatformintegration_qpa.cpp index b35af1e8b7..23ecf3add4 100644 --- a/src/gui/kernel/qplatformintegration_qpa.cpp +++ b/src/gui/kernel/qplatformintegration_qpa.cpp @@ -46,6 +46,7 @@ #include #include #include +#include #include QT_BEGIN_NAMESPACE @@ -255,11 +256,10 @@ QVariant QPlatformIntegration::styleHint(StyleHint hint) const */ void QPlatformIntegration::screenAdded(QPlatformScreen *ps) { - QScreen *screen = ps ? ps->screen() : 0; - if (screen && !QGuiApplicationPrivate::screen_list.contains(screen)) { - QGuiApplicationPrivate::screen_list << screen; - emit qGuiApp->screenAdded(screen); - } + QScreen *screen = new QScreen(ps); + ps->d_func()->screen = screen; + QGuiApplicationPrivate::screen_list << screen; + emit qGuiApp->screenAdded(screen); } class QPlatformTheme *QPlatformIntegration::platformTheme() const -- cgit v1.2.3