VirtualBox

Changeset 65629 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Feb 6, 2017 4:57:11 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: Settings: A bit of refactoring to bring the code of global and machine settings to the same level of achievements.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings
Files:
23 edited

Legend:

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

    r65628 r65629  
    5454
    5555    /* API: Get/return data to/form items: */
    56     void fetchNetworkData(const UIDataNetworkNAT &data);
    57     void uploadNetworkData(UIDataNetworkNAT &data);
     56    void fetchNetworkData(const UIDataSettingsGlobalNetworkNAT &data);
     57    void uploadNetworkData(UIDataSettingsGlobalNetworkNAT &data);
    5858
    5959    /* API: Validation stuff: */
     
    7474
    7575    /* Variable: Network data: */
    76     UIDataNetworkNAT m_data;
     76    UIDataSettingsGlobalNetworkNAT m_data;
    7777};
    7878
     
    8787
    8888    /* API: Get/return data to/form items: */
    89     void fetchNetworkData(const UIDataNetworkHost &data);
    90     void uploadNetworkData(UIDataNetworkHost &data);
     89    void fetchNetworkData(const UIDataSettingsGlobalNetworkHost &data);
     90    void uploadNetworkData(UIDataSettingsGlobalNetworkHost &data);
    9191
    9292    /* API: Validation stuff: */
     
    102102
    103103    /* Variable: Network data: */
    104     UIDataNetworkHost m_data;
     104    UIDataSettingsGlobalNetworkHost m_data;
    105105};
    106106
     
    111111}
    112112
    113 void UIItemNetworkNAT::fetchNetworkData(const UIDataNetworkNAT &data)
     113void UIItemNetworkNAT::fetchNetworkData(const UIDataSettingsGlobalNetworkNAT &data)
    114114{
    115115    /* Get from cache: */
     
    120120}
    121121
    122 void UIItemNetworkNAT::uploadNetworkData(UIDataNetworkNAT &data)
     122void UIItemNetworkNAT::uploadNetworkData(UIDataSettingsGlobalNetworkNAT &data)
    123123{
    124124    /* Put to cache: */
     
    233233}
    234234
    235 void UIItemNetworkHost::fetchNetworkData(const UIDataNetworkHost &data)
     235void UIItemNetworkHost::fetchNetworkData(const UIDataSettingsGlobalNetworkHost &data)
    236236{
    237237    /* Get from cache: */
     
    242242}
    243243
    244 void UIItemNetworkHost::uploadNetworkData(UIDataNetworkHost &data)
     244void UIItemNetworkHost::uploadNetworkData(UIDataSettingsGlobalNetworkHost &data)
    245245{
    246246    /* Put to cache: */
     
    537537{
    538538    /* Fetch NAT networks from cache: */
    539     foreach (const UIDataNetworkNAT &network, m_cache.m_networksNAT)
     539    foreach (const UIDataSettingsGlobalNetworkNAT &network, m_cache.m_networksNAT)
    540540        createTreeItemNetworkNAT(network);
    541541    m_pTreeNetworkNAT->sortByColumn(1, Qt::AscendingOrder);
     
    544544
    545545    /* Fetch Host networks from cache: */
    546     foreach (const UIDataNetworkHost &network, m_cache.m_networksHost)
     546    foreach (const UIDataSettingsGlobalNetworkHost &network, m_cache.m_networksHost)
    547547        createTreeItemNetworkHost(network);
    548548    m_pTreeNetworkHost->sortByColumn(0, Qt::AscendingOrder);
     
    560560    for (int iNetworkIndex = 0; iNetworkIndex < m_pTreeNetworkNAT->topLevelItemCount(); ++iNetworkIndex)
    561561    {
    562         UIDataNetworkNAT data;
     562        UIDataSettingsGlobalNetworkNAT data;
    563563        UIItemNetworkNAT *pItem = static_cast<UIItemNetworkNAT*>(m_pTreeNetworkNAT->topLevelItem(iNetworkIndex));
    564564        pItem->uploadNetworkData(data);
     
    570570    for (int iNetworkIndex = 0; iNetworkIndex < m_pTreeNetworkHost->topLevelItemCount(); ++iNetworkIndex)
    571571    {
    572         UIDataNetworkHost data;
     572        UIDataSettingsGlobalNetworkHost data;
    573573        UIItemNetworkHost *pItem = static_cast<UIItemNetworkHost*>(m_pTreeNetworkHost->topLevelItem(iNetworkIndex));
    574574        pItem->uploadNetworkData(data);
     
    587587
    588588    /* Save NAT networks from cache: */
    589     foreach (const UIDataNetworkNAT &data, m_cache.m_networksNAT)
     589    foreach (const UIDataSettingsGlobalNetworkNAT &data, m_cache.m_networksNAT)
    590590        saveCacheItemNetworkNAT(data);
    591591
    592592    /* Save Host networks from cache: */
    593     foreach (const UIDataNetworkHost &data, m_cache.m_networksHost)
     593    foreach (const UIDataSettingsGlobalNetworkHost &data, m_cache.m_networksHost)
    594594        saveCacheItemNetworkHost(data);
    595595
     
    783783
    784784    /* Edit current item data: */
    785     UIDataNetworkNAT data;
     785    UIDataSettingsGlobalNetworkNAT data;
    786786    pItem->uploadNetworkData(data);
    787787    UIGlobalSettingsNetworkDetailsNAT details(this, data);
     
    887887
    888888    /* Edit current item data: */
    889     UIDataNetworkHost data;
     889    UIDataSettingsGlobalNetworkHost data;
    890890    pItem->uploadNetworkData(data);
    891891    UIGlobalSettingsNetworkDetailsHost details(this, data);
     
    953953}
    954954
    955 UIDataNetworkNAT UIGlobalSettingsNetwork::generateDataNetworkNAT(const CNATNetwork &network)
     955UIDataSettingsGlobalNetworkNAT UIGlobalSettingsNetwork::generateDataNetworkNAT(const CNATNetwork &network)
    956956{
    957957    /* Prepare data: */
    958     UIDataNetworkNAT data;
     958    UIDataSettingsGlobalNetworkNAT data;
    959959
    960960    /* Load NAT network settings: */
     
    10191019}
    10201020
    1021 void UIGlobalSettingsNetwork::saveCacheItemNetworkNAT(const UIDataNetworkNAT &data)
     1021void UIGlobalSettingsNetwork::saveCacheItemNetworkNAT(const UIDataSettingsGlobalNetworkNAT &data)
    10221022{
    10231023    /* Make sure corresponding NAT network exists: */
     
    10551055}
    10561056
    1057 void UIGlobalSettingsNetwork::createTreeItemNetworkNAT(const UIDataNetworkNAT &data, bool fChooseItem)
     1057void UIGlobalSettingsNetwork::createTreeItemNetworkNAT(const UIDataSettingsGlobalNetworkNAT &data, bool fChooseItem)
    10581058{
    10591059    /* Add new item to the tree: */
     
    10721072}
    10731073
    1074 UIDataNetworkHost UIGlobalSettingsNetwork::generateDataNetworkHost(const CHostNetworkInterface &iface)
     1074UIDataSettingsGlobalNetworkHost UIGlobalSettingsNetwork::generateDataNetworkHost(const CHostNetworkInterface &iface)
    10751075{
    10761076    /* Prepare data: */
    1077     UIDataNetworkHost data;
     1077    UIDataSettingsGlobalNetworkHost data;
    10781078
    10791079    /* Get DHCP server (create if necessary): */
     
    11141114}
    11151115
    1116 void UIGlobalSettingsNetwork::saveCacheItemNetworkHost(const UIDataNetworkHost &data)
     1116void UIGlobalSettingsNetwork::saveCacheItemNetworkHost(const UIDataSettingsGlobalNetworkHost &data)
    11171117{
    11181118    /* Make sure corresponding Host interface exists: */
     
    11851185}
    11861186
    1187 void UIGlobalSettingsNetwork::createTreeItemNetworkHost(const UIDataNetworkHost &data, bool fChooseItem)
     1187void UIGlobalSettingsNetwork::createTreeItemNetworkHost(const UIDataSettingsGlobalNetworkHost &data, bool fChooseItem)
    11881188{
    11891189    /* Add new item to the tree: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.h

    r62493 r65629  
    3030
    3131/* Global settings / Network page / NAT network data: */
    32 struct UIDataNetworkNAT
     32struct UIDataSettingsGlobalNetworkNAT
    3333{
    3434    /* NAT Network: */
     
    4242    UIPortForwardingDataList m_ipv4rules;
    4343    UIPortForwardingDataList m_ipv6rules;
    44     bool operator==(const UIDataNetworkNAT &other) const
     44    bool operator==(const UIDataSettingsGlobalNetworkNAT &other) const
    4545    {
    4646        return m_fEnabled == other.m_fEnabled &&
     
    5858
    5959/* Global settings / Network page / Host interface data: */
    60 struct UIDataNetworkHostInterface
     60struct UIDataSettingsGlobalNetworkHostInterface
    6161{
    6262    /* Host Interface: */
     
    6868    QString m_strInterfaceAddress6;
    6969    QString m_strInterfaceMaskLength6;
    70     bool operator==(const UIDataNetworkHostInterface &other) const
     70    bool operator==(const UIDataSettingsGlobalNetworkHostInterface &other) const
    7171    {
    7272        return m_strName == other.m_strName &&
     
    8181
    8282/* Global settings / Network page / Host DHCP server data: */
    83 struct UIDataNetworkDHCPServer
     83struct UIDataSettingsGlobalNetworkDHCPServer
    8484{
    8585    /* DHCP Server: */
     
    8989    QString m_strDhcpLowerAddress;
    9090    QString m_strDhcpUpperAddress;
    91     bool operator==(const UIDataNetworkDHCPServer &other) const
     91    bool operator==(const UIDataSettingsGlobalNetworkDHCPServer &other) const
    9292    {
    9393        return m_fDhcpServerEnabled == other.m_fDhcpServerEnabled &&
     
    100100
    101101/* Global settings / Network page / Host network data: */
    102 struct UIDataNetworkHost
    103 {
    104     UIDataNetworkHostInterface m_interface;
    105     UIDataNetworkDHCPServer m_dhcpserver;
    106     bool operator==(const UIDataNetworkHost &other) const
     102struct UIDataSettingsGlobalNetworkHost
     103{
     104    UIDataSettingsGlobalNetworkHostInterface m_interface;
     105    UIDataSettingsGlobalNetworkDHCPServer m_dhcpserver;
     106    bool operator==(const UIDataSettingsGlobalNetworkHost &other) const
    107107    {
    108108        return m_interface == other.m_interface &&
     
    115115struct UISettingsCacheGlobalNetwork
    116116{
    117     QList<UIDataNetworkNAT> m_networksNAT;
    118     QList<UIDataNetworkHost> m_networksHost;
     117    QList<UIDataSettingsGlobalNetworkNAT> m_networksNAT;
     118    QList<UIDataSettingsGlobalNetworkHost> m_networksHost;
    119119};
    120120
     
    179179
    180180    /* Helpers: NAT network cache stuff: */
    181     UIDataNetworkNAT generateDataNetworkNAT(const CNATNetwork &network);
    182     void saveCacheItemNetworkNAT(const UIDataNetworkNAT &data);
     181    UIDataSettingsGlobalNetworkNAT generateDataNetworkNAT(const CNATNetwork &network);
     182    void saveCacheItemNetworkNAT(const UIDataSettingsGlobalNetworkNAT &data);
    183183
    184184    /* Helpers: NAT network tree stuff: */
    185     void createTreeItemNetworkNAT(const UIDataNetworkNAT &data, bool fChooseItem = false);
     185    void createTreeItemNetworkNAT(const UIDataSettingsGlobalNetworkNAT &data, bool fChooseItem = false);
    186186    void removeTreeItemNetworkNAT(UIItemNetworkNAT *pItem);
    187187
    188188    /* Helpers: Host network cache stuff: */
    189     UIDataNetworkHost generateDataNetworkHost(const CHostNetworkInterface &iface);
    190     void saveCacheItemNetworkHost(const UIDataNetworkHost &data);
     189    UIDataSettingsGlobalNetworkHost generateDataNetworkHost(const CHostNetworkInterface &iface);
     190    void saveCacheItemNetworkHost(const UIDataSettingsGlobalNetworkHost &data);
    191191
    192192    /* Helpers: Host network tree stuff: */
    193     void createTreeItemNetworkHost(const UIDataNetworkHost &data, bool fChooseItem = false);
     193    void createTreeItemNetworkHost(const UIDataSettingsGlobalNetworkHost &data, bool fChooseItem = false);
    194194    void removeTreeItemNetworkHost(UIItemNetworkHost *pItem);
    195195
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsHost.cpp

    r65603 r65629  
    3030
    3131
    32 UIGlobalSettingsNetworkDetailsHost::UIGlobalSettingsNetworkDetailsHost(QWidget *pParent, UIDataNetworkHost &data)
     32UIGlobalSettingsNetworkDetailsHost::UIGlobalSettingsNetworkDetailsHost(QWidget *pParent, UIDataSettingsGlobalNetworkHost &data)
    3333    : QIWithRetranslateUI2<QIDialog>(pParent)
    3434    , m_data(data)
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsHost.h

    r65603 r65629  
    2525
    2626/* Forward decalrations: */
    27 struct UIDataNetworkHost;
     27struct UIDataSettingsGlobalNetworkHost;
    2828
    2929/* Global settings / Network page / Details sub-dialog: */
     
    3535
    3636    /* Constructor: */
    37     UIGlobalSettingsNetworkDetailsHost(QWidget *pParent, UIDataNetworkHost &data);
     37    UIGlobalSettingsNetworkDetailsHost(QWidget *pParent, UIDataSettingsGlobalNetworkHost &data);
    3838
    3939protected:
     
    6565
    6666    /* Variable: External data reference: */
    67     UIDataNetworkHost &m_data;
     67    UIDataSettingsGlobalNetworkHost &m_data;
    6868};
    6969
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsNAT.cpp

    r62493 r65629  
    3131
    3232
    33 UIGlobalSettingsNetworkDetailsNAT::UIGlobalSettingsNetworkDetailsNAT(QWidget *pParent, UIDataNetworkNAT &data)
     33UIGlobalSettingsNetworkDetailsNAT::UIGlobalSettingsNetworkDetailsNAT(QWidget *pParent, UIDataSettingsGlobalNetworkNAT &data)
    3434    : QIWithRetranslateUI2<QIDialog>(pParent)
    3535    , m_data(data)
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetworkDetailsNAT.h

    r62493 r65629  
    2525
    2626/* Forward decalrations: */
    27 struct UIDataNetworkNAT;
     27struct UIDataSettingsGlobalNetworkNAT;
    2828
    2929/* Global settings / Network page / Details sub-dialog: */
     
    3535
    3636    /* Constructor: */
    37     UIGlobalSettingsNetworkDetailsNAT(QWidget *pParent, UIDataNetworkNAT &data);
     37    UIGlobalSettingsNetworkDetailsNAT(QWidget *pParent, UIDataSettingsGlobalNetworkNAT &data);
    3838
    3939protected:
     
    6060
    6161    /* Variable: External data reference: */
    62     UIDataNetworkNAT &m_data;
     62    UIDataSettingsGlobalNetworkNAT &m_data;
    6363};
    6464
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.h

    r62493 r65629  
    4747    KAudioControllerType m_audioControllerType;
    4848};
    49 typedef UISettingsCache<UIDataSettingsMachineAudio> UICacheSettingsMachineAudio;
     49typedef UISettingsCache<UIDataSettingsMachineAudio> UISettingsCacheMachineAudio;
    5050
    5151/* Machine settings / Audio page: */
     
    9494
    9595    /* Cache: */
    96     UICacheSettingsMachineAudio m_cache;
     96    UISettingsCacheMachineAudio m_cache;
    9797};
    9898
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h

    r62493 r65629  
    121121    QVector<BOOL> m_screens;
    122122};
    123 typedef UISettingsCache<UIDataSettingsMachineDisplay> UICacheSettingsMachineDisplay;
     123typedef UISettingsCache<UIDataSettingsMachineDisplay> UISettingsCacheMachineDisplay;
    124124
    125125/* Machine settings / Display page: */
     
    238238
    239239    /* Cache: */
    240     UICacheSettingsMachineDisplay m_cache;
     240    UISettingsCacheMachineDisplay m_cache;
    241241};
    242242
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.h

    r62493 r65629  
    9595    EncryptionPasswordMap m_encryptionPasswords;
    9696};
    97 typedef UISettingsCache<UIDataSettingsMachineGeneral> UICacheSettingsMachineGeneral;
     97typedef UISettingsCache<UIDataSettingsMachineGeneral> UISettingsCacheMachineGeneral;
    9898
    9999/** Machine settings: General page. */
     
    172172
    173173    /** Holds the page cache. */
    174     UICacheSettingsMachineGeneral m_cache;
     174    UISettingsCacheMachineGeneral m_cache;
    175175
    176176    /** Holds whether HW virtualization extension is enabled. */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.h

    r62493 r65629  
    112112#endif /* !VBOX_WS_MAC */
    113113};
    114 typedef UISettingsCache<UIDataSettingsMachineInterface> UICacheSettingsMachineInterface;
     114typedef UISettingsCache<UIDataSettingsMachineInterface> UISettingsCacheMachineInterface;
    115115
    116116/* Machine settings / User Interface page: */
     
    164164
    165165    /* Cache: */
    166     UICacheSettingsMachineInterface m_cache;
     166    UISettingsCacheMachineInterface m_cache;
    167167
    168168    /** Holds the machine ID copy. */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp

    r62493 r65629  
    9191}
    9292
    93 void UIMachineSettingsNetwork::fetchAdapterCache(const UICacheSettingsMachineNetworkAdapter &adapterCache)
     93void UIMachineSettingsNetwork::fetchAdapterCache(const UISettingsCacheMachineNetworkAdapter &adapterCache)
    9494{
    9595    /* Get adapter data: */
     
    130130}
    131131
    132 void UIMachineSettingsNetwork::uploadAdapterCache(UICacheSettingsMachineNetworkAdapter &adapterCache)
     132void UIMachineSettingsNetwork::uploadAdapterCache(UISettingsCacheMachineNetworkAdapter &adapterCache)
    133133{
    134134    /* Prepare adapter data: */
     
    966966        {
    967967            /* Check if adapter data was changed: */
    968             const UICacheSettingsMachineNetworkAdapter &adapterCache = m_cache.child(iSlot);
     968            const UISettingsCacheMachineNetworkAdapter &adapterCache = m_cache.child(iSlot);
    969969            if (adapterCache.wasChanged())
    970970            {
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.h

    r62493 r65629  
    8484    UIPortForwardingDataList m_redirects;
    8585};
    86 typedef UISettingsCache<UIDataSettingsMachineNetworkAdapter> UICacheSettingsMachineNetworkAdapter;
     86typedef UISettingsCache<UIDataSettingsMachineNetworkAdapter> UISettingsCacheMachineNetworkAdapter;
    8787
    8888/* Machine settings / Network page / Network data: */
     
    9595    bool operator!=(const UIDataSettingsMachineNetwork& /* other */) const { return false; }
    9696};
    97 typedef UISettingsCachePool<UIDataSettingsMachineNetwork, UICacheSettingsMachineNetworkAdapter> UICacheSettingsMachineNetwork;
     97typedef UISettingsCachePool<UIDataSettingsMachineNetwork, UISettingsCacheMachineNetworkAdapter> UISettingsCacheMachineNetwork;
    9898
    9999/* Machine settings / Network page / Adapter tab: */
     
    108108
    109109    /* Load / Save API: */
    110     void fetchAdapterCache(const UICacheSettingsMachineNetworkAdapter &adapterCache);
    111     void uploadAdapterCache(UICacheSettingsMachineNetworkAdapter &adapterCache);
     110    void fetchAdapterCache(const UISettingsCacheMachineNetworkAdapter &adapterCache);
     111    void uploadAdapterCache(UISettingsCacheMachineNetworkAdapter &adapterCache);
    112112
    113113    /* API: Validation stuff: */
     
    261261
    262262    /* Cache: */
    263     UICacheSettingsMachineNetwork m_cache;
     263    UISettingsCacheMachineNetwork m_cache;
    264264};
    265265
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.cpp

    r62493 r65629  
    8787}
    8888
    89 void UIMachineSettingsParallel::fetchPortData(const UICacheSettingsMachineParallelPort &portCache)
     89void UIMachineSettingsParallel::fetchPortData(const UISettingsCacheMachineParallelPort &portCache)
    9090{
    9191    /* Get port data: */
     
    106106}
    107107
    108 void UIMachineSettingsParallel::uploadPortData(UICacheSettingsMachineParallelPort &portCache)
     108void UIMachineSettingsParallel::uploadPortData(UISettingsCacheMachineParallelPort &portCache)
    109109{
    110110    /* Prepare port data: */
     
    303303        {
    304304            /* Check if port data was changed: */
    305             const UICacheSettingsMachineParallelPort &portCache = m_cache.child(iPort);
     305            const UISettingsCacheMachineParallelPort &portCache = m_cache.child(iPort);
    306306            if (portCache.wasChanged())
    307307            {
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.h

    r62493 r65629  
    5656    QString m_strPath;
    5757};
    58 typedef UISettingsCache<UIDataSettingsMachineParallelPort> UICacheSettingsMachineParallelPort;
     58typedef UISettingsCache<UIDataSettingsMachineParallelPort> UISettingsCacheMachineParallelPort;
    5959
    6060/* Machine settings / Parallel page / Ports data: */
     
    6767    bool operator!=(const UIDataSettingsMachineParallel& /* other */) const { return false; }
    6868};
    69 typedef UISettingsCachePool<UIDataSettingsMachineParallel, UICacheSettingsMachineParallelPort> UICacheSettingsMachineParallel;
     69typedef UISettingsCachePool<UIDataSettingsMachineParallel, UISettingsCacheMachineParallelPort> UISettingsCacheMachineParallel;
    7070
    7171class UIMachineSettingsParallel : public QIWithRetranslateUI<QWidget>,
     
    8080    void polishTab();
    8181
    82     void fetchPortData(const UICacheSettingsMachineParallelPort &portCache);
    83     void uploadPortData(UICacheSettingsMachineParallelPort &portCache);
     82    void fetchPortData(const UISettingsCacheMachineParallelPort &portCache);
     83    void uploadPortData(UISettingsCacheMachineParallelPort &portCache);
    8484
    8585    QWidget* setOrderAfter (QWidget *aAfter);
     
    146146
    147147    /* Cache: */
    148     UICacheSettingsMachineParallel m_cache;
     148    UISettingsCacheMachineParallel m_cache;
    149149};
    150150
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp

    r64780 r65629  
    377377    {
    378378        /* Check if this shared folder data was actually changed: */
    379         const UICacheSettingsSharedFolder &sharedFolderCache = m_cache.child(iSharedFolderIndex);
     379        const UISettingsCacheSharedFolder &sharedFolderCache = m_cache.child(iSharedFolderIndex);
    380380        if (sharedFolderCache.wasChanged())
    381381        {
     
    749749}
    750750
    751 bool UIMachineSettingsSF::removeSharedFolder(const UICacheSettingsSharedFolder &folderCache)
     751bool UIMachineSettingsSF::removeSharedFolder(const UISettingsCacheSharedFolder &folderCache)
    752752{
    753753    /* Get shared folder data: */
     
    804804}
    805805
    806 bool UIMachineSettingsSF::createSharedFolder(const UICacheSettingsSharedFolder &folderCache)
     806bool UIMachineSettingsSF::createSharedFolder(const UISettingsCacheSharedFolder &folderCache)
    807807{
    808808    /* Get shared folder data: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.h

    r62493 r65629  
    6262    bool m_fWritable;
    6363};
    64 typedef UISettingsCache<UIDataSettingsSharedFolder> UICacheSettingsSharedFolder;
     64typedef UISettingsCache<UIDataSettingsSharedFolder> UISettingsCacheSharedFolder;
    6565
    6666/* Machine settings / Shared Folders page / Shared Folders data: */
     
    7373    bool operator!=(const UIDataSettingsSharedFolders& /* other */) const { return false; }
    7474};
    75 typedef UISettingsCachePool<UIDataSettingsSharedFolders, UICacheSettingsSharedFolder> UICacheSettingsSharedFolders;
     75typedef UISettingsCachePool<UIDataSettingsSharedFolders, UISettingsCacheSharedFolder> UISettingsCacheSharedFolders;
    7676
    7777class UIMachineSettingsSF : public UISettingsPageMachine,
     
    139139    CSharedFolderVector getSharedFolders(UISharedFolderType sharedFoldersType);
    140140
    141     bool removeSharedFolder(const UICacheSettingsSharedFolder &folderCache);
    142     bool createSharedFolder(const UICacheSettingsSharedFolder &folderCache);
     141    bool removeSharedFolder(const UISettingsCacheSharedFolder &folderCache);
     142    bool createSharedFolder(const UISettingsCacheSharedFolder &folderCache);
    143143
    144144    QAction  *mNewAction;
     
    150150
    151151    /* Cache: */
    152     UICacheSettingsSharedFolders m_cache;
     152    UISettingsCacheSharedFolders m_cache;
    153153};
    154154
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp

    r62493 r65629  
    101101}
    102102
    103 void UIMachineSettingsSerial::fetchPortData(const UICacheSettingsMachineSerialPort &portCache)
     103void UIMachineSettingsSerial::fetchPortData(const UISettingsCacheMachineSerialPort &portCache)
    104104{
    105105    /* Get port data: */
     
    122122}
    123123
    124 void UIMachineSettingsSerial::uploadPortData(UICacheSettingsMachineSerialPort &portCache)
     124void UIMachineSettingsSerial::uploadPortData(UISettingsCacheMachineSerialPort &portCache)
    125125{
    126126    /* Prepare port data: */
     
    344344        {
    345345            /* Check if port data was changed: */
    346             const UICacheSettingsMachineSerialPort &portCache = m_cache.child(iPort);
     346            const UISettingsCacheMachineSerialPort &portCache = m_cache.child(iPort);
    347347            if (portCache.wasChanged())
    348348            {
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.h

    r62493 r65629  
    6262    QString m_strPath;
    6363};
    64 typedef UISettingsCache<UIDataSettingsMachineSerialPort> UICacheSettingsMachineSerialPort;
     64typedef UISettingsCache<UIDataSettingsMachineSerialPort> UISettingsCacheMachineSerialPort;
    6565
    6666/* Machine settings / Serial page / Ports data: */
     
    7373    bool operator!=(const UIDataSettingsMachineSerial& /* other */) const { return false; }
    7474};
    75 typedef UISettingsCachePool<UIDataSettingsMachineSerial, UICacheSettingsMachineSerialPort> UICacheSettingsMachineSerial;
     75typedef UISettingsCachePool<UIDataSettingsMachineSerial, UISettingsCacheMachineSerialPort> UISettingsCacheMachineSerial;
    7676
    7777class UIMachineSettingsSerial : public QIWithRetranslateUI<QWidget>,
     
    8686    void polishTab();
    8787
    88     void fetchPortData(const UICacheSettingsMachineSerialPort &data);
    89     void uploadPortData(UICacheSettingsMachineSerialPort &data);
     88    void fetchPortData(const UISettingsCacheMachineSerialPort &data);
     89    void uploadPortData(UISettingsCacheMachineSerialPort &data);
    9090
    9191    QWidget* setOrderAfter (QWidget *aAfter);
     
    153153
    154154    /* Cache: */
    155     UICacheSettingsMachineSerial m_cache;
     155    UISettingsCacheMachineSerial m_cache;
    156156};
    157157
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp

    r64796 r65629  
    22902290    {
    22912291        /* Get storage controller cache: */
    2292         const UICacheSettingsMachineStorageController &controllerCache = m_cache.child(iControllerIndex);
     2292        const UISettingsCacheMachineStorageController &controllerCache = m_cache.child(iControllerIndex);
    22932293        /* Get storage controller data from cache: */
    22942294        const UIDataSettingsMachineStorageController &controllerData = controllerCache.base();
     
    23062306        {
    23072307            /* Get storage attachment cache: */
    2308             const UICacheSettingsMachineStorageAttachment &attachmentCache = controllerCache.child(iAttachmentIndex);
     2308            const UISettingsCacheMachineStorageAttachment &attachmentCache = controllerCache.child(iAttachmentIndex);
    23092309            /* Get storage controller data from cache: */
    23102310            const UIDataSettingsMachineStorageAttachment &attachmentData = attachmentCache.base();
     
    35903590            {
    35913591                /* Get controller cache: */
    3592                 const UICacheSettingsMachineStorageController &controllerCache = m_cache.child(iControllerIndex);
     3592                const UISettingsCacheMachineStorageController &controllerCache = m_cache.child(iControllerIndex);
    35933593
    35943594                /* Remove controllers marked for 'remove' and 'update' (if they can't be updated): */
     
    36053605                    {
    36063606                        /* Get attachment cache: */
    3607                         const UICacheSettingsMachineStorageAttachment &attachmentCache = controllerCache.child(iAttachmentIndex);
     3607                        const UISettingsCacheMachineStorageAttachment &attachmentCache = controllerCache.child(iAttachmentIndex);
    36083608
    36093609                        /* Remove attachments marked for 'remove' and 'update' (if they can't be updated): */
     
    36183618            {
    36193619                /* Get controller cache: */
    3620                 const UICacheSettingsMachineStorageController &controllerCache = m_cache.child(iControllerIndex);
     3620                const UISettingsCacheMachineStorageController &controllerCache = m_cache.child(iControllerIndex);
    36213621
    36223622                /* Create controllers marked for 'create' or 'update' (if they can't be updated): */
     
    36363636}
    36373637
    3638 bool UIMachineSettingsStorage::removeStorageController(const UICacheSettingsMachineStorageController &controllerCache)
     3638bool UIMachineSettingsStorage::removeStorageController(const UISettingsCacheMachineStorageController &controllerCache)
    36393639{
    36403640    /* Prepare result: */
     
    36653665}
    36663666
    3667 bool UIMachineSettingsStorage::createStorageController(const UICacheSettingsMachineStorageController &controllerCache)
     3667bool UIMachineSettingsStorage::createStorageController(const UISettingsCacheMachineStorageController &controllerCache)
    36683668{
    36693669    /* Prepare result: */
     
    37083708                {
    37093709                    /* Get storage attachment cache: */
    3710                     const UICacheSettingsMachineStorageAttachment &attachmentCache = controllerCache.child(iAttachmentIndex);
     3710                    const UISettingsCacheMachineStorageAttachment &attachmentCache = controllerCache.child(iAttachmentIndex);
    37113711
    37123712                    /* Create attachment if it was not just 'removed': */
     
    37213721}
    37223722
    3723 bool UIMachineSettingsStorage::updateStorageController(const UICacheSettingsMachineStorageController &controllerCache)
     3723bool UIMachineSettingsStorage::updateStorageController(const UISettingsCacheMachineStorageController &controllerCache)
    37243724{
    37253725    /* Prepare result: */
     
    37573757            {
    37583758                /* Get storage attachment cache: */
    3759                 const UICacheSettingsMachineStorageAttachment &attachmentCache = controllerCache.child(iAttachmentIndex);
     3759                const UISettingsCacheMachineStorageAttachment &attachmentCache = controllerCache.child(iAttachmentIndex);
    37603760
    37613761                /* Create attachments marked for 'create' and 'update' (if they can't be updated): */
     
    37753775}
    37763776
    3777 bool UIMachineSettingsStorage::removeStorageAttachment(const UICacheSettingsMachineStorageController &controllerCache,
    3778                                                        const UICacheSettingsMachineStorageAttachment &attachmentCache)
     3777bool UIMachineSettingsStorage::removeStorageAttachment(const UISettingsCacheMachineStorageController &controllerCache,
     3778                                                       const UISettingsCacheMachineStorageAttachment &attachmentCache)
    37793779{
    37803780    /* Prepare result: */
     
    38103810}
    38113811
    3812 bool UIMachineSettingsStorage::createStorageAttachment(const UICacheSettingsMachineStorageController &controllerCache,
    3813                                                        const UICacheSettingsMachineStorageAttachment &attachmentCache)
     3812bool UIMachineSettingsStorage::createStorageAttachment(const UISettingsCacheMachineStorageController &controllerCache,
     3813                                                       const UISettingsCacheMachineStorageAttachment &attachmentCache)
    38143814{
    38153815    /* Prepare result: */
     
    38993899}
    39003900
    3901 bool UIMachineSettingsStorage::updateStorageAttachment(const UICacheSettingsMachineStorageController &controllerCache,
    3902                                                        const UICacheSettingsMachineStorageAttachment &attachmentCache)
     3901bool UIMachineSettingsStorage::updateStorageAttachment(const UISettingsCacheMachineStorageController &controllerCache,
     3902                                                       const UISettingsCacheMachineStorageAttachment &attachmentCache)
    39033903{
    39043904    /* Prepare result: */
     
    39883988}
    39893989
    3990 bool UIMachineSettingsStorage::isControllerCouldBeUpdated(const UICacheSettingsMachineStorageController &controllerCache) const
     3990bool UIMachineSettingsStorage::isControllerCouldBeUpdated(const UISettingsCacheMachineStorageController &controllerCache) const
    39913991{
    39923992    /* IController interface doesn't allows to change 'name' and 'bus' attributes.
     
    40004000}
    40014001
    4002 bool UIMachineSettingsStorage::isAttachmentCouldBeUpdated(const UICacheSettingsMachineStorageAttachment &attachmentCache) const
     4002bool UIMachineSettingsStorage::isAttachmentCouldBeUpdated(const UISettingsCacheMachineStorageAttachment &attachmentCache) const
    40034003{
    40044004    /* IMediumAttachment could be indirectly updated through IMachine
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h

    r64796 r65629  
    627627    bool m_fAttachmentHotPluggable;
    628628};
    629 typedef UISettingsCache<UIDataSettingsMachineStorageAttachment> UICacheSettingsMachineStorageAttachment;
     629typedef UISettingsCache<UIDataSettingsMachineStorageAttachment> UISettingsCacheMachineStorageAttachment;
    630630
    631631/* Machine settings / Storage page / Storage controller data: */
     
    658658    bool m_fUseHostIOCache;
    659659};
    660 typedef UISettingsCachePool<UIDataSettingsMachineStorageController, UICacheSettingsMachineStorageAttachment> UICacheSettingsMachineStorageController;
     660typedef UISettingsCachePool<UIDataSettingsMachineStorageController, UISettingsCacheMachineStorageAttachment> UISettingsCacheMachineStorageController;
    661661
    662662/* Machine settings / Storage page / Storage data: */
     
    669669    bool operator!=(const UIDataSettingsMachineStorage& /* other */) const { return false; }
    670670};
    671 typedef UISettingsCachePool<UIDataSettingsMachineStorage, UICacheSettingsMachineStorageController> UICacheSettingsMachineStorage;
     671typedef UISettingsCachePool<UIDataSettingsMachineStorage, UISettingsCacheMachineStorageController> UISettingsCacheMachineStorage;
    672672
    673673/* Machine settings / Storage page: */
     
    778778
    779779    bool updateStorageData();
    780     bool removeStorageController(const UICacheSettingsMachineStorageController &controllerCache);
    781     bool createStorageController(const UICacheSettingsMachineStorageController &controllerCache);
    782     bool updateStorageController(const UICacheSettingsMachineStorageController &controllerCache);
    783     bool removeStorageAttachment(const UICacheSettingsMachineStorageController &controllerCache,
    784                                  const UICacheSettingsMachineStorageAttachment &attachmentCache);
    785     bool createStorageAttachment(const UICacheSettingsMachineStorageController &controllerCache,
    786                                  const UICacheSettingsMachineStorageAttachment &attachmentCache);
    787     bool updateStorageAttachment(const UICacheSettingsMachineStorageController &controllerCache,
    788                                  const UICacheSettingsMachineStorageAttachment &attachmentCache);
    789     bool isControllerCouldBeUpdated(const UICacheSettingsMachineStorageController &controllerCache) const;
    790     bool isAttachmentCouldBeUpdated(const UICacheSettingsMachineStorageAttachment &attachmentCache) const;
     780    bool removeStorageController(const UISettingsCacheMachineStorageController &controllerCache);
     781    bool createStorageController(const UISettingsCacheMachineStorageController &controllerCache);
     782    bool updateStorageController(const UISettingsCacheMachineStorageController &controllerCache);
     783    bool removeStorageAttachment(const UISettingsCacheMachineStorageController &controllerCache,
     784                                 const UISettingsCacheMachineStorageAttachment &attachmentCache);
     785    bool createStorageAttachment(const UISettingsCacheMachineStorageController &controllerCache,
     786                                 const UISettingsCacheMachineStorageAttachment &attachmentCache);
     787    bool updateStorageAttachment(const UISettingsCacheMachineStorageController &controllerCache,
     788                                 const UISettingsCacheMachineStorageAttachment &attachmentCache);
     789    bool isControllerCouldBeUpdated(const UISettingsCacheMachineStorageController &controllerCache) const;
     790    bool isAttachmentCouldBeUpdated(const UISettingsCacheMachineStorageAttachment &attachmentCache) const;
    791791
    792792    /** Defines configuration access level. */
     
    826826
    827827    /* Cache: */
    828     UICacheSettingsMachineStorage m_cache;
     828    UISettingsCacheMachineStorage m_cache;
    829829};
    830830
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.h

    r62493 r65629  
    116116    bool m_fEnabledNestedPaging;
    117117};
    118 typedef UISettingsCache<UIDataSettingsMachineSystem> UICacheSettingsMachineSystem;
     118typedef UISettingsCache<UIDataSettingsMachineSystem> UISettingsCacheMachineSystem;
    119119
    120120/* Machine settings / System page: */
     
    218218
    219219    /* Cache: */
    220     UICacheSettingsMachineSystem m_cache;
     220    UISettingsCacheMachineSystem m_cache;
    221221};
    222222
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp

    r64780 r65629  
    512512                {
    513513                    /* Check if USB filter data really changed: */
    514                     const UICacheSettingsMachineUSBFilter &usbFilterCache = m_cache.child(iFilterIndex);
     514                    const UISettingsCacheMachineUSBFilter &usbFilterCache = m_cache.child(iFilterIndex);
    515515                    if (usbFilterCache.wasChanged())
    516516                    {
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.h

    r64713 r65629  
    8080    KUSBDeviceState m_hostUSBDeviceState;
    8181};
    82 typedef UISettingsCache<UIDataSettingsMachineUSBFilter> UICacheSettingsMachineUSBFilter;
     82typedef UISettingsCache<UIDataSettingsMachineUSBFilter> UISettingsCacheMachineUSBFilter;
    8383
    8484/* Common settings / USB page / USB data: */
     
    102102    KUSBControllerType m_USBControllerType;
    103103};
    104 typedef UISettingsCachePool<UIDataSettingsMachineUSB, UICacheSettingsMachineUSBFilter> UICacheSettingsMachineUSB;
     104typedef UISettingsCachePool<UIDataSettingsMachineUSB, UISettingsCacheMachineUSBFilter> UISettingsCacheMachineUSB;
    105105
    106106/* Common settings / USB page: */
     
    189189
    190190    /* Cache: */
    191     UICacheSettingsMachineUSB m_cache;
     191    UISettingsCacheMachineUSB m_cache;
    192192};
    193193
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