From 1b76cf017427a98bf4487f3cf576611d82097539 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 24 Feb 2013 09:14:20 -0800 Subject: 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 Reviewed-by: Giuseppe D'Angelo Reviewed-by: Gunnar Sletta --- src/plugins/platforms/eglfs/qeglfscontext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/eglfs/qeglfscontext.cpp') 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); } -- cgit v1.2.3