Changeset 86077 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Sep 9, 2020 4:03:14 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp
r82968 r86077 29 29 #include "CCanShowWindowEvent.h" 30 30 #include "CClipboardModeChangedEvent.h" 31 #include "CCloudProviderListChangedEvent.h" 32 #include "CCloudProviderUninstallEvent.h" 31 33 #include "CCursorPositionChangedEvent.h" 32 34 #include "CDnDModeChangedEvent.h" … … 287 289 break; 288 290 } 291 case KVBoxEventType_OnCloudProviderListChanged: 292 { 293 emit sigCloudProviderListChanged(); 294 break; 295 } 296 case KVBoxEventType_OnCloudProviderUninstall: 297 { 298 CCloudProviderUninstallEvent comEventSpecific(pEvent); 299 emit sigCloudProviderUninstall(comEventSpecific.GetId()); 300 break; 301 } 289 302 290 303 case KVBoxEventType_OnExtraDataCanChange: -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h
r82968 r86077 96 96 /** Notifies about snapshot with @a uSnapshotId was restored for the machine with @a uId. */ 97 97 void sigSnapshotRestore(const QUuid &uId, const QUuid &uSnapshotId); 98 /** Notifies about request to uninstall cloud provider with @a uId. */ 99 void sigCloudProviderUninstall(const QUuid &uId); 100 /** Notifies about cloud provider list changed. */ 101 void sigCloudProviderListChanged(); 98 102 /** @} */ 99 103 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVirtualBoxEventHandler.cpp
r82968 r86077 56 56 /** Notifies about snapshot with @a uSnapshotId was restored for the machine with @a uId. */ 57 57 void sigSnapshotRestore(const QUuid &uId, const QUuid &uSnapshotId); 58 /** Notifies about request to uninstall cloud provider with @a uId. */ 59 void sigCloudProviderUninstall(const QUuid &uId); 60 /** Notifies about cloud provider list changed. */ 61 void sigCloudProviderListChanged(); 58 62 59 63 /** Notifies about storage controller change. … … 178 182 << KVBoxEventType_OnSnapshotChanged 179 183 << KVBoxEventType_OnSnapshotRestored 184 << KVBoxEventType_OnCloudProviderListChanged 185 << KVBoxEventType_OnCloudProviderUninstall 180 186 << KVBoxEventType_OnStorageControllerChanged 181 187 << KVBoxEventType_OnStorageDeviceChanged … … 228 234 this, SIGNAL(sigSnapshotRestore(QUuid, QUuid)), 229 235 Qt::DirectConnection); 236 connect(m_pQtListener->getWrapped(), SIGNAL(sigCloudProviderListChanged()), 237 this, SIGNAL(sigCloudProviderListChanged()), 238 Qt::DirectConnection); 239 connect(m_pQtListener->getWrapped(), SIGNAL(sigCloudProviderUninstall(QUuid)), 240 this, SIGNAL(sigCloudProviderUninstall(QUuid)), 241 Qt::DirectConnection); 230 242 connect(m_pQtListener->getWrapped(), SIGNAL(sigStorageControllerChange(QUuid, QString)), 231 243 this, SIGNAL(sigStorageControllerChange(QUuid, QString)), … … 341 353 this, SIGNAL(sigSnapshotRestore(QUuid, QUuid)), 342 354 Qt::QueuedConnection); 355 connect(m_pProxy, SIGNAL(sigCloudProviderListChanged()), 356 this, SIGNAL(sigCloudProviderListChanged()), 357 Qt::QueuedConnection); 358 connect(m_pProxy, SIGNAL(sigCloudProviderUninstall(QUuid)), 359 this, SIGNAL(sigCloudProviderUninstall(QUuid)), 360 Qt::BlockingQueuedConnection); 343 361 connect(m_pProxy, SIGNAL(sigStorageControllerChange(QUuid, QString)), 344 362 this, SIGNAL(sigStorageControllerChange(QUuid, QString)), -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVirtualBoxEventHandler.h
r83304 r86077 63 63 /** Notifies about snapshot with @a uSnapshotId was restored for the machine with @a uId. */ 64 64 void sigSnapshotRestore(const QUuid &uId, const QUuid &uSnapshotId); 65 /** Notifies about request to uninstall cloud provider with @a uId. */ 66 void sigCloudProviderUninstall(const QUuid &uId); 67 /** Notifies about cloud provider list changed. */ 68 void sigCloudProviderListChanged(); 65 69 66 70 /** Notifies about storage controller change. -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp
r85038 r86077 687 687 /* Update machine-nodes with passed id: */ 688 688 invisibleRoot()->updateAllNodes(uMachineId); 689 } 690 691 void UIChooserAbstractModel::sltHandleCloudProviderListChanged() 692 { 693 /* Reload cloud tree: */ 694 reloadCloudTree(); 695 } 696 697 void UIChooserAbstractModel::sltHandleCloudProviderUninstall(const QUuid &uId) 698 { 699 /* Search for top-level provider node: */ 700 foreach (UIChooserNode *pNode, m_pInvisibleRootNode->nodes(UIChooserNodeType_Group)) 701 { 702 /* Skip unrelated nodes: */ 703 AssertPtrReturnVoid(pNode); 704 UIChooserNodeGroup *pGroupNode = pNode->toGroupNode(); 705 AssertPtrReturnVoid(pGroupNode); 706 if (pGroupNode->groupType() != UIChooserNodeGroupType_Provider) 707 continue; 708 const QUuid uIteratedId = pGroupNode->property("id").toUuid(); 709 AssertReturnVoid(!uIteratedId.isNull()); 710 if (uIteratedId != uId) 711 continue; 712 713 /* Remove found provider node: */ 714 delete pNode; 715 } 689 716 } 690 717 … … 798 825 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigSnapshotRestore, 799 826 this, &UIChooserAbstractModel::sltSnapshotChanged); 827 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigCloudProviderListChanged, 828 this, &UIChooserAbstractModel::sltHandleCloudProviderListChanged); 829 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigCloudProviderUninstall, 830 this, &UIChooserAbstractModel::sltHandleCloudProviderUninstall); 800 831 801 832 /* Setup group saving connections: */ … … 879 910 /* Skip if we have nothing to populate: */ 880 911 if (comCloudProvider.isNull()) 912 continue; 913 914 /* Acquire provider id: */ 915 QUuid uProviderId; 916 if (!cloudProviderId(comCloudProvider, uProviderId)) 881 917 continue; 882 918 … … 907 943 strProviderShortName, 908 944 UIChooserNodeGroupType_Provider); 945 pProviderNode->setProperty("id", uProviderId); 909 946 910 947 /* Iterate through provider's profiles: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.h
r85038 r86077 154 154 /** Handles snapshot change for machine/snapshot with certain @a uMachineId / @a uSnapshotId. */ 155 155 virtual void sltSnapshotChanged(const QUuid &uMachineId, const QUuid &uSnapshotId); 156 /** Handles event about cloud provider list changed. */ 157 virtual void sltHandleCloudProviderListChanged(); 158 /** Handles event about cloud provider with @a uId being uninstalled. */ 159 virtual void sltHandleCloudProviderUninstall(const QUuid &uId); 156 160 /** @} */ 157 161
Note:
See TracChangeset
for help on using the changeset viewer.