Changeset 80784 in vbox
- Timestamp:
- Sep 13, 2019 5:21:05 PM (5 years ago)
- 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 406 406 /* Disconnect old current-item (if any): */ 407 407 if (pOldCurrentItem) 408 disconnect(pOldCurrentItem, SIGNAL(destroyed(QObject*)), this, SLOT(sltCurrentItemDestroyed()));408 disconnect(pOldCurrentItem, &UIChooserItem::destroyed, this, &UIChooserModel::sltCurrentItemDestroyed); 409 409 /* Connect new current-item (if any): */ 410 410 if (m_pCurrentItem) 411 connect(m_pCurrentItem, SIGNAL(destroyed(QObject*)), this, SLOT(sltCurrentItemDestroyed()));411 connect(m_pCurrentItem, &UIChooserItem::destroyed, this, &UIChooserModel::sltCurrentItemDestroyed); 412 412 413 413 /* If dialog is visible and item exists => make it visible as well: */ … … 1242 1242 { 1243 1243 /* 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); 1252 1252 1253 1253 /* 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); 1278 1278 } 1279 1279 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElements.cpp
r80100 r80784 63 63 { 64 64 /* 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); 67 67 68 68 /* Translate finally: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.cpp
r79842 r80784 262 262 { 263 263 /* Prepare group-item connections: */ 264 connect(this, SIGNAL(sigMinimumWidthHintChanged(int)),265 model(), SIGNAL(sigRootItemMinimumWidthHintChanged(int)));264 connect(this, &UIDetailsGroup::sigMinimumWidthHintChanged, 265 model(), &UIDetailsModel::sigRootItemMinimumWidthHintChanged); 266 266 } 267 267 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.h
r79842 r80784 84 84 /** @} */ 85 85 86 p rotectedslots:86 public slots: 87 87 88 88 /** @name Item stuff. -
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsItem.cpp
r76606 r80784 281 281 { 282 282 /* 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, 285 285 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, 288 288 Qt::QueuedConnection); 289 289 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.cpp
r79365 r80784 570 570 { 571 571 /* 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); 579 579 580 580 /* 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); 583 583 } 584 584 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.cpp
r79365 r80784 256 256 /* Disconnect old focus-item (if any): */ 257 257 if (pOldFocusItem) 258 disconnect(pOldFocusItem, SIGNAL(destroyed(QObject*)), this, SLOT(sltFocusItemDestroyed()));258 disconnect(pOldFocusItem, &UIToolsItem::destroyed, this, &UIToolsModel::sltFocusItemDestroyed); 259 259 /* Connect new focus-item (if any): */ 260 260 if (m_pFocusItem) 261 connect(m_pFocusItem , SIGNAL(destroyed(QObject*)), this, SLOT(sltFocusItemDestroyed()));261 connect(m_pFocusItem.data(), &UIToolsItem::destroyed, this, &UIToolsModel::sltFocusItemDestroyed); 262 262 263 263 /* Notify about focus change: */ … … 496 496 { 497 497 /* 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); 504 504 } 505 505
Note:
See TracChangeset
for help on using the changeset viewer.