VirtualBox

Changeset 59413 in vbox


Ignore:
Timestamp:
Jan 20, 2016 10:19:03 AM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: Qt5 migration (part 67): Implementing keyboard handling for Qt5: Do not throw out event type, still required.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp

    r59403 r59413  
    16511651    return m_views[m_iKeyboardHookViewIndex]->winEvent(&message, &dummyResult);
    16521652#else /* QT_VERSION >= 0x050000 */
    1653     return m_views[m_iKeyboardHookViewIndex]->nativeEvent(&message);
     1653    QByteArray eventType("windows_generic_MSG");
     1654    return m_views[m_iKeyboardHookViewIndex]->nativeEvent(eventType, &message);
    16541655#endif /* QT_VERSION >= 0x050000 */
    16551656}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r59403 r59413  
    147147    {
    148148        /* Redirect event to parent: */
    149         Q_UNUSED(eventType); Q_UNUSED(pResult);
    150         return m_pParent->nativeEvent(pMessage);
     149        Q_UNUSED(pResult);
     150        return m_pParent->nativeEvent(eventType, pMessage);
    151151    }
    152152
     
    18851885#else /* QT_VERSION >= 0x050000 */
    18861886
    1887 bool UIMachineView::nativeEvent(void *pMessage)
     1887bool UIMachineView::nativeEvent(const QByteArray &eventType, void *pMessage)
    18881888{
    18891889# if defined(Q_WS_MAC)
     
    18931893# elif defined(Q_WS_WIN)
    18941894
    1895     /* Cast to generic MSG event: */
     1895    /* Make sure it's generic MSG event: */
     1896    if (eventType != "windows_generic_MSG")
     1897        return false;
    18961898    MSG *pEvent = static_cast<MSG*>(pMessage);
    18971899
     
    19181920    /* Make sure it's generic XCB event: */
    19191921    if (eventType != "xcb_generic_event_t")
    1920         return QAbstractScrollArea::nativeEvent(eventType, pMessage, pResult);
     1922        return false;
    19211923    xcb_generic_event_t *pEvent = static_cast<xcb_generic_event_t*>(pMessage);
    19221924
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r59403 r59413  
    375375      *           the Qt itself because it has another signature,
    376376      *           only by the keyboard-hook of the keyboard-handler. */
    377     virtual bool nativeEvent(void *pMessage);
     377    virtual bool nativeEvent(const QByteArray &eventType, void *pMessage);
    378378#endif /* QT_VERSION >= 0x050000 */
    379379
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