Changeset 100601 in vbox
- Timestamp:
- Jul 17, 2023 12:13:50 PM (20 months ago)
- svn:sync-xref-src-repo-rev:
- 158431
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICustomFileSystemModel.cpp
r100593 r100601 290 290 } 291 291 292 void UICustomFileSystemItem::setToolTip(const QString &strToolTip) 293 { 294 m_strToolTip = strToolTip; 295 } 296 297 const QString &UICustomFileSystemItem::toolTip() const 298 { 299 return m_strToolTip; 300 } 301 292 302 293 303 /********************************************************************************************************************************* … … 500 510 else 501 511 return QIcon(":/file_manager_folder_16px.png"); 502 503 512 } 504 513 else if (item->isFile()) … … 521 530 if (role == Qt::ToolTipRole) 522 531 { 523 return QString(item->path()); 532 if (!item->toolTip().isEmpty()) 533 return QString(item->toolTip()); 524 534 } 525 535 return QVariant(); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICustomFileSystemModel.h
r100539 r100601 119 119 bool isRemovedFromViso() const; 120 120 121 void setToolTip(const QString &strToolTip); 122 const QString &toolTip() const; 123 121 124 private: 122 125 … … 135 138 /** True if the file object is hidden in the file system. */ 136 139 bool m_fIsHidden; 140 QString m_strToolTip; 137 141 }; 138 142 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.cpp
r100593 r100601 521 521 createVisoEntry(pItem->path(), pItem->data(UICustomFileSystemModelData_LocalPath).toString(), true /* bool bRemove */); 522 522 523 pItem->setRemovedFromViso(true);523 markRemovedUnremovedItemParents(pItem, true); 524 524 } 525 525 if (m_pTableProxyModel) … … 527 527 } 528 528 529 void UIVisoContentBrowser::markRemovedUnremovedItemParents(UICustomFileSystemItem *pItem, bool fRemoved) 530 { 531 Q_UNUSED(fRemoved); 532 pItem->setRemovedFromViso(true); 533 UICustomFileSystemItem *pParent = pItem->parentItem(); 534 while (pParent) 535 { 536 pParent->setToolTip(QApplication::translate("UIVisoCreatorWidget", "Child/children removed")); 537 pParent = pParent->parentItem(); 538 } 539 } 529 540 530 541 void UIVisoContentBrowser::restoreItems(const QList<UICustomFileSystemItem*> itemList) … … 905 916 void UIVisoContentBrowser::processRemovedEntries(const QStringList &removedEntries) 906 917 { 918 QList<UICustomFileSystemItem*> itemList; 907 919 foreach (const QString &strPath, removedEntries) 908 920 { … … 910 922 UICustomFileSystemItem *pItem = searchItemByPath(strPath); 911 923 if (pItem) 912 { 913 pItem->setRemovedFromViso(true); 914 createVisoEntry(strPath, QString(), true); 915 } 916 } 924 itemList << pItem; 925 } 926 removeItems(itemList); 917 927 } 918 928 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.h
r100583 r100601 146 146 void processRemovedEntries(const QStringList &removedEntries); 147 147 const UICustomFileSystemItem* currentDirectoryItem() const; 148 void markRemovedUnremovedItemParents(UICustomFileSystemItem *pItem, bool fRemoved); 148 149 UIVisoContentTableView *m_pTableView; 149 150 UICustomFileSystemModel *m_pModel;
Note:
See TracChangeset
for help on using the changeset viewer.