Index: /trunk/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsView.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsView.cpp	(revision 58851)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsView.cpp	(revision 58852)
@@ -52,5 +52,9 @@
             AssertPtrReturn(pTouchEvent, QGraphicsView::event(pEvent));
             /* For touch-screen event we have something special: */
+#if QT_VERSION >= 0x050000
+            if (pTouchEvent->device()->type() == QTouchDevice::TouchScreen)
+#else /* QT_VERSION < 0x050000 */
             if (pTouchEvent->deviceType() == QTouchEvent::TouchScreen)
+#endif /* QT_VERSION < 0x050000 */
             {
                 /* Remember where the scrolling was started: */
@@ -69,5 +73,9 @@
             AssertPtrReturn(pTouchEvent, QGraphicsView::event(pEvent));
             /* For touch-screen event we have something special: */
+#if QT_VERSION >= 0x050000
+            if (pTouchEvent->device()->type() == QTouchDevice::TouchScreen)
+#else /* QT_VERSION < 0x050000 */
             if (pTouchEvent->deviceType() == QTouchEvent::TouchScreen)
+#endif /* QT_VERSION < 0x050000 */
             {
                 /* Determine vertical shift (inverted): */
@@ -92,5 +100,9 @@
             AssertPtrReturn(pTouchEvent, QGraphicsView::event(pEvent));
             /* For touch-screen event we have something special: */
+#if QT_VERSION >= 0x050000
+            if (pTouchEvent->device()->type() == QTouchDevice::TouchScreen)
+#else /* QT_VERSION < 0x050000 */
             if (pTouchEvent->deviceType() == QTouchEvent::TouchScreen)
+#endif /* QT_VERSION < 0x050000 */
             {
                 /* Reset the scrolling start position: */
