diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2013-02-24 09:14:20 -0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-26 22:01:27 +0100 |
commit | 1b76cf017427a98bf4487f3cf576611d82097539 (patch) | |
tree | f7348ce5e47854ea1e608a873b19b4c6889e5a41 /src/plugins/platforms/eglfs/qeglfscontext.cpp | |
parent | bc5170f274572a4b262569c12d5d3c6ef892aaf2 (diff) |
EGLFS: Replace the global static 'hooks' variable with a function
Having a global static variable in a header is a poor choice to start
with. All .cpp including that header must use that variable or the
compiler will warn of an unused static.
Second, for the case of platform hooks, it's possible that it is reading
the value of a variable that isn't initialised yet.
Change-Id: Id823c2be9cfededb9c31fb76a9080d4122577ca4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfscontext.cpp')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfscontext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfscontext.cpp b/src/plugins/platforms/eglfs/qeglfscontext.cpp index 44bc9b2344..6bd0d35191 100644 --- a/src/plugins/platforms/eglfs/qeglfscontext.cpp +++ b/src/plugins/platforms/eglfs/qeglfscontext.cpp @@ -79,7 +79,7 @@ void QEglFSContext::swapBuffers(QPlatformSurface *surface) cursor->paintOnScreen(); } - hooks->waitForVSync(); + QEglFSHooks::hooks()->waitForVSync(); QEGLPlatformContext::swapBuffers(surface); } |