VirtualBox

Ignore:
Timestamp:
May 23, 2014 3:01:36 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: QObject translation template: Handle application wide events only.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/QIWithRetranslateUI.h

    r44528 r51372  
    9898    virtual bool eventFilter(QObject *pObject, QEvent *pEvent)
    9999    {
    100         switch (pEvent->type())
     100        /* Handle events for qApp only: */
     101        if (pObject == qApp)
    101102        {
    102             case QEvent::LanguageChange:
     103            switch (pEvent->type())
    103104            {
    104                 retranslateUi();
    105                 break;
     105                case QEvent::LanguageChange: retranslateUi(); break;
     106                default: break;
    106107            }
    107             default:
    108                 break;
    109108        }
     109        /* Call to base-class: */
    110110        return Base::eventFilter(pObject, pEvent);
    111111    }
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