- Timestamp:
- Jul 7, 2021 2:18:28 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 145573
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMDiskPageBasic.cpp
r90075 r90076 167 167 { 168 168 return m_mediumFormat; 169 }170 171 QString UIWizardNewVMDiskPageBasic::mediumPath() const172 {173 return UIWizardNewVMDiskPage::absoluteFilePath(UIWizardNewVMDiskPage::toFileName(m_strDefaultName,174 m_strDefaultExtension), m_strDefaultPath);175 169 } 176 170 … … 389 383 390 384 /* We set the medium name and path according to machine name/path and do not allow user change these in the guided mode: */ 391 const QString &strDefaultName = pWizard->machineBaseName(); 392 m_strDefaultName = strDefaultName.isEmpty() ? QString("NewVirtualDisk1") : strDefaultName; 393 m_strDefaultPath = pWizard->machineFolder(); 385 QString strDefaultName = pWizard->machineBaseName().isEmpty() ? QString("NewVirtualDisk1") : pWizard->machineBaseName(); 386 const QString &strMachineFolder = pWizard->machineFolder(); 387 QString strMediumPath = UIWizardNewVMDiskPage::absoluteFilePath(UIWizardNewVMDiskPage::toFileName(strDefaultName, 388 m_strDefaultExtension), 389 strMachineFolder); 390 newVMWizardPropertySet(MediumPath, strMediumPath); 391 394 392 /* Set the recommended disk size if user has already not done so: */ 395 393 if (m_pMediumSizeEditor && !m_userModifiedParameters.contains("MediumSize")) … … 398 396 m_pMediumSizeEditor->setMediumSize(iRecommendedSize); 399 397 m_pMediumSizeEditor->blockSignals(false); 398 newVMWizardPropertySet(MediumSize, iRecommendedSize); 400 399 } 401 400 } … … 444 443 { 445 444 /* Check if the path we will be using for hard drive creation exists: */ 446 const QString strMediumPath(mediumPath());445 const QString &strMediumPath = pWizard->mediumPath(); 447 446 fResult = !QFileInfo(strMediumPath).exists(); 448 447 if (!fResult) -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMDiskPageBasic.h
r90074 r90076 79 79 80 80 UIWizardNewVMDiskPageBasic(); 81 /** For the guide wizard mode medium path, name and extention is static and we have82 * no UI element for this. thus override. */83 virtual QString mediumPath() const /*override */;84 81 CMediumFormat mediumFormat() const; 85 82 … … 136 133 SelectedDiskSource m_enmSelectedDiskSource; 137 134 bool m_fRecommendedNoDisk; 138 QString m_strDefaultName; 139 QString m_strDefaultPath; 135 140 136 QString m_strDefaultExtension; 141 137 QSet<QString> m_userModifiedParameters;
Note:
See TracChangeset
for help on using the changeset viewer.