Changeset 93456 in vbox
- Timestamp:
- Jan 27, 2022 10:06:47 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 149568
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMExpertPage.cpp
r93455 r93456 87 87 { 88 88 AssertReturnVoid(wizardWindow<UIWizardNewVM>()); 89 if (!m_userModifiedParameters.contains("GuestOSType") && m_pNameAndSystemEditor) 89 /* Allow type guessing from name only if an OS type from ISO could not be detected: */ 90 if (!m_userModifiedParameters.contains("GuestOSTypeFromISO") && m_pNameAndSystemEditor) 90 91 { 91 92 m_pNameAndSystemEditor->blockSignals(true); … … 95 96 /* Since the type `possibly` changed: */ 96 97 setOSTypeDependedValues(); 98 m_userModifiedParameters << "GuestOSTypeFromName"; 97 99 } 98 100 m_pNameAndSystemEditor->blockSignals(false); … … 148 150 UIWizardNewVMNameOSTypeCommon::detectOSType(strISOPath, pWizard); 149 151 150 if (!m_userModifiedParameters.contains("GuestOSType")) 151 UIWizardNewVMNameOSTypeCommon::guessOSTypeDetectedOSTypeString(m_pNameAndSystemEditor, pWizard->detectedOSTypeId()); 152 153 if (UIWizardNewVMNameOSTypeCommon::guessOSTypeDetectedOSTypeString(m_pNameAndSystemEditor, pWizard->detectedOSTypeId())) 154 m_userModifiedParameters << "GuestOSTypeFromISO"; 155 else /* Remove GuestOSTypeFromISO fromthe set if it is there: */ 156 m_userModifiedParameters.remove("GuestOSTypeFromISO"); 157 152 158 pWizard->setISOFilePath(strISOPath); 153 159 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePage.cpp
r93455 r93456 205 205 AssertReturn(pNameAndSystemEditor, false); 206 206 if (strDetectedOSType.isEmpty()) 207 { 207 208 pNameAndSystemEditor->setType(uiCommon().vmGuestOSType("Other")); 209 /* Return false to allow OS type guessing from name. See caller code: */ 210 return false; 211 } 208 212 /* Append 32 as bit-count if the name has no 64 and 32 in the name since API returns a type name with no arch bit count for 32-bit OSs: */ 209 213 if (!strDetectedOSType.contains("32") && !strDetectedOSType.contains("64")) … … 390 394 { 391 395 AssertReturnVoid(wizardWindow<UIWizardNewVM>()); 392 if (!m_userModifiedParameters.contains("GuestOSType "))396 if (!m_userModifiedParameters.contains("GuestOSTypeFromISO")) 393 397 { 394 398 m_pNameAndSystemEditor->blockSignals(true); 395 399 if (UIWizardNewVMNameOSTypeCommon::guessOSTypeFromName(m_pNameAndSystemEditor, strNewName)) 400 { 396 401 wizardWindow<UIWizardNewVM>()->setGuestOSType(m_pNameAndSystemEditor->type()); 402 m_userModifiedParameters << "GuestOSTypeFromName"; 403 } 397 404 m_pNameAndSystemEditor->blockSignals(false); 398 405 } … … 474 481 UIWizardNewVMNameOSTypeCommon::detectOSType(strPath, pWizard); 475 482 476 if (!m_userModifiedParameters.contains("GuestOSType")) 477 UIWizardNewVMNameOSTypeCommon::guessOSTypeDetectedOSTypeString(m_pNameAndSystemEditor, pWizard->detectedOSTypeId()); 483 if (UIWizardNewVMNameOSTypeCommon::guessOSTypeDetectedOSTypeString(m_pNameAndSystemEditor, pWizard->detectedOSTypeId())) 484 m_userModifiedParameters << "GuestOSTypeFromISO"; 485 else /* Remove GuestOSTypeFromISO fromthe set if it is there: */ 486 m_userModifiedParameters.remove("GuestOSTypeFromISO"); 487 478 488 pWizard->setISOFilePath(strPath); 479 489
Note:
See TracChangeset
for help on using the changeset viewer.