VirtualBox

Changeset 107001 in vbox for trunk


Ignore:
Timestamp:
Nov 14, 2024 11:50:32 AM (5 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
165937
Message:

FE/Qt: bugref:9831. In help viewer widget listen to UICommon::sigAskToCommitData to avoid COM access in application exit.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp

    r106282 r107001  
    5252#include "QIToolBar.h"
    5353#include "QIToolButton.h"
     54#include "UICommon.h"
    5455#include "UIExtraDataManager.h"
    5556#include "UIHelpViewer.h"
     
    13691370    , m_fModelContentCreated(false)
    13701371    , m_fIndexingFinished(false)
     1372    , m_fCommitDataSignalReceived(false)
    13711373{
    13721374    qRegisterMetaType<HelpBrowserTabs>("HelpBrowserTabs");
     
    14311433    connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI,
    14321434        this, &UIHelpBrowserWidget::sltRetranslateUI);
     1435    connect(&uiCommon(), &UICommon::sigAskToCommitData,
     1436            this, &UIHelpBrowserWidget::sltCommitDataSignalReceived);
    14331437}
    14341438
     
    17911795void UIHelpBrowserWidget::cleanup()
    17921796{
     1797    if (m_fCommitDataSignalReceived)
     1798        return;
    17931799    saveOptions();
    17941800    saveBookmarks();
     
    18381844}
    18391845
     1846void UIHelpBrowserWidget::sltCommitDataSignalReceived()
     1847{
     1848    cleanup();
     1849    m_fCommitDataSignalReceived = true;
     1850}
    18401851
    18411852void UIHelpBrowserWidget::showEvent(QShowEvent *pEvent)
  • trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.h

    r106282 r107001  
    121121    void sltMouseOverImage(const QString &strImageName);
    122122    void sltRetranslateUI();
     123    void sltCommitDataSignalReceived();
    123124
    124125private:
     
    209210    bool                 m_fModelContentCreated;
    210211    bool                 m_fIndexingFinished;
     212    bool                 m_fCommitDataSignalReceived;
    211213    /** This queue is used in unlikely case where possibly several keywords are requested to be shown
    212214      *  but indexing is not yet finished. In that case we queue the keywords and process them after
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