VirtualBox

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


Ignore:
Timestamp:
Jan 9, 2025 10:21:08 AM (4 weeks ago)
Author:
vboxsync
Message:

FE/Qt: bugref:3409: Action-pool: Fixing similar parfait warnings for coding pattern, related to unused variables; S.a. commits for Runtime and Manager action-pools: r166529, r166539; Besides that, adding some sanity checks for addAction stuff as passed pointers can indeed be null.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp

    r106709 r107584  
    35483548bool UIActionPool::addAction(UIMenu *pMenu, UIAction *pAction, bool fReallyAdd /* = true */)
    35493549{
     3550    /* Sanity check: */
     3551    AssertPtrReturn(pMenu, false);
     3552    AssertPtrReturn(pAction, false);
     3553
    35503554    /* Check if action is allowed: */
    35513555    const bool fIsActionAllowed = pAction->isAllowed();
     
    36753679    /* 'Close' action: */
    36763680    fSeparator = addAction(pMenu, action(UIActionIndex_M_Application_S_Close)) || fSeparator;
     3681
     3682    /* Remove if fSeparator is used: */
     3683    Q_UNUSED(fSeparator);
    36773684
    36783685    /* Mark menu as valid: */
     
    37423749#endif
    37433750
     3751    /* Remove if fSeparator is used: */
     3752    Q_UNUSED(fSeparator);
     3753
    37443754    /* Mark menu as valid: */
    37453755    m_invalidations.remove(UIActionIndex_Menu_Help);
     
    38013811    fSeparator = addAction(pMenu, action(UIActionIndex_M_Log_S_Refresh)) || fSeparator;
    38023812    fSeparator = addAction(pMenu, action(UIActionIndex_M_Log_S_Reload)) || fSeparator;
     3813
     3814    /* Remove if fSeparator is used: */
     3815    Q_UNUSED(fSeparator);
    38033816}
    38043817
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