From 656c4919bcb148e39f78ad0b6ebff767bb59fe4e Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 4 Feb 2021 15:31:06 +0100 Subject: [PATCH] Qt4: [skip ci] fix build failure --- src/Mod/Sketcher/Gui/DrawSketchHandler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandler.cpp b/src/Mod/Sketcher/Gui/DrawSketchHandler.cpp index eac2fdb258..16d32274bd 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandler.cpp +++ b/src/Mod/Sketcher/Gui/DrawSketchHandler.cpp @@ -29,7 +29,9 @@ # include # include # include +# if QT_VERSION >= 0x050000 # include +# endif # include #endif // #ifndef _PreComp_ @@ -116,11 +118,13 @@ void DrawSketchHandler::setSvgCursor(const QString & cursorName, int x, int y, c qreal defaultCursorSize = isRatioOne ? 64 : 32; qreal hotX = x; qreal hotY = y; +#if QT_VERSION >= 0x050000 #if !defined(Q_OS_WIN32) && !defined(Q_OS_MAC) if (qGuiApp->platformName() == QLatin1String("xcb")) { hotX *= pRatio; hotY *= pRatio; } +#endif #endif qreal cursorSize = defaultCursorSize * pRatio; @@ -159,11 +163,13 @@ void DrawSketchHandler::setCursor(const QPixmap &p,int x,int y, bool autoScale) #endif qreal hotX = x; qreal hotY = y; +#if QT_VERSION >= 0x050000 #if !defined(Q_OS_WIN32) && !defined(Q_OS_MAC) if (qGuiApp->platformName() == QLatin1String("xcb")) { hotX *= pRatio; hotY *= pRatio; } +#endif #endif cursor = QCursor(p1, hotX, hotY); } else {