VirtualBox

Ignore:
Timestamp:
Jun 2, 2007 2:48:06 PM (18 years ago)
Author:
vboxsync
Message:

Fixing LanguageChange event issue:
Hidden Global Settings "usb" list item reappears due to Qt LanguageChange event.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxGlobalSettingsDlg.ui

    r2988 r2997  
    12551255    <function access="protected">setWarning( const QString &amp; )</function>
    12561256    <function returnType="bool">eventFilter( QObject * watched, QEvent * e )</function>
     1257    <function access="private">fixLanguageChange()</function>
    12571258</functions>
    12581259<pixmapinproject/>
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxGlobalSettingsDlg.ui.h

    r2980 r2997  
    446446        lvLanguages_currentChanged (lvLanguages->currentItem());
    447447        mLanguageChanged = false;
     448        fixLanguageChange();
    448449    }
    449450    return result;
     
    10061007    mLanguageChanged = true;
    10071008}
     1009
     1010void VBoxGlobalSettingsDlg::fixLanguageChange()
     1011{
     1012    /* fix for usb page */
     1013
     1014    /// @todo currently, we always disable USB UI on XPCOM-based hosts because
     1015    /// QueryInterface on CUSBDeviceFilter doesn't return CHostUSBDeviceFilter
     1016    /// for host filters (most likely, our XPCOM/IPC/DCONNECT bug).
     1017
     1018#ifdef Q_OS_WIN32
     1019    CHost host = vboxGlobal().virtualBox().GetHost();
     1020    CHostUSBDeviceFilterCollection coll = host.GetUSBDeviceFilters();
     1021    if (coll.isNull())
     1022    {
     1023#endif
     1024        /* disable the USB host filters category if the USB is
     1025         * not available (i.e. in VirtualBox OSE) */
     1026
     1027        QListViewItem *usbItem = listView->findItem ("#usb", listView_Link);
     1028        Assert (usbItem);
     1029        usbItem->setVisible (false);
     1030
     1031        /* disable validators if any */
     1032        pageUSB->setEnabled (false);
     1033
     1034#ifdef Q_OS_WIN32
     1035    }
     1036#endif
     1037}
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