Changeset 101562 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Oct 23, 2023 4:55:58 PM (16 months ago)
- svn:sync-xref-src-repo-rev:
- 159640
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/graphics/QIGraphicsView.cpp
r98103 r101562 57 57 AssertPtrReturn(pTouchEvent, QGraphicsView::event(pEvent)); 58 58 /* For touch-screen event we have something special: */ 59 #ifdef VBOX_IS_QT6_OR_LATER /* QTouchDevice was consumed by QInputDevice in 6.0 */60 59 if (pTouchEvent->device()->type() == QInputDevice::DeviceType::TouchScreen) 61 #else62 if (pTouchEvent->device()->type() == QTouchDevice::TouchScreen)63 #endif64 60 { 65 61 /* Remember where the scrolling was started: */ … … 78 74 AssertPtrReturn(pTouchEvent, QGraphicsView::event(pEvent)); 79 75 /* For touch-screen event we have something special: */ 80 #ifdef VBOX_IS_QT6_OR_LATER /* QTouchDevice was consumed by QInputDevice in 6.0 */81 76 if (pTouchEvent->device()->type() == QInputDevice::DeviceType::TouchScreen) 82 #else83 if (pTouchEvent->device()->type() == QTouchDevice::TouchScreen)84 #endif85 77 { 86 78 /* Determine vertical shift (inverted): */ … … 105 97 AssertPtrReturn(pTouchEvent, QGraphicsView::event(pEvent)); 106 98 /* For touch-screen event we have something special: */ 107 #ifdef VBOX_IS_QT6_OR_LATER /* QTouchDevice was consumed by QInputDevice in 6.0 */108 99 if (pTouchEvent->device()->type() == QInputDevice::DeviceType::TouchScreen) 109 #else110 if (pTouchEvent->device()->type() == QTouchDevice::TouchScreen)111 #endif112 100 { 113 101 /* Reset the scrolling start position: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
r101561 r101562 1192 1192 return true; 1193 1193 1194 #ifndef VBOX_IS_QT6_OR_LATER /* QTouchEvent::TouchPoint was replaced by QEventPoint in 6.0 */1195 QVector<LONG64> contacts(pTouchEvent->touchPoints().size());1196 #else1197 1194 QVector<LONG64> contacts(pTouchEvent->points().size()); 1198 #endif1199 1195 1200 1196 long xShift = 0, yShift = 0; 1201 1197 1202 #ifdef VBOX_IS_QT6_OR_LATER /* QTouchDevice was consumed by QInputDevice in 6.0 */1203 1198 bool fTouchScreen = (pTouchEvent->device()->type() == QInputDevice::DeviceType::TouchScreen); 1204 #else1205 bool fTouchScreen = (pTouchEvent->device()->type() == QTouchDevice::TouchScreen);1206 #endif1207 1199 /* Compatibility with previous behavior. If there is no touchpad configured 1208 1200 * then treat all multitouch events as touchscreen ones: */ … … 1218 1210 /* Pass all multi-touch events into guest: */ 1219 1211 int iTouchPointIndex = 0; 1220 #ifdef VBOX_IS_QT6_OR_LATER /* QTouchEvent::TouchPoint was replaced by QEventPoint in 6.0 */1221 1212 foreach (const QEventPoint &touchPoint, pTouchEvent->points()) 1222 #else1223 foreach (const QTouchEvent::TouchPoint &touchPoint, pTouchEvent->touchPoints())1224 #endif1225 1213 { 1226 1214 /* Get touch-point state: */ … … 1228 1216 switch (touchPoint.state()) 1229 1217 { 1230 #ifdef VBOX_IS_QT6_OR_LATER /* QTouchEvent::TouchPoint was replaced by QEventPoint in 6.0 */1231 1218 case QEventPoint::Pressed: 1232 1219 case QEventPoint::Updated: 1233 1220 case QEventPoint::Stationary: 1234 #else1235 case Qt::TouchPointPressed:1236 case Qt::TouchPointMoved:1237 case Qt::TouchPointStationary:1238 #endif1239 1221 iTouchPointState = KTouchContactState_InContact; 1240 1222 if (fTouchScreen) -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIStatusBarEditor.cpp
r101561 r101562 103 103 104 104 /** Handles mouse-press @a pEvent. */ 105 virtual void mousePressEvent(QMouseEvent *pEvent) ;105 virtual void mousePressEvent(QMouseEvent *pEvent) RT_OVERRIDE; 106 106 /** Handles mouse-release @a pEvent. */ 107 virtual void mouseReleaseEvent(QMouseEvent *pEvent) ;107 virtual void mouseReleaseEvent(QMouseEvent *pEvent) RT_OVERRIDE; 108 108 /** Handles mouse-enter @a pEvent. */ 109 #ifdef VBOX_IS_QT6_OR_LATER /* QWidget::enterEvent uses QEnterEvent since qt6 */110 109 virtual void enterEvent(QEnterEvent *pEvent) RT_OVERRIDE; 111 #else112 virtual void enterEvent(QEvent *pEvent) RT_OVERRIDE;113 #endif114 110 /** Handles mouse-leave @a pEvent. */ 115 virtual void leaveEvent(QEvent *pEvent) ;111 virtual void leaveEvent(QEvent *pEvent) RT_OVERRIDE; 116 112 /** Handles mouse-move @a pEvent. */ 117 virtual void mouseMoveEvent(QMouseEvent *pEvent) ;113 virtual void mouseMoveEvent(QMouseEvent *pEvent) RT_OVERRIDE; 118 114 119 115 private: … … 320 316 } 321 317 322 #ifdef VBOX_IS_QT6_OR_LATER /* QWidget::enterEvent uses QEnterEvent since qt6 */323 318 void UIStatusBarEditorButton::enterEvent(QEnterEvent*) 324 #else325 void UIStatusBarEditorButton::enterEvent(QEvent*)326 #endif327 319 { 328 320 /* Make sure button isn't hovered: */ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
r100064 r101562 710 710 } 711 711 712 #ifdef VBOX_IS_QT6_OR_LATER /* QWidget::enterEvent uses QEnterEvent since qt6 */713 712 void UIMiniToolBar::enterEvent(QEnterEvent*) 714 #else715 void UIMiniToolBar::enterEvent(QEvent*)716 #endif717 713 { 718 714 /* Stop the hover-leave timer if necessary: */ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.h
r100064 r101562 127 127 128 128 /** Mouse enter @a pEvent handler. */ 129 #ifdef VBOX_IS_QT6_OR_LATER /* QWidget::enterEvent uses QEnterEvent since qt6 */130 129 virtual void enterEvent(QEnterEvent *pEvent) RT_OVERRIDE; 131 #else132 virtual void enterEvent(QEvent *pEvent) RT_OVERRIDE;133 #endif134 130 /** Mouse leave @a pEvent handler. */ 135 131 virtual void leaveEvent(QEvent *pEvent) RT_OVERRIDE; -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UITabBar.cpp
r101561 r101562 125 125 virtual void mouseMoveEvent(QMouseEvent *pEvent) RT_OVERRIDE; 126 126 /** Handles mouse-enter @a pEvent. */ 127 #ifdef VBOX_IS_QT6_OR_LATER /* QWidget::enterEvent uses QEnterEvent since qt6 */128 127 virtual void enterEvent(QEnterEvent *pEvent) RT_OVERRIDE; 129 #else130 virtual void enterEvent(QEvent *pEvent) RT_OVERRIDE;131 #endif132 128 /** Handles mouse-leave @a pEvent. */ 133 129 virtual void leaveEvent(QEvent *pEvent) RT_OVERRIDE; … … 592 588 } 593 589 594 #ifdef VBOX_IS_QT6_OR_LATER /* QWidget::enterEvent uses QEnterEvent since qt6 */595 590 void UITabBarItem::enterEvent(QEnterEvent *pEvent) 596 #else597 void UITabBarItem::enterEvent(QEvent *pEvent)598 #endif599 591 { 600 592 /* Make sure button isn't hovered: */
Note:
See TracChangeset
for help on using the changeset viewer.