From 4b7a4c40d83b9bf64867bd90ddb059e8630f8167 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Mon, 11 Jun 2012 08:04:41 -0700 Subject: [PATCH] eglfs: mark overriden methods with Q_DECL_OVERRIDE The current cursor implementation can be a bit hard to read without hints about which methods are overriden. Change-Id: I3376890a13be46e1ece03d1442dd5a15ccd61382 Reviewed-by: Johannes Zellner Reviewed-by: Thiago Macieira --- mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp | 9 +++++---- src/plugins/platforms/eglfs/qeglfscursor.h | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp b/mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp index eb3357d2ac..62efa73d7f 100644 --- a/mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp +++ b/mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp @@ -201,7 +201,7 @@ public: eglMakeCurrent(m_screen->display(), EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); } - void changeCursor(QCursor *cursor, QWindow *window) { + void changeCursor(QCursor *cursor, QWindow *window) Q_DECL_OVERRIDE { if (!setCurrentCursor(cursor)) return; @@ -214,18 +214,19 @@ public: drawInLayer(); } - void setPos(const QPoint &pos) { + void setPos(const QPoint &pos) Q_DECL_OVERRIDE { m_pos = pos; moveDispmanxLayer(m_window, cursorRect().topLeft()); } - void pointerEvent(const QMouseEvent &event) { + void pointerEvent(const QMouseEvent &event) Q_DECL_OVERRIDE { if (event.type() != QEvent::MouseMove) return; m_pos = event.pos(); moveDispmanxLayer(m_window, cursorRect().topLeft()); } - void paintOnScreen() { } + + void paintOnScreen() Q_DECL_OVERRIDE { } private: EGLConfig m_config; EGLContext m_context; diff --git a/src/plugins/platforms/eglfs/qeglfscursor.h b/src/plugins/platforms/eglfs/qeglfscursor.h index 464b52e195..4a3ba8968b 100644 --- a/src/plugins/platforms/eglfs/qeglfscursor.h +++ b/src/plugins/platforms/eglfs/qeglfscursor.h @@ -57,11 +57,11 @@ public: QEglFSCursor(QEglFSScreen *screen); ~QEglFSCursor(); - void changeCursor(QCursor *cursor, QWindow *widget); - void pointerEvent(const QMouseEvent &event); + void changeCursor(QCursor *cursor, QWindow *widget) Q_DECL_OVERRIDE; + void pointerEvent(const QMouseEvent &event) Q_DECL_OVERRIDE; - QPoint pos() const; - void setPos(const QPoint &pos); + QPoint pos() const Q_DECL_OVERRIDE; + void setPos(const QPoint &pos) Q_DECL_OVERRIDE; QRect cursorRect() const;