Changeset 104394 in vbox
- Timestamp:
- Apr 22, 2024 1:07:03 PM (7 months ago)
- 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 32 32 33 33 /* GUI includes: */ 34 #include "UITranslationEventListener.h" 34 35 #include "UIWindowMenuManager.h" 35 36 … … 290 291 } 291 292 292 void UIWindowMenuManager:: retranslateUi()293 void UIWindowMenuManager::sltRetranslateUI() 293 294 { 294 295 /* Translate all the helpers: */ … … 304 305 /* Install global event-filter: */ 305 306 qApp->installEventFilter(this); 307 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 308 this, &UIWindowMenuManager::sltRetranslateUI); 306 309 } 307 310 … … 362 365 QWidget *pWidget = qobject_cast<QWidget*>(pObject); 363 366 if (pWidget && m_helpers.contains(pWidget)) 364 retranslateUi();367 sltRetranslateUI(); 365 368 } 366 369 367 370 /* Call to base-class: */ 368 return Q IWithRetranslateUI3<QObject>::eventFilter(pObject, pEvent);371 return QObject::eventFilter(pObject, pEvent); 369 372 } 370 373 -
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIWindowMenuManager.h
r98103 r104394 36 36 #include <QObject> 37 37 38 /* GUI includes: */39 #include "QIWithRetranslateUI.h"40 41 38 /* Forward declarations: */ 42 39 class QMenu; … … 45 42 /** Singleton QObject extension 46 43 * used as Mac OS X 'Window' menu Manager. */ 47 class SHARED_LIBRARY_STUFF UIWindowMenuManager : public Q IWithRetranslateUI3<QObject>44 class SHARED_LIBRARY_STUFF UIWindowMenuManager : public QObject 48 45 { 49 46 Q_OBJECT; … … 68 65 void removeWindow(QWidget *pWindow); 69 66 70 /** Handles translation event. */71 virtual void retranslateUi() RT_OVERRIDE;72 73 67 protected: 74 68 … … 80 74 /** Preprocesses any Qt @a pEvent for passed @a pObject. */ 81 75 virtual bool eventFilter(QObject *pObject, QEvent *pEvent) RT_OVERRIDE; 76 77 private slots: 78 79 /** Handles translation event. */ 80 virtual void sltRetranslateUI(); 82 81 83 82 private:
Note:
See TracChangeset
for help on using the changeset viewer.