VirtualBox

Changeset 104394 in vbox


Ignore:
Timestamp:
Apr 22, 2024 1:07:03 PM (7 months ago)
Author:
vboxsync
Message:

FE/Qt. bugref:10622. Using new UITranslationEventListener in the UIWindowMenuManager class.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIWindowMenuManager.cpp

    r103977 r104394  
    3232
    3333/* GUI includes: */
     34#include "UITranslationEventListener.h"
    3435#include "UIWindowMenuManager.h"
    3536
     
    290291}
    291292
    292 void UIWindowMenuManager::retranslateUi()
     293void UIWindowMenuManager::sltRetranslateUI()
    293294{
    294295    /* Translate all the helpers: */
     
    304305    /* Install global event-filter: */
    305306    qApp->installEventFilter(this);
     307    connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI,
     308            this, &UIWindowMenuManager::sltRetranslateUI);
    306309}
    307310
     
    362365        QWidget *pWidget = qobject_cast<QWidget*>(pObject);
    363366        if (pWidget && m_helpers.contains(pWidget))
    364             retranslateUi();
     367            sltRetranslateUI();
    365368    }
    366369
    367370    /* Call to base-class: */
    368     return QIWithRetranslateUI3<QObject>::eventFilter(pObject, pEvent);
     371    return QObject::eventFilter(pObject, pEvent);
    369372}
    370373
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIWindowMenuManager.h

    r98103 r104394  
    3636#include <QObject>
    3737
    38 /* GUI includes: */
    39 #include "QIWithRetranslateUI.h"
    40 
    4138/* Forward declarations: */
    4239class QMenu;
     
    4542/** Singleton QObject extension
    4643  * used as Mac OS X 'Window' menu Manager. */
    47 class SHARED_LIBRARY_STUFF UIWindowMenuManager : public QIWithRetranslateUI3<QObject>
     44class SHARED_LIBRARY_STUFF UIWindowMenuManager : public QObject
    4845{
    4946    Q_OBJECT;
     
    6865    void removeWindow(QWidget *pWindow);
    6966
    70     /** Handles translation event. */
    71     virtual void retranslateUi() RT_OVERRIDE;
    72 
    7367protected:
    7468
     
    8074    /** Preprocesses any Qt @a pEvent for passed @a pObject. */
    8175    virtual bool eventFilter(QObject *pObject, QEvent *pEvent) RT_OVERRIDE;
     76
     77private slots:
     78
     79    /** Handles translation event. */
     80    virtual void sltRetranslateUI();
    8281
    8382private:
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