VirtualBox

Changeset 99979 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 25, 2023 11:52:28 AM (22 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
157639
Message:

FE/Qt: bugref:10460. Make sure 64-bit OS type is selected in case it exists.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp

    r99975 r99979  
    391391    else if (m_strFamilyId == "Windows")
    392392    {
    393         QString strDefaultID = "Windows10";
    394         if (ARCH_BITS == 64)
    395             strDefaultID += "_64";
     393        QString strDefaultID = "Windows10_64";
    396394        const int iIndexWin10 = m_pComboType->findData(strDefaultID, TypeID);
    397395        if (iIndexWin10 != -1)
     
    401399    else if (m_strFamilyId == "Linux")
    402400    {
    403         QString strDefaultID = "Oracle";
    404         if (ARCH_BITS == 64)
    405             strDefaultID += "_64";
    406         const int iIndexUbuntu = m_pComboType->findData(strDefaultID, TypeID);
    407         if (iIndexUbuntu != -1)
    408             m_pComboType->setCurrentIndex(iIndexUbuntu);
    409     }
    410     /* Else simply select the first one present: */
     401        QString strDefaultID = "Oracle_64";
     402        const int iIndexOracle = m_pComboType->findData(strDefaultID, TypeID);
     403        if (iIndexOracle != -1)
     404            m_pComboType->setCurrentIndex(iIndexOracle);
     405    }
     406    /* Else try to pick the first 64-bit one if it exists.: */
    411407    else
    412         m_pComboType->setCurrentIndex(0);
     408    {
     409       QString strDefaultID = "_64";
     410       const int iIndex = m_pComboType->findData(strDefaultID, TypeID, Qt::MatchContains);
     411       if (iIndex != -1)
     412           m_pComboType->setCurrentIndex(iIndex);
     413       else
     414           m_pComboType->setCurrentIndex(0);
     415    }
    413416
    414417    /* Update all the stuff: */
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