VirtualBox

Changeset 105273 in vbox for trunk/src


Ignore:
Timestamp:
Jul 11, 2024 1:51:10 PM (5 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10384: VM settings / System page: Reworking totally wrong r161581; Same idea, just take into account that the widgets can be hidden already, don't show them ourselves.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp

    r104313 r105273  
    625625{
    626626    /* Update some stuff: */
    627     updateOptionSet();
    628627    updateMinimumLayoutHint();
     628
     629    /* Some options hidden for ARM machines: */
     630    const KPlatformArchitecture enmArch = optionalFlags().contains("arch")
     631                                        ? optionalFlags().value("arch").value<KPlatformArchitecture>()
     632                                        : KPlatformArchitecture_x86;
     633    const bool fARMMachine = enmArch == KPlatformArchitecture_ARM;
     634    if (fARMMachine)
     635    {
     636        if (m_pEditorChipset)
     637            m_pEditorChipset->hide();
     638        if (m_pEditorTpm)
     639            m_pEditorTpm->hide();
     640        if (m_pEditorProcessorFeatures)
     641            m_pEditorProcessorFeatures->hide();
     642    }
    629643}
    630644
     
    660674                                                                      || (systemData.m_fEnabledNestedPaging && isMachineOffline()));
    661675    }
    662 
    663     /* Update option set: */
    664     updateOptionSet();
    665676}
    666677
     
    674685    prepareWidgets();
    675686    prepareConnections();
    676 
    677     /* Update option set: */
    678     updateOptionSet();
    679687
    680688    /* Apply language settings: */
     
    895903        connect(m_pEditorAccelerationFeatures, &UIAccelerationFeaturesEditor::sigChangedNestedPaging,
    896904                this, &UIMachineSettingsSystem::revalidate);
    897 }
    898 
    899 void UIMachineSettingsSystem::updateOptionSet()
    900 {
    901     /* Load currently propagated arch type: */
    902     const KPlatformArchitecture enmArch = optionalFlags().contains("arch")
    903                                         ? optionalFlags().value("arch").value<KPlatformArchitecture>()
    904                                         : KPlatformArchitecture_x86;
    905 
    906     /* Some options visible only for x86 machines: */
    907     const bool fx86 = enmArch == KPlatformArchitecture_x86;
    908     if (m_pEditorChipset)
    909         m_pEditorChipset->setVisible(fx86);
    910     if (m_pEditorTpm)
    911         m_pEditorTpm->setVisible(fx86);
    912     m_pEditorProcessorFeatures->setVisible(fx86);
    913905}
    914906
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.h

    r104313 r105273  
    138138    /** Prepares connections. */
    139139    void prepareConnections();
    140     /** Updates option set. */
    141     void updateOptionSet();
    142140    /** Cleanups all. */
    143141    void cleanup();
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