VirtualBox

Changeset 80784 in vbox


Ignore:
Timestamp:
Sep 13, 2019 5:21:05 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8938. Converting connection syntaxes under manager subfolder. not complete.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp

    r80443 r80784  
    406406    /* Disconnect old current-item (if any): */
    407407    if (pOldCurrentItem)
    408         disconnect(pOldCurrentItem, SIGNAL(destroyed(QObject*)), this, SLOT(sltCurrentItemDestroyed()));
     408        disconnect(pOldCurrentItem, &UIChooserItem::destroyed, this, &UIChooserModel::sltCurrentItemDestroyed);
    409409    /* Connect new current-item (if any): */
    410410    if (m_pCurrentItem)
    411         connect(m_pCurrentItem, SIGNAL(destroyed(QObject*)), this, SLOT(sltCurrentItemDestroyed()));
     411        connect(m_pCurrentItem, &UIChooserItem::destroyed, this, &UIChooserModel::sltCurrentItemDestroyed);
    412412
    413413    /* If dialog is visible and item exists => make it visible as well: */
     
    12421242{
    12431243    /* Setup parent connections: */
    1244     connect(this, SIGNAL(sigSelectionChanged()),
    1245             parent(), SIGNAL(sigSelectionChanged()));
    1246     connect(this, SIGNAL(sigSelectionInvalidated()),
    1247             parent(), SIGNAL(sigSelectionInvalidated()));
    1248     connect(this, SIGNAL(sigToggleStarted()),
    1249             parent(), SIGNAL(sigToggleStarted()));
    1250     connect(this, SIGNAL(sigToggleFinished()),
    1251             parent(), SIGNAL(sigToggleFinished()));
     1244    connect(this, &UIChooserModel::sigSelectionChanged,
     1245            qobject_cast<UIChooser*>(parent()), &UIChooser::sigSelectionChanged);
     1246    connect(this, &UIChooserModel::sigSelectionInvalidated,
     1247            qobject_cast<UIChooser*>(parent()), &UIChooser::sigSelectionInvalidated);
     1248    connect(this, &UIChooserModel::sigToggleStarted,
     1249            qobject_cast<UIChooser*>(parent()), &UIChooser::sigToggleStarted);
     1250    connect(this, &UIChooserModel::sigToggleFinished,
     1251            qobject_cast<UIChooser*>(parent()), &UIChooser::sigToggleFinished);
    12521252
    12531253    /* Setup action connections: */
    1254     connect(actionPool()->action(UIActionIndexST_M_Welcome_S_New), SIGNAL(triggered()),
    1255             this, SLOT(sltCreateNewMachine()));
    1256     connect(actionPool()->action(UIActionIndexST_M_Group_S_New), SIGNAL(triggered()),
    1257             this, SLOT(sltCreateNewMachine()));
    1258     connect(actionPool()->action(UIActionIndexST_M_Machine_S_New), SIGNAL(triggered()),
    1259             this, SLOT(sltCreateNewMachine()));
    1260     connect(actionPool()->action(UIActionIndexST_M_Group_S_Rename), SIGNAL(triggered()),
    1261             this, SLOT(sltEditGroupName()));
    1262     connect(actionPool()->action(UIActionIndexST_M_Group_S_Remove), SIGNAL(triggered()),
    1263             this, SLOT(sltUngroupSelectedGroup()));
    1264     connect(actionPool()->action(UIActionIndexST_M_Machine_S_Remove), SIGNAL(triggered()),
    1265             this, SLOT(sltRemoveSelectedMachine()));
    1266     connect(actionPool()->action(UIActionIndexST_M_Machine_S_AddGroup), SIGNAL(triggered()),
    1267             this, SLOT(sltGroupSelectedMachines()));
    1268     connect(actionPool()->action(UIActionIndexST_M_Group_S_Refresh), SIGNAL(triggered()),
    1269             this, SLOT(sltPerformRefreshAction()));
    1270     connect(actionPool()->action(UIActionIndexST_M_Machine_S_Refresh), SIGNAL(triggered()),
    1271             this, SLOT(sltPerformRefreshAction()));
    1272     connect(actionPool()->action(UIActionIndexST_M_Machine_S_SortParent), SIGNAL(triggered()),
    1273             this, SLOT(sltSortParentGroup()));
    1274     connect(actionPool()->action(UIActionIndexST_M_Group_S_Sort), SIGNAL(triggered()),
    1275             this, SLOT(sltSortGroup()));
    1276     connect(actionPool()->action(UIActionIndexST_M_Machine_S_Search), SIGNAL(triggered()),
    1277             this, SLOT(sltShowHideSearchWidget()));
     1254    connect(actionPool()->action(UIActionIndexST_M_Welcome_S_New), &UIAction::triggered,
     1255            this, &UIChooserModel::sltCreateNewMachine);
     1256    connect(actionPool()->action(UIActionIndexST_M_Group_S_New), &UIAction::triggered,
     1257            this, &UIChooserModel::sltCreateNewMachine);
     1258    connect(actionPool()->action(UIActionIndexST_M_Machine_S_New), &UIAction::triggered,
     1259            this, &UIChooserModel::sltCreateNewMachine);
     1260    connect(actionPool()->action(UIActionIndexST_M_Group_S_Rename), &UIAction::triggered,
     1261            this, &UIChooserModel::sltEditGroupName);
     1262    connect(actionPool()->action(UIActionIndexST_M_Group_S_Remove), &UIAction::triggered,
     1263            this, &UIChooserModel::sltUngroupSelectedGroup);
     1264    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Remove), &UIAction::triggered,
     1265            this, &UIChooserModel::sltRemoveSelectedMachine);
     1266    connect(actionPool()->action(UIActionIndexST_M_Machine_S_AddGroup), &UIAction::triggered,
     1267            this, &UIChooserModel::sltGroupSelectedMachines);
     1268    connect(actionPool()->action(UIActionIndexST_M_Group_S_Refresh), &UIAction::triggered,
     1269            this, &UIChooserModel::sltPerformRefreshAction);
     1270    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Refresh), &UIAction::triggered,
     1271            this, &UIChooserModel::sltPerformRefreshAction);
     1272    connect(actionPool()->action(UIActionIndexST_M_Machine_S_SortParent), &UIAction::triggered,
     1273            this, &UIChooserModel::sltSortParentGroup);
     1274    connect(actionPool()->action(UIActionIndexST_M_Group_S_Sort), &UIAction::triggered,
     1275            this, &UIChooserModel::sltSortGroup);
     1276    connect(actionPool()->action(UIActionIndexST_M_Machine_S_Search), &UIAction::triggered,
     1277            this, &UIChooserModel::sltShowHideSearchWidget);
    12781278}
    12791279
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElements.cpp

    r80100 r80784  
    6363{
    6464    /* Listen for the global thread-pool: */
    65     connect(uiCommon().threadPool(), SIGNAL(sigTaskComplete(UITask*)),
    66             this, SLOT(sltUpdateAppearanceFinished(UITask*)));
     65    connect(uiCommon().threadPool(), &UIThreadPool::sigTaskComplete,
     66            this, &UIDetailsElementInterface::sltUpdateAppearanceFinished);
    6767
    6868    /* Translate finally: */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.cpp

    r79842 r80784  
    262262{
    263263    /* Prepare group-item connections: */
    264     connect(this, SIGNAL(sigMinimumWidthHintChanged(int)),
    265             model(), SIGNAL(sigRootItemMinimumWidthHintChanged(int)));
     264    connect(this, &UIDetailsGroup::sigMinimumWidthHintChanged,
     265            model(), &UIDetailsModel::sigRootItemMinimumWidthHintChanged);
    266266}
    267267
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.h

    r79842 r80784  
    8484    /** @} */
    8585
    86 protected slots:
     86public slots:
    8787
    8888    /** @name Item stuff.
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsItem.cpp

    r76606 r80784  
    281281{
    282282    /* Prepare connections (old style, polymorph): */
    283     connect(pBuildObject, SIGNAL(sigBuildDone()),
    284             this, SLOT(sltStepDone()),
     283    connect(qobject_cast<UIDetailsItem*>(pBuildObject), &UIDetailsItem::sigBuildDone,
     284            this, &UIPrepareStep::sltStepDone,
    285285            Qt::QueuedConnection);
    286     connect(this, SIGNAL(sigStepDone(QUuid, int)),
    287             pParent, SLOT(sltBuildStep(QUuid, int)),
     286    connect(this, &UIPrepareStep::sigStepDone,
     287            qobject_cast<UIDetailsGroup*>(pParent), &UIDetailsGroup::sltBuildStep,
    288288            Qt::QueuedConnection);
    289289}
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.cpp

    r79365 r80784  
    570570{
    571571    /* Global-events connections: */
    572     connect(gVBoxEvents, SIGNAL(sigMachineStateChange(QUuid, KMachineState)), this, SLOT(sltMachineStateChange(QUuid)));
    573     connect(gVBoxEvents, SIGNAL(sigMachineDataChange(QUuid)), this, SLOT(sltMachineAttributesChange(QUuid)));
    574     connect(gVBoxEvents, SIGNAL(sigSessionStateChange(QUuid, KSessionState)), this, SLOT(sltMachineAttributesChange(QUuid)));
    575     connect(gVBoxEvents, SIGNAL(sigSnapshotTake(QUuid, QUuid)), this, SLOT(sltMachineAttributesChange(QUuid)));
    576     connect(gVBoxEvents, SIGNAL(sigSnapshotDelete(QUuid, QUuid)), this, SLOT(sltMachineAttributesChange(QUuid)));
    577     connect(gVBoxEvents, SIGNAL(sigSnapshotChange(QUuid, QUuid)), this, SLOT(sltMachineAttributesChange(QUuid)));
    578     connect(gVBoxEvents, SIGNAL(sigSnapshotRestore(QUuid, QUuid)), this, SLOT(sltMachineAttributesChange(QUuid)));
     572    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineStateChange, this, &UIDetailsSet::sltMachineStateChange);
     573    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineDataChange, this, &UIDetailsSet::sltMachineAttributesChange);
     574    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSessionStateChange, this, &UIDetailsSet::sltMachineAttributesChange);
     575    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotTake, this, &UIDetailsSet::sltMachineAttributesChange);
     576    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotDelete, this, &UIDetailsSet::sltMachineAttributesChange);
     577    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotChange, this, &UIDetailsSet::sltMachineAttributesChange);
     578    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotRestore, this, &UIDetailsSet::sltMachineAttributesChange);
    579579
    580580    /* Meidum-enumeration connections: */
    581     connect(&uiCommon(), SIGNAL(sigMediumEnumerationStarted()), this, SLOT(sltUpdateAppearance()));
    582     connect(&uiCommon(), SIGNAL(sigMediumEnumerationFinished()), this, SLOT(sltUpdateAppearance()));
     581    connect(&uiCommon(), &UICommon::sigMediumEnumerationStarted, this, &UIDetailsSet::sltUpdateAppearance);
     582    connect(&uiCommon(), &UICommon::sigMediumEnumerationFinished, this, &UIDetailsSet::sltUpdateAppearance);
    583583}
    584584
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.cpp

    r79365 r80784  
    256256    /* Disconnect old focus-item (if any): */
    257257    if (pOldFocusItem)
    258         disconnect(pOldFocusItem, SIGNAL(destroyed(QObject*)), this, SLOT(sltFocusItemDestroyed()));
     258        disconnect(pOldFocusItem, &UIToolsItem::destroyed, this, &UIToolsModel::sltFocusItemDestroyed);
    259259    /* Connect new focus-item (if any): */
    260260    if (m_pFocusItem)
    261         connect(m_pFocusItem, SIGNAL(destroyed(QObject*)), this, SLOT(sltFocusItemDestroyed()));
     261        connect(m_pFocusItem.data(), &UIToolsItem::destroyed, this, &UIToolsModel::sltFocusItemDestroyed);
    262262
    263263    /* Notify about focus change: */
     
    496496{
    497497    /* Setup parent connections: */
    498     connect(this, SIGNAL(sigSelectionChanged()),
    499             parent(), SIGNAL(sigSelectionChanged()));
    500     connect(this, SIGNAL(sigExpandingStarted()),
    501             parent(), SIGNAL(sigExpandingStarted()));
    502     connect(this, SIGNAL(sigExpandingFinished()),
    503             parent(), SIGNAL(sigExpandingFinished()));
     498    connect(this, &UIToolsModel::sigSelectionChanged,
     499        qobject_cast<UITools*>(parent()), &UITools::sigSelectionChanged);
     500    connect(this, &UIToolsModel::sigExpandingStarted,
     501            qobject_cast<UITools*>(parent()), &UITools::sigExpandingStarted);
     502    connect(this, &UIToolsModel::sigExpandingFinished,
     503            qobject_cast<UITools*>(parent()), &UITools::sigExpandingFinished);
    504504}
    505505
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