VirtualBox

Ignore:
Timestamp:
Sep 6, 2019 8:32:17 AM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8938. Converting connection syntaxes. contd.

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

Legend:

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

    r79365 r80617  
    13831383{
    13841384    /* Attach EMT connections: */
    1385     connect(this, SIGNAL(sigNotifyChange(int, int)),
    1386             m_pMachineView, SLOT(sltHandleNotifyChange(int, int)),
     1385    connect(this, &UIFrameBufferPrivate::sigNotifyChange,
     1386            m_pMachineView, &UIMachineView::sltHandleNotifyChange,
    13871387            Qt::QueuedConnection);
    1388     connect(this, SIGNAL(sigNotifyUpdate(int, int, int, int)),
    1389             m_pMachineView, SLOT(sltHandleNotifyUpdate(int, int, int, int)),
     1388    connect(this, &UIFrameBufferPrivate::sigNotifyUpdate,
     1389            m_pMachineView, &UIMachineView::sltHandleNotifyUpdate,
    13901390            Qt::QueuedConnection);
    1391     connect(this, SIGNAL(sigSetVisibleRegion(QRegion)),
    1392             m_pMachineView, SLOT(sltHandleSetVisibleRegion(QRegion)),
     1391    connect(this, &UIFrameBufferPrivate::sigSetVisibleRegion,
     1392            m_pMachineView, &UIMachineView::sltHandleSetVisibleRegion,
    13931393            Qt::QueuedConnection);
    1394     connect(this, SIGNAL(sigNotifyAbout3DOverlayVisibilityChange(bool)),
    1395             m_pMachineView, SLOT(sltHandle3DOverlayVisibilityChange(bool)),
     1394    connect(this, &UIFrameBufferPrivate::sigNotifyAbout3DOverlayVisibilityChange,
     1395            m_pMachineView, &UIMachineView::sltHandle3DOverlayVisibilityChange,
    13961396            Qt::QueuedConnection);
    13971397
     
    14061406{
    14071407    /* Detach EMT connections: */
    1408     disconnect(this, SIGNAL(sigNotifyChange(int, int)),
    1409                m_pMachineView, SLOT(sltHandleNotifyChange(int, int)));
    1410     disconnect(this, SIGNAL(sigNotifyUpdate(int, int, int, int)),
    1411                m_pMachineView, SLOT(sltHandleNotifyUpdate(int, int, int, int)));
    1412     disconnect(this, SIGNAL(sigSetVisibleRegion(QRegion)),
    1413                m_pMachineView, SLOT(sltHandleSetVisibleRegion(QRegion)));
    1414     disconnect(this, SIGNAL(sigNotifyAbout3DOverlayVisibilityChange(bool)),
    1415                m_pMachineView, SLOT(sltHandle3DOverlayVisibilityChange(bool)));
     1408    disconnect(this, &UIFrameBufferPrivate::sigNotifyChange,
     1409               m_pMachineView, &UIMachineView::sltHandleNotifyChange);
     1410    disconnect(this, &UIFrameBufferPrivate::sigNotifyUpdate,
     1411               m_pMachineView, &UIMachineView::sltHandleNotifyUpdate);
     1412    disconnect(this, &UIFrameBufferPrivate::sigSetVisibleRegion,
     1413               m_pMachineView, &UIMachineView::sltHandleSetVisibleRegion);
     1414    disconnect(this, &UIFrameBufferPrivate::sigNotifyAbout3DOverlayVisibilityChange,
     1415               m_pMachineView, &UIMachineView::sltHandle3DOverlayVisibilityChange);
    14161416
    14171417    /* Detach GUI connections: */
     
    19051905
    19061906#include "UIFrameBuffer.moc"
    1907 
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r79365 r80617  
    465465{
    466466    /* We should watch for console events: */
    467     connect(uisession(), SIGNAL(sigMachineStateChange()), this, SLOT(sltMachineStateChanged()));
     467    connect(uisession(), &UISession::sigMachineStateChange, this, &UIMachineWindow::sltMachineStateChanged);
    468468}
    469469
     
    511511
    512512    /* Listen for frame-buffer resize: */
    513     connect(m_pMachineView, SIGNAL(sigFrameBufferResize()), this, SIGNAL(sigFrameBufferResize()));
     513    connect(m_pMachineView, &UIMachineView::sigFrameBufferResize, this, &UIMachineWindow::sigFrameBufferResize);
    514514
    515515    /* Add machine-view into main-layout: */
     
    548548{
    549549    /* We should stop watching for console events: */
    550     disconnect(uisession(), SIGNAL(sigMachineStateChange()), this, SLOT(sltMachineStateChanged()));
     550    disconnect(uisession(), &UISession::sigMachineStateChange, this, &UIMachineWindow::sltMachineStateChanged);
    551551}
    552552
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp

    r79365 r80617  
    109109        m_views[uIndex]->installEventFilter(this);
    110110        /* Make machine-view notify mouse-handler about frame-buffer resize: */
    111         connect(m_views[uIndex], SIGNAL(sigFrameBufferResize()), this, SLOT(sltMousePointerShapeChanged()));
     111        connect(m_views[uIndex], &UIMachineView::sigFrameBufferResize, this, &UIMouseHandler::sltMousePointerShapeChanged);
    112112    }
    113113
     
    518518{
    519519    /* Machine state-change updater: */
    520     connect(uisession(), SIGNAL(sigMachineStateChange()), this, SLOT(sltMachineStateChanged()));
     520    connect(uisession(), &UISession::sigMachineStateChange, this, &UIMouseHandler::sltMachineStateChanged);
    521521
    522522    /* Mouse capability state-change updater: */
    523     connect(uisession(), SIGNAL(sigMouseCapabilityChange()), this, SLOT(sltMouseCapabilityChanged()));
     523    connect(uisession(), &UISession::sigMouseCapabilityChange, this, &UIMouseHandler::sltMouseCapabilityChanged);
    524524
    525525    /* Mouse pointer shape state-change updaters: */
    526     connect(uisession(), SIGNAL(sigMousePointerShapeChange()), this, SLOT(sltMousePointerShapeChanged()));
    527     connect(this, SIGNAL(sigStateChange(int)), this, SLOT(sltMousePointerShapeChanged()));
     526    connect(uisession(), &UISession::sigMousePointerShapeChange, this, &UIMouseHandler::sltMousePointerShapeChanged);
     527    connect(this, &UIMouseHandler::sigStateChange, this, &UIMouseHandler::sltMousePointerShapeChanged);
    528528
    529529    /* Mouse cursor position state-change updater: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp

    r79365 r80617  
    128128    {
    129129        /* Configure menu-bar editor: */
    130         connect(pMenuBarEditor, SIGNAL(destroyed(QObject*)),
    131                 this, SLOT(sltMenuBarSettingsClosed()));
     130        connect(pMenuBarEditor, &UIMenuBarEditorWindow::destroyed,
     131                this, &UIMachineLogicNormal::sltMenuBarSettingsClosed);
    132132#ifdef VBOX_WS_MAC
    133         connect(this, SIGNAL(sigNotifyAbout3DOverlayVisibilityChange(bool)),
    134                 pMenuBarEditor, SLOT(sltActivateWindow()));
     133        connect(this, &UIMachineLogicNormal::sigNotifyAbout3DOverlayVisibilityChange,
     134                pMenuBarEditor, &UIMenuBarEditorWindow::sltActivateWindow);
    135135#endif /* VBOX_WS_MAC */
    136136        /* Show window: */
     
    183183    {
    184184        /* Configure status-bar editor: */
    185         connect(pStatusBarEditor, SIGNAL(destroyed(QObject*)),
    186                 this, SLOT(sltStatusBarSettingsClosed()));
     185        connect(pStatusBarEditor, &UIStatusBarEditorWindow::destroyed,
     186                this, &UIMachineLogicNormal::sltStatusBarSettingsClosed);
    187187#ifdef VBOX_WS_MAC
    188         connect(this, SIGNAL(sigNotifyAbout3DOverlayVisibilityChange(bool)),
    189                 pStatusBarEditor, SLOT(sltActivateWindow()));
     188        connect(this, &UIMachineLogicNormal::sigNotifyAbout3DOverlayVisibilityChange,
     189                pStatusBarEditor, &UIStatusBarEditorWindow::sltActivateWindow);
    190190#endif /* VBOX_WS_MAC */
    191191        /* Show window: */
     
    280280
    281281    /* Prepare 'View' actions connections: */
    282     connect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    283             this, SLOT(sltChangeVisualStateToFullscreen()));
    284     connect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    285             this, SLOT(sltChangeVisualStateToSeamless()));
    286     connect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    287             this, SLOT(sltChangeVisualStateToScale()));
    288     connect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings), SIGNAL(triggered(bool)),
    289             this, SLOT(sltOpenMenuBarSettings()));
    290 #ifndef VBOX_WS_MAC
    291     connect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility), SIGNAL(triggered(bool)),
    292             this, SLOT(sltToggleMenuBar()));
    293 #endif /* !VBOX_WS_MAC */
    294     connect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)),
    295             this, SLOT(sltOpenStatusBarSettings()));
    296     connect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), SIGNAL(triggered(bool)),
    297             this, SLOT(sltToggleStatusBar()));
    298     connect(actionPool(), SIGNAL(sigNotifyAboutTriggeringViewScreenToggle(int, bool)),
    299             this, SLOT(sltHandleActionTriggerViewScreenToggle(int, bool)));
    300     connect(actionPool(), SIGNAL(sigNotifyAboutTriggeringViewScreenResize(int, const QSize&)),
    301             this, SLOT(sltHandleActionTriggerViewScreenResize(int, const QSize&)));
     282    connect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), &UIAction::triggered,
     283            this, &UIMachineLogicNormal::sltChangeVisualStateToFullscreen);
     284    connect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), &UIAction::triggered,
     285            this, &UIMachineLogicNormal::sltChangeVisualStateToSeamless);
     286    connect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), &UIAction::triggered,
     287            this, &UIMachineLogicNormal::sltChangeVisualStateToScale);
     288    connect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings), &UIAction::triggered,
     289            this, &UIMachineLogicNormal::sltOpenMenuBarSettings);
     290#ifndef VBOX_WS_MAC
     291    connect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility), &UIAction::triggered,
     292            this, &UIMachineLogicNormal::sltToggleMenuBar);
     293#endif /* !VBOX_WS_MAC */
     294    connect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), &UIAction::triggered,
     295            this, &UIMachineLogicNormal::sltOpenStatusBarSettings);
     296    connect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), &UIAction::triggered,
     297            this, &UIMachineLogicNormal::sltToggleStatusBar);
     298    connect(qobject_cast<UIActionPoolRuntime*>(actionPool()), &UIActionPoolRuntime::sigNotifyAboutTriggeringViewScreenToggle,
     299            this, &UIMachineLogicNormal::sltHandleActionTriggerViewScreenToggle);
     300    connect(qobject_cast<UIActionPoolRuntime*>(actionPool()), &UIActionPoolRuntime::sigNotifyAboutTriggeringViewScreenResize,
     301            this, &UIMachineLogicNormal::sltHandleActionTriggerViewScreenResize);
    302302}
    303303
     
    325325    /* Listen for frame-buffer resize: */
    326326    foreach (UIMachineWindow *pMachineWindow, machineWindows())
    327         connect(pMachineWindow, SIGNAL(sigFrameBufferResize()),
    328                 this, SIGNAL(sigFrameBufferResize()));
     327        connect(pMachineWindow, &UIMachineWindow::sigFrameBufferResize,
     328                this, &UIMachineLogicNormal::sigFrameBufferResize);
    329329    emit sigFrameBufferResize();
    330330
     
    373373{
    374374    /* "View" actions disconnections: */
    375     disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
    376                this, SLOT(sltChangeVisualStateToFullscreen()));
    377     disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
    378                this, SLOT(sltChangeVisualStateToSeamless()));
    379     disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
    380                this, SLOT(sltChangeVisualStateToScale()));
    381     disconnect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings), SIGNAL(triggered(bool)),
    382                this, SLOT(sltOpenMenuBarSettings()));
    383 #ifndef VBOX_WS_MAC
    384     disconnect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility), SIGNAL(triggered(bool)),
    385                this, SLOT(sltToggleMenuBar()));
    386 #endif /* !VBOX_WS_MAC */
    387     disconnect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)),
    388                this, SLOT(sltOpenStatusBarSettings()));
    389     disconnect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), SIGNAL(triggered(bool)),
    390                this, SLOT(sltToggleStatusBar()));
     375    disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), &UIAction::triggered,
     376               this, &UIMachineLogicNormal::sltChangeVisualStateToFullscreen);
     377    disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), &UIAction::triggered,
     378               this, &UIMachineLogicNormal::sltChangeVisualStateToSeamless);
     379    disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), &UIAction::triggered,
     380               this, &UIMachineLogicNormal::sltChangeVisualStateToScale);
     381    disconnect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings), &UIAction::triggered,
     382               this, &UIMachineLogicNormal::sltOpenMenuBarSettings);
     383#ifndef VBOX_WS_MAC
     384    disconnect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility), &UIAction::triggered,
     385               this, &UIMachineLogicNormal::sltToggleMenuBar);
     386#endif /* !VBOX_WS_MAC */
     387    disconnect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), &UIAction::triggered,
     388               this, &UIMachineLogicNormal::sltOpenStatusBarSettings);
     389    disconnect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), &UIAction::triggered,
     390               this, &UIMachineLogicNormal::sltToggleStatusBar);
    391391
    392392    /* Call to base-class: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp

    r79403 r80617  
    132132
    133133    /* Guest additions state-change updater: */
    134     connect(uisession(), SIGNAL(sigAdditionsStateActualChange()), this, SLOT(sltAdditionsStateChanged()));
     134    connect(uisession(), &UISession::sigAdditionsStateActualChange, this, &UIMachineViewNormal::sltAdditionsStateChanged);
    135135}
    136136
     
    258258    return maximumSize - (windowSize - centralWidgetSize.boundedTo(windowSize));
    259259}
    260 
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