VirtualBox

Changeset 88771 in vbox


Ignore:
Timestamp:
Apr 29, 2021 9:47:00 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
144101
Message:

FE/Qt: bugref:8161. Handling closeEvent in UIVMInformationDialog

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.cpp

    r88741 r88771  
    5757#include <iprt/time.h>
    5858
    59 
    60 
    6159UIVMInformationDialog::UIVMInformationDialog(UIMachineWindow *pMachineWindow)
    6260    : QMainWindowWithRestorableGeometryAndRetranslateUi(0)
    6361    , m_pTabWidget(0)
    6462    , m_pMachineWindow(pMachineWindow)
     63    , m_fCloseEmitted(false)
    6564{
    6665    /* Prepare: */
     
    10099        m_pButtonBox->button(QDialogButtonBox::Close)->setToolTip(tr("Reset Changes (%1)").arg(m_pButtonBox->button(QDialogButtonBox::Close)->shortcut().toString()));
    101100        m_pButtonBox->button(QDialogButtonBox::Help)->setToolTip(tr("Show Help (%1)").arg(m_pButtonBox->button(QDialogButtonBox::Help)->shortcut().toString()));
     101    }
     102}
     103
     104void UIVMInformationDialog::closeEvent(QCloseEvent *pEvent)
     105{
     106    if (!m_fCloseEmitted)
     107    {
     108        m_fCloseEmitted = true;
     109        UIVMInformationDialog::sigClose();
     110        pEvent->ignore();
    102111    }
    103112}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.h

    r88741 r88771  
    6666
    6767    /** Handles translation event. */
    68     void retranslateUi();
     68    void retranslateUi() /* override */;
     69    void closeEvent(QCloseEvent *pEvent) /* override */;
    6970
    7071private slots:
     
    102103    UIMachineWindow              *m_pMachineWindow;
    103104    /** @} */
     105    bool m_fCloseEmitted;
    104106};
    105107
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