VirtualBox

Changeset 43827 in vbox


Ignore:
Timestamp:
Nov 7, 2012 11:02:12 AM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: VM group UI: Some cleanup for group-item (root-item processing related).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.cpp

    r43825 r43827  
    173173QString UIGChooserItemGroup::fullName() const
    174174{
    175     /* Return "/" for root-group: */
    176     if (!parentItem())
     175    /* Return "/" for main root-item: */
     176    if (isMainRoot())
    177177        return "/";
    178178    /* Get full parent name, append with '/' if not yet appended: */
     179    AssertMsg(parentItem(), ("Incorrect parent set!"));
    179180    QString strFullParentName = parentItem()->fullName();
    180181    if (!strFullParentName.endsWith('/'))
     
    216217void UIGChooserItemGroup::close(bool fAnimated /* = true */)
    217218{
    218     AssertMsg(parentItem(), ("Can't close root-item!"));
     219    AssertMsg(!isRoot(), ("Can't close root-item!"));
    219220    m_pToggleButton->setToggled(false, fAnimated);
    220221}
     
    222223void UIGChooserItemGroup::open(bool fAnimated /* = true */)
    223224{
    224     AssertMsg(parentItem(), ("Can't open root-item!"));
     225    AssertMsg(!isRoot(), ("Can't open root-item!"));
    225226    m_pToggleButton->setToggled(true, fAnimated);
    226227}
     
    232233        if (pItem->toMachineItem()->id() == strId)
    233234            return true;
     235    /* Found nothing? */
    234236    return false;
    235237}
     
    245247        if (pItem->toGroupItem()->isContainsLockedMachine())
    246248            return true;
     249    /* Found nothing? */
    247250    return false;
    248251}
     
    263266void UIGChooserItemGroup::sltNameEditingFinished()
    264267{
    265     /* Not for root-item: */
     268    /* Not for root: */
    266269    if (isRoot())
    267270        return;
     
    290293void UIGChooserItemGroup::sltGroupToggleStart()
    291294{
    292     /* Not for root-item: */
     295    /* Not for root: */
    293296    if (isRoot())
    294297        return;
     
    321324void UIGChooserItemGroup::sltGroupToggleFinish(bool fToggled)
    322325{
    323     /* Not for root-item: */
     326    /* Not for root: */
    324327    if (isRoot())
    325328        return;
     
    693696void UIGChooserItemGroup::startEditing()
    694697{
    695     /* Not for root-item: */
     698    /* Not for root: */
    696699    if (isRoot())
    697700        return;
     
    892895            return pFoundItem;
    893896
    894     /* Nothing found? */
     897    /* Found nothing? */
    895898    return 0;
    896899}
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