VirtualBox

Changeset 102556 in vbox


Ignore:
Timestamp:
Dec 8, 2023 5:17:43 PM (15 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160702
Message:

FE/Qt: bugref:10570: UIMachineLogic: A bit of cleanup/rework for Session Information and Soft Keyboard dialogs startup procedure.

File:
1 edited

Legend:

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

    r102553 r102556  
    16571657        return;
    16581658
     1659    /* Create instance if not yet created: */
    16591660    if (!m_pVMInformationDialog)
     1661    {
    16601662        m_pVMInformationDialog = new UIVMInformationDialog;
    1661 
    1662     if (m_pVMInformationDialog)
    1663     {
    1664         m_pVMInformationDialog->show();
    1665         m_pVMInformationDialog->raise();
    1666         m_pVMInformationDialog->setWindowState(m_pVMInformationDialog->windowState() & ~Qt::WindowMinimized);
    1667         m_pVMInformationDialog->activateWindow();
    16681663        connect(m_pVMInformationDialog, &UIVMInformationDialog::sigClose,
    16691664                this, &UIMachineLogic::sltCloseInformationDialog);
    16701665    }
     1666
     1667    /* Expose instance: */
     1668    UIDesktopWidgetWatchdog::restoreWidget(m_pVMInformationDialog);
    16711669}
    16721670
     
    20332031void UIMachineLogic::sltShowSoftKeyboard()
    20342032{
    2035     if (!activeMachineWindow())
    2036         return;
    2037 
     2033    /* Do not process if window(s) missed! */
     2034    if (!isMachineWindowsCreated())
     2035        return;
     2036
     2037    /* Create instance if not yet created: */
    20382038    if (!m_pSoftKeyboardDialog)
    20392039    {
    2040         QWidget *pCenterWidget = windowManager().realParentWindow(activeMachineWindow());
    2041         m_pSoftKeyboardDialog = new UISoftKeyboard(0, uimachine(), pCenterWidget, uimachine()->machineName());
     2040        m_pSoftKeyboardDialog = new UISoftKeyboard(0, uimachine(), activeMachineWindow(), uimachine()->machineName());
    20422041        connect(m_pSoftKeyboardDialog, &UISoftKeyboard::sigClose,
    20432042                this, &UIMachineLogic::sltCloseSoftKeyboard);
    20442043    }
    20452044
    2046     if (m_pSoftKeyboardDialog)
    2047     {
    2048         m_pSoftKeyboardDialog->show();
    2049         m_pSoftKeyboardDialog->raise();
    2050         m_pSoftKeyboardDialog->setWindowState(m_pSoftKeyboardDialog->windowState() & ~Qt::WindowMinimized);
    2051         m_pSoftKeyboardDialog->activateWindow();
    2052     }
     2045    /* Expose instance: */
     2046    UIDesktopWidgetWatchdog::restoreWidget(m_pSoftKeyboardDialog);
    20532047}
    20542048
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