VirtualBox

Changeset 30525 in vbox


Ignore:
Timestamp:
Jun 30, 2010 11:17:28 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
63232
Message:

FE/Qt: Make sure any modal dialog is closed if a powered off event occurs from the outside.

File:
1 edited

Legend:

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

    r30348 r30525  
    907907void UISession::sltCloseVirtualSession()
    908908{
     909     /* Use a single shot with timeout 0 to allow the widgets to cleanly close and test then again.
     910      * If all open widgets are closed destroy ourself: */
     911    QWidget *widget = QApplication::activeModalWidget() ?
     912                      QApplication::activeModalWidget() :
     913                      QApplication::activePopupWidget() ?
     914                      QApplication::activePopupWidget() : 0;
     915    if (widget)
     916    {
     917        widget->hide();
     918        QTimer::singleShot(0, this, SLOT(sltCloseVirtualSession()));
     919        return;
     920    }
    909921    m_pMachine->closeVirtualMachine();
    910922}
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