Changeset 86788 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Nov 2, 2020 6:40:54 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp
r86787 r86788 353 353 *********************************************************************************************************************************/ 354 354 355 UIChooserAbstractModel:: 355 UIChooserAbstractModel::UIChooserAbstractModel(UIChooser *pParent) 356 356 : QObject(pParent) 357 357 , m_pParent(pParent) … … 359 359 { 360 360 prepare(); 361 } 362 363 UIChooserAbstractModel::~UIChooserAbstractModel() 364 { 365 cleanup(); 361 366 } 362 367 … … 948 953 this, &UIChooserAbstractModel::sltCloudMachineRegistered); 949 954 950 /* Setup global connections: */955 /* Global connections: */ 951 956 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineStateChange, 952 957 this, &UIChooserAbstractModel::sltLocalMachineStateChanged); … … 974 979 this, &UIChooserAbstractModel::sltHandleCloudProviderUninstall); 975 980 976 /* Setup group saving connections: */981 /* Group saving connections: */ 977 982 connect(this, &UIChooserAbstractModel::sigStartGroupSaving, 978 983 this, &UIChooserAbstractModel::sltStartGroupSaving, 979 984 Qt::QueuedConnection); 980 985 981 /* Setup extra-data connections: */986 /* Extra-data connections: */ 982 987 connect(gEDataManager, &UIExtraDataManager::sigCloudProfileManagerRestrictionChange, 983 988 this, &UIChooserAbstractModel::sltHandleCloudProfileManagerCumulativeChange); 989 } 990 991 void UIChooserAbstractModel::cleanupConnections() 992 { 993 /* Cloud thread-pool connections: */ 994 disconnect(uiCommon().threadPoolCloud(), &UIThreadPool::sigTaskComplete, 995 this, &UIChooserAbstractModel::sltHandleCloudListMachinesTaskComplete); 996 997 /* Cloud VM registration connections: */ 998 disconnect(&uiCommon(), &UICommon::sigCloudMachineUnregistered, 999 this, &UIChooserAbstractModel::sltCloudMachineUnregistered); 1000 disconnect(&uiCommon(), &UICommon::sigCloudMachineRegistered, 1001 this, &UIChooserAbstractModel::sltCloudMachineRegistered); 1002 1003 /* Global connections: */ 1004 disconnect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineStateChange, 1005 this, &UIChooserAbstractModel::sltLocalMachineStateChanged); 1006 disconnect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineDataChange, 1007 this, &UIChooserAbstractModel::sltLocalMachineDataChanged); 1008 disconnect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineRegistered, 1009 this, &UIChooserAbstractModel::sltLocalMachineRegistrationChanged); 1010 disconnect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSessionStateChange, 1011 this, &UIChooserAbstractModel::sltSessionStateChanged); 1012 disconnect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotTake, 1013 this, &UIChooserAbstractModel::sltSnapshotChanged); 1014 disconnect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotDelete, 1015 this, &UIChooserAbstractModel::sltSnapshotChanged); 1016 disconnect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotChange, 1017 this, &UIChooserAbstractModel::sltSnapshotChanged); 1018 disconnect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotRestore, 1019 this, &UIChooserAbstractModel::sltSnapshotChanged); 1020 disconnect(gVBoxEvents, &UIVirtualBoxEventHandler::sigCloudProviderListChanged, 1021 this, &UIChooserAbstractModel::sltHandleCloudProfileManagerCumulativeChange); 1022 disconnect(gVBoxEvents, &UIVirtualBoxEventHandler::sigCloudProfileRegistered, 1023 this, &UIChooserAbstractModel::sltHandleCloudProfileManagerCumulativeChange); 1024 disconnect(gVBoxEvents, &UIVirtualBoxEventHandler::sigCloudProfileChanged, 1025 this, &UIChooserAbstractModel::sltHandleCloudProfileManagerCumulativeChange); 1026 disconnect(gVBoxEvents, &UIVirtualBoxEventHandler::sigCloudProviderUninstall, 1027 this, &UIChooserAbstractModel::sltHandleCloudProviderUninstall); 1028 1029 /* Group saving connections: */ 1030 disconnect(this, &UIChooserAbstractModel::sigStartGroupSaving, 1031 this, &UIChooserAbstractModel::sltStartGroupSaving); 1032 1033 /* Extra-data connections: */ 1034 disconnect(gEDataManager, &UIExtraDataManager::sigCloudProfileManagerRestrictionChange, 1035 this, &UIChooserAbstractModel::sltHandleCloudProfileManagerCumulativeChange); 1036 } 1037 1038 void UIChooserAbstractModel::cleanup() 1039 { 1040 cleanupConnections(); 984 1041 } 985 1042 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.h
r86787 r86788 74 74 /** Constructs abstract Chooser-model passing @a pParent to the base-class. */ 75 75 UIChooserAbstractModel(UIChooser *pParent); 76 /** Destructs abstract Chooser-model. */ 77 virtual ~UIChooserAbstractModel() /* override */; 76 78 77 79 /** @name General stuff. … … 247 249 /** Prepares connections. */ 248 250 void prepareConnections(); 251 252 /** Cleanups connections. */ 253 void cleanupConnections(); 254 /** Cleanups all. */ 255 void cleanup(); 249 256 /** @} */ 250 257
Note:
See TracChangeset
for help on using the changeset viewer.