VirtualBox

Changeset 102085 in vbox


Ignore:
Timestamp:
Nov 13, 2023 3:42:38 PM (15 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10543: VM Settings / General page: Make sure LONG mode setting saved on the basis of current settings dialog architecture, not CMachine architecture; Those two are just different sources of the same value, but the last one is used everwhere, so for consistence.

File:
1 edited

Legend:

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

    r102061 r102085  
    5454#include "CPlatform.h"
    5555#include "CPlatformX86.h"
    56 #ifdef VBOX_WITH_VIRT_ARMV8
    57 # include "CPlatformARM.h"
    58 #endif
    5956#include "CProgress.h"
    6057
     
    777774            {
    778775                /* Update long mode CPU feature bit when OS type changed: */
    779                 const CPlatform comPlatform = m_machine.GetPlatform();
    780                 switch (comPlatform.GetArchitecture())
     776                const KPlatformArchitecture enmArch = optionalFlags().contains("arch")
     777                                                    ? optionalFlags().value("arch").value<KPlatformArchitecture>()
     778                                                    : KPlatformArchitecture_x86;
     779                switch (enmArch)
    781780                {
    782781                    case KPlatformArchitecture_x86:
    783782                    {
     783                        const CPlatform comPlatform = m_machine.GetPlatform();
    784784                        CPlatformX86 comPlatformX86 = comPlatform.GetX86();
    785                         const CGuestOSType &comNewType = uiCommon().virtualBox().GetGuestOSType(newGeneralData.m_strGuestOsTypeId);
     785                        const CGuestOSType comNewType = uiCommon().virtualBox().GetGuestOSType(newGeneralData.m_strGuestOsTypeId);
    786786                        comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_LongMode, comNewType.GetIs64Bit());
    787787                        fSuccess = comPlatformX86.isOk();
     
    789789                        break;
    790790                    }
    791 
    792 #ifdef VBOX_WITH_VIRT_ARMV8
    793                     case KPlatformArchitecture_ARM:
    794                     {
    795                         CPlatformARM comPlatformARM = comPlatform.GetARM();
    796                         /** @todo BUGBUG ARM stuff goes here. */
    797                         fSuccess = comPlatformARM.isOk();
    798                         break;
    799                     }
    800 #endif
    801 
    802791                    default:
    803792                        break;
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