From 1399cacb6be044550bbd330b5ec77c1c1609b3ff Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Thu, 16 Feb 2017 14:58:13 +0100 Subject: Fix build with -no-feature-cursor Change-Id: I971dbe7827adf0cf06337348a0d011632c364725 Reviewed-by: Lars Knoll --- src/plugins/platforms/vnc/qvnc.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/plugins/platforms/vnc/qvnc.cpp') diff --git a/src/plugins/platforms/vnc/qvnc.cpp b/src/plugins/platforms/vnc/qvnc.cpp index a45bb1c19c..fa65e8c9a4 100644 --- a/src/plugins/platforms/vnc/qvnc.cpp +++ b/src/plugins/platforms/vnc/qvnc.cpp @@ -531,13 +531,12 @@ void QRfbRawEncoder::write() socket->flush(); } +#if QT_CONFIG(cursor) QVncClientCursor::QVncClientCursor() { -#ifndef QT_NO_CURSOR QWindow *w = QGuiApplication::focusWindow(); QCursor c = w ? w->cursor() : QCursor(Qt::ArrowCursor); changeCursor(&c, 0); -#endif } QVncClientCursor::~QVncClientCursor() @@ -587,7 +586,6 @@ void QVncClientCursor::write(QVncClient *client) const void QVncClientCursor::changeCursor(QCursor *widgetCursor, QWindow *window) { Q_UNUSED(window); -#ifndef QT_NO_CURSOR const Qt::CursorShape shape = widgetCursor ? widgetCursor->shape() : Qt::ArrowCursor; if (shape == Qt::BitmapCursor) { @@ -601,9 +599,6 @@ void QVncClientCursor::changeCursor(QCursor *widgetCursor, QWindow *window) cursor = *platformImage.image(); hotspot = platformImage.hotspot(); } -#else // !QT_NO_CURSOR - Q_UNUSED(widgetCursor); -#endif for (auto client : clients) client->setDirtyCursor(); } @@ -619,6 +614,7 @@ uint QVncClientCursor::removeClient(QVncClient *client) clients.removeOne(client); return clients.count(); } +#endif // QT_CONFIG(cursor) QVncServer::QVncServer(QVncScreen *screen, quint16 port) : qvnc_screen(screen) -- cgit v1.2.3