From 7b1058ac92276b81b1d5164fb4ba651421df7990 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 6 Mar 2014 12:01:54 +0100 Subject: Do not attempt to open multiple windows in hellowindow on embedded Platforms like eglfs will not allow opening more than one OpenGL-based window. To prevent aborting the hellowindow example when invoked without --single, enhance the capability check to include also WindowManagement in addition to ThreadedOpenGL. Change-Id: I147d90b31d9fd94912c36339d36af3f311aaa874 Reviewed-by: Andy Nichols --- examples/opengl/hellowindow/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/opengl/hellowindow/main.cpp b/examples/opengl/hellowindow/main.cpp index d6802a8e20..5b2552ee3e 100644 --- a/examples/opengl/hellowindow/main.cpp +++ b/examples/opengl/hellowindow/main.cpp @@ -51,8 +51,9 @@ int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); - const bool multipleWindows = - QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL) + QPlatformIntegration *integ = QGuiApplicationPrivate::platformIntegration(); + const bool multipleWindows = integ->hasCapability(QPlatformIntegration::ThreadedOpenGL) + && integ->hasCapability(QPlatformIntegration::WindowManagement) && !QGuiApplication::arguments().contains(QStringLiteral("--single")); QScreen *screen = QGuiApplication::primaryScreen(); -- cgit v1.2.3