VirtualBox

Changeset 100605 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 17, 2023 4:09:47 PM (21 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
158435
Message:

FE/Qt: bugref:9080. Implementing restore item functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.cpp

    r100604 r100605  
    528528}
    529529
     530void UIVisoContentBrowser::restoreItems(const QList<UICustomFileSystemItem*> itemList)
     531{
     532    foreach(UICustomFileSystemItem *pItem, itemList)
     533    {
     534        if (!pItem || pItem->isUpDirectory())
     535            continue;
     536        if (!pItem->isRemovedFromViso())
     537            continue;
     538        QString strVisoPath = pItem->path();
     539        if (strVisoPath.isEmpty())
     540            continue;
     541
     542        bool bFoundInMap = m_entryMap.remove(strVisoPath) > 0;
     543        if (!bFoundInMap)
     544            createVisoEntry(pItem->path(), pItem->data(UICustomFileSystemModelData_LocalPath).toString(), false /* bool bRemove */);
     545
     546        markRemovedUnremovedItemParents(pItem, false);
     547    }
     548    if (m_pTableProxyModel)
     549        m_pTableProxyModel->invalidate();
     550}
     551
    530552void UIVisoContentBrowser::markRemovedUnremovedItemParents(UICustomFileSystemItem *pItem, bool fRemoved)
    531553{
    532     Q_UNUSED(fRemoved);
    533     pItem->setRemovedFromViso(true);
     554    pItem->setRemovedFromViso(fRemoved);
    534555    UICustomFileSystemItem *pRoot = rootItem();
    535556    UICustomFileSystemItem *pParent = pItem->parentItem();
     
    541562        pParent = pParent->parentItem();
    542563    }
    543 }
    544 
    545 void UIVisoContentBrowser::restoreItems(const QList<UICustomFileSystemItem*> itemList)
    546 {
    547     Q_UNUSED(itemList);
    548564}
    549565
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette