diff options
author | Louai Al-Khanji <louai.al-khanji@digia.com> | 2014-09-16 09:52:00 +0300 |
---|---|---|
committer | Louai Al-Khanji <louai.al-khanji@digia.com> | 2014-09-16 10:35:35 +0200 |
commit | fb44d3838a0a35cbc0d23323c614deaac986507f (patch) | |
tree | a5609ef3c5400e4c5cbb7e634d02275ab513e9e7 /src/plugins/platforms/eglfs | |
parent | e22fcc8c062a927b91ac8f674a74d8325679bcc1 (diff) |
EGLFS: Do not assume all hooks will want to create a QEGLPlatformCursor
Change-Id: I05502c27d697524fb4c4d4ccc3aec0e59589fe24
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/plugins/platforms/eglfs')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfscontext.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfshooks.h | 3 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfshooks_stub.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfsscreen.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfsscreen.h | 3 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfswindow.cpp | 2 |
6 files changed, 6 insertions, 8 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfscontext.cpp b/src/plugins/platforms/eglfs/qeglfscontext.cpp index fc9eaa08b2..1459bed175 100644 --- a/src/plugins/platforms/eglfs/qeglfscontext.cpp +++ b/src/plugins/platforms/eglfs/qeglfscontext.cpp @@ -70,7 +70,7 @@ void QEglFSContext::swapBuffers(QPlatformSurface *surface) // draw the cursor if (surface->surface()->surfaceClass() == QSurface::Window) { QPlatformWindow *window = static_cast<QPlatformWindow *>(surface); - if (QEGLPlatformCursor *cursor = static_cast<QEGLPlatformCursor *>(window->screen()->cursor())) + if (QEGLPlatformCursor *cursor = qobject_cast<QEGLPlatformCursor *>(window->screen()->cursor())) cursor->paintOnScreen(); } diff --git a/src/plugins/platforms/eglfs/qeglfshooks.h b/src/plugins/platforms/eglfs/qeglfshooks.h index f4193ce7c4..45bb6510c9 100644 --- a/src/plugins/platforms/eglfs/qeglfshooks.h +++ b/src/plugins/platforms/eglfs/qeglfshooks.h @@ -50,7 +50,6 @@ QT_BEGIN_NAMESPACE -class QEGLPlatformCursor; class QEglFSScreen; class QEglFSHooks @@ -73,7 +72,7 @@ public: const QSurfaceFormat &format); virtual void destroyNativeWindow(EGLNativeWindowType window); virtual bool hasCapability(QPlatformIntegration::Capability cap) const; - virtual QEGLPlatformCursor *createCursor(QPlatformScreen *screen) const; + virtual QPlatformCursor *createCursor(QPlatformScreen *screen) const; virtual bool filterConfig(EGLDisplay display, EGLConfig config) const; virtual void waitForVSync() const; virtual void presentBuffer(); diff --git a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp index 0efdf84b48..1448391eb4 100644 --- a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp +++ b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp @@ -181,7 +181,7 @@ bool QEglFSHooks::hasCapability(QPlatformIntegration::Capability cap) const return false; } -QEGLPlatformCursor *QEglFSHooks::createCursor(QPlatformScreen *screen) const +QPlatformCursor *QEglFSHooks::createCursor(QPlatformScreen *screen) const { return new QEGLPlatformCursor(screen); } diff --git a/src/plugins/platforms/eglfs/qeglfsscreen.cpp b/src/plugins/platforms/eglfs/qeglfsscreen.cpp index 31f6ac5be6..a889053fbc 100644 --- a/src/plugins/platforms/eglfs/qeglfsscreen.cpp +++ b/src/plugins/platforms/eglfs/qeglfsscreen.cpp @@ -42,7 +42,7 @@ #include "qeglfsscreen.h" #include "qeglfswindow.h" #include "qeglfshooks.h" -#include <QtPlatformSupport/private/qeglplatformcursor_p.h> +#include <QtGui/qpa/qplatformcursor.h> QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/eglfs/qeglfsscreen.h b/src/plugins/platforms/eglfs/qeglfsscreen.h index 13f7cfddd8..2f3b29756d 100644 --- a/src/plugins/platforms/eglfs/qeglfsscreen.h +++ b/src/plugins/platforms/eglfs/qeglfsscreen.h @@ -50,7 +50,6 @@ QT_BEGIN_NAMESPACE -class QEGLPlatformCursor; class QEglFSWindow; class QOpenGLContext; @@ -87,7 +86,7 @@ private: EGLDisplay m_dpy; EGLSurface m_surface; - QEGLPlatformCursor *m_cursor; + QPlatformCursor *m_cursor; QEGLPlatformWindow *m_rootWindow; QOpenGLContext *m_rootContext; }; diff --git a/src/plugins/platforms/eglfs/qeglfswindow.cpp b/src/plugins/platforms/eglfs/qeglfswindow.cpp index 1f67170efc..efc4faed59 100644 --- a/src/plugins/platforms/eglfs/qeglfswindow.cpp +++ b/src/plugins/platforms/eglfs/qeglfswindow.cpp @@ -124,7 +124,7 @@ void QEglFSWindow::destroy() { QEglFSScreen *screen = this->screen(); if (m_flags.testFlag(HasNativeWindow)) { - QEGLPlatformCursor *cursor = static_cast<QEGLPlatformCursor *>(screen->cursor()); + QEGLPlatformCursor *cursor = qobject_cast<QEGLPlatformCursor *>(screen->cursor()); if (cursor) cursor->resetResources(); |