Changeset 91294 in vbox
- Timestamp:
- Sep 17, 2021 9:01:51 AM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards
- Files:
-
- 7 edited
-
clonevd/UIWizardCloneVDExpertPage.cpp (modified) (4 diffs)
-
clonevd/UIWizardCloneVDPathSizePage.cpp (modified) (3 diffs)
-
newvd/UIWizardNewVDExpertPage.cpp (modified) (4 diffs)
-
newvm/UIWizardNewVMDiskPage.cpp (modified) (1 diff)
-
newvm/UIWizardNewVMExpertPage.cpp (modified) (5 diffs)
-
newvm/UIWizardNewVMNameOSTypePage.cpp (modified) (4 diffs)
-
newvm/UIWizardNewVMSummaryPage.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDExpertPage.cpp
r91293 r91294 93 93 QString strMediumPath = 94 94 UIWizardDiskEditors::appendExtension(strSelectedPath, 95 UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), pWizard->deviceType()));95 UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), pWizard->deviceType())); 96 96 QFileInfo mediumPath(strMediumPath); 97 97 m_pMediumSizePathGroupBox->setMediumFilePath(QDir::toNativeSeparators(mediumPath.absoluteFilePath())); … … 118 118 QString strMediumPath = 119 119 UIWizardDiskEditors::appendExtension(strPath, 120 UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), pWizard->deviceType()));120 UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), pWizard->deviceType())); 121 121 pWizard->setMediumPath(strMediumPath); 122 122 emit completeChanged(); … … 147 147 QString strMediumFilePath = 148 148 UIWizardDiskEditors::constructMediumFilePath(UIWizardDiskEditors::appendExtension(strDiskName, 149 strExtension), strSourceDiskPath);149 strExtension), strSourceDiskPath); 150 150 m_pMediumSizePathGroupBox->setMediumFilePath(strMediumFilePath); 151 151 pWizard->setMediumPath(strMediumFilePath); … … 167 167 fResult = m_pMediumSizePathGroupBox->isComplete(); 168 168 169 return fResult;169 return fResult; 170 170 } 171 171 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVDPathSizePage.cpp
r91293 r91294 80 80 QString strMediumFilePath = 81 81 UIWizardDiskEditors::constructMediumFilePath(UIWizardDiskEditors::appendExtension(strDiskName, 82 strExtension), strSourceDiskPath);82 strExtension), strSourceDiskPath); 83 83 m_pMediumSizePathGroupBox->setMediumFilePath(strMediumFilePath); 84 84 pWizard->setMediumPath(strMediumFilePath); … … 119 119 QString strMediumPath = 120 120 UIWizardDiskEditors::appendExtension(strSelectedPath, 121 UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), pWizard->deviceType()));121 UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), pWizard->deviceType())); 122 122 QFileInfo mediumPath(strMediumPath); 123 123 m_pMediumSizePathGroupBox->setMediumFilePath(QDir::toNativeSeparators(mediumPath.absoluteFilePath())); … … 131 131 QString strMediumPath = 132 132 UIWizardDiskEditors::appendExtension(strPath, 133 UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), pWizard->deviceType()));133 UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), pWizard->deviceType())); 134 134 pWizard->setMediumPath(strMediumPath); 135 135 emit completeChanged(); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDExpertPage.cpp
r91293 r91294 87 87 QString strMediumPath = 88 88 UIWizardDiskEditors::appendExtension(strPath, 89 UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), KDeviceType_HardDisk));89 UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), KDeviceType_HardDisk)); 90 90 pWizard->setMediumPath(strMediumPath); 91 91 emit completeChanged(); … … 115 115 QString strSelectedPath = 116 116 UIWizardDiskEditors::openFileDialogForDiskFile(pWizard->mediumPath(), comMediumFormat, 117 KDeviceType_HardDisk, pWizard);117 KDeviceType_HardDisk, pWizard); 118 118 if (strSelectedPath.isEmpty()) 119 119 return; 120 120 QString strMediumPath = 121 121 UIWizardDiskEditors::appendExtension(strSelectedPath, 122 UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), KDeviceType_HardDisk));122 UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), KDeviceType_HardDisk)); 123 123 QFileInfo mediumPath(strMediumPath); 124 124 m_pSizeAndPathGroup->setMediumFilePath(QDir::toNativeSeparators(mediumPath.absoluteFilePath())); … … 145 145 QString strMediumFilePath = 146 146 UIWizardDiskEditors::constructMediumFilePath(UIWizardDiskEditors::appendExtension(m_strDefaultName, 147 strExtension), m_strDefaultPath);147 strExtension), m_strDefaultPath); 148 148 m_pSizeAndPathGroup->blockSignals(true); 149 149 m_pSizeAndPathGroup->setMediumFilePath(strMediumFilePath); … … 196 196 /* Make sure we are passing FAT size limitation: */ 197 197 fResult = UIWizardDiskEditors::checkFATSizeLimitation(pWizard->mediumVariant(), 198 pWizard->mediumPath(),199 pWizard->mediumSize());198 pWizard->mediumPath(), 199 pWizard->mediumSize()); 200 200 if (!fResult) 201 201 { -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMDiskPage.cpp
r91293 r91294 303 303 QString strMediumPath = 304 304 UIWizardDiskEditors::constructMediumFilePath(UIWizardDiskEditors::appendExtension(strDefaultName, 305 strDefaultExtension), strMachineFolder);305 strDefaultExtension), strMachineFolder); 306 306 pWizard->setMediumPath(strMediumPath); 307 307 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMExpertPage.cpp
r91293 r91294 147 147 148 148 if (!pWizard->detectedOSTypeId().isEmpty() && !m_userModifiedParameters.contains("GuestOSType")) 149 UIWizardNewVMNameOSTypeCommon::guessOSTypeFromName(m_pNameAndSystemEditor, pWizard->detectedOSTypeId());149 UIWizardNewVMNameOSTypeCommon::guessOSTypeFromName(m_pNameAndSystemEditor, pWizard->detectedOSTypeId()); 150 150 pWizard->setISOFilePath(strISOPath); 151 151 … … 276 276 if (m_pSkipUnattendedCheckBox) 277 277 connect(m_pSkipUnattendedCheckBox, &QCheckBox::toggled, 278 this, &UIWizardNewVMExpertPage::sltSkipUnattendedCheckBoxChecked);278 this, &UIWizardNewVMExpertPage::sltSkipUnattendedCheckBoxChecked); 279 279 280 280 if (m_pSizeAndLocationGroup) … … 363 363 { 364 364 /* We need not to check existence of parameter within m_userModifiedParameters since initializePage() runs 365 once the page loads before user has a chance to modify parameters explicitly: */365 once the page loads before user has a chance to modify parameters explicitly: */ 366 366 UIWizardNewVM *pWizard = wizardWindow<UIWizardNewVM>(); 367 367 AssertReturnVoid(pWizard); … … 700 700 QString strMediumPath = 701 701 UIWizardDiskEditors::appendExtension(strSelectedPath, 702 UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), KDeviceType_HardDisk));702 UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), KDeviceType_HardDisk)); 703 703 QFileInfo mediumPath(strMediumPath); 704 704 m_pSizeAndLocationGroup->setMediumFilePath(QDir::toNativeSeparators(mediumPath.absoluteFilePath())); … … 823 823 QString strMediumFilePath = 824 824 UIWizardDiskEditors::constructMediumFilePath(UIWizardDiskEditors::appendExtension(strDiskFileName, 825 strExtension), strMediumPath);825 strExtension), strMediumPath); 826 826 m_pSizeAndLocationGroup->blockSignals(true); 827 827 m_pSizeAndLocationGroup->setMediumFilePath(strMediumFilePath); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePage.cpp
r91220 r91294 197 197 198 198 void UIWizardNewVMNameOSTypeCommon::composeMachineFilePath(UINameAndSystemEditor *pNameAndSystemEditor, 199 UIWizardNewVM *pWizard)199 UIWizardNewVM *pWizard) 200 200 { 201 201 if (!pNameAndSystemEditor || !pWizard) … … 203 203 if (pNameAndSystemEditor->name().isEmpty() || pNameAndSystemEditor->path().isEmpty()) 204 204 return; 205 /* Get VBox: */205 /* Get VBox: */ 206 206 CVirtualBox vbox = uiCommon().virtualBox(); 207 207 208 208 /* Compose machine filename: */ 209 209 pWizard->setMachineFilePath(vbox.ComposeMachineFilename(pNameAndSystemEditor->name(), 210 pWizard->machineGroup(),211 QString(),212 pNameAndSystemEditor->path()));210 pWizard->machineGroup(), 211 QString(), 212 pNameAndSystemEditor->path())); 213 213 /* Compose machine folder/basename: */ 214 214 const QFileInfo fileInfo(pWizard->machineFilePath()); … … 218 218 219 219 bool UIWizardNewVMNameOSTypeCommon::createMachineFolder(UINameAndSystemEditor *pNameAndSystemEditor, 220 UINativeWizardPage *pCaller,221 UIWizardNewVM *pWizard)220 UINativeWizardPage *pCaller, 221 UIWizardNewVM *pWizard) 222 222 { 223 223 if (!pNameAndSystemEditor || !pWizard) … … 449 449 450 450 if (!pWizard->detectedOSTypeId().isEmpty() && !m_userModifiedParameters.contains("GuestOSType")) 451 UIWizardNewVMNameOSTypeCommon::guessOSTypeFromName(m_pNameAndSystemEditor, pWizard->detectedOSTypeId());451 UIWizardNewVMNameOSTypeCommon::guessOSTypeFromName(m_pNameAndSystemEditor, pWizard->detectedOSTypeId()); 452 452 pWizard->setISOFilePath(strPath); 453 453 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMSummaryPage.cpp
r91293 r91294 33 33 34 34 /********************************************************************************************************************************* 35 * UIWizardNewVMSummaryItem definition. *35 * UIWizardNewVMSummaryItem definition. * 36 36 *********************************************************************************************************************************/ 37 37 … … 77 77 78 78 /********************************************************************************************************************************* 79 * UIWizardNewVMSummaryModel definition. *80 *********************************************************************************************************************************/79 * UIWizardNewVMSummaryModel definition. * 80 *********************************************************************************************************************************/ 81 81 82 82 class UIWizardNewVMSummaryModel : public QAbstractItemModel … … 260 260 QModelIndex UIWizardNewVMSummaryModel::index(int row, int column, const QModelIndex &parent /* = QModelIndex() */) const 261 261 { 262 if (!hasIndex(row, column, parent))263 return QModelIndex();264 265 UIWizardNewVMSummaryItem *pParentItem;266 267 if (!parent.isValid())268 pParentItem = m_pRootItem;269 else270 pParentItem = static_cast<UIWizardNewVMSummaryItem*>(parent.internalPointer());271 272 UIWizardNewVMSummaryItem *pChildItem = pParentItem->childItem(row);273 if (pChildItem)274 return createIndex(row, column, pChildItem);275 else276 return QModelIndex();262 if (!hasIndex(row, column, parent)) 263 return QModelIndex(); 264 265 UIWizardNewVMSummaryItem *pParentItem; 266 267 if (!parent.isValid()) 268 pParentItem = m_pRootItem; 269 else 270 pParentItem = static_cast<UIWizardNewVMSummaryItem*>(parent.internalPointer()); 271 272 UIWizardNewVMSummaryItem *pChildItem = pParentItem->childItem(row); 273 if (pChildItem) 274 return createIndex(row, column, pChildItem); 275 else 276 return QModelIndex(); 277 277 } 278 278 … … 442 442 if (m_pLabel) 443 443 m_pLabel->setText(UIWizardNewVM::tr("The following table summarizes the configuration you have" 444 " chosen for the new virtual machine. When you are happy with the configuration"445 " press Finish to create the virtual machine. Alternatively you can go back"446 " and modify the configuration."));444 " chosen for the new virtual machine. When you are happy with the configuration" 445 " press Finish to create the virtual machine. Alternatively you can go back" 446 " and modify the configuration.")); 447 447 } 448 448 … … 494 494 /* Check FAT size limitation of the host hard drive: */ 495 495 fResult = UIWizardDiskEditors::checkFATSizeLimitation(pWizard->mediumVariant(), 496 strMediumPath,497 pWizard->mediumSize());496 strMediumPath, 497 pWizard->mediumSize()); 498 498 if (!fResult) 499 499 {
Note:
See TracChangeset
for help on using the changeset viewer.

