VirtualBox

Changeset 101382 in vbox for trunk


Ignore:
Timestamp:
Oct 6, 2023 10:02:08 AM (16 months ago)
Author:
vboxsync
Message:

FE/Qt: Marking up some more guest OS ID strings. bugref:10384

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp

    r101315 r101382  
    119119#include "CUSBDeviceFilters.h"
    120120#include "CVRDEServer.h"
     121#include <VBox/com/VirtualBox.h> /* For GUEST_OS_ID_STR_PARTIAL. */
    121122
    122123/* Other VBox includes: */
     
    24352436bool UICommon::isWddmCompatibleOsType(const QString &strGuestOSTypeId)
    24362437{
    2437     return    strGuestOSTypeId.startsWith("WindowsVista")
    2438            || strGuestOSTypeId.startsWith("Windows7")
    2439            || strGuestOSTypeId.startsWith("Windows8")
    2440            || strGuestOSTypeId.startsWith("Windows81")
    2441            || strGuestOSTypeId.startsWith("Windows10")
    2442            || strGuestOSTypeId.startsWith("Windows11")
    2443            || strGuestOSTypeId.startsWith("Windows2008")
    2444            || strGuestOSTypeId.startsWith("Windows2012")
    2445            || strGuestOSTypeId.startsWith("Windows2016")
    2446            || strGuestOSTypeId.startsWith("Windows2019");
     2438    return    strGuestOSTypeId.startsWith(GUEST_OS_ID_STR_PARTIAL("WindowsVista"))
     2439           || strGuestOSTypeId.startsWith(GUEST_OS_ID_STR_PARTIAL("Windows7"))
     2440           || strGuestOSTypeId.startsWith(GUEST_OS_ID_STR_PARTIAL("Windows8"))
     2441           || strGuestOSTypeId.startsWith(GUEST_OS_ID_STR_PARTIAL("Windows81"))
     2442           || strGuestOSTypeId.startsWith(GUEST_OS_ID_STR_PARTIAL("Windows10"))
     2443           || strGuestOSTypeId.startsWith(GUEST_OS_ID_STR_PARTIAL("Windows11"))
     2444           || strGuestOSTypeId.startsWith(GUEST_OS_ID_STR_PARTIAL("Windows2008"))
     2445           || strGuestOSTypeId.startsWith(GUEST_OS_ID_STR_PARTIAL("Windows2012"))
     2446           || strGuestOSTypeId.startsWith(GUEST_OS_ID_STR_PARTIAL("Windows2016"))
     2447           || strGuestOSTypeId.startsWith(GUEST_OS_ID_STR_PARTIAL("Windows2019"));
    24472448}
    24482449#endif /* VBOX_WITH_3D_ACCELERATION */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp

    r101373 r101382  
    651651        /* Assign fallback icon if we do NOT have that 'guest OS type' registered: */
    652652        else if (!strOSTypeID.isNull())
    653             m_guestOSTypeIcons[strOSTypeID] = iconSet(m_guestOSTypeIconNames["Other"]);
     653            m_guestOSTypeIcons[strOSTypeID] = iconSet(m_guestOSTypeIconNames[GUEST_OS_ID_STR_X86("Other")]);
    654654        /* Assign fallback icon if we do NOT have that 'guest OS type' known: */
    655655        else
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.cpp

    r99186 r101382  
    4444#include "CProgress.h"
    4545#include "CVirtualBoxErrorInfo.h"
     46#include <VBox/com/VirtualBox.h> /* For GUEST_OS_ID_STR_X86. */
    4647
    4748
     
    207208
    208209            /* Determine VM OS type: */
    209             m_strOSTypeId = "Other";
     210            m_strOSTypeId = GUEST_OS_ID_STR_X86("Other");
    210211
    211212            /* Determine VM states: */
     
    245246
    246247            /* Determine VM OS type: */
    247             m_strOSTypeId = m_fAccessible ? m_comCloudMachine.GetOSTypeId() : "Other";
     248            m_strOSTypeId = m_fAccessible ? m_comCloudMachine.GetOSTypeId() : GUEST_OS_ID_STR_X86("Other");
    248249
    249250            /* Determine VM states: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp

    r101265 r101382  
    5454#include "CRecordingSettings.h"
    5555#include "CVRDEServer.h"
     56#include <VBox/com/VirtualBox.h> /* For GUEST_OS_ID_STR_X86 and friends. */
    5657
    5758
     
    10211022bool UIMachineSettingsDisplay::shouldWeWarnAboutLowVRAM()
    10221023{
    1023     QStringList excludingOSList = QStringList()
    1024         << "Other" << "DOS" << "Netware" << "L4" << "QNX" << "JRockitVE";
    1025     return !excludingOSList.contains(m_strGuestOSTypeId);
     1024    static const char *s_apszExcludes[] =
     1025    {
     1026        GUEST_OS_ID_STR_X86("Other"),
     1027        GUEST_OS_ID_STR_X64("Other"),
     1028        GUEST_OS_ID_STR_A64("Other"),
     1029        GUEST_OS_ID_STR_X64("VBoxBS"),
     1030        GUEST_OS_ID_STR_X86("DOS"),
     1031        GUEST_OS_ID_STR_X86("Netware"),
     1032        GUEST_OS_ID_STR_X86("L4"),
     1033        GUEST_OS_ID_STR_X86("QNX"),
     1034        GUEST_OS_ID_STR_X86("JRockitVE"),
     1035    };
     1036    for (size_t idx = 0; idx < RT_ELEMENTS(s_apszExcludes); idx++)
     1037        if (m_strGuestOSTypeId == s_apszExcludes[idx])
     1038            return false;
     1039    return true;
    10261040}
    10271041
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePage.cpp

    r101373 r101382  
    5757{
    5858    /* DOS: */
    59     { QRegularExpression("DOS", QRegularExpression::CaseInsensitiveOption), "DOS" },
     59    { QRegularExpression("DOS", QRegularExpression::CaseInsensitiveOption), GUEST_OS_ID_STR_X86("DOS") },
    6060
    6161    /* Windows: */
     
    308308        if (!pNameAndSystemEditor->setGuestOSTypeByTypeId(strDetectedOSType))
    309309        {
    310             pNameAndSystemEditor->setGuestOSTypeByTypeId("Other");
     310            pNameAndSystemEditor->setGuestOSTypeByTypeId(GUEST_OS_ID_STR_X86("Other"));
    311311            /* Return false to allow OS type guessing from name. See caller code: */
    312312            return false;
     
    314314        return true;
    315315    }
    316     pNameAndSystemEditor->setGuestOSTypeByTypeId("Other");
     316    pNameAndSystemEditor->setGuestOSTypeByTypeId(GUEST_OS_ID_STR_X86("Other"));
    317317    return false;
    318318}
Note: See TracChangeset for help on using the changeset viewer.

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