Changeset 94029 in vbox
- Timestamp:
- Mar 1, 2022 11:09:14 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 150262
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r94014 r94029 3165 3165 3166 3166 /* Invalidate all known menus: */ 3167 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) 3168 QList<int> const updateHandlerKeys = m_menuUpdateHandlers.keys(); 3169 m_invalidations.unite(QSet<int>(updateHandlerKeys.begin(), updateHandlerKeys.end())); 3170 #else 3167 3171 m_invalidations.unite(m_menuUpdateHandlers.keys().toSet()); 3172 #endif 3168 3173 3169 3174 /* Apply language settings: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp
r93996 r94029 212 212 /* Get new group list/set: */ 213 213 const QStringList &newGroupList = m_newLists.value(strId); 214 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) 215 const UIStringSet newGroupSet(newGroupList.begin(), newGroupList.end()); 216 #else 214 217 const UIStringSet &newGroupSet = UIStringSet::fromList(newGroupList); 218 #endif 215 219 /* Get old group list/set: */ 216 220 const QStringList &oldGroupList = m_oldLists.value(strId); 221 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) 222 const UIStringSet oldGroupSet(oldGroupList.begin(), oldGroupList.end()); 223 #else 217 224 const UIStringSet &oldGroupSet = UIStringSet::fromList(oldGroupList); 225 #endif 218 226 /* Make sure group set changed: */ 219 227 if (newGroupSet == oldGroupSet) … … 899 907 /* Remove unregistered cloud VM nodes: */ 900 908 if (!unregisteredIDs.isEmpty()) 909 { 910 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) 911 QList<QUuid> listUnregisteredIDs(unregisteredIDs.begin(), unregisteredIDs.end()); 912 #else 913 QList<QUuid> listUnregisteredIDs = unregisteredIDs.toList(); 914 #endif 901 915 sltCloudMachinesUnregistered(guiCloudProfileKey.m_strProviderShortName, 902 916 guiCloudProfileKey.m_strProfileName, 903 unregisteredIDs.toList()); 917 listUnregisteredIDs); 918 } 904 919 /* Add registered cloud VM nodes: */ 905 920 if (!registeredMachines.isEmpty()) -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r94004 r94029 429 429 430 430 /* If we have at least one of those items currently selected: */ 431 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) 432 { 433 QList<UIChooserItem *> selectedItemsList = selectedItems(); 434 QSet<UIChooserItem *> selectedItemsSet(selectedItemsList.begin(), selectedItemsList.end()); 435 if (selectedItemsSet.intersects(matchedItems)) 436 setSelectedItem(findClosestUnselectedItem()); 437 } 438 #else 431 439 if (selectedItems().toSet().intersects(matchedItems)) 432 440 setSelectedItem(findClosestUnselectedItem()); 441 #endif 433 442 434 443 /* If global item is currently chosen, selection should be invalidated: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
r94013 r94029 1436 1436 bool UIKeyboardHandler::keyEventHandleNormal(int iKey, uint8_t uScan, int fFlags, LONG *pCodes, uint *puCodesCount) 1437 1437 { 1438 /* Get host-combo key list: */1439 QSet<int> allHostComboKeys = UIHostCombo::toKeyCodeList(gEDataManager->hostKeyCombination()).toSet();1440 1438 /* Get the type of key - simple or extended: */ 1441 1439 uint8_t uWhatPressed = fFlags & KeyExtended ? IsExtKeyPressed : IsKeyPressed; … … 1478 1476 /* Ignore key-release if that key was NOT pressed before, 1479 1477 * but only if thats not one of the host-combination keys: */ 1480 else if (!allHostComboKeys.contains(iKey)) 1481 return true; 1478 else 1479 { 1480 /* Get host-combo key list: */ 1481 QList<int> lstAllHostComboKey = UIHostCombo::toKeyCodeList(gEDataManager->hostKeyCombination()); 1482 if (!lstAllHostComboKey.contains(iKey)) 1483 return true; 1484 } 1482 1485 return false; 1483 1486 } … … 1614 1617 { 1615 1618 /* Get host-combo key list: */ 1616 Q Set<int> allHostComboKeys = UIHostCombo::toKeyCodeList(gEDataManager->hostKeyCombination()).toSet();1619 QList<int> allHostComboKeys = UIHostCombo::toKeyCodeList(gEDataManager->hostKeyCombination()); 1617 1620 1618 1621 /* Update the map of pressed host-combo keys: */ … … 1632 1635 } 1633 1636 } 1637 1634 1638 /* Check if we are currently holding FULL host-combo: */ 1635 bool fIsFullHostComboPresent = !allHostComboKeys.isEmpty() && allHostComboKeys == m_pressedHostComboKeys.keys().toSet(); 1639 bool fIsFullHostComboPresent = false; 1640 if (!allHostComboKeys.isEmpty()) 1641 { 1642 const QList<int> &pressedKeyList = m_pressedHostComboKeys.keys(); 1643 fIsFullHostComboPresent = QSet<int>(allHostComboKeys.begin(), allHostComboKeys.end()) 1644 == QSet<int>(pressedKeyList.begin(), pressedKeyList.end()); 1645 } 1646 1636 1647 /* Check if currently pressed/released key had changed host-combo state: */ 1637 1648 const bool isHostComboStateChanged = (!m_bIsHostComboPressed && fIsFullHostComboPresent) || … … 1728 1739 { 1729 1740 /* Send prepared scan-codes to the guest: */ 1741 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) 1742 QVector<LONG> scancodes; 1743 for (uint i = 0; i < uCodesCount; i++) 1744 scancodes.push_back(pCodes[i]); 1745 keyboard().PutScancodes(scancodes); 1746 #else 1730 1747 std::vector<LONG> scancodes(pCodes, &pCodes[uCodesCount]); 1731 1748 keyboard().PutScancodes(QVector<LONG>::fromStdVector(scancodes)); 1749 #endif 1732 1750 } 1733 1751
Note:
See TracChangeset
for help on using the changeset viewer.