diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-03-06 12:01:54 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-06 12:21:14 +0100 |
commit | 7b1058ac92276b81b1d5164fb4ba651421df7990 (patch) | |
tree | 4bbd6c40c55786eb138768ee0145291e645dae27 /examples/opengl/hellowindow | |
parent | cd652500af18671e0d64b30d51c79a0c45b973a3 (diff) |
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 <andy.nichols@digia.com>
Diffstat (limited to 'examples/opengl/hellowindow')
-rw-r--r-- | examples/opengl/hellowindow/main.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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(); |