VirtualBox

Changeset 101867 in vbox


Ignore:
Timestamp:
Nov 6, 2023 12:58:49 PM (15 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10513: Extend UIEditor with optional flag getter for easy reuse.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors
Files:
8 edited

Legend:

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

    r101725 r101867  
    152152
    153153        /* Load currently supported audio driver types: */
    154         const KPlatformArchitecture enmArch = m_flags.contains("arch")
    155                                             ? m_flags.value("arch").value<KPlatformArchitecture>()
     154        const KPlatformArchitecture enmArch = optionalFlags().contains("arch")
     155                                            ? optionalFlags().value("arch").value<KPlatformArchitecture>()
    156156                                            : KPlatformArchitecture_x86;
    157157        CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIChipsetEditor.cpp

    r101865 r101867  
    155155
    156156        /* Load currently supported values: */
    157         const KPlatformArchitecture enmArch = m_flags.contains("arch")
    158                                             ? m_flags.value("arch").value<KPlatformArchitecture>()
     157        const KPlatformArchitecture enmArch = optionalFlags().contains("arch")
     158                                            ? optionalFlags().value("arch").value<KPlatformArchitecture>()
    159159                                            : KPlatformArchitecture_x86;
    160160        CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIEditor.h

    r101723 r101867  
    5656    UIEditor(QWidget *pParent = 0, bool fShowInBasicMode = false);
    5757
     58    /** Returns editor optional flags. */
     59    QMap<QString, QVariant> optionalFlags() const { return m_flags; }
     60
    5861    /** Adds @a pEditor into list of sub-editor. */
    5962    void addEditor(UIEditor *pEditor);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIGraphicsControllerEditor.cpp

    r101725 r101867  
    160160
    161161        /* Load currently supported graphics controller types: */
    162         const KPlatformArchitecture enmArch = m_flags.contains("arch")
    163                                             ? m_flags.value("arch").value<KPlatformArchitecture>()
     162        const KPlatformArchitecture enmArch = optionalFlags().contains("arch")
     163                                            ? optionalFlags().value("arch").value<KPlatformArchitecture>()
    164164                                            : KPlatformArchitecture_x86;
    165165        CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkFeaturesEditor.cpp

    r101725 r101867  
    394394
    395395        /* Load currently supported types: */
    396         const KPlatformArchitecture enmArch = m_flags.contains("arch")
    397                                             ? m_flags.value("arch").value<KPlatformArchitecture>()
     396        const KPlatformArchitecture enmArch = optionalFlags().contains("arch")
     397                                            ? optionalFlags().value("arch").value<KPlatformArchitecture>()
    398398                                            : KPlatformArchitecture_x86;
    399399        CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIParavirtProviderEditor.cpp

    r101865 r101867  
    152152
    153153        /* Load currently supported paravirt provider types: */
    154         const KPlatformArchitecture enmArch = m_flags.contains("arch")
    155                                             ? m_flags.value("arch").value<KPlatformArchitecture>()
     154        const KPlatformArchitecture enmArch = optionalFlags().contains("arch")
     155                                            ? optionalFlags().value("arch").value<KPlatformArchitecture>()
    156156                                            : KPlatformArchitecture_x86;
    157157        CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UITpmEditor.cpp

    r101865 r101867  
    153153
    154154        /* Load currently supported values: */
    155         const KPlatformArchitecture enmArch = m_flags.contains("arch")
    156                                             ? m_flags.value("arch").value<KPlatformArchitecture>()
     155        const KPlatformArchitecture enmArch = optionalFlags().contains("arch")
     156                                            ? optionalFlags().value("arch").value<KPlatformArchitecture>()
    157157                                            : KPlatformArchitecture_x86;
    158158        CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIUSBControllerEditor.cpp

    r101865 r101867  
    153153{
    154154    /* Load currently supported types: */
    155     const KPlatformArchitecture enmArch = m_flags.contains("arch")
    156                                         ? m_flags.value("arch").value<KPlatformArchitecture>()
     155    const KPlatformArchitecture enmArch = optionalFlags().contains("arch")
     156                                        ? optionalFlags().value("arch").value<KPlatformArchitecture>()
    157157                                        : KPlatformArchitecture_x86;
    158158    CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
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