VirtualBox

Changeset 88766 in vbox


Ignore:
Timestamp:
Apr 29, 2021 7:40:19 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
144096
Message:

FE/Qt: bugref:8161. In the machine UI context the logviewer saves options to extra data during destruction.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
3 edited

Legend:

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

    r88737 r88766  
    164164}
    165165
     166UIVMLogViewerWidget::~UIVMLogViewerWidget()
     167{
     168    /* In machine UI context we perform cleanup during destruction.
     169       UIMachineLogic makes sure this happens early enough: */
     170    if (m_enmEmbedding == EmbedTo_Dialog)
     171        sltSaveOptions();
     172}
     173
    166174int UIVMLogViewerWidget::defaultLogPageWidth() const
    167175{
     
    728736    if (loadedFont != QFont())
    729737        m_font = loadedFont;
    730     connect(&uiCommon(), &UICommon::sigAskToCommitData,
    731             this, &UIVMLogViewerWidget::sltSaveOptions);
     738    /* In manager UI we cleanup by listening the sigAskToCommitData signal: */
     739    if (m_enmEmbedding == EmbedTo_Stack)
     740        connect(&uiCommon(), &UICommon::sigAskToCommitData,
     741                this, &UIVMLogViewerWidget::sltSaveOptions);
    732742}
    733743
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h

    r88735 r88766  
    7373    UIVMLogViewerWidget(EmbedTo enmEmbedding, UIActionPool *pActionPool,
    7474                        bool fShowToolbar = true, const CMachine &comMachine = CMachine(), QWidget *pParent = 0);
     75    ~UIVMLogViewerWidget();
    7576    /** Returns the width of the current log page. return 0 if there is no current log page: */
    7677    int defaultLogPageWidth() const;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r88741 r88766  
    25682568void UIMachineLogic::sltCloseLogViewerWindow()
    25692569{
    2570     QIManagerDialog* pDialog = qobject_cast<QIManagerDialog*>(sender());
    2571     if (m_pLogViewerDialog != pDialog || !pDialog)
    2572         return;
    2573 
     2570    if (!m_pLogViewerDialog)
     2571        return;
     2572
     2573    QIManagerDialog* pDialog = m_pLogViewerDialog;
    25742574    /* Set the m_pLogViewerDialog to NULL before closing the dialog. or we will have redundant deletes*/
    25752575    m_pLogViewerDialog = 0;
     
    28082808    cleanupDebugger();
    28092809#endif
     2810    sltCloseLogViewerWindow();
    28102811    sltCloseFileManagerDialog();
    28112812    sltCloseVMInformationDialog();
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