VirtualBox

Changeset 99071 in vbox for trunk


Ignore:
Timestamp:
Mar 20, 2023 4:21:45 PM (21 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10322: Runtime UI: More appropriate fixes for changes in keyboard handler and indicator done in r156332 and 156333.

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

Legend:

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

    r98984 r99071  
    929929        setStateIcon(15, UIIconPool::iconSet(":/hostkey_captured_pressed_checked_16px.png"));
    930930        /* Configure connection: */
    931         connect(pMachine, &UIMachine::sigInitialized,
    932                 this, &UIIndicatorKeyboard::sltFetchState);
    933931        connect(pMachine, &UIMachine::sigKeyboardStateChange,
    934932                this, static_cast<void(UIIndicatorKeyboard::*)(int)>(&UIIndicatorKeyboard::setState));
     
    957955        setToolTip(strToolTip.arg(strFullData));
    958956    }
    959 
    960 private slots:
    961 
    962     /** Fetches the keyboard-state from machine UI. */
    963     void sltFetchState() { setState(m_pMachine->keyboardState()); }
    964957};
    965958
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp

    r98984 r99071  
    908908void UIKeyboardHandler::sltMachineStateChanged()
    909909{
    910     /* Get previous and cached machine states: */
    911     const KMachineState enmPreviousState = uimachine()->machineStatePrevious();
     910    /* Get cached machine states: */
    912911    const KMachineState enmState = uimachine()->machineState();
    913912
    914913    /* Notify all the listeners that machine state was [de]initialized: */
    915     if (   enmPreviousState == KMachineState_Null
    916         || enmState == KMachineState_Null)
     914    if (   enmState == KMachineState_Null
     915        || enmState == KMachineState_Starting)
    917916        emit sigStateChange(state());
    918917
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