VirtualBox

Ignore:
Timestamp:
May 27, 2021 2:23:11 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9827: Cleanup in Global Preferences pages; Mostly to comply with coding-style standards around.

File:
1 edited

Legend:

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

    r86978 r89323  
    55
    66/*
    7  * Copyright (C) 2012-2020 Oracle Corporation
     7 * Copyright (C) 2012-2021 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    4141    bool equal(const UIDataSettingsGlobalDisplay &other) const
    4242    {
    43         return true
     43        return    true
    4444               && (m_guiMaximumGuestScreenSizeValue == other.m_guiMaximumGuestScreenSizeValue)
    4545               && (m_fActivateHoveredMachineWindow == other.m_fActivateHoveredMachineWindow)
    4646               && (m_scaleFactors == other.m_scaleFactors)
    47                ;
     47                  ;
    4848    }
    4949
     
    6161};
    6262
     63
     64/*********************************************************************************************************************************
     65*   Class UIGlobalSettingsDisplay implementation.                                                                                *
     66*********************************************************************************************************************************/
    6367
    6468UIGlobalSettingsDisplay::UIGlobalSettingsDisplay()
     
    129133
    130134    /* Update data and failing state: */
    131     setFailed(!saveDisplayData());
     135    setFailed(!saveData());
    132136
    133137    /* Upload properties to data: */
     
    240244}
    241245
    242 bool UIGlobalSettingsDisplay::saveDisplayData()
     246bool UIGlobalSettingsDisplay::saveData()
    243247{
    244248    /* Prepare result: */
    245249    bool fSuccess = true;
    246250    /* Save display settings from cache: */
    247     if (fSuccess && m_pCache->wasChanged())
     251    if (   fSuccess
     252        && m_pCache->wasChanged())
    248253    {
    249254        /* Get old data from cache: */
     
    253258
    254259        /* Save maximum guest screen size and policy: */
    255         if (fSuccess && newData.m_guiMaximumGuestScreenSizeValue != oldData.m_guiMaximumGuestScreenSizeValue)
    256             gEDataManager->setMaxGuestScreenResolution(newData.m_guiMaximumGuestScreenSizeValue.m_enmPolicy,
    257                                                        newData.m_guiMaximumGuestScreenSizeValue.m_size);
     260        if (   fSuccess
     261            && newData.m_guiMaximumGuestScreenSizeValue != oldData.m_guiMaximumGuestScreenSizeValue)
     262            /* fSuccess = */ gEDataManager->setMaxGuestScreenResolution(newData.m_guiMaximumGuestScreenSizeValue.m_enmPolicy,
     263                                                                        newData.m_guiMaximumGuestScreenSizeValue.m_size);
    258264        /* Save whether hovered machine-window should be activated automatically: */
    259         if (fSuccess && newData.m_fActivateHoveredMachineWindow != oldData.m_fActivateHoveredMachineWindow)
    260             gEDataManager->setActivateHoveredMachineWindow(newData.m_fActivateHoveredMachineWindow);
     265        if (   fSuccess
     266            && newData.m_fActivateHoveredMachineWindow != oldData.m_fActivateHoveredMachineWindow)
     267            /* fSuccess = */ gEDataManager->setActivateHoveredMachineWindow(newData.m_fActivateHoveredMachineWindow);
    261268        /* Save guest-screen scale-factor: */
    262         if (fSuccess && newData.m_scaleFactors != oldData.m_scaleFactors)
    263             gEDataManager->setScaleFactors(newData.m_scaleFactors, UIExtraDataManager::GlobalID);
     269        if (   fSuccess
     270            && newData.m_scaleFactors != oldData.m_scaleFactors)
     271            /* fSuccess = */ gEDataManager->setScaleFactors(newData.m_scaleFactors, UIExtraDataManager::GlobalID);
    264272    }
    265273    /* Return result: */
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