VirtualBox

Changeset 102543 in vbox


Ignore:
Timestamp:
Dec 8, 2023 2:13:43 PM (10 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10570. Always ignoring close event is not a good idea. Solves the problem for soft keyboard dialog.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.cpp

    r102485 r102543  
    12081208    else if (enmMachineState != KMachineState_Paused)
    12091209        cleanAll();
     1210    else if (enmMachineState != KMachineState_Saving)
     1211        cleanAll();
    12101212    setStateAndEnableWidgets();
    12111213}
  • trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp

    r101658 r102543  
    39533953    , m_pStatusBarWidget(0)
    39543954    , m_iGeometrySaveTimerId(-1)
     3955    , m_fApplicationAboutToQuit(false)
    39553956{
    39563957    setWindowTitle(QString("%1 - %2").arg(m_strMachineName).arg(tr("Soft Keyboard")));
     
    39693970    retranslateUi();
    39703971    uiCommon().setHelpKeyword(this, "soft-keyb");
     3972    connect(qApp, &QGuiApplication::aboutToQuit, this, &UISoftKeyboard::sltApplicationAboutToQuit);
    39713973}
    39723974
     
    39843986    QStringList strNameList = m_pKeyboardWidget->unsavedLayoutsNameList();
    39853987    /* Show a warning dialog when there are not saved layouts: */
    3986     if (m_pKeyboardWidget && !strNameList.empty())
     3988    if (m_pKeyboardWidget && !strNameList.empty() && !m_fApplicationAboutToQuit)
    39873989    {
    39883990        QString strJoinedString = strNameList.join("<br/>");
     
    39994001    m_pMachine->releaseKeys();
    40004002    emit sigClose();
    4001     event->ignore();
    40024003}
    40034004
     
    43864387{
    43874388    m_pMachine->releaseKeys();
     4389}
     4390
     4391void UISoftKeyboard::sltApplicationAboutToQuit()
     4392{
     4393    m_fApplicationAboutToQuit = true;
    43884394}
    43894395
  • trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.h

    r99948 r102543  
    113113    void sltSaveSettings();
    114114    void sltReleaseKeys();
     115    void sltApplicationAboutToQuit();
    115116
    116117private:
     
    140141    UISoftKeyboardStatusBarWidget *m_pStatusBarWidget;
    141142    int m_iGeometrySaveTimerId;
     143    bool m_fApplicationAboutToQuit;
    142144};
    143145
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