- Timestamp:
- May 21, 2014 1:08:47 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r51198 r51322 1576 1576 && aMachine.GetUSBProxyAvailable()) 1577 1577 { 1578 /* the USB controller may be unavailable (i.e. in VirtualBox OSE) */ 1579 1580 ULONG cOhciCtls = aMachine.GetUSBControllerCountByType(KUSBControllerType_OHCI); 1581 1582 if (cOhciCtls) 1578 /* The USB controller may be unavailable (i.e. in VirtualBox OSE): */ 1579 if (aMachine.GetUSBControllers().isEmpty()) 1580 item = QString(sSectionItemTpl1).arg(tr("Disabled", "details report (USB)")); 1581 else 1583 1582 { 1584 1583 CUSBDeviceFilterVector coll = flts.GetDeviceFilters(); … … 1593 1592 .arg (coll.size()).arg (active)); 1594 1593 } 1595 else1596 item = QString (sSectionItemTpl1)1597 .arg (tr ("Disabled", "details report (USB)"));1598 1594 1599 1595 report += sectionTpl -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
r51293 r51322 392 392 QString strFullData; 393 393 394 395 /* 396 * Check whether there is at least one OHCI USB controllers with 397 * an available proxy. 398 */ 399 const CUSBDeviceFilters &filters = machine.GetUSBDeviceFilters(); 400 ULONG cOhciCtls = machine.GetUSBControllerCountByType(KUSBControllerType_OHCI); 401 bool fUSBEnabled = !filters.isNull() && cOhciCtls && machine.GetUSBProxyAvailable(); 394 /* Check whether there is at least one USB controller with an available proxy. */ 395 bool fUSBEnabled = !machine.GetUSBDeviceFilters().isNull() 396 && !machine.GetUSBControllers().isEmpty() 397 && machine.GetUSBProxyAvailable(); 402 398 403 399 setState(fUSBEnabled ? KDeviceActivity_Idle : KDeviceActivity_Null); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r51252 r51322 1553 1553 /* USB stuff: */ 1554 1554 { 1555 /* Check whether there is at least one OHCIUSB controllers with an available proxy. */1556 const CUSBDeviceFilters &filters = machine.GetUSBDeviceFilters();1557 ULONG cOhciCtls = machine.GetUSBControllerCountByType(KUSBControllerType_OHCI);1558 bool fUSBEnabled = !filters.isNull() && cOhciCtls&& machine.GetUSBProxyAvailable();1555 /* Check whether there is at least one USB controllers with an available proxy. */ 1556 bool fUSBEnabled = !machine.GetUSBDeviceFilters().isNull() 1557 && !machine.GetUSBControllers().isEmpty() 1558 && machine.GetUSBProxyAvailable(); 1559 1559 1560 1560 /* Show/Hide USB menu depending on controller availability, activity and USB-proxy presence: */ … … 1566 1566 /* Check whether there is an accessible video input devices pool: */ 1567 1567 const CHostVideoInputDeviceVector &webcams = host.GetVideoInputDevices(); Q_UNUSED(webcams); 1568 ULONG cOhciCtls = machine.GetUSBControllerCountByType(KUSBControllerType_OHCI); 1569 bool fWebCamsEnabled = host.isOk() && cOhciCtls; 1568 bool fWebCamsEnabled = host.isOk() && !machine.GetUSBControllers().isEmpty(); 1570 1569 1571 1570 /* Show/Hide WebCams menu depending on ExtPack availability: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r51054 r51322 495 495 if (indicatorsPool()->indicator(IndicatorType_USB)) 496 496 { 497 const CUSBDeviceFilters &filters = m.GetUSBDeviceFilters();498 ULONG cOhciCtls = m.GetUSBControllerCountByType(KUSBControllerType_OHCI);499 bool fUSBEnabled = !filters.isNull() && cOhciCtls&& m.GetUSBProxyAvailable();497 bool fUSBEnabled = !m.GetUSBDeviceFilters().isNull() 498 && !m.GetUSBControllers().isEmpty() 499 && m.GetUSBProxyAvailable(); 500 500 501 501 if (!fUSBEnabled) -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp
r50912 r51322 910 910 { 911 911 const CUSBDeviceFilters &flts = machine().GetUSBDeviceFilters(); 912 if (!flts.isNull() && machine().GetUSBControllerCountByType(KUSBControllerType_OHCI))912 if (!flts.isNull() && !machine().GetUSBControllers().isEmpty()) 913 913 { 914 914 const CUSBDeviceFilterVector &coll = flts.GetDeviceFilters(); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
r51297 r51322 821 821 #endif /* VBOX_WITH_VIDEOHWACCEL */ 822 822 823 /* Enable OHCI controller if HID is enabled: */ 824 if (pSystemPage && pSystemPage->isHIDEnabled()) 825 { 826 ULONG cOhciCtls = m_machine.GetUSBControllerCountByType(KUSBControllerType_OHCI); 827 if (!cOhciCtls) 828 m_machine.AddUSBController("OHCI", KUSBControllerType_OHCI); 829 } 823 /* Enable OHCI controller if HID is enabled but no USB controllers present: */ 824 if (pSystemPage && pSystemPage->isHIDEnabled() && m_machine.GetUSBControllers().isEmpty()) 825 m_machine.AddUSBController("OHCI", KUSBControllerType_OHCI); 830 826 831 827 /* Disable First RUN Wizard: */ … … 1101 1097 if ( !m_machine.isReallyOk() 1102 1098 && controllerColl.size() > 0 1103 && m_machine.GetUSBControllerCountByType(KUSBControllerType_OHCI))1099 && !m_machine.GetUSBControllers().isEmpty()) 1104 1100 msgCenter().warnAboutUnaccessibleUSB(m_machine, parentWidget()); 1105 1101 break;
Note:
See TracChangeset
for help on using the changeset viewer.