- Timestamp:
- Jul 10, 2023 2:08:18 PM (17 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICustomFileSystemModel.cpp
r100419 r100460 650 650 m_pRootItem->setData(UICustomFileSystemModel::tr("Permissions"), UICustomFileSystemModelData_Permissions); 651 651 m_pRootItem->setData(UICustomFileSystemModel::tr("Local Path"), UICustomFileSystemModelData_LocalPath); 652 m_pRootItem->setData(UICustomFileSystemModel::tr("Path"), UICustomFileSystemModelData_VISOPath); 653 } 652 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICustomFileSystemModel.h
r100419 r100460 48 48 UICustomFileSystemModelData_Owner, 49 49 UICustomFileSystemModelData_Permissions, 50 UICustomFileSystemModelData_VISOPath,51 50 UICustomFileSystemModelData_LocalPath, 52 51 UICustomFileSystemModelData_ISOFilePath, /* in case of import-iso this contains full path of the container iso file. */ -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.cpp
r100455 r100460 496 496 connect(m_pView, &UIGuestControlFileView::customContextMenuRequested, 497 497 this, &UIFileManagerTable::sltCreateFileViewContextMenu); 498 m_pView->hideColumn(UICustomFileSystemModelData_VISOPath);499 498 m_pView->hideColumn(UICustomFileSystemModelData_LocalPath); 500 499 m_sessionWidgets << m_pView; -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.cpp
r100457 r100460 307 307 UICustomFileSystemItem* pAddedItem = new UICustomFileSystemItem(fileInfo.fileName(), pParentItem, 308 308 objectList[i].enmObjectType); 309 /* VISOPAth and LocalPath is the same since we allow importing ISO content only to VISO root:*/ 309 310 310 QString path = UIPathOperations::mergePaths(pParentItem->path(), fileInfo.fileName()); 311 311 pAddedItem->setData(path, UICustomFileSystemModelData_LocalPath); 312 312 pAddedItem->setData(strISOFilePath, UICustomFileSystemModelData_ISOFilePath); 313 pAddedItem->setData(path, UICustomFileSystemModelData_VISOPath);314 313 pAddedItem->setIsOpened(false); 315 314 // if (fileInfo.isSymLink()) … … 375 374 fileType(fileInfo)); 376 375 pAddedItem->setData(strPath, UICustomFileSystemModelData_LocalPath); 377 pAddedItem->setData(UIPathOperations::mergePaths(pParentItem->path(), fileInfo.fileName()), 378 UICustomFileSystemModelData_VISOPath); 376 379 377 pAddedItem->setIsOpened(false); 380 378 if (fileInfo.isSymLink()) … … 393 391 if (!pItem) 394 392 return; 395 if (pItem-> data(UICustomFileSystemModelData_VISOPath).toString().isEmpty())393 if (pItem->path().isEmpty()) 396 394 return; 397 395 … … 400 398 return; 401 399 if (!bRemove) 402 m_entryMap.insert(pItem-> data(UICustomFileSystemModelData_VISOPath).toString(),400 m_entryMap.insert(pItem->path(), 403 401 pItem->data(UICustomFileSystemModelData_LocalPath).toString()); 404 402 else 405 m_entryMap.insert(pItem-> data(UICustomFileSystemModelData_VISOPath).toString(),403 m_entryMap.insert(pItem->path(), 406 404 ":remove:"); 407 405 } … … 431 429 pRootItem->setData(QApplication::translate("UIVisoCreatorWidget", "Permissions"), UICustomFileSystemModelData_Permissions); 432 430 pRootItem->setData(QApplication::translate("UIVisoCreatorWidget", "Local Path"), UICustomFileSystemModelData_LocalPath); 433 pRootItem->setData(QApplication::translate("UIVisoCreatorWidget", "VISO Path"), UICustomFileSystemModelData_VISOPath);434 431 } 435 432 setFileTableLabelText(QApplication::translate("UIVisoCreatorWidget","VISO Content")); … … 490 487 UICustomFileSystemItem* pAddedItem = new UICustomFileSystemItem(strNewDirectoryName, pParentItem, 491 488 KFsObjType_Directory); 492 pAddedItem->setData(UIPathOperations::mergePaths(pParentItem->path(), strNewDirectoryName), UICustomFileSystemModelData_VISOPath);493 489 494 490 pAddedItem->setIsOpened(false); … … 510 506 if (!pItem) 511 507 continue; 512 QString strIsoPath = pItem-> data(UICustomFileSystemModelData_VISOPath).toString();508 QString strIsoPath = pItem->path(); 513 509 if (strIsoPath.isEmpty()) 514 510 continue; … … 876 872 continue; 877 873 878 pItem->setData(strPath, UICustomFileSystemModelData_VISOPath);879 874 if (i == pathList.size() - 1) 880 875 pItem->setData(strLocalPath, UICustomFileSystemModelData_LocalPath); … … 926 921 newItem->setData(fileInfo.filePath(), UICustomFileSystemModelData_LocalPath); 927 922 928 newItem->setData(UIPathOperations::mergePaths(directoryItem->path(), fileInfo.fileName()),929 UICustomFileSystemModelData_VISOPath);930 923 if (fileInfo.isSymLink()) 931 924 { … … 983 976 const QString &strOldName, const QString &strNewName) 984 977 { 985 Q_UNUSED(strOldPath);986 978 if (!pItem || !pItem->parentItem()) 987 979 return; … … 993 985 bDuplicate = true; 994 986 } 987 995 988 QString strNewPath = UIPathOperations::mergePaths(pItem->parentItem()->path(), pItem->fileObjectName()); 996 989 … … 1006 999 VISO file for the old path since in some cases, when remaned item is not top level, it still 1007 1000 appears in ISO. So we remove it explicitly: */ 1008 QString oldItemPath = pItem->data(UICustomFileSystemModelData_VISOPath).toString();1009 1001 m_entryMap.insert(strNewPath, pItem->data(UICustomFileSystemModelData_LocalPath).toString()); 1010 m_entryMap.remove( oldItemPath);1002 m_entryMap.remove(strOldPath); 1011 1003 if (!pItem->data(UICustomFileSystemModelData_LocalPath).toString().isEmpty()) 1012 m_entryMap.insert(oldItemPath, ":remove:"); 1013 } 1014 1015 pItem->setData(strNewPath, UICustomFileSystemModelData_VISOPath); 1004 m_entryMap.insert(strOldPath, ":remove:"); 1005 } 1016 1006 1017 1007 if (m_pTableProxyModel) … … 1091 1081 if (!pItem) 1092 1082 return QString(); 1093 return pItem->path(); //data(UICustomFileSystemModelData_VISOPath).toString();1083 return pItem->path(); 1094 1084 } 1095 1085
Note:
See TracChangeset
for help on using the changeset viewer.