VirtualBox

Ignore:
Timestamp:
Oct 23, 2023 4:55:58 PM (16 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
159640
Message:

FE/Qt: bugref:10450: Get rid of Qt5 stuff; This one is about touch/enter events related stuff.

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  
    5757            AssertPtrReturn(pTouchEvent, QGraphicsView::event(pEvent));
    5858            /* For touch-screen event we have something special: */
    59 #ifdef VBOX_IS_QT6_OR_LATER /* QTouchDevice was consumed by QInputDevice in 6.0 */
    6059            if (pTouchEvent->device()->type() == QInputDevice::DeviceType::TouchScreen)
    61 #else
    62             if (pTouchEvent->device()->type() == QTouchDevice::TouchScreen)
    63 #endif
    6460            {
    6561                /* Remember where the scrolling was started: */
     
    7874            AssertPtrReturn(pTouchEvent, QGraphicsView::event(pEvent));
    7975            /* For touch-screen event we have something special: */
    80 #ifdef VBOX_IS_QT6_OR_LATER /* QTouchDevice was consumed by QInputDevice in 6.0 */
    8176            if (pTouchEvent->device()->type() == QInputDevice::DeviceType::TouchScreen)
    82 #else
    83             if (pTouchEvent->device()->type() == QTouchDevice::TouchScreen)
    84 #endif
    8577            {
    8678                /* Determine vertical shift (inverted): */
     
    10597            AssertPtrReturn(pTouchEvent, QGraphicsView::event(pEvent));
    10698            /* For touch-screen event we have something special: */
    107 #ifdef VBOX_IS_QT6_OR_LATER /* QTouchDevice was consumed by QInputDevice in 6.0 */
    10899            if (pTouchEvent->device()->type() == QInputDevice::DeviceType::TouchScreen)
    109 #else
    110             if (pTouchEvent->device()->type() == QTouchDevice::TouchScreen)
    111 #endif
    112100            {
    113101                /* Reset the scrolling start position: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp

    r101561 r101562  
    11921192        return true;
    11931193
    1194 #ifndef VBOX_IS_QT6_OR_LATER /* QTouchEvent::TouchPoint was replaced by QEventPoint in 6.0 */
    1195     QVector<LONG64> contacts(pTouchEvent->touchPoints().size());
    1196 #else
    11971194    QVector<LONG64> contacts(pTouchEvent->points().size());
    1198 #endif
    11991195
    12001196    long xShift = 0, yShift = 0;
    12011197
    1202 #ifdef VBOX_IS_QT6_OR_LATER /* QTouchDevice was consumed by QInputDevice in 6.0 */
    12031198    bool fTouchScreen = (pTouchEvent->device()->type() == QInputDevice::DeviceType::TouchScreen);
    1204 #else
    1205     bool fTouchScreen = (pTouchEvent->device()->type() == QTouchDevice::TouchScreen);
    1206 #endif
    12071199    /* Compatibility with previous behavior. If there is no touchpad configured
    12081200     * then treat all multitouch events as touchscreen ones: */
     
    12181210    /* Pass all multi-touch events into guest: */
    12191211    int iTouchPointIndex = 0;
    1220 #ifdef VBOX_IS_QT6_OR_LATER /* QTouchEvent::TouchPoint was replaced by QEventPoint in 6.0 */
    12211212    foreach (const QEventPoint &touchPoint, pTouchEvent->points())
    1222 #else
    1223     foreach (const QTouchEvent::TouchPoint &touchPoint, pTouchEvent->touchPoints())
    1224 #endif
    12251213    {
    12261214        /* Get touch-point state: */
     
    12281216        switch (touchPoint.state())
    12291217        {
    1230 #ifdef VBOX_IS_QT6_OR_LATER /* QTouchEvent::TouchPoint was replaced by QEventPoint in 6.0 */
    12311218            case QEventPoint::Pressed:
    12321219            case QEventPoint::Updated:
    12331220            case QEventPoint::Stationary:
    1234 #else
    1235             case Qt::TouchPointPressed:
    1236             case Qt::TouchPointMoved:
    1237             case Qt::TouchPointStationary:
    1238 #endif
    12391221                iTouchPointState = KTouchContactState_InContact;
    12401222                if (fTouchScreen)
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIStatusBarEditor.cpp

    r101561 r101562  
    103103
    104104    /** Handles mouse-press @a pEvent. */
    105     virtual void mousePressEvent(QMouseEvent *pEvent);
     105    virtual void mousePressEvent(QMouseEvent *pEvent) RT_OVERRIDE;
    106106    /** Handles mouse-release @a pEvent. */
    107     virtual void mouseReleaseEvent(QMouseEvent *pEvent);
     107    virtual void mouseReleaseEvent(QMouseEvent *pEvent) RT_OVERRIDE;
    108108    /** Handles mouse-enter @a pEvent. */
    109 #ifdef VBOX_IS_QT6_OR_LATER /* QWidget::enterEvent uses QEnterEvent since qt6 */
    110109    virtual void enterEvent(QEnterEvent *pEvent) RT_OVERRIDE;
    111 #else
    112     virtual void enterEvent(QEvent *pEvent) RT_OVERRIDE;
    113 #endif
    114110    /** Handles mouse-leave @a pEvent. */
    115     virtual void leaveEvent(QEvent *pEvent);
     111    virtual void leaveEvent(QEvent *pEvent) RT_OVERRIDE;
    116112    /** Handles mouse-move @a pEvent. */
    117     virtual void mouseMoveEvent(QMouseEvent *pEvent);
     113    virtual void mouseMoveEvent(QMouseEvent *pEvent) RT_OVERRIDE;
    118114
    119115private:
     
    320316}
    321317
    322 #ifdef VBOX_IS_QT6_OR_LATER /* QWidget::enterEvent uses QEnterEvent since qt6 */
    323318void UIStatusBarEditorButton::enterEvent(QEnterEvent*)
    324 #else
    325 void UIStatusBarEditorButton::enterEvent(QEvent*)
    326 #endif
    327319{
    328320    /* Make sure button isn't hovered: */
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp

    r100064 r101562  
    710710}
    711711
    712 #ifdef VBOX_IS_QT6_OR_LATER /* QWidget::enterEvent uses QEnterEvent since qt6 */
    713712void UIMiniToolBar::enterEvent(QEnterEvent*)
    714 #else
    715 void UIMiniToolBar::enterEvent(QEvent*)
    716 #endif
    717713{
    718714    /* Stop the hover-leave timer if necessary: */
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.h

    r100064 r101562  
    127127
    128128    /** Mouse enter @a pEvent handler. */
    129 #ifdef VBOX_IS_QT6_OR_LATER /* QWidget::enterEvent uses QEnterEvent since qt6 */
    130129    virtual void enterEvent(QEnterEvent *pEvent) RT_OVERRIDE;
    131 #else
    132     virtual void enterEvent(QEvent *pEvent) RT_OVERRIDE;
    133 #endif
    134130    /** Mouse leave @a pEvent handler. */
    135131    virtual void leaveEvent(QEvent *pEvent) RT_OVERRIDE;
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UITabBar.cpp

    r101561 r101562  
    125125    virtual void mouseMoveEvent(QMouseEvent *pEvent) RT_OVERRIDE;
    126126    /** Handles mouse-enter @a pEvent. */
    127 #ifdef VBOX_IS_QT6_OR_LATER /* QWidget::enterEvent uses QEnterEvent since qt6 */
    128127    virtual void enterEvent(QEnterEvent *pEvent) RT_OVERRIDE;
    129 #else
    130     virtual void enterEvent(QEvent *pEvent) RT_OVERRIDE;
    131 #endif
    132128    /** Handles mouse-leave @a pEvent. */
    133129    virtual void leaveEvent(QEvent *pEvent) RT_OVERRIDE;
     
    592588}
    593589
    594 #ifdef VBOX_IS_QT6_OR_LATER /* QWidget::enterEvent uses QEnterEvent since qt6 */
    595590void UITabBarItem::enterEvent(QEnterEvent *pEvent)
    596 #else
    597 void UITabBarItem::enterEvent(QEvent *pEvent)
    598 #endif
    599591{
    600592    /* Make sure button isn't hovered: */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette