diff options
author | Paul Olav Tvete <paul.tvete@qt.io> | 2017-02-16 14:58:13 +0100 |
---|---|---|
committer | Stephan Binner <stephan.binner@basyskom.com> | 2017-03-01 09:01:19 +0000 |
commit | 1399cacb6be044550bbd330b5ec77c1c1609b3ff (patch) | |
tree | a43013c893d738d2aca91ff256af91ec1d2c5715 /src/plugins/platforms/vnc/qvncscreen.cpp | |
parent | 0684f28984e748c80300f5b66b15a3a1f2462ce7 (diff) |
Fix build with -no-feature-cursor
Change-Id: I971dbe7827adf0cf06337348a0d011632c364725
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/plugins/platforms/vnc/qvncscreen.cpp')
-rw-r--r-- | src/plugins/platforms/vnc/qvncscreen.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/platforms/vnc/qvncscreen.cpp b/src/plugins/platforms/vnc/qvncscreen.cpp index 75c8bedff7..cd43ce4e69 100644 --- a/src/plugins/platforms/vnc/qvncscreen.cpp +++ b/src/plugins/platforms/vnc/qvncscreen.cpp @@ -58,8 +58,10 @@ QVncScreen::QVncScreen(const QStringList &args) QVncScreen::~QVncScreen() { +#if QT_CONFIG(cursor) if (clientCursor) delete clientCursor; +#endif } bool QVncScreen::initialize() @@ -120,17 +122,21 @@ QRegion QVncScreen::doRedraw() return touched; } + void QVncScreen::enableClientCursor(QVncClient *client) { +#if QT_CONFIG(cursor) delete mCursor; mCursor = nullptr; if (!clientCursor) clientCursor = new QVncClientCursor(); clientCursor->addClient(client); +#endif } void QVncScreen::disableClientCursor(QVncClient *client) { +#if QT_CONFIG(cursor) uint clientCount = clientCursor->removeClient(client); if (clientCount == 0) { delete clientCursor; @@ -138,11 +144,16 @@ void QVncScreen::disableClientCursor(QVncClient *client) } mCursor = new QFbCursor(this); +#endif } QPlatformCursor *QVncScreen::cursor() const { +#if QT_CONFIG(cursor) return mCursor ? static_cast<QPlatformCursor *>(mCursor) : static_cast<QPlatformCursor *>(clientCursor); +#else + return nullptr; +#endif } // grabWindow() grabs "from the screen" not from the backingstores. |