VirtualBox

Changeset 49706 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Nov 28, 2013 7:08:22 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: 7007: Some native cocoa stuff should be async otherwise it prevents OS logoff/shutdown.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.cpp

    r47170 r49706  
    2323#include <QStackedWidget>
    2424#include <QToolButton>
     25#ifdef Q_WS_MAC
     26# include <QTimer>
     27#endif /* Q_WS_MAC */
    2528
    2629/* GUI includes */
     
    229232    m_pHeaderBtn->setIcon(Snap, UIIconPool::iconSet(":/snapshot_take_16px.png",
    230233                                                    ":/snapshot_take_disabled_16px.png"));
    231     m_pHeaderBtn->animateClick(0);
     234#ifdef Q_WS_MAC
     235    /* Cocoa stuff should be async...
     236     * Do not ask me why but otherwise
     237     * it conflicts with native handlers. */
     238    QTimer::singleShot(0, this, SLOT(sltInit()));
     239#else /* !Q_WS_MAC */
     240    sltInit();
     241#endif /* !Q_WS_MAC */
    232242
    233243    /* Prepare main layout: */
     
    326336}
    327337
     338void UIVMDesktop::sltInit()
     339{
     340    m_pHeaderBtn->animateClick(0);
     341}
     342
    328343void UIVMDesktop::retranslateUi()
    329344{
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.h

    r44318 r49706  
    6363    void lockSnapshots();
    6464
     65private slots:
     66
     67    /** Initialization handler. */
     68    void sltInit();
     69
    6570private:
    6671
Note: See TracChangeset for help on using the changeset viewer.

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