Changeset 100919 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Aug 21, 2023 12:29:25 PM (18 months ago)
- svn:sync-xref-src-repo-rev:
- 158856
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/logviewer
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.cpp
r100918 r100919 87 87 } 88 88 89 bool UIVMLogViewerPanelNew::eventFilter(QObject *pObject, QEvent *pEvent) 90 { 91 if (currentIndex() == static_cast<Page>(Page_Search)) 92 { 93 if (m_pSearchWidget->handleSearchRelatedEvents(pObject, pEvent)) 94 return true; 95 } 96 return QIWithRetranslateUI<UIDialogPanelBase>::eventFilter(pObject, pEvent); 97 } 89 98 90 99 /********************************************************************************************************************************* -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.h
r100918 r100919 62 62 /** @} */ 63 63 64 65 66 64 enum Page 67 65 { … … 71 69 Page_Preferences, 72 70 Page_Max 73 }; 71 } 72 ; 73 protected: 74 74 75 virtual bool eventFilter(QObject *pObject, QEvent *pEvent) RT_OVERRIDE; 75 76 76 77 private: … … 81 82 UIVMLogViewerSearchPanel *m_pSearchWidget; 82 83 UIVMLogViewerWidget *m_pViewer; 83 84 84 }; 85 85 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.cpp
r100917 r100919 305 305 } 306 306 307 bool UIVMLogViewerSearchPanel:: eventFilter(QObject *pObject, QEvent *pEvent)307 bool UIVMLogViewerSearchPanel::handleSearchRelatedEvents(QObject *pObject, QEvent *pEvent) 308 308 { 309 309 /* Handle only events sent to viewer(): */ 310 310 if (pObject != viewer()) 311 return UIVMLogViewerPanel::eventFilter(pObject, pEvent);311 return false; 312 312 313 313 /* Depending on event-type: */ … … 367 367 368 368 /* Call to base-class: */ 369 return UIVMLogViewerPanel::eventFilter(pObject, pEvent);369 return false; 370 370 } 371 371 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.h
r100917 r100919 68 68 /** Returns the number of the matches to the current search. */ 69 69 int matchCount() const; 70 /** Handles Qt @a pEvent, used for keyboard processing. */ 71 bool handleSearchRelatedEvents(QObject *pObject, QEvent *pEvent); 70 72 71 73 protected: … … 76 78 /** Handles Qt key-press @a pEevent. */ 77 79 virtual void keyPressEvent(QKeyEvent *pEvent) RT_OVERRIDE; 78 /** Handles Qt @a pEvent, used for keyboard processing. */79 virtual bool eventFilter(QObject *pObject, QEvent *pEvent) RT_OVERRIDE;80 80 virtual void showEvent(QShowEvent *pEvent) RT_OVERRIDE; 81 81 virtual void hideEvent(QHideEvent* pEvent) RT_OVERRIDE; -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
r100918 r100919 762 762 { 763 763 /* Configure panel: */ 764 installEventFilter(m_pFilterPanel);764 //installEventFilter(m_pFilterPanel); 765 765 m_pFilterPanel->hide(); 766 766 connect(m_pFilterPanel, &UIVMLogViewerFilterPanel::sigFilterApplied, … … 808 808 m_pPanel = new UIVMLogViewerPanelNew(0, this); 809 809 AssertReturnVoid(m_pPanel); 810 // installEventFilter(m_pSearchPanel);810 installEventFilter(m_pPanel); 811 811 connect(m_pPanel, &UIVMLogViewerPanelNew::sigHighlightingUpdated, 812 812 this, &UIVMLogViewerWidget::sltSearchResultHighLigting);
Note:
See TracChangeset
for help on using the changeset viewer.