VirtualBox

Changeset 108082 in vbox


Ignore:
Timestamp:
Feb 5, 2025 5:37:00 PM (2 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167376
Message:

FE/Qt: VM settings dialog / General and System pages: Missing API error handling for all the remaining places.

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

Legend:

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

    r107682 r108082  
    786786                        const CGuestOSType comNewType = gpGlobalSession->virtualBox().GetGuestOSType(newGeneralData.m_strGuestOsTypeId);
    787787                        comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_LongMode, comNewType.GetIs64Bit());
    788                         fSuccess = comPlatformX86.isOk();
    789                         /// @todo convey error info ..
     788                        if (!comPlatformX86.isOk())
     789                        {
     790                            notifyOperationProgressError(UIErrorString::formatErrorInfo(comPlatformX86));
     791                            return false;
     792                        }
    790793                        break;
    791794                    }
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp

    r107478 r108082  
    978978            CPlatform comPlatform = m_machine.GetPlatform();
    979979            comPlatform.SetChipsetType(newSystemData.m_chipsetType);
    980             fSuccess = comPlatform.isOk();
    981             /// @todo convey error info ..
     980            if (!comPlatform.isOk())
     981            {
     982                notifyOperationProgressError(UIErrorString::formatErrorInfo(comPlatform));
     983                return false;
     984            }
    982985        }
    983986        /* Save TPM type: */
     
    986989            CTrustedPlatformModule comModule = m_machine.GetTrustedPlatformModule();
    987990            comModule.SetType(newSystemData.m_tpmType);
    988             fSuccess = comModule.isOk();
    989             /// @todo convey error info ..
     991            if (!comModule.isOk())
     992            {
     993                notifyOperationProgressError(UIErrorString::formatErrorInfo(comModule));
     994                return false;
     995            }
    990996        }
    991997        /* Save pointing HID type: */
     
    10001006            CFirmwareSettings comFirmwareSettings = m_machine.GetFirmwareSettings();
    10011007            comFirmwareSettings.SetIOAPICEnabled(newSystemData.m_fEnabledIoApic);
    1002             fSuccess = comFirmwareSettings.isOk();
    1003             /// @todo convey error info ..
     1008            if (!comFirmwareSettings.isOk())
     1009            {
     1010                notifyOperationProgressError(UIErrorString::formatErrorInfo(comFirmwareSettings));
     1011                return false;
     1012            }
    10041013        }
    10051014        /* Save firware type (whether EFI is enabled): */
     
    10081017            CFirmwareSettings comFirmwareSettings = m_machine.GetFirmwareSettings();
    10091018            comFirmwareSettings.SetFirmwareType(newSystemData.m_fEnabledEFI ? KFirmwareType_EFI : KFirmwareType_BIOS);
    1010             fSuccess = comFirmwareSettings.isOk();
    1011             /// @todo convey error info ..
     1019            if (!comFirmwareSettings.isOk())
     1020            {
     1021                notifyOperationProgressError(UIErrorString::formatErrorInfo(comFirmwareSettings));
     1022                return false;
     1023            }
    10121024        }
    10131025        /* Save whether UTC is enabled: */
     
    10161028            CPlatform comPlatform = m_machine.GetPlatform();
    10171029            comPlatform.SetRTCUseUTC(newSystemData.m_fEnabledUTC);
    1018             fSuccess = comPlatform.isOk();
    1019             /// @todo convey error info ..
     1030            if (!comPlatform.isOk())
     1031            {
     1032                notifyOperationProgressError(UIErrorString::formatErrorInfo(comPlatform));
     1033                return false;
     1034            }
    10201035        }
    10211036        /* Save whether secure boot is enabled: */
     
    10381053                    /* Init if required: */
    10391054                    if (!newSystemData.m_fAvailableSecureBoot)
     1055                    {
    10401056                        comStoreLvl1.InitUefiVariableStore(0);
     1057                        if (!comStoreLvl1.isOk())
     1058                        {
     1059                            notifyOperationProgressError(UIErrorString::formatErrorInfo(comStoreLvl1));
     1060                            return false;
     1061                        }
     1062                    }
    10411063                    /* Enroll everything: */
    10421064                    comStoreLvl2 = comStoreLvl1.GetUefiVariableStore();
    10431065                    comStoreLvl2.EnrollOraclePlatformKey();
     1066                    if (!comStoreLvl2.isOk())
     1067                    {
     1068                        notifyOperationProgressError(UIErrorString::formatErrorInfo(comStoreLvl2));
     1069                        return false;
     1070                    }
    10441071                    comStoreLvl2.EnrollDefaultMsSignatures();
     1072                    if (!comStoreLvl2.isOk())
     1073                    {
     1074                        notifyOperationProgressError(UIErrorString::formatErrorInfo(comStoreLvl2));
     1075                        return false;
     1076                    }
    10451077                }
    10461078                comStoreLvl2.SetSecureBootEnabled(true);
    1047                 fSuccess = comStoreLvl2.isOk();
    1048                 /// @todo convey error info ..
     1079                if (!comStoreLvl2.isOk())
     1080                {
     1081                    notifyOperationProgressError(UIErrorString::formatErrorInfo(comStoreLvl2));
     1082                    return false;
     1083                }
    10491084            }
    10501085            /* Disabling secure boot? */
     
    10521087            {
    10531088                comStoreLvl2.SetSecureBootEnabled(false);
    1054                 fSuccess = comStoreLvl2.isOk();
    1055                 /// @todo convey error info ..
     1089                if (!comStoreLvl2.isOk())
     1090                {
     1091                    notifyOperationProgressError(UIErrorString::formatErrorInfo(comStoreLvl2));
     1092                    return false;
     1093                }
    10561094            }
    10571095        }
     
    11001138                    {
    11011139                        comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_PAE, newSystemData.m_fEnabledPAE);
    1102                         fSuccess = comPlatformX86.isOk();
    1103                         /// @todo convey error info ..
     1140                        if (!comPlatformX86.isOk())
     1141                        {
     1142                            notifyOperationProgressError(UIErrorString::formatErrorInfo(comPlatformX86));
     1143                            return false;
     1144                        }
    11041145                    }
    11051146                    /* Save whether Nested HW Virt Ex is enabled: */
     
    11071148                    {
    11081149                        comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_HWVirt, newSystemData.m_fEnabledNestedHwVirtEx);
    1109                         fSuccess = comPlatformX86.isOk();
    1110                         /// @todo convey error info ..
     1150                        if (!comPlatformX86.isOk())
     1151                        {
     1152                            notifyOperationProgressError(UIErrorString::formatErrorInfo(comPlatformX86));
     1153                            return false;
     1154                        }
    11111155                    }
    11121156
     
    11761220                    {
    11771221                        comPlatformX86.SetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging, newSystemData.m_fEnabledNestedPaging);
    1178                         fSuccess = comPlatformX86.isOk();
    1179                         /// @todo convey error info ..
     1222                        if (!comPlatformX86.isOk())
     1223                        {
     1224                            notifyOperationProgressError(UIErrorString::formatErrorInfo(comPlatformX86));
     1225                            return false;
     1226                        }
    11801227                    }
    11811228
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