VirtualBox

Changeset 101090 in vbox


Ignore:
Timestamp:
Sep 12, 2023 12:14:34 PM (20 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
159059
Message:

FE/Qt: bugref:6699, bugref:9072. Making sure tool bar's pane actions are unchecked as log viewer is kicked off.

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

Legend:

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

    r101027 r101090  
    511511void UIVMLogViewerWidget::sltPanelContainerHidden()
    512512{
    513     foreach (QAction *pPanelAction, m_panelActions)
    514     {
    515         if (!pPanelAction)
    516             continue;
    517         pPanelAction->blockSignals(true);
    518         pPanelAction->setChecked(false);
    519         pPanelAction->blockSignals(false);
    520     }
     513    uncheckPaneActions();
    521514}
    522515
     
    527520    QAction *pAction = qobject_cast<QAction*>(sender());
    528521
    529     if (!m_panelActions.contains(pAction))
    530         return;
    531 
    532     foreach (QAction *pOther, m_panelActions)
     522    if (!m_paneActions.contains(pAction))
     523        return;
     524
     525    foreach (QAction *pOther, m_paneActions)
    533526    {
    534527        if (pOther == pAction)
     
    703696        return;
    704697
    705     for(QSet<QAction*>::iterator iter = m_panelActions.begin(); iter != m_panelActions.end(); ++iter)
    706     {
    707         QAction *pAction = *iter;
    708 
    709         pAction->blockSignals(true);
    710         pAction->setChecked(false);
    711         pAction->blockSignals(false);
    712     }
     698    uncheckPaneActions();
    713699
    714700    switch (static_cast<UIVMLogViewerPaneContainer::Page>(iIndex))
     
    757743    addAction(m_pActionPool->action(UIActionIndex_M_Log_S_Save));
    758744
    759     m_panelActions.insert(m_pActionPool->action(UIActionIndex_M_Log_T_Find));
    760     m_panelActions.insert(m_pActionPool->action(UIActionIndex_M_Log_T_Filter));
    761     m_panelActions.insert(m_pActionPool->action(UIActionIndex_M_Log_T_Bookmark));
    762     m_panelActions.insert(m_pActionPool->action(UIActionIndex_M_Log_T_Preferences));
     745    m_paneActions.insert(m_pActionPool->action(UIActionIndex_M_Log_T_Find));
     746    m_paneActions.insert(m_pActionPool->action(UIActionIndex_M_Log_T_Filter));
     747    m_paneActions.insert(m_pActionPool->action(UIActionIndex_M_Log_T_Bookmark));
     748    m_paneActions.insert(m_pActionPool->action(UIActionIndex_M_Log_T_Preferences));
     749    uncheckPaneActions();
    763750
    764751    m_pActionPool->action(UIActionIndex_M_Log_T_Find)->setData((int)UIVMLogViewerPaneContainer::Page_Search);
     
    11551142}
    11561143
     1144void UIVMLogViewerWidget::uncheckPaneActions()
     1145{
     1146    foreach (QAction *pPanelAction, m_paneActions)
     1147    {
     1148        if (!pPanelAction)
     1149            continue;
     1150        pPanelAction->blockSignals(true);
     1151        pPanelAction->setChecked(false);
     1152        pPanelAction->blockSignals(false);
     1153    }
     1154}
     1155
    11571156#include "UIVMLogViewerWidget.moc"
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h

    r101027 r101090  
    203203    /** If the current tab is a label tab then switch to the next tab and return true. Returns false otherwise. */
    204204    bool labelTabHandler();
     205    void uncheckPaneActions();
    205206
    206207    /** Holds the widget's embedding type. */
     
    244245    QPointer<UIVMLogPage> m_pPreviousLogPage;
    245246    UIVMLogViewerPaneContainer *m_pPanel;
    246     QSet<QAction*> m_panelActions;
     247    QSet<QAction*> m_paneActions;
    247248    friend class UIVMLogViewerFilterWidget;
    248249    friend class UIVMLogViewerPane;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette