VirtualBox

Changeset 101757 in vbox


Ignore:
Timestamp:
Nov 3, 2023 4:18:47 PM (16 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
159853
Message:

FE/Qt: bugref:10543: UIAdvancedSettingsDialogMachine: Init platform arch type to update editors accordingly.

File:
1 edited

Legend:

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

    r101752 r101757  
    6868#include "CExtPackManager.h"
    6969#include "CGraphicsAdapter.h"
     70#include "CPlatform.h"
    7071#include "CUSBController.h"
    7172
     
    763764    setConfigurationAccessLevel(::configurationAccessLevel(m_enmSessionState, m_enmMachineState));
    764765
     766    /* Define initial dialog platform, for now it's constant.
     767     * Who knows, maybe we will be able to change it dynamically one day: */
     768    const CPlatform comPlatform = m_machine.GetPlatform();
     769    if (comPlatform.isNotNull())
     770    {
     771        const KPlatformArchitecture enmArch = comPlatform.GetArchitecture();
     772        Assert(enmArch != KPlatformArchitecture_None);
     773        if (enmArch != KPlatformArchitecture_None)
     774        {
     775            /* Push platform flag through whole UIEditor hierarchy: */
     776            QMap<QString, QVariant> optFlags = optionalFlags();
     777            switch (enmArch)
     778            {
     779                /* For x86 we no need the flag at all, removing if present: */
     780                case KPlatformArchitecture_x86: optFlags.remove("arch"); break;
     781                /* For rest of platforms we need the flag: */
     782                default: optFlags["arch"] = QVariant::fromValue(enmArch); break;
     783            }
     784            setOptionalFlags(optFlags);
     785        }
     786    }
     787
    765788    /* Apply language settings: */
    766789    retranslateUi();
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