VirtualBox

Changeset 93454 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 27, 2022 9:39:26 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
149566
Message:

FE/Qt: bugref:9371. Some more fixes for detected OS type stuff.

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

    r93409 r93454  
    148148    UIWizardNewVMNameOSTypeCommon::determineOSType(strISOPath, pWizard);
    149149
    150     if (!pWizard->detectedOSTypeId().isEmpty() && !m_userModifiedParameters.contains("GuestOSType"))
     150    if (!m_userModifiedParameters.contains("GuestOSType"))
    151151        UIWizardNewVMNameOSTypeCommon::guessOSTypeDetectedOSTypeString(m_pNameAndSystemEditor, pWizard->detectedOSTypeId());
    152152    pWizard->setISOFilePath(strISOPath);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePage.cpp

    r93409 r93454  
    178178bool UIWizardNewVMNameOSTypeCommon::guessOSTypeFromName(UINameAndSystemEditor *pNameAndSystemEditor, QString strNewName)
    179179{
     180    AssertReturn(pNameAndSystemEditor, false);
    180181    /* Append default architecture bit-count (64/32) if not already in the name: */
    181182    if (!strNewName.contains("32") && !strNewName.contains("64"))
     
    193194        if (strNewName.contains(gs_OSTypePattern[i].pattern))
    194195        {
    195             if (pNameAndSystemEditor)
    196                 pNameAndSystemEditor->setType(uiCommon().vmGuestOSType(gs_OSTypePattern[i].pcstId));
     196            pNameAndSystemEditor->setType(uiCommon().vmGuestOSType(gs_OSTypePattern[i].pcstId));
    197197            return true;
    198198        }
     
    203203bool UIWizardNewVMNameOSTypeCommon::guessOSTypeDetectedOSTypeString(UINameAndSystemEditor *pNameAndSystemEditor, QString strDetectedOSType)
    204204{
     205    AssertReturn(pNameAndSystemEditor, false);
     206    if (strDetectedOSType.isEmpty())
     207        pNameAndSystemEditor->setType(uiCommon().vmGuestOSType("Other"));
    205208    /* 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: */
    206209    if (!strDetectedOSType.contains("32") && !strDetectedOSType.contains("64"))
     
    212215        if (strDetectedOSType.contains(gs_OSTypePattern[i].pattern))
    213216        {
    214             if (pNameAndSystemEditor)
    215                 pNameAndSystemEditor->setType(uiCommon().vmGuestOSType(gs_OSTypePattern[i].pcstId));
     217
     218            pNameAndSystemEditor->setType(uiCommon().vmGuestOSType(gs_OSTypePattern[i].pcstId));
    216219            return true;
    217220        }
     
    471474    UIWizardNewVMNameOSTypeCommon::determineOSType(strPath, pWizard);
    472475
    473     if (!pWizard->detectedOSTypeId().isEmpty() && !m_userModifiedParameters.contains("GuestOSType"))
     476    if (!m_userModifiedParameters.contains("GuestOSType"))
    474477        UIWizardNewVMNameOSTypeCommon::guessOSTypeDetectedOSTypeString(m_pNameAndSystemEditor, pWizard->detectedOSTypeId());
    475478    pWizard->setISOFilePath(strPath);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette