diff options
author | Thomas McGuire <thomas.mcguire@kdab.com> | 2012-03-29 15:20:35 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-30 21:51:14 +0200 |
commit | 5d7f7e6559bb78795c0572a605c2e635d28ec017 (patch) | |
tree | 9f71fdc0ed084b2909a77b771b67d32a78c309f2 /src/plugins/platforms/qnx/qqnxglcontext.cpp | |
parent | d8c98de3999f034bc8ea17c866d4d8c4997f9441 (diff) |
Don't assume windows and GL contexts are created on the primary screen
Change-Id: Ib4f1c377bf93b1041b5f5e3fc56c0e01e35aeb38
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxglcontext.cpp')
-rw-r--r-- | src/plugins/platforms/qnx/qqnxglcontext.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/qnx/qqnxglcontext.cpp b/src/plugins/platforms/qnx/qqnxglcontext.cpp index d620feb710..882b71753e 100644 --- a/src/plugins/platforms/qnx/qqnxglcontext.cpp +++ b/src/plugins/platforms/qnx/qqnxglcontext.cpp @@ -48,6 +48,7 @@ #include <QtCore/QDebug> #include <QtGui/QOpenGLContext> +#include <QtGui/QScreen> QT_BEGIN_NAMESPACE @@ -103,7 +104,7 @@ QQnxGLContext::QQnxGLContext(QOpenGLContext *glContext) // Check if all channels are don't care if (alphaSize == -1 && redSize == -1 && greenSize == -1 && blueSize == -1) { // Set colour channels based on depth of window's screen - QQnxScreen *screen = static_cast<QQnxScreen*>(QQnxScreen::screens().first()); + QQnxScreen *screen = static_cast<QQnxScreen*>(glContext->screen()->handle()); int depth = screen->depth(); if (depth == 32) { // SCREEN_FORMAT_RGBA8888 |