From d095a300728372fab107df27fdf4edc9d2164bfc Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Fri, 23 Apr 2010 23:52:10 +0200 Subject: Fix for EGL for symbian on 3.1/3.2/5.0, define QT_NO_EGL. Reviewed-by: Jason Barron --- src/gui/egl/egl.pri | 1 + src/gui/egl/qegl.cpp | 10 ++++++++++ src/gui/egl/qegl_p.h | 4 ++-- src/gui/egl/qegl_stub.cpp | 12 ++++++++++++ 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/gui/egl/egl.pri b/src/gui/egl/egl.pri index 65b1636..bf25438 100644 --- a/src/gui/egl/egl.pri +++ b/src/gui/egl/egl.pri @@ -23,6 +23,7 @@ contains(QT_CONFIG, egl): { } } } else:symbian { + DEFINES += QT_NO_EGL SOURCES += egl/qegl_stub.cpp SOURCES += egl/qeglproperties_stub.cpp } diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index 0ed95ea..ee19216 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -333,6 +333,16 @@ bool QEglContext::configAttrib(int name, EGLint *value) const return eglGetConfigAttrib(display(), cfg, name, value); } +void QEglContext::clearError() +{ + eglGetError(); +} + +EGLint QEglContext::error() +{ + return eglGetError(); +} + // Retrieve all of the properties on "cfg". If zero, return // the context's configuration. QEglProperties QEglContext::configProperties(EGLConfig cfg) const diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index 87ed818..e08e1dd 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -102,8 +102,8 @@ public: bool configAttrib(int name, EGLint *value) const; - static void clearError() { eglGetError(); } - static EGLint error() { return eglGetError(); } + static void clearError(); + static EGLint error(); static QString errorString(EGLint code); static EGLDisplay display(); diff --git a/src/gui/egl/qegl_stub.cpp b/src/gui/egl/qegl_stub.cpp index e280739..0363103 100644 --- a/src/gui/egl/qegl_stub.cpp +++ b/src/gui/egl/qegl_stub.cpp @@ -165,6 +165,18 @@ bool QEglContext::configAttrib(int name, EGLint *value) const return false; } +void QEglContext::clearError() +{ + NOEGL + return; +} + +EGLint QEglContext::error() +{ + NOEGL + return 0; +} + EGLDisplay QEglContext::display() { NOEGL -- cgit v0.12