VirtualBox

Ignore:
Timestamp:
Aug 21, 2023 12:29:25 PM (18 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
158856
Message:

FE/Qt: bugref:10496, bugref:9072. Restoring event filtering for search panel.

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  
    8787}
    8888
     89bool 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}
    8998
    9099/*********************************************************************************************************************************
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.h

    r100918 r100919  
    6262    /** @} */
    6363
    64 
    65 
    6664    enum Page
    6765    {
     
    7169        Page_Preferences,
    7270        Page_Max
    73     };
     71    }
     72        ;
     73protected:
    7474
     75    virtual bool eventFilter(QObject *pObject, QEvent *pEvent) RT_OVERRIDE;
    7576
    7677private:
     
    8182    UIVMLogViewerSearchPanel *m_pSearchWidget;
    8283    UIVMLogViewerWidget *m_pViewer;
    83 
    8484};
    8585
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.cpp

    r100917 r100919  
    305305}
    306306
    307 bool UIVMLogViewerSearchPanel::eventFilter(QObject *pObject, QEvent *pEvent)
     307bool UIVMLogViewerSearchPanel::handleSearchRelatedEvents(QObject *pObject, QEvent *pEvent)
    308308{
    309309    /* Handle only events sent to viewer(): */
    310310    if (pObject != viewer())
    311         return UIVMLogViewerPanel::eventFilter(pObject, pEvent);
     311        return false;
    312312
    313313    /* Depending on event-type: */
     
    367367
    368368    /* Call to base-class: */
    369     return UIVMLogViewerPanel::eventFilter(pObject, pEvent);
     369    return false;
    370370}
    371371
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.h

    r100917 r100919  
    6868    /** Returns the number of the matches to the current search. */
    6969    int matchCount() const;
     70    /** Handles Qt @a pEvent, used for keyboard processing. */
     71    bool handleSearchRelatedEvents(QObject *pObject, QEvent *pEvent);
    7072
    7173protected:
     
    7678    /** Handles Qt key-press @a pEevent. */
    7779    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;
    8080    virtual void showEvent(QShowEvent *pEvent) RT_OVERRIDE;
    8181    virtual void hideEvent(QHideEvent* pEvent) RT_OVERRIDE;
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp

    r100918 r100919  
    762762    {
    763763        /* Configure panel: */
    764         installEventFilter(m_pFilterPanel);
     764        //installEventFilter(m_pFilterPanel);
    765765        m_pFilterPanel->hide();
    766766        connect(m_pFilterPanel, &UIVMLogViewerFilterPanel::sigFilterApplied,
     
    808808    m_pPanel = new UIVMLogViewerPanelNew(0, this);
    809809    AssertReturnVoid(m_pPanel);
    810     //     installEventFilter(m_pSearchPanel);
     810    installEventFilter(m_pPanel);
    811811    connect(m_pPanel, &UIVMLogViewerPanelNew::sigHighlightingUpdated,
    812812            this, &UIVMLogViewerWidget::sltSearchResultHighLigting);
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