Changeset 100520 in vbox for trunk/src/VBox
- Timestamp:
- Jul 11, 2023 4:32:53 PM (21 months ago)
- svn:sync-xref-src-repo-rev:
- 158321
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/medium/viso
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.cpp
r100502 r100520 312 312 pAddedItem->setData(strISOFilePath, UICustomFileSystemModelData_ISOFilePath); 313 313 pAddedItem->setIsOpened(false); 314 // if (fileInfo.isSymLink()) 315 // { 316 // pAddedItem->setTargetPath(fileInfo.symLinkTarget()); 317 // pAddedItem->setIsSymLinkToADirectory(QFileInfo(fileInfo.symLinkTarget()).isDir()); 318 // } 319 //createVisoEntry(pAddedItem); 314 320 315 } 321 316 if (m_pTableProxyModel) … … 381 376 pAddedItem->setIsSymLinkToADirectory(QFileInfo(fileInfo.symLinkTarget()).isDir()); 382 377 } 383 createVisoEntry(pAddedItem );378 createVisoEntry(pAddedItem->path(), pAddedItem->data(UICustomFileSystemModelData_LocalPath).toString(), false); 384 379 } 385 380 if (m_pTableProxyModel) … … 387 382 } 388 383 389 void UIVisoContentBrowser::createVisoEntry(UICustomFileSystemItem *pItem, bool bRemove /* = false */) 390 { 391 if (!pItem) 392 return; 393 if (pItem->path().isEmpty()) 394 return; 395 396 397 if (!bRemove && pItem->data(UICustomFileSystemModelData_LocalPath).toString().isEmpty()) 398 return; 384 void UIVisoContentBrowser::createVisoEntry(const QString &strPath, const QString &strLocalPath, bool bRemove /* = false */) 385 { 386 if (strPath.isEmpty()) 387 return; 388 399 389 if (!bRemove) 400 m_entryMap.insert(pItem->path(), 401 pItem->data(UICustomFileSystemModelData_LocalPath).toString()); 390 { 391 if(strLocalPath.isEmpty()) 392 return; 393 m_entryMap.insert(strPath, strLocalPath); 394 } 402 395 else 403 m_entryMap.insert(pItem->path(), 404 ":remove:"); 396 m_entryMap.insert(strPath, ":remove:"); 405 397 } 406 398 … … 525 517 } 526 518 if (!bFoundInMap) 527 createVisoEntry(pItem , true /* bool bRemove */);519 createVisoEntry(pItem->path(), pItem->data(UICustomFileSystemModelData_LocalPath).toString(), true /* bool bRemove */); 528 520 } 529 521 … … 872 864 if (!pItem) 873 865 { 874 pItem = new UICustomFileSystemItem(pathList[i], 875 pParent, 876 enmObjectType); 866 pItem = new UICustomFileSystemItem(pathList[i], pParent, enmObjectType); 877 867 if (!pItem) 878 868 continue; … … 882 872 } 883 873 if (i == pathList.size() - 1) 884 createVisoEntry(pItem );874 createVisoEntry(pItem->path(), pItem->data(UICustomFileSystemModelData_LocalPath).toString(), false); 885 875 pParent = pItem; 886 876 } -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.h
r100502 r100520 127 127 * if @p bRemove is true then the value is the string ":remove:" which effectively removes the file object 128 128 * from the iso image. */ 129 void createVisoEntry( UICustomFileSystemItem *pItem, bool bRemove = false);129 void createVisoEntry(const QString &strPath, const QString &strLocalPath, bool bRemove = false); 130 130 QString currentPath() const; 131 131 UICustomFileSystemItem* searchItemByPath(const QString &strPath);
Note:
See TracChangeset
for help on using the changeset viewer.