- Timestamp:
- Jun 29, 2023 5:15:20 PM (18 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/medium/viso
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.cpp
r100330 r100333 282 282 QList<ISOFileObject> objectList = openAndReadISODir(strISOFilePath, strDirPath); 283 283 284 /* Update import ISO path and effectively add it to VISO file content if ISO reading has succeeds: */ 285 if (!objectList.isEmpty()) 286 setImportedISOPath(strISOFilePath); 287 284 288 for (int i = 0; i < objectList.size(); ++i) 285 289 { … … 304 308 // pAddedItem->setIsSymLinkToADirectory(QFileInfo(fileInfo.symLinkTarget()).isDir()); 305 309 // } 306 createVisoEntry(pAddedItem);310 //createVisoEntry(pAddedItem); 307 311 } 308 312 if (m_pTableProxyModel) … … 595 599 } 596 600 601 const QString &UIVisoContentBrowser::importedISOPath() const 602 { 603 return m_strImportedISOPath; 604 } 605 606 void UIVisoContentBrowser::setImportedISOPath(const QString &strPath) 607 { 608 if (m_strImportedISOPath == strPath) 609 return; 610 m_strImportedISOPath = strPath; 611 } 612 597 613 void UIVisoContentBrowser::prepareConnections() 598 614 { -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.h
r100330 r100333 76 76 void prepareMainMenu(QMenu *pMenu); 77 77 78 const QString &importedISOPath() const; 79 void setImportedISOPath(const QString &strPath); 80 78 81 public slots: 79 82 … … 111 114 UICustomFileSystemItem *startItem(); 112 115 113 /** @name Index conversion functions. These are half-smart and tries to determine the source model before conversion. 114 * @{ */ 115 QModelIndex convertIndexToTableIndex(const QModelIndex &index); 116 /** @} */ 116 QModelIndex convertIndexToTableIndex(const QModelIndex &index); 117 117 /** Lists the content of the host file system directory by using Qt file system API. */ 118 118 void scanHostDirectory(UICustomFileSystemItem *directory); … … 133 133 bool onStartItem(); 134 134 void goUp(); 135 UIVisoContentTableView *m_pTableView;136 UICustomFileSystemModel *m_pModel;137 UICustomFileSystemProxyModel *m_pTableProxyModel;135 UIVisoContentTableView *m_pTableView; 136 UICustomFileSystemModel *m_pModel; 137 UICustomFileSystemProxyModel *m_pTableProxyModel; 138 138 139 139 QString m_strVisoName; 140 QString m_strImportedISOPath; 140 141 /** keys of m_entryMap are iso locations and values are 141 142 * local location of file objects. these keys and values are -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp
r100329 r100333 288 288 } 289 289 290 QString UIVisoCreatorWidget::importedISOPath() const 291 { 292 if (!m_pVISOContentBrowser) 293 return QString(); 294 return m_pVISOContentBrowser->importedISOPath(); 295 } 296 290 297 const QString &UIVisoCreatorWidget::visoName() const 291 298 { … … 656 663 { 657 664 QStringList VisoEntryList = pVisoCreator->entryList(); 658 659 if ( VisoEntryList.empty() || VisoEntryList[0].isEmpty())665 QString strImportedISOPath = pVisoCreator->importedISOPath(); 666 if ((VisoEntryList.empty() || VisoEntryList[0].isEmpty()) && strImportedISOPath.isEmpty()) 660 667 { 661 668 delete pVisoCreator; … … 673 680 stream << QString("%1 %2").arg("--iprt-iso-maker-file-marker-bourne-sh").arg(QUuid::createUuid().toString()) << "\n"; 674 681 stream<< "--volume-id=" << strVisoName << "\n"; 682 if (!strImportedISOPath.isEmpty()) 683 stream << "--import-iso=" << strImportedISOPath; 675 684 stream << VisoEntryList.join("\n"); 676 685 if (!pVisoCreator->customOptions().isEmpty()) … … 725 734 } 726 735 736 QString UIVisoCreatorDialog::importedISOPath() const 737 { 738 if (m_pVisoCreatorWidget) 739 return m_pVisoCreatorWidget->importedISOPath(); 740 return QString(); 741 } 742 727 743 QStringList UIVisoCreatorDialog::customOptions() const 728 744 { -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.h
r100320 r100333 90 90 /** Returns the content of the .viso file. Each element of the list corresponds to a line in the .viso file. */ 91 91 QStringList entryList() const; 92 QString importedISOPath() const; 92 93 const QString &visoName() const; 93 94 /** Returns custom ISO options (if any). */ … … 174 175 QStringList entryList() const; 175 176 QString visoName() const; 177 QString importedISOPath() const; 176 178 QStringList customOptions() const; 177 179 QString currentPath() const;
Note:
See TracChangeset
for help on using the changeset viewer.