Changeset 103178 in vbox
- Timestamp:
- Feb 2, 2024 3:43:31 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIBootOrderEditor.cpp
r103080 r103178 349 349 UIBootItemDataList UIBootDataTools::loadBootItems(const CMachine &comMachine) 350 350 { 351 /* Acquire supported boot devices: */ 351 352 CPlatform comPlatform = comMachine.GetPlatform(); 352 353 const KPlatformArchitecture comArch = comPlatform.GetArchitecture(); 353 354 const CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(comArch); 354 355 QVector<KDeviceType> possibleBootItems = comProperties.GetSupportedBootDevices(); 355 const int iPossibleBootListSize = qMin((ULONG)4, comProperties.GetMaxBootPosition()); 356 /* Limit the list to maximum boot position: */ 357 int iPossibleBootListSize = qMin((ULONG)possibleBootItems.size(), comProperties.GetMaxBootPosition()); 358 /* Limit the list to maximum 4 slots for the GUI: */ 359 iPossibleBootListSize = qMin(4, iPossibleBootListSize); 360 /* Resize the possible list finally: */ 356 361 possibleBootItems.resize(iPossibleBootListSize); 357 362 … … 359 364 UIBootItemDataList bootItems; 360 365 361 /* Gather boot-items of current VM : */366 /* Gather boot-items of current VM, they can be different from supported: */ 362 367 QList<KDeviceType> usedBootItems; 363 368 for (int i = 1; i <= possibleBootItems.size(); ++i) … … 373 378 } 374 379 } 380 375 381 /* Gather other unique boot-items: */ 376 382 for (int i = 0; i < possibleBootItems.size(); ++i) 377 383 { 378 384 const KDeviceType enmType = possibleBootItems.at(i); 379 if (!usedBootItems.contains(enmType)) 385 if ( !usedBootItems.contains(enmType) 386 && enmType != KDeviceType_Null) 380 387 { 381 388 UIBootItemData data;
Note:
See TracChangeset
for help on using the changeset viewer.