summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/vnc
diff options
context:
space:
mode:
authorAndrew Knight <andrew.knight@intopalo.com>2016-11-07 21:11:09 +0100
committerAndrew Knight <andrew.knight@intopalo.com>2016-11-08 07:35:09 +0000
commit14805de3d9584157fed9da8f8955446d2292846f (patch)
treeeff67da72e704c475b5adf9ae8bf44083e5c82ec /src/plugins/platforms/vnc
parent969bb10eed646313209fcdd9b84605aa98fc88de (diff)
Fix build with -no-feature-cursor
Change-Id: I0644342c56facefab611f981690d0c7a2a460e7e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/plugins/platforms/vnc')
-rw-r--r--src/plugins/platforms/vnc/qvnc.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/platforms/vnc/qvnc.cpp b/src/plugins/platforms/vnc/qvnc.cpp
index f386be193d..a45bb1c19c 100644
--- a/src/plugins/platforms/vnc/qvnc.cpp
+++ b/src/plugins/platforms/vnc/qvnc.cpp
@@ -533,9 +533,11 @@ void QRfbRawEncoder::write()
QVncClientCursor::QVncClientCursor()
{
+#ifndef QT_NO_CURSOR
QWindow *w = QGuiApplication::focusWindow();
QCursor c = w ? w->cursor() : QCursor(Qt::ArrowCursor);
changeCursor(&c, 0);
+#endif
}
QVncClientCursor::~QVncClientCursor()
@@ -582,10 +584,10 @@ void QVncClientCursor::write(QVncClient *client) const
socket->write((const char*)bitmap.scanLine(i), width);
}
-#ifndef QT_NO_CURSOR
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) {
@@ -599,6 +601,9 @@ 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();
}
@@ -614,7 +619,6 @@ uint QVncClientCursor::removeClient(QVncClient *client)
clients.removeOne(client);
return clients.count();
}
-#endif
QVncServer::QVncServer(QVncScreen *screen, quint16 port)
: qvnc_screen(screen)