Changeset 101724 in vbox for trunk/src/VBox
- Timestamp:
- Nov 3, 2023 8:43:56 AM (13 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/UIAdvancedSettingsDialogSpecific.cpp
r101607 r101724 622 622 } 623 623 624 void UIAdvancedSettingsDialogMachine::sltHandlePlatformArchitectureChanged(KPlatformArchitecture enmArch) 625 { 626 /* Update optional flags accordingly: */ 627 QMap<QString, QVariant> optFlags = optionalFlags(); 628 /* For x86 we no need the flag at all, removing if present: */ 629 if (enmArch == KPlatformArchitecture_x86) 630 optFlags.remove("arch"); 631 /* For ARM (and potentially rest) we need the flag: */ 632 else if (enmArch == KPlatformArchitecture_ARM) 633 optFlags["arch"] = QVariant::fromValue(enmArch); 634 setOptionalFlags(optFlags); 635 } 636 624 637 void UIAdvancedSettingsDialogMachine::prepare() 625 638 { … … 660 673 case MachineSettingsPageType_General: 661 674 { 662 pSettingsPage= new UIMachineSettingsGeneral;675 UIMachineSettingsGeneral *pSettingsPageGeneral = new UIMachineSettingsGeneral; 663 676 addItem(":/machine_32px.png", ":/machine_24px.png", ":/machine_16px.png", 664 iPageIndex, "#general", pSettingsPage );677 iPageIndex, "#general", pSettingsPageGeneral); 665 678 addPageHelpKeyword(iPageIndex, "generalsettings"); 679 connect(pSettingsPageGeneral, &UIMachineSettingsGeneral::sigPlatformArchitectureChanged, 680 this, &UIAdvancedSettingsDialogMachine::sltHandlePlatformArchitectureChanged); 666 681 break; 667 682 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UIAdvancedSettingsDialogSpecific.h
r101654 r101724 144 144 void sltMachineDataChanged(const QUuid &uMachineId); 145 145 146 /** Handles platform @a enmArch change. */ 147 void sltHandlePlatformArchitectureChanged(KPlatformArchitecture enmArch); 148 146 149 private: 147 150 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp
r101717 r101724 503 503 } 504 504 505 void UIMachineSettingsGeneral::sltHandleOsTypeChanged() 506 { 507 /* Compose new guest OS type: */ 508 const CGuestOSType comNewType = uiCommon().virtualBox().GetGuestOSType(guestOSTypeId()); 509 /* Notify listeners about new platform architecture: */ 510 if (comNewType.isNotNull()) 511 { 512 const KPlatformArchitecture enmArch = comNewType.GetPlatformArchitecture(); 513 if (comNewType.isOk() && enmArch != KPlatformArchitecture_None) 514 emit sigPlatformArchitectureChanged(enmArch); 515 } 516 517 /* Revalidate the usual way as well: */ 518 revalidate(); 519 } 520 505 521 void UIMachineSettingsGeneral::sltHandleEncryptionCipherChanged() 506 522 { … … 702 718 /* Configure 'Basic' connections: */ 703 719 connect(m_pEditorNameAndSystem, &UINameAndSystemEditor::sigOsTypeChanged, 704 this, &UIMachineSettingsGeneral:: revalidate);720 this, &UIMachineSettingsGeneral::sltHandleOsTypeChanged); 705 721 connect(m_pEditorNameAndSystem, &UINameAndSystemEditor::sigNameChanged, 706 722 this, &UIMachineSettingsGeneral::revalidate); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.h
r101717 r101724 51 51 Q_OBJECT; 52 52 53 signals: 54 55 /** Notifies listeners about platform @a enmArch changed. */ 56 void sigPlatformArchitectureChanged(KPlatformArchitecture enmArch); 57 53 58 public: 54 59 … … 96 101 97 102 private slots: 103 104 /** Handles OS type change. */ 105 void sltHandleOsTypeChanged(); 98 106 99 107 /** Handles encryption cipher change. */
Note:
See TracChangeset
for help on using the changeset viewer.