VirtualBox

Ignore:
Timestamp:
Dec 22, 2022 10:48:48 AM (2 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9898: Migrating UIKeyboardHandler bits to Qt6.

File:
1 edited

Legend:

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

    r96407 r97853  
    17531753        {
    17541754            /* Send prepared scan-codes to the guest: */
    1755 #ifdef VBOX_IS_QT6_OR_LATER
    17561755            QVector<LONG> scancodes;
    1757             for (uint i = 0; i < uCodesCount; i++)
    1758                 scancodes.push_back(pCodes[i]);
     1756            for (uint i = 0; i < uCodesCount; ++i)
     1757                scancodes.append(pCodes[i]);
    17591758            keyboard().PutScancodes(scancodes);
    1760 #else
    1761             std::vector<LONG> scancodes(pCodes, &pCodes[uCodesCount]);
    1762             keyboard().PutScancodes(QVector<LONG>::fromStdVector(scancodes));
    1763 #endif
    17641759        }
    17651760
     
    17841779    Q_UNUSED(iHotKey);
    17851780    if (pHotKey && pHotKey[0] && !pHotKey[1])
    1786 # ifdef VBOX_IS_QT6_OR_LATER
    17871781        fWasProcessed = actionPool()->processHotKey(QKeySequence(QChar(pHotKey[0]).toUpper().unicode()));
    1788 # else
    1789         fWasProcessed = actionPool()->processHotKey(QKeySequence(Qt::UNICODE_ACCEL + QChar(pHotKey[0]).toUpper().unicode()));
    1790 # endif
    17911782
    17921783#elif defined(VBOX_WS_WIN)
     
    18221813        {
    18231814            QChar qtSymbol = QString::fromLocal8Bit(&symbol, 1)[0];
    1824 # ifdef VBOX_IS_QT6_OR_LATER
    18251815            fWasProcessed = actionPool()->processHotKey(QKeySequence(qtSymbol.toUpper().unicode()));
    1826 # else
    1827             fWasProcessed = actionPool()->processHotKey(QKeySequence((Qt::UNICODE_ACCEL + qtSymbol.toUpper().unicode())));
    1828 # endif
    18291816        }
    18301817    }
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