VirtualBox

Changeset 101092 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Sep 12, 2023 12:54:09 PM (17 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6699, bugref:9072. Fixing 'type to search' functionality of log viewer. take 1.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/logviewer
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.cpp

    r100962 r101092  
    6666    connect(m_pSearchWidget, &UIVMLogViewerSearchWidget::sigSearchUpdated,
    6767            this, &UIVMLogViewerPaneContainer::sigSearchUpdated);
     68    connect(m_pSearchWidget, &UIVMLogViewerSearchWidget::sigShowPane,
     69            this, &UIVMLogViewerPaneContainer::sigShowSearchPane);
    6870
    6971    /* Filter tab: */
     
    169171bool UIVMLogViewerPaneContainer::eventFilter(QObject *pObject, QEvent *pEvent)
    170172{
    171     if (currentIndex() == static_cast<Page>(Page_Search))
    172     {
    173         if (m_pSearchWidget->handleSearchRelatedEvents(pObject, pEvent))
    174             return true;
    175     }
     173    /* Check if the search panel is interested in the event (most prob. key event): */
     174    if (m_pSearchWidget && m_pSearchWidget->handleSearchRelatedEvents(pObject, pEvent))
     175        return true;
     176
    176177    return UIPaneContainer::eventFilter(pObject, pEvent);
    177178}
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.h

    r100962 r101092  
    6363    void sigChangeFont(QFont font);
    6464    void sigResetToDefaults();
     65
     66    void sigShowSearchPane();
    6567
    6668public:
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchWidget.cpp

    r100963 r101092  
    343343            {
    344344                /* Make sure current log-page is visible: */
    345                 //emit sigShowPanel(this);
     345                emit sigShowPane();
    346346                /* Set focus on search-editor: */
    347347                m_pSearchEditor->setFocus();
     
    353353            {
    354354                /* Make sure current log-page is visible: */
    355                 //emit sigShowPanel(this);
     355                emit sigShowPane();
    356356                /* Set focus on search-editor: */
    357357                m_pSearchEditor->setFocus();
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchWidget.h

    r100963 r101092  
    5757    void sigHighlightingUpdated();
    5858    void sigSearchUpdated();
     59    void sigShowPane();
    5960
    6061public:
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp

    r101090 r101092  
    715715            break;
    716716    }
     717}
     718
     719void UIVMLogViewerWidget::sltShowSearchPane()
     720{
     721    AssertReturnVoid(m_pPanel);
     722
     723    m_pPanel->setVisible(true);
     724    int iIndex = (int)UIVMLogViewerPaneContainer::Page_Search;
     725    m_pPanel->setCurrentIndex(iIndex);
     726    sltPanelCurrentTabChanged(iIndex);
    717727}
    718728
     
    832842    connect(m_pPanel, &UIVMLogViewerPaneContainer::sigCurrentTabChanged,
    833843            this, &UIVMLogViewerWidget::sltPanelCurrentTabChanged);
     844    connect(m_pPanel, &UIVMLogViewerPaneContainer::sigShowSearchPane,
     845            this, &UIVMLogViewerWidget::sltShowSearchPane);
    834846
    835847    m_pMainLayout->addWidget(m_pPanel);
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h

    r101090 r101092  
    147147    void sltPanelContainerHidden();
    148148    void sltPanelCurrentTabChanged(int iIndex);
     149    void sltShowSearchPane();
    149150
    150151private:
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