VirtualBox

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


Ignore:
Timestamp:
May 14, 2021 11:18:18 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
144380
Message:

FE/Qt: bugref:8161: Runtime UI / Machine-logic: Rework commit data request handling for Session Information and Soft Keyboard dialogs; They should be deleted synchronously when corresponding signal is coming, not later as in simple close case.

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

Legend:

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

    r88802 r89040  
    16311631        QWidget *pCenterWidget = windowManager().realParentWindow(activeMachineWindow());
    16321632        m_pSoftKeyboardDialog = new UISoftKeyboard(0, uisession(), pCenterWidget, machine().GetName());
    1633         connect(m_pSoftKeyboardDialog, &UISoftKeyboard::sigClose, this, &UIMachineLogic::sltCloseSoftKeyboard);
     1633        connect(m_pSoftKeyboardDialog, &UISoftKeyboard::sigClose, this, &UIMachineLogic::sltCloseSoftKeyboardDefault);
    16341634    }
    16351635
     
    16431643}
    16441644
    1645 void UIMachineLogic::sltCloseSoftKeyboard()
     1645void UIMachineLogic::sltCloseSoftKeyboard(bool fAsync /* = false */)
    16461646{
    16471647    if (!m_pSoftKeyboardDialog)
    16481648        return;
    1649     m_pSoftKeyboardDialog->deleteLater();
     1649    if (fAsync)
     1650        m_pSoftKeyboardDialog->deleteLater();
     1651    else
     1652        delete m_pSoftKeyboardDialog;
    16501653    m_pSoftKeyboardDialog = 0;
    16511654}
     
    18341837        m_pVMInformationDialog->setWindowState(m_pVMInformationDialog->windowState() & ~Qt::WindowMinimized);
    18351838        m_pVMInformationDialog->activateWindow();
    1836         connect(m_pVMInformationDialog, &UIVMInformationDialog::sigClose,
    1837                 this, &UIMachineLogic::sltCloseVMInformationDialog);
    1838     }
    1839 }
    1840 
    1841 void UIMachineLogic::sltCloseVMInformationDialog()
     1839        connect(m_pVMInformationDialog, &UIVMInformationDialog::sigClose, this, &UIMachineLogic::sltCloseVMInformationDialogDefault);
     1840    }
     1841}
     1842
     1843void UIMachineLogic::sltCloseVMInformationDialog(bool fAsync /* = false */)
    18421844{
    18431845    if (!m_pVMInformationDialog)
    18441846        return;
    1845     m_pVMInformationDialog->deleteLater();
     1847    if (fAsync)
     1848        m_pVMInformationDialog->deleteLater();
     1849    else
     1850        delete m_pVMInformationDialog;
    18461851    m_pVMInformationDialog = 0;
    18471852}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h

    r88785 r89040  
    268268    void sltShowKeyboardSettings();
    269269    void sltShowSoftKeyboard();
    270     void sltCloseSoftKeyboard();
     270    void sltCloseSoftKeyboard(bool fAsync = false);
     271    void sltCloseSoftKeyboardDefault() { sltCloseSoftKeyboard(true); }
    271272    void sltToggleMouseIntegration(bool fEnabled);
    272273    void sltTypeCAD();
     
    281282    void sltTakeSnapshot();
    282283    void sltShowInformationDialog();
    283     void sltCloseVMInformationDialog();
     284    void sltCloseVMInformationDialog(bool fAsync = false);
     285    void sltCloseVMInformationDialogDefault() { sltCloseVMInformationDialog(true); }
    284286    void sltShowFileManagerDialog();
    285287    void sltCloseFileManagerDialog();
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