VirtualBox

Changeset 33781 in vbox for trunk/src


Ignore:
Timestamp:
Nov 4, 2010 3:59:35 PM (14 years ago)
Author:
vboxsync
Message:

FE/Qt4: move the getter to the ctor

Location:
trunk/src/VBox/Frontends/VirtualBox/src/widgets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorWidget.cpp

    r28800 r33781  
    5252    mCbType->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Fixed);
    5353    mPxTypeIcon->setFixedSize (32, 32);
     54
     55    /* Check if host supports (AMD-V or VT-x) and long mode */
     56    CHost host = vboxGlobal().virtualBox().GetHost();
     57    m_fSupportsHWVirtEx = host.GetProcessorFeature(KProcessorFeature_HWVirtEx);
     58    m_fSupportsLongMode = host.GetProcessorFeature(KProcessorFeature_LongMode);
    5459
    5560    /* Fill OS family selector */
     
    168173    mCbType->clear();
    169174
    170     /* Check if host supports (AMD-V or VT-x) and long mode */
    171     CHost host = vboxGlobal().virtualBox().GetHost();
    172     bool mSupportsHWVirtEx = host.GetProcessorFeature (KProcessorFeature_HWVirtEx);
    173     bool mSupportsLongMode = host.GetProcessorFeature (KProcessorFeature_LongMode);
    174 
    175175    /* Populate combo-box with OS Types related to currently selected Family ID */
    176176    QString familyId (mCbFamily->itemData (aIndex, RoleTypeID).toString());
     
    178178    for (int i = 0; i < types.size(); ++ i)
    179179    {
    180         if (types [i].GetIs64Bit() && (!mSupportsHWVirtEx || !mSupportsLongMode))
     180        if (types [i].GetIs64Bit() && (!m_fSupportsHWVirtEx || !m_fSupportsLongMode))
    181181            continue;
    182182        int index = mCbType->count();
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorWidget.h

    r28800 r33781  
    7272    int mLayoutPosition;
    7373    bool mLayoutActivated;
     74
     75    bool m_fSupportsHWVirtEx;
     76    bool m_fSupportsLongMode;
    7477};
    7578
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