Changeset 101752 in vbox for trunk/src/VBox
- Timestamp:
- Nov 3, 2023 3:56:43 PM (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
r101724 r101752 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 637 624 void UIAdvancedSettingsDialogMachine::prepare() 638 625 { … … 673 660 case MachineSettingsPageType_General: 674 661 { 675 UIMachineSettingsGeneral *pSettingsPageGeneral= new UIMachineSettingsGeneral;662 pSettingsPage = new UIMachineSettingsGeneral; 676 663 addItem(":/machine_32px.png", ":/machine_24px.png", ":/machine_16px.png", 677 iPageIndex, "#general", pSettingsPage General);664 iPageIndex, "#general", pSettingsPage); 678 665 addPageHelpKeyword(iPageIndex, "generalsettings"); 679 connect(pSettingsPageGeneral, &UIMachineSettingsGeneral::sigPlatformArchitectureChanged,680 this, &UIAdvancedSettingsDialogMachine::sltHandlePlatformArchitectureChanged);681 666 break; 682 667 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UIAdvancedSettingsDialogSpecific.h
r101724 r101752 144 144 void sltMachineDataChanged(const QUuid &uMachineId); 145 145 146 /** Handles platform @a enmArch change. */147 void sltHandlePlatformArchitectureChanged(KPlatformArchitecture enmArch);148 149 146 private: 150 147 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp
r101724 r101752 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 521 505 void UIMachineSettingsGeneral::sltHandleEncryptionCipherChanged() 522 506 { … … 718 702 /* Configure 'Basic' connections: */ 719 703 connect(m_pEditorNameAndSystem, &UINameAndSystemEditor::sigOsTypeChanged, 720 this, &UIMachineSettingsGeneral:: sltHandleOsTypeChanged);704 this, &UIMachineSettingsGeneral::revalidate); 721 705 connect(m_pEditorNameAndSystem, &UINameAndSystemEditor::sigNameChanged, 722 706 this, &UIMachineSettingsGeneral::revalidate); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.h
r101724 r101752 51 51 Q_OBJECT; 52 52 53 signals:54 55 /** Notifies listeners about platform @a enmArch changed. */56 void sigPlatformArchitectureChanged(KPlatformArchitecture enmArch);57 58 53 public: 59 54 … … 101 96 102 97 private slots: 103 104 /** Handles OS type change. */105 void sltHandleOsTypeChanged();106 98 107 99 /** Handles encryption cipher change. */
Note:
See TracChangeset
for help on using the changeset viewer.