Changeset 90280 in vbox
- Timestamp:
- Jul 22, 2021 7:50:38 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 145822
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMDiskPageBasic.cpp
r90276 r90280 235 235 { 236 236 AssertReturnVoid(m_pDiskSelector && m_pDiskSourceButtonGroup); 237 237 m_userModifiedParameters << "SelectedDiskSource"; 238 238 if (m_pDiskSourceButtonGroup->checkedButton() == m_pDiskEmpty) 239 239 m_enmSelectedDiskSource = SelectedDiskSource_Empty; … … 255 255 { 256 256 AssertReturnVoid(m_pDiskSelector); 257 m_userModifiedParameters << "SelectedExistingMediumIndex"; 257 258 newVMWizardPropertySet(VirtualDisk, m_pDiskSelector->id()); 258 259 emit completeChanged(); … … 326 327 LONG64 iRecommendedSize = 0; 327 328 CGuestOSType type = pWizard->guestOSType(); 328 if (!type.isNull() )329 if (!type.isNull() && !m_userModifiedParameters.contains("SelectedDiskSource")) 329 330 { 330 331 iRecommendedSize = type.GetRecommendedHDD(); … … 351 352 } 352 353 353 if (m_pDiskSelector )354 if (m_pDiskSelector && !m_userModifiedParameters.contains("SelectedExistingMediumIndex")) 354 355 m_pDiskSelector->setCurrentIndex(0); 355 356 setEnableDiskSelectionWidgets(m_enmSelectedDiskSource == SelectedDiskSource_Existing); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMDiskPageBasic.h
r90276 r90280 64 64 } 65 65 66 // SelectedDiskSource selectedDiskSource() const;67 // void setSelectedDiskSource(SelectedDiskSource enmSelectedDiskSource);68 // bool getWithNewVirtualDiskWizard();69 // virtual QWidget *createDiskWidgets();70 // virtual QWidget *createNewDiskWidgets();71 // void getWithFileOpenDialog();72 // void retranslateWidgets();73 // void setEnableDiskSelectionWidgets(bool fEnable);74 66 75 67 class UIWizardNewVMDiskPageBasic : public UINativeWizardPage -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.cpp
r90233 r90280 179 179 }; 180 180 181 voidUIWizardNewVMNameOSTypePage::guessOSTypeFromName(UINameAndSystemEditor *pNameAndSystemEditor, QString strNewName)181 bool UIWizardNewVMNameOSTypePage::guessOSTypeFromName(UINameAndSystemEditor *pNameAndSystemEditor, QString strNewName) 182 182 { 183 183 CHost host = uiCommon().host(); … … 191 191 /* Search for a matching OS type based on the string the user typed already. */ 192 192 for (size_t i = 0; i < RT_ELEMENTS(gs_OSTypePattern); ++i) 193 { 193 194 if (strNewName.contains(gs_OSTypePattern[i].pattern)) 194 195 { 195 196 if (pNameAndSystemEditor) 196 197 pNameAndSystemEditor->setType(uiCommon().vmGuestOSType(gs_OSTypePattern[i].pcstId)); 197 break;198 return true; 198 199 } 200 } 201 return false; 199 202 } 200 203 … … 367 370 { 368 371 if (!m_userModifiedParameters.contains("GuestOSType")) 369 UIWizardNewVMNameOSTypePage::guessOSTypeFromName(m_pNameAndSystemEditor, strNewName); 372 { 373 m_pNameAndSystemEditor->blockSignals(true); 374 if (UIWizardNewVMNameOSTypePage::guessOSTypeFromName(m_pNameAndSystemEditor, strNewName)) 375 newVMWizardPropertySet(GuestOSType, m_pNameAndSystemEditor->type()); 376 m_pNameAndSystemEditor->blockSignals(false); 377 } 370 378 UIWizardNewVMNameOSTypePage::composeMachineFilePath(m_pNameAndSystemEditor, qobject_cast<UIWizardNewVM*>(wizard())); 371 379 emit completeChanged(); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.h
r90223 r90280 40 40 namespace UIWizardNewVMNameOSTypePage 41 41 { 42 voidguessOSTypeFromName(UINameAndSystemEditor *pNameAndSystemEditor, QString strNewName);42 bool guessOSTypeFromName(UINameAndSystemEditor *pNameAndSystemEditor, QString strNewName); 43 43 bool createMachineFolder(UINameAndSystemEditor *pNameAndSystemEditor, 44 44 UINativeWizardPage *pCaller, -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
r90276 r90280 95 95 void UIWizardNewVMPageExpert::sltNameChanged(const QString &strNewName) 96 96 { 97 if (!m_userModifiedParameters.contains("GuestOSType")) 98 UIWizardNewVMNameOSTypePage::guessOSTypeFromName(m_pNameAndSystemEditor, strNewName); 97 if (!m_userModifiedParameters.contains("GuestOSType") && m_pNameAndSystemEditor) 98 { 99 m_pNameAndSystemEditor->blockSignals(true); 100 if (UIWizardNewVMNameOSTypePage::guessOSTypeFromName(m_pNameAndSystemEditor, strNewName)) 101 { 102 newVMWizardPropertySet(GuestOSType, m_pNameAndSystemEditor->type()); 103 /* Since the type `possibly` changed: */ 104 setOSTypeDependedValues(); 105 } 106 m_pNameAndSystemEditor->blockSignals(false); 107 } 99 108 UIWizardNewVMNameOSTypePage::composeMachineFilePath(m_pNameAndSystemEditor, qobject_cast<UIWizardNewVM*>(wizard())); 100 109 if (!m_userModifiedParameters.contains("MediumPath")) … … 118 127 if (m_pNameAndSystemEditor) 119 128 newVMWizardPropertySet(GuestOSType, m_pNameAndSystemEditor->type()); 120 //setOSTypeDependedValues() ??!!!129 setOSTypeDependedValues(); 121 130 } 122 131 … … 253 262 } 254 263 264 /* Virtual disk related connections: */ 255 265 if (m_pDiskSourceButtonGroup) 256 266 connect(m_pDiskSourceButtonGroup, static_cast<void(QButtonGroup::*)(QAbstractButton *)>(&QButtonGroup::buttonClicked), 257 267 this, &UIWizardNewVMPageExpert::sltSelectedDiskSourceChanged); 258 268 259 connect(m_pSkipUnattendedCheckBox, &QCheckBox::toggled, this, &UIWizardNewVMPageExpert::sltSkipUnattendedCheckBoxChecked); 269 if (m_pSkipUnattendedCheckBox) 270 connect(m_pSkipUnattendedCheckBox, &QCheckBox::toggled, 271 this, &UIWizardNewVMPageExpert::sltSkipUnattendedCheckBoxChecked); 260 272 261 273 if (m_pSizeAndLocationGroup) … … 266 278 this, &UIWizardNewVMPageExpert::sltMediumPathChanged); 267 279 268 // /* Virtual disk related connections: */ 269 270 // if (m_pDiskSelectionButton) 271 // connect(m_pDiskSelectionButton, &QIToolButton::clicked, 272 // this, &UIWizardNewVMPageExpert::sltGetWithFileOpenDialog); 280 if (m_pDiskSelectionButton) 281 connect(m_pDiskSelectionButton, &QIToolButton::clicked, 282 this, &UIWizardNewVMPageExpert::sltGetWithFileOpenDialog); 273 283 274 284 // if (m_pDiskSelector) … … 308 318 } 309 319 LONG64 iRecommendedDiskSize = type.GetRecommendedHDD(); 320 310 321 /* Prepare initial disk choice: */ 311 322 if (!m_userModifiedParameters.contains("SelectedDiskSource"))
Note:
See TracChangeset
for help on using the changeset viewer.