VirtualBox

Changeset 94333 in vbox for trunk


Ignore:
Timestamp:
Mar 23, 2022 11:21:34 AM (3 years ago)
Author:
vboxsync
Message:

FE/Qt/Ds: bugref:6899: A bit of cleanup for settings pages.

Location:
trunk
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r94318 r94333  
    75757575  endif
    75767576 else if1of ($(KBUILD_TARGET), linux freebsd netbsd openbsd solaris win)
    7577   VBOX_QT_MOD += Qt5Core Qt5Gui Qt5Widgets Qt5PrintSupport $(if $(VBOX_GUI_USE_QGL),Qt5OpenGL,)
     7577  VBOX_QT_MOD += Qt6Core Qt5Gui Qt5Widgets Qt5PrintSupport $(if $(VBOX_GUI_USE_QGL),Qt5OpenGL,)
    75787578  if1of ($(KBUILD_TARGET), linux freebsd netbsd openbsd solaris)
    75797579   VBOX_QT_MOD += Qt5DBus Qt5Xml Qt5XcbQpa Qt5X11Extras
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInterface.cpp

    r94323 r94333  
    8686void UIGlobalSettingsInterface::getFromCache()
    8787{
    88     /* Load old data from the cache: */
     88    /* Load old data from cache: */
    8989    const UIDataSettingsGlobalInterface &oldData = m_pCache->base();
    9090    m_pEditorColorTheme->setValue(oldData.m_enmColorTheme);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.h

    r94323 r94333  
    7676    void cleanup();
    7777
    78     /** Saves existing proxy data from cache. */
     78    /** Saves existing data from cache. */
    7979    bool saveData();
    8080
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.cpp

    r94298 r94333  
    128128void UIMachineSettingsAudio::getFromCache()
    129129{
    130     /* Get old audio data from the cache: */
     130    /* Get old audio data from cache: */
    131131    const UIDataSettingsMachineAudio &oldAudioData = m_pCache->base();
    132132
    133     /* Load old audio data from the cache: */
     133    /* Load old audio data from cache: */
    134134    m_pCheckBoxAudio->setChecked(oldAudioData.m_fAudioEnabled);
    135135    m_pEditorAudioHostDriver->setValue(oldAudioData.m_audioDriverType);
     
    163163    UISettingsPageMachine::fetchData(data);
    164164
    165     /* Update audio data and failing state: */
    166     setFailed(!saveAudioData());
     165    /* Update data and failing state: */
     166    setFailed(!saveData());
    167167
    168168    /* Upload machine to data: */
     
    271271}
    272272
    273 bool UIMachineSettingsAudio::saveAudioData()
     273bool UIMachineSettingsAudio::saveData()
    274274{
    275275    /* Prepare result: */
    276276    bool fSuccess = true;
    277     /* Save audio settings from the cache: */
     277    /* Save audio settings from cache: */
    278278    if (fSuccess && isMachineInValidMode() && m_pCache->wasChanged())
    279279    {
    280         /* Get old audio data from the cache: */
     280        /* Get old audio data from cache: */
    281281        const UIDataSettingsMachineAudio &oldAudioData = m_pCache->base();
    282         /* Get new audio data from the cache: */
     282        /* Get new audio data from cache: */
    283283        const UIDataSettingsMachineAudio &newAudioData = m_pCache->data();
    284284
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.h

    r94298 r94333  
    4343    UIMachineSettingsAudio();
    4444    /** Destructs Audio settings page. */
    45     ~UIMachineSettingsAudio();
     45    virtual ~UIMachineSettingsAudio() RT_OVERRIDE;
    4646
    4747protected:
     
    8181    void cleanup();
    8282
    83     /** Saves existing audio data from the cache. */
    84     bool saveAudioData();
     83    /** Saves existing data from cache. */
     84    bool saveData();
    8585
    8686    /** Holds the page data cache instance. */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp

    r94056 r94333  
    493493void UIMachineSettingsDisplay::getFromCache()
    494494{
    495     /* Get old display data from the cache: */
     495    /* Get old display data from cache: */
    496496    const UIDataSettingsMachineDisplay &oldDisplayData = m_pCache->base();
    497497
     
    500500    repopulateComboAuthType();
    501501
    502     /* Load old 'Screen' data from the cache: */
     502    /* Load old 'Screen' data from cache: */
    503503    m_pSpinboxMonitorCount->setValue(oldDisplayData.m_cGuestScreenCount);
    504504    m_pEditorScaleFactor->setScaleFactors(oldDisplayData.m_scaleFactors);
     
    520520    if (oldDisplayData.m_fRemoteDisplayServerSupported)
    521521    {
    522         /* Load old 'Remote Display' data from the cache: */
     522        /* Load old 'Remote Display' data from cache: */
    523523        m_pCheckboxRemoteDisplay->setChecked(oldDisplayData.m_fRemoteDisplayServerEnabled);
    524524        m_pEditorRemoteDisplayPort->setText(oldDisplayData.m_strRemoteDisplayPort);
     
    529529    }
    530530
    531     /* Load old 'Recording' data from the cache: */
     531    /* Load old 'Recording' data from cache: */
    532532    m_pCheckboxRecording->setChecked(oldDisplayData.m_fRecordingEnabled);
    533533    m_pEditorRecordingFilePath->setInitialPath(oldDisplayData.m_strRecordingFolder);
     
    633633    UISettingsPageMachine::fetchData(data);
    634634
    635     /* Update display data and failing state: */
    636     setFailed(!saveDisplayData());
     635    /* Update data and failing state: */
     636    setFailed(!saveData());
    637637
    638638    /* Upload machine to data: */
     
    870870void UIMachineSettingsDisplay::polishPage()
    871871{
    872     /* Get old display data from the cache: */
     872    /* Get old display data from cache: */
    873873    const UIDataSettingsMachineDisplay &oldDisplayData = m_pCache->base();
    874874
     
    18491849}
    18501850
    1851 bool UIMachineSettingsDisplay::saveDisplayData()
     1851bool UIMachineSettingsDisplay::saveData()
    18521852{
    18531853    /* Prepare result: */
    18541854    bool fSuccess = true;
    1855     /* Save display settings from the cache: */
     1855    /* Save display settings from cache: */
    18561856    if (fSuccess && isMachineInValidMode() && m_pCache->wasChanged())
    18571857    {
    1858         /* Save 'Screen' data from the cache: */
     1858        /* Save 'Screen' data from cache: */
    18591859        if (fSuccess)
    18601860            fSuccess = saveScreenData();
    1861         /* Save 'Remote Display' data from the cache: */
     1861        /* Save 'Remote Display' data from cache: */
    18621862        if (fSuccess)
    18631863            fSuccess = saveRemoteDisplayData();
    1864         /* Save 'Video Capture' data from the cache: */
     1864        /* Save 'Video Capture' data from cache: */
    18651865        if (fSuccess)
    18661866            fSuccess = saveRecordingData();
     
    18741874    /* Prepare result: */
    18751875    bool fSuccess = true;
    1876     /* Save 'Screen' data from the cache: */
     1876    /* Save 'Screen' data from cache: */
    18771877    if (fSuccess)
    18781878    {
    1879         /* Get old display data from the cache: */
     1879        /* Get old display data from cache: */
    18801880        const UIDataSettingsMachineDisplay &oldDisplayData = m_pCache->base();
    1881         /* Get new display data from the cache: */
     1881        /* Get new display data from cache: */
    18821882        const UIDataSettingsMachineDisplay &newDisplayData = m_pCache->data();
    18831883
     
    19431943    /* Prepare result: */
    19441944    bool fSuccess = true;
    1945     /* Save 'Remote Display' data from the cache: */
     1945    /* Save 'Remote Display' data from cache: */
    19461946    if (fSuccess)
    19471947    {
    1948         /* Get old display data from the cache: */
     1948        /* Get old display data from cache: */
    19491949        const UIDataSettingsMachineDisplay &oldDisplayData = m_pCache->base();
    1950         /* Get new display data from the cache: */
     1950        /* Get new display data from cache: */
    19511951        const UIDataSettingsMachineDisplay &newDisplayData = m_pCache->data();
    19521952
     
    20062006    /* Prepare result: */
    20072007    bool fSuccess = true;
    2008     /* Save 'Recording' data from the cache: */
     2008    /* Save 'Recording' data from cache: */
    20092009    if (fSuccess)
    20102010    {
    2011         /* Get old display data from the cache: */
     2011        /* Get old display data from cache: */
    20122012        const UIDataSettingsMachineDisplay &oldDisplayData = m_pCache->base();
    2013         /* Get new display data from the cache: */
     2013        /* Get new display data from cache: */
    20142014        const UIDataSettingsMachineDisplay &newDisplayData = m_pCache->data();
    20152015
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h

    r93990 r94333  
    5757    UIMachineSettingsDisplay();
    5858    /** Destructs Display settings page. */
    59     ~UIMachineSettingsDisplay();
     59    virtual ~UIMachineSettingsDisplay() RT_OVERRIDE;
    6060
    6161    /** Defines @a comGuestOSType. */
     
    169169    /** Calculates recording video quality for passed @a iFrameWidth, @a iFrameHeight, @a iFrameRate and @a iBitRate. */
    170170    static int calculateQuality(int iFrameWidth, int iFrameHeight, int iFrameRate, int iBitRate);
    171     /** Saves existing display data from the cache. */
    172     bool saveDisplayData();
    173     /** Saves existing 'Screen' data from the cache. */
     171    /** Saves existing data from cache. */
     172    bool saveData();
     173    /** Saves existing 'Screen' data from cache. */
    174174    bool saveScreenData();
    175     /** Saves existing 'Remote Display' data from the cache. */
     175    /** Saves existing 'Remote Display' data from cache. */
    176176    bool saveRemoteDisplayData();
    177     /** Saves existing 'Recording' data from the cache. */
     177    /** Saves existing 'Recording' data from cache. */
    178178    bool saveRecordingData();
    179179    /** Decide which of the recording related widgets are to be disabled/enabled. */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp

    r93829 r94333  
    260260void UIMachineSettingsGeneral::getFromCache()
    261261{
    262     /* Get old general data from the cache: */
     262    /* Get old general data from cache: */
    263263    const UIDataSettingsMachineGeneral &oldGeneralData = m_pCache->base();
    264264
     
    268268    repopulateComboDnDMode();
    269269
    270     /* Load old 'Basic' data from the cache: */
     270    /* Load old 'Basic' data from cache: */
    271271    AssertPtrReturnVoid(m_pEditorNameAndSystem);
    272272    m_pEditorNameAndSystem->setName(oldGeneralData.m_strName);
    273273    m_pEditorNameAndSystem->setTypeId(oldGeneralData.m_strGuestOsTypeId);
    274274
    275     /* Load old 'Advanced' data from the cache: */
     275    /* Load old 'Advanced' data from cache: */
    276276    AssertPtrReturnVoid(m_pEditorSnapshotFolder);
    277277    AssertPtrReturnVoid(m_pComboClipboard);
     
    284284    m_pComboDragAndDrop->setCurrentIndex(iDnDModePosition == -1 ? 0 : iDnDModePosition);
    285285
    286     /* Load old 'Description' data from the cache: */
     286    /* Load old 'Description' data from cache: */
    287287    AssertPtrReturnVoid(m_pEditorDescription);
    288288    m_pEditorDescription->setPlainText(oldGeneralData.m_strDescription);
    289289
    290     /* Load old 'Encryption' data from the cache: */
     290    /* Load old 'Encryption' data from cache: */
    291291    AssertPtrReturnVoid(m_pCheckBoxEncryption);
    292292    AssertPtrReturnVoid(m_pComboCipher);
     
    368368    UISettingsPageMachine::fetchData(data);
    369369
    370     /* Update general data and failing state: */
    371     setFailed(!saveGeneralData());
     370    /* Update data and failing state: */
     371    setFailed(!saveData());
    372372
    373373    /* Upload machine to data: */
     
    892892}
    893893
    894 bool UIMachineSettingsGeneral::saveGeneralData()
     894bool UIMachineSettingsGeneral::saveData()
    895895{
    896896    /* Prepare result: */
    897897    bool fSuccess = true;
    898     /* Save general settings from the cache: */
     898    /* Save general settings from cache: */
    899899    if (fSuccess && isMachineInValidMode() && m_pCache->wasChanged())
    900900    {
    901         /* Save 'Basic' data from the cache: */
     901        /* Save 'Basic' data from cache: */
    902902        if (fSuccess)
    903903            fSuccess = saveBasicData();
    904         /* Save 'Advanced' data from the cache: */
     904        /* Save 'Advanced' data from cache: */
    905905        if (fSuccess)
    906906            fSuccess = saveAdvancedData();
    907         /* Save 'Description' data from the cache: */
     907        /* Save 'Description' data from cache: */
    908908        if (fSuccess)
    909909            fSuccess = saveDescriptionData();
    910         /* Save 'Encryption' data from the cache: */
     910        /* Save 'Encryption' data from cache: */
    911911        if (fSuccess)
    912912            fSuccess = saveEncryptionData();
     
    920920    /* Prepare result: */
    921921    bool fSuccess = true;
    922     /* Save 'Basic' data from the cache: */
     922    /* Save 'Basic' data from cache: */
    923923    if (fSuccess)
    924924    {
    925         /* Get old general data from the cache: */
     925        /* Get old general data from cache: */
    926926        const UIDataSettingsMachineGeneral &oldGeneralData = m_pCache->base();
    927         /* Get new general data from the cache: */
     927        /* Get new general data from cache: */
    928928        const UIDataSettingsMachineGeneral &newGeneralData = m_pCache->data();
    929929
     
    959959    /* Prepare result: */
    960960    bool fSuccess = true;
    961     /* Save 'Advanced' data from the cache: */
     961    /* Save 'Advanced' data from cache: */
    962962    if (fSuccess)
    963963    {
    964         /* Get old general data from the cache: */
     964        /* Get old general data from cache: */
    965965        const UIDataSettingsMachineGeneral &oldGeneralData = m_pCache->base();
    966         /* Get new general data from the cache: */
     966        /* Get new general data from cache: */
    967967        const UIDataSettingsMachineGeneral &newGeneralData = m_pCache->data();
    968968
     
    10061006    /* Prepare result: */
    10071007    bool fSuccess = true;
    1008     /* Save 'Description' data from the cache: */
     1008    /* Save 'Description' data from cache: */
    10091009    if (fSuccess)
    10101010    {
    1011         /* Get old general data from the cache: */
     1011        /* Get old general data from cache: */
    10121012        const UIDataSettingsMachineGeneral &oldGeneralData = m_pCache->base();
    1013         /* Get new general data from the cache: */
     1013        /* Get new general data from cache: */
    10141014        const UIDataSettingsMachineGeneral &newGeneralData = m_pCache->data();
    10151015
     
    10331033    /* Prepare result: */
    10341034    bool fSuccess = true;
    1035     /* Save 'Encryption' data from the cache: */
     1035    /* Save 'Encryption' data from cache: */
    10361036    if (fSuccess)
    10371037    {
    1038         /* Get old general data from the cache: */
     1038        /* Get old general data from cache: */
    10391039        const UIDataSettingsMachineGeneral &oldGeneralData = m_pCache->base();
    1040         /* Get new general data from the cache: */
     1040        /* Get new general data from cache: */
    10411041        const UIDataSettingsMachineGeneral &newGeneralData = m_pCache->data();
    10421042
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.h

    r93990 r94333  
    4848    UIMachineSettingsGeneral();
    4949    /** Destructs General settings page. */
    50     ~UIMachineSettingsGeneral();
     50    virtual ~UIMachineSettingsGeneral() RT_OVERRIDE;
    5151
    5252    /** Returns the VM OS type ID. */
     
    6666      * @note This task COULD be performed in other than GUI thread. */
    6767    virtual void loadToCacheFrom(QVariant &data) RT_OVERRIDE;
    68     /** Loads data into the corresponding widgets from the cache,
     68    /** Loads data into the corresponding widgets from cache,
    6969      * @note This task SHOULD be performed in GUI thread only! */
    7070    virtual void getFromCache() RT_OVERRIDE;
     
    7373      * @note This task SHOULD be performed in GUI thread only! */
    7474    virtual void putToCache() RT_OVERRIDE;
    75     /** Save data from the cache into the corresponding external object(s).
     75    /** Save data from cache into the corresponding external object(s).
    7676      * @note This task COULD be performed in other than GUI thread. */
    7777    virtual void saveFromCacheTo(QVariant &data) /* overrride */;
     
    120120    void repopulateComboDnDMode();
    121121
    122     /** Saves existing general data from the cache. */
    123     bool saveGeneralData();
    124     /** Saves existing 'Basic' data from the cache. */
     122    /** Saves existing general data from cache. */
     123    bool saveData();
     124    /** Saves existing 'Basic' data from cache. */
    125125    bool saveBasicData();
    126     /** Saves existing 'Advanced' data from the cache. */
     126    /** Saves existing 'Advanced' data from cache. */
    127127    bool saveAdvancedData();
    128     /** Saves existing 'Description' data from the cache. */
     128    /** Saves existing 'Description' data from cache. */
    129129    bool saveDescriptionData();
    130     /** Saves existing 'Encryption' data from the cache. */
     130    /** Saves existing 'Encryption' data from cache. */
    131131    bool saveEncryptionData();
    132132
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.cpp

    r94148 r94333  
    211211void UIMachineSettingsInterface::getFromCache()
    212212{
    213     /* Get old interface data from the cache: */
     213    /* Get old interface data from cache: */
    214214    const UIDataSettingsMachineInterface &oldInterfaceData = m_pCache->base();
    215215
    216     /* Load old interface data from the cache: */
     216    /* Load old interface data from cache: */
    217217    m_pEditorStatusBar->setStatusBarEnabled(oldInterfaceData.m_fStatusBarEnabled);
    218218    m_pEditorStatusBar->setStatusBarConfiguration(oldInterfaceData.m_statusBarRestrictions,
     
    288288    UISettingsPageMachine::fetchData(data);
    289289
    290     /* Update interface data and failing state: */
    291     setFailed(!saveInterfaceData());
     290    /* Update data and failing state: */
     291    setFailed(!saveData());
    292292
    293293    /* Upload machine to data: */
     
    413413}
    414414
    415 bool UIMachineSettingsInterface::saveInterfaceData()
     415bool UIMachineSettingsInterface::saveData()
    416416{
    417417    /* Prepare result: */
    418418    bool fSuccess = true;
    419     /* Save display settings from the cache: */
     419    /* Save display settings from cache: */
    420420    if (fSuccess && isMachineInValidMode() && m_pCache->wasChanged())
    421421    {
    422         /* Save 'Menu-bar' data from the cache: */
     422        /* Save 'Menu-bar' data from cache: */
    423423        if (fSuccess)
    424424            fSuccess = saveMenuBarData();
    425         /* Save 'Status-bar' data from the cache: */
     425        /* Save 'Status-bar' data from cache: */
    426426        if (fSuccess)
    427427            fSuccess = saveStatusBarData();
    428         /* Save 'Mini-toolbar' data from the cache: */
     428        /* Save 'Mini-toolbar' data from cache: */
    429429        if (fSuccess)
    430430            fSuccess = saveMiniToolbarData();
    431         /* Save 'Visual State' data from the cache: */
     431        /* Save 'Visual State' data from cache: */
    432432        if (fSuccess)
    433433            fSuccess = saveVisualStateData();
     
    441441    /* Prepare result: */
    442442    bool fSuccess = true;
    443     /* Save 'Menu-bar' data from the cache: */
     443    /* Save 'Menu-bar' data from cache: */
    444444    if (fSuccess)
    445445    {
    446         /* Get old interface data from the cache: */
     446        /* Get old interface data from cache: */
    447447        const UIDataSettingsMachineInterface &oldInterfaceData = m_pCache->base();
    448         /* Get new interface data from the cache: */
     448        /* Get new interface data from cache: */
    449449        const UIDataSettingsMachineInterface &newInterfaceData = m_pCache->data();
    450450
     
    494494    /* Prepare result: */
    495495    bool fSuccess = true;
    496     /* Save 'Status-bar' data from the cache: */
     496    /* Save 'Status-bar' data from cache: */
    497497    if (fSuccess)
    498498    {
    499         /* Get old interface data from the cache: */
     499        /* Get old interface data from cache: */
    500500        const UIDataSettingsMachineInterface &oldInterfaceData = m_pCache->base();
    501         /* Get new interface data from the cache: */
     501        /* Get new interface data from cache: */
    502502        const UIDataSettingsMachineInterface &newInterfaceData = m_pCache->data();
    503503
     
    520520    /* Prepare result: */
    521521    bool fSuccess = true;
    522     /* Save 'Mini-toolbar' data from the cache: */
     522    /* Save 'Mini-toolbar' data from cache: */
    523523    if (fSuccess)
    524524    {
    525         /* Get old interface data from the cache: */
     525        /* Get old interface data from cache: */
    526526        const UIDataSettingsMachineInterface &oldInterfaceData = m_pCache->base(); Q_UNUSED(oldInterfaceData);
    527         /* Get new interface data from the cache: */
     527        /* Get new interface data from cache: */
    528528        const UIDataSettingsMachineInterface &newInterfaceData = m_pCache->data(); Q_UNUSED(newInterfaceData);
    529529
     
    545545    /* Prepare result: */
    546546    bool fSuccess = true;
    547     /* Save 'Visual State' data from the cache: */
     547    /* Save 'Visual State' data from cache: */
    548548    if (fSuccess)
    549549    {
    550         /* Get old interface data from the cache: */
     550        /* Get old interface data from cache: */
    551551        const UIDataSettingsMachineInterface &oldInterfaceData = m_pCache->base();
    552         /* Get new interface data from the cache: */
     552        /* Get new interface data from cache: */
    553553        const UIDataSettingsMachineInterface &newInterfaceData = m_pCache->data();
    554554
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.h

    r94148 r94333  
    4646    UIMachineSettingsInterface(const QUuid &uMachineId);
    4747    /** Destructs User Interface settings page. */
    48     ~UIMachineSettingsInterface();
     48    virtual ~UIMachineSettingsInterface() RT_OVERRIDE;
    4949
    5050protected:
     
    8484    void cleanup();
    8585
    86     /** Saves existing interface data from the cache. */
    87     bool saveInterfaceData();
    88     /** Saves existing 'Menu-bar' data from the cache. */
     86    /** Saves existing data from cache. */
     87    bool saveData();
     88    /** Saves existing 'Menu-bar' data from cache. */
    8989    bool saveMenuBarData();
    90     /** Saves existing 'Status-bar' data from the cache. */
     90    /** Saves existing 'Status-bar' data from cache. */
    9191    bool saveStatusBarData();
    92     /** Saves existing 'Mini-toolbar' data from the cache. */
     92    /** Saves existing 'Mini-toolbar' data from cache. */
    9393    bool saveMiniToolbarData();
    94     /** Saves existing 'Visual State' data from the cache. */
     94    /** Saves existing 'Visual State' data from cache. */
    9595    bool saveVisualStateData();
    9696
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp

    r94058 r94333  
    11741174        UIMachineSettingsNetwork *pTab = qobject_cast<UIMachineSettingsNetwork*>(m_pTabWidget->widget(iSlot));
    11751175
    1176         /* Load old adapter data from the cache: */
     1176        /* Load old adapter data from cache: */
    11771177        pTab->getAdapterDataFromCache(m_pCache->child(iSlot));
    11781178
     
    12151215    UISettingsPageMachine::fetchData(data);
    12161216
    1217     /* Update network data and failing state: */
    1218     setFailed(!saveNetworkData());
     1217    /* Update data and failing state: */
     1218    setFailed(!saveData());
    12191219
    12201220    /* Upload machine to data: */
     
    15131513}
    15141514
    1515 bool UIMachineSettingsNetworkPage::saveNetworkData()
     1515bool UIMachineSettingsNetworkPage::saveData()
    15161516{
    15171517    /* Prepare result: */
    15181518    bool fSuccess = true;
    1519     /* Save network settings from the cache: */
     1519    /* Save network settings from cache: */
    15201520    if (fSuccess && isMachineInValidMode() && m_pCache->wasChanged())
    15211521    {
     
    15321532    /* Prepare result: */
    15331533    bool fSuccess = true;
    1534     /* Save adapter settings from the cache: */
     1534    /* Save adapter settings from cache: */
    15351535    if (fSuccess && m_pCache->child(iSlot).wasChanged())
    15361536    {
    1537         /* Get old network data from the cache: */
     1537        /* Get old network data from cache: */
    15381538        const UIDataSettingsMachineNetworkAdapter &oldAdapterData = m_pCache->child(iSlot).base();
    1539         /* Get new network data from the cache: */
     1539        /* Get new network data from cache: */
    15401540        const UIDataSettingsMachineNetworkAdapter &newAdapterData = m_pCache->child(iSlot).data();
    15411541
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.h

    r93990 r94333  
    4444    UIMachineSettingsNetworkPage();
    4545    /** Destructs Network settings page. */
    46     ~UIMachineSettingsNetworkPage();
     46    virtual ~UIMachineSettingsNetworkPage() RT_OVERRIDE;
    4747
    4848    /** Returns the bridged adapter list. */
     
    134134    static bool saveGenericProperties(CNetworkAdapter &comAdapter, const QString &strProperties);
    135135
    136     /** Saves existing network data from the cache. */
    137     bool saveNetworkData();
    138     /** Saves existing adapter data from the cache. */
     136    /** Saves existing data from cache. */
     137    bool saveData();
     138    /** Saves existing adapter data from cache. */
    139139    bool saveAdapterData(int iSlot);
    140140
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp

    r94005 r94333  
    395395    updateRootItemsVisibility();
    396396
    397     /* For each folder => load it from the cache: */
     397    /* For each folder => load it from cache: */
    398398    for (int iFolderIndex = 0; iFolderIndex < m_pCache->childCount(); ++iFolderIndex)
    399399        addSharedFolderItem(m_pCache->child(iFolderIndex).base(), false /* its new? */);
     
    437437    UISettingsPageMachine::fetchData(data);
    438438
    439     /* Update folders data and failing state: */
    440     setFailed(!saveFoldersData());
     439    /* Update data and failing state: */
     440    setFailed(!saveData());
    441441
    442442    /* Upload machine to data: */
     
    10271027}
    10281028
    1029 bool UIMachineSettingsSF::saveFoldersData()
     1029bool UIMachineSettingsSF::saveData()
    10301030{
    10311031    /* Prepare result: */
    10321032    bool fSuccess = true;
    1033     /* Save folders settings from the cache: */
     1033    /* Save folders settings from cache: */
    10341034    if (fSuccess && isMachineInValidMode() && m_pCache->wasChanged())
    10351035    {
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.h

    r93990 r94333  
    5353    UIMachineSettingsSF();
    5454    /** Destructs Shared Folders settings page. */
    55     ~UIMachineSettingsSF();
     55    virtual ~UIMachineSettingsSF() RT_OVERRIDE;
    5656
    5757protected:
     
    144144    bool getSharedFolder(const QString &strFolderName, const CSharedFolderVector &folders, CSharedFolder &comFolder);
    145145
    146     /** Saves existing folder data from the cache. */
    147     bool saveFoldersData();
     146    /** Saves existing data from cache. */
     147    bool saveData();
    148148    /** Removes shared folder defined by a @a folderCache. */
    149149    bool removeSharedFolder(const UISettingsCacheSharedFolder &folderCache);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp

    r94042 r94333  
    629629        UIMachineSettingsSerial *pPage = qobject_cast<UIMachineSettingsSerial*>(m_pTabWidget->widget(iSlot));
    630630
    631         /* Load old port data from the cache: */
     631        /* Load old port data from cache: */
    632632        pPage->loadPortData(m_pCache->child(iSlot).base());
    633633
     
    676676    UISettingsPageMachine::fetchData(data);
    677677
    678     /* Update serial data and failing state: */
    679     setFailed(!saveSerialData());
     678    /* Update data and failing state: */
     679    setFailed(!saveData());
    680680
    681681    /* Upload machine to data: */
     
    823823}
    824824
    825 bool UIMachineSettingsSerialPage::saveSerialData()
     825bool UIMachineSettingsSerialPage::saveData()
    826826{
    827827    /* Prepare result: */
    828828    bool fSuccess = true;
    829     /* Save serial settings from the cache: */
     829    /* Save serial settings from cache: */
    830830    if (fSuccess && isMachineInValidMode() && m_pCache->wasChanged())
    831831    {
     
    842842    /* Prepare result: */
    843843    bool fSuccess = true;
    844     /* Save adapter settings from the cache: */
     844    /* Save adapter settings from cache: */
    845845    if (fSuccess && m_pCache->child(iSlot).wasChanged())
    846846    {
    847         /* Get old serial data from the cache: */
     847        /* Get old serial data from cache: */
    848848        const UIDataSettingsMachineSerialPort &oldPortData = m_pCache->child(iSlot).base();
    849         /* Get new serial data from the cache: */
     849        /* Get new serial data from cache: */
    850850        const UIDataSettingsMachineSerialPort &newPortData = m_pCache->child(iSlot).data();
    851851
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.h

    r93990 r94333  
    4343    UIMachineSettingsSerialPage();
    4444    /** Destructs Serial settings page. */
    45     ~UIMachineSettingsSerialPage();
     45    virtual ~UIMachineSettingsSerialPage() RT_OVERRIDE;
    4646
    4747protected:
     
    8080    void cleanup();
    8181
    82     /** Saves existing serial data from the cache. */
    83     bool saveSerialData();
    84     /** Saves existing port data from the cache. */
     82    /** Saves existing data from cache. */
     83    bool saveData();
     84    /** Saves existing port data from cache. */
    8585    bool savePortData(int iSlot);
    8686
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp

    r93998 r94333  
    31313131    m_pModelStorage->clear();
    31323132
    3133     /* Load old common data from the cache: */
     3133    /* Load old common data from cache: */
    31343134    m_pModelStorage->setMachineId(m_uMachineId);
    31353135
     
    31393139        /* Get controller cache: */
    31403140        const UISettingsCacheMachineStorageController &controllerCache = m_pCache->child(iControllerIndex);
    3141         /* Get old controller data from the cache: */
     3141        /* Get old controller data from cache: */
    31423142        const UIDataSettingsMachineStorageController &oldControllerData = controllerCache.base();
    31433143
    3144         /* Load old controller data from the cache: */
     3144        /* Load old controller data from cache: */
    31453145        const QModelIndex controllerIndex = m_pModelStorage->addController(oldControllerData.m_strName,
    31463146                                                                           oldControllerData.m_enmBus,
     
    31553155            /* Get attachment cache: */
    31563156            const UISettingsCacheMachineStorageAttachment &attachmentCache = controllerCache.child(iAttachmentIndex);
    3157             /* Get old attachment data from the cache: */
     3157            /* Get old attachment data from cache: */
    31583158            const UIDataSettingsMachineStorageAttachment &oldAttachmentData = attachmentCache.base();
    31593159
    3160             /* Load old attachment data from the cache: */
     3160            /* Load old attachment data from cache: */
    31613161            const QModelIndex attachmentIndex = m_pModelStorage->addAttachment(controllerId,
    31623162                                                                               oldAttachmentData.m_enmDeviceType,
     
    32443244    UISettingsPageMachine::fetchData(data);
    32453245
    3246     /* Update storage data and failing state: */
    3247     setFailed(!saveStorageData());
     3246    /* Update data and failing state: */
     3247    setFailed(!saveData());
    32483248
    32493249    /* Upload machine to data: */
     
    53795379}
    53805380
    5381 bool UIMachineSettingsStorage::saveStorageData()
     5381bool UIMachineSettingsStorage::saveData()
    53825382{
    53835383    /* Prepare result: */
    53845384    bool fSuccess = true;
    5385     /* Save storage settings from the cache: */
     5385    /* Save storage settings from cache: */
    53865386    if (fSuccess && isMachineInValidMode() && m_pCache->wasChanged())
    53875387    {
     
    54455445    if (fSuccess && isMachineOffline())
    54465446    {
    5447         /* Get old controller data from the cache: */
     5447        /* Get old controller data from cache: */
    54485448        const UIDataSettingsMachineStorageController &oldControllerData = controllerCache.base();
    54495449
     
    54755475    if (fSuccess && isMachineOffline())
    54765476    {
    5477         /* Get new controller data from the cache: */
     5477        /* Get new controller data from cache: */
    54785478        const UIDataSettingsMachineStorageController &newControllerData = controllerCache.data();
    54795479
     
    55625562    if (fSuccess)
    55635563    {
    5564         /* Get old controller data from the cache: */
     5564        /* Get old controller data from cache: */
    55655565        const UIDataSettingsMachineStorageController &oldControllerData = controllerCache.base();
    5566         /* Get new controller data from the cache: */
     5566        /* Get new controller data from cache: */
    55675567        const UIDataSettingsMachineStorageController &newControllerData = controllerCache.data();
    55685568
     
    56665666    if (fSuccess)
    56675667    {
    5668         /* Get old controller data from the cache: */
     5668        /* Get old controller data from cache: */
    56695669        const UIDataSettingsMachineStorageController &oldControllerData = controllerCache.base();
    5670         /* Get old attachment data from the cache: */
     5670        /* Get old attachment data from cache: */
    56715671        const UIDataSettingsMachineStorageAttachment &oldAttachmentData = attachmentCache.base();
    56725672
     
    57035703    if (fSuccess)
    57045704    {
    5705         /* Get new controller data from the cache: */
     5705        /* Get new controller data from cache: */
    57065706        const UIDataSettingsMachineStorageController &newControllerData = controllerCache.data();
    5707         /* Get new attachment data from the cache: */
     5707        /* Get new attachment data from cache: */
    57085708        const UIDataSettingsMachineStorageAttachment &newAttachmentData = attachmentCache.data();
    57095709
     
    57935793    if (fSuccess)
    57945794    {
    5795         /* Get new controller data from the cache: */
     5795        /* Get new controller data from cache: */
    57965796        const UIDataSettingsMachineStorageController &newControllerData = controllerCache.data();
    5797         /* Get new attachment data from the cache: */
     5797        /* Get new attachment data from cache: */
    57985798        const UIDataSettingsMachineStorageAttachment &newAttachmentData = attachmentCache.data();
    57995799
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h

    r93990 r94333  
    251251    void addRecentMediumActions(QMenu *pOpenMediumMenu, UIMediumDeviceType enmRecentMediumType);
    252252
    253     /** Saves existing storage data from the cache. */
    254     bool saveStorageData();
     253    /** Saves existing data from cache. */
     254    bool saveData();
    255255    /** Removes existing storage controller described by the @a controllerCache. */
    256256    bool removeStorageController(const UISettingsCacheMachineStorageController &controllerCache);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp

    r93829 r94333  
    306306void UIMachineSettingsSystem::getFromCache()
    307307{
    308     /* Get old system data from the cache: */
     308    /* Get old system data from cache: */
    309309    const UIDataSettingsMachineSystem &oldSystemData = m_pCache->base();
    310310
     
    315315    repopulateComboParavirtProviderType();
    316316
    317     /* Load old 'Motherboard' data from the cache: */
     317    /* Load old 'Motherboard' data from cache: */
    318318    m_pEditorBaseMemory->setValue(oldSystemData.m_iMemorySize);
    319319    m_pEditorBootOrder->setValue(oldSystemData.m_bootItems);
     
    326326    m_pCheckBoxUTC->setChecked(oldSystemData.m_fEnabledUTC);
    327327
    328     /* Load old 'Processor' data from the cache: */
     328    /* Load old 'Processor' data from cache: */
    329329    m_pSliderProcessorCount->setValue(oldSystemData.m_cCPUCount);
    330330    m_pSliderProcessorExecCap->setValue(oldSystemData.m_iCPUExecCap);
     
    332332    m_pCheckBoxNestedVirtualization->setChecked(oldSystemData.m_fEnabledNestedHwVirtEx);
    333333
    334     /* Load old 'Acceleration' data from the cache: */
     334    /* Load old 'Acceleration' data from cache: */
    335335    const int iParavirtProviderPosition = m_pComboParavirtProvider->findData(oldSystemData.m_paravirtProvider);
    336336    m_pComboParavirtProvider->setCurrentIndex(iParavirtProviderPosition == -1 ? 0 : iParavirtProviderPosition);
     
    397397    UISettingsPageMachine::fetchData(data);
    398398
    399     /* Update system data and failing state: */
    400     setFailed(!saveSystemData());
     399    /* Update data and failing state: */
     400    setFailed(!saveData());
    401401
    402402    /* Upload machine to data: */
     
    686686void UIMachineSettingsSystem::polishPage()
    687687{
    688     /* Get old system data from the cache: */
     688    /* Get old system data from cache: */
    689689    const UIDataSettingsMachineSystem &systemData = m_pCache->base();
    690690
     
    13181318}
    13191319
    1320 bool UIMachineSettingsSystem::saveSystemData()
     1320bool UIMachineSettingsSystem::saveData()
    13211321{
    13221322    /* Prepare result: */
    13231323    bool fSuccess = true;
    1324     /* Save general settings from the cache: */
     1324    /* Save general settings from cache: */
    13251325    if (fSuccess && isMachineInValidMode() && m_pCache->wasChanged())
    13261326    {
    1327         /* Save 'Motherboard' data from the cache: */
     1327        /* Save 'Motherboard' data from cache: */
    13281328        if (fSuccess)
    13291329            fSuccess = saveMotherboardData();
    1330         /* Save 'Processor' data from the cache: */
     1330        /* Save 'Processor' data from cache: */
    13311331        if (fSuccess)
    13321332            fSuccess = saveProcessorData();
    1333         /* Save 'Acceleration' data from the cache: */
     1333        /* Save 'Acceleration' data from cache: */
    13341334        if (fSuccess)
    13351335            fSuccess = saveAccelerationData();
     
    13431343    /* Prepare result: */
    13441344    bool fSuccess = true;
    1345     /* Save 'Motherboard' settings from the cache: */
     1345    /* Save 'Motherboard' settings from cache: */
    13461346    if (fSuccess)
    13471347    {
    1348         /* Get old system data from the cache: */
     1348        /* Get old system data from cache: */
    13491349        const UIDataSettingsMachineSystem &oldSystemData = m_pCache->base();
    1350         /* Get new system data from the cache: */
     1350        /* Get new system data from cache: */
    13511351        const UIDataSettingsMachineSystem &newSystemData = m_pCache->data();
    13521352
     
    14061406    /* Prepare result: */
    14071407    bool fSuccess = true;
    1408     /* Save 'Processor' settings from the cache: */
     1408    /* Save 'Processor' settings from cache: */
    14091409    if (fSuccess)
    14101410    {
    1411         /* Get old system data from the cache: */
     1411        /* Get old system data from cache: */
    14121412        const UIDataSettingsMachineSystem &oldSystemData = m_pCache->base();
    1413         /* Get new system data from the cache: */
     1413        /* Get new system data from cache: */
    14141414        const UIDataSettingsMachineSystem &newSystemData = m_pCache->data();
    14151415
     
    14511451    /* Prepare result: */
    14521452    bool fSuccess = true;
    1453     /* Save 'Acceleration' settings from the cache: */
     1453    /* Save 'Acceleration' settings from cache: */
    14541454    if (fSuccess)
    14551455    {
    1456         /* Get old system data from the cache: */
     1456        /* Get old system data from cache: */
    14571457        const UIDataSettingsMachineSystem &oldSystemData = m_pCache->base();
    1458         /* Get new system data from the cache: */
     1458        /* Get new system data from cache: */
    14591459        const UIDataSettingsMachineSystem &newSystemData = m_pCache->data();
    14601460
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.h

    r93990 r94333  
    4848    UIMachineSettingsSystem();
    4949    /** Destructs System settings page. */
    50     ~UIMachineSettingsSystem();
     50    virtual ~UIMachineSettingsSystem() RT_OVERRIDE;
    5151
    5252    /** Returns whether the HW Virt Ex is supported. */
     
    150150    void retranslateComboParavirtProvider();
    151151
    152     /** Saves existing system data from the cache. */
    153     bool saveSystemData();
    154     /** Saves existing 'Motherboard' data from the cache. */
     152    /** Saves existing data from cache. */
     153    bool saveData();
     154    /** Saves existing 'Motherboard' data from cache. */
    155155    bool saveMotherboardData();
    156     /** Saves existing 'Processor' data from the cache. */
     156    /** Saves existing 'Processor' data from cache. */
    157157    bool saveProcessorData();
    158     /** Saves existing 'Acceleration' data from the cache. */
     158    /** Saves existing 'Acceleration' data from cache. */
    159159    bool saveAccelerationData();
    160160
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp

    r94001 r94333  
    435435    m_pTreeWidgetFilters->clear();
    436436
    437     /* Get old USB data from the cache: */
     437    /* Get old USB data from cache: */
    438438    const UIDataSettingsMachineUSB &oldUsbData = m_pCache->base();
    439439
     
    450450    m_pRadioButtonUSB3->setVisible(supportedTypes.contains(KUSBControllerType_XHCI));
    451451
    452     /* Load old USB data from the cache: */
     452    /* Load old USB data from cache: */
    453453    m_pCheckBoxUSB->setChecked(oldUsbData.m_fUSBEnabled);
    454454    switch (oldUsbData.m_USBControllerType)
     
    460460    }
    461461
    462     /* For each filter => load it from the cache: */
     462    /* For each filter => load it from cache: */
    463463    for (int iFilterIndex = 0; iFilterIndex < m_pCache->childCount(); ++iFilterIndex)
    464464        addUSBFilterItem(m_pCache->child(iFilterIndex).base(), false /* its new? */);
     
    512512    UISettingsPageMachine::fetchData(data);
    513513
    514     /* Update USB data and failing state: */
    515     setFailed(!saveUSBData());
     514    /* Update data and failing state: */
     515    setFailed(!saveData());
    516516
    517517    /* Upload machine to data: */
     
    10871087}
    10881088
    1089 bool UIMachineSettingsUSB::saveUSBData()
     1089bool UIMachineSettingsUSB::saveData()
    10901090{
    10911091    /* Prepare result: */
    10921092    bool fSuccess = true;
    1093     /* Save USB settings from the cache: */
     1093    /* Save USB settings from cache: */
    10941094    if (fSuccess && isMachineInValidMode() && m_pCache->wasChanged())
    10951095    {
    1096         /* Get new USB data from the cache: */
     1096        /* Get new USB data from cache: */
    10971097        const UIDataSettingsMachineUSB &newUsbData = m_pCache->data();
    10981098
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.h

    r93990 r94333  
    5353    UIMachineSettingsUSB();
    5454    /** Destructs USB settings page. */
    55     ~UIMachineSettingsUSB();
     55    virtual ~UIMachineSettingsUSB() RT_OVERRIDE;
    5656
    5757    /** Returns whether the USB is enabled. */
     
    136136    void addUSBFilterItem(const UIDataSettingsMachineUSBFilter &filterData, bool fChoose);
    137137
    138     /** Saves existing USB data from the cache. */
    139     bool saveUSBData();
     138    /** Saves existing data from cache. */
     139    bool saveData();
    140140    /** Removes USB controllers of passed @a types. */
    141141    bool removeUSBControllers(const QSet<KUSBControllerType> &types = QSet<KUSBControllerType>());
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