Changeset 83095 in vbox
- Timestamp:
- Feb 17, 2020 12:38:51 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 136152
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.cpp
r83094 r83095 216 216 , m_pCloudMachine(0) 217 217 , m_enmFakeCloudItemState(FakeCloudItemState_Loading) 218 , m_pTask(0) 218 219 { 219 220 recache(); … … 224 225 , m_pCloudMachine(new UICloudMachine(guiCloudMachine)) 225 226 , m_enmFakeCloudItemState(FakeCloudItemState_NotApplicable) 227 , m_pTask(0) 226 228 { 227 229 recache(); … … 290 292 msgCenter().cannotAcquireCloudClientParameter(comProgress); 291 293 else 292 updateState (pParent);294 updateStateAsync(false /* delayed? */); 293 295 } 294 296 } … … 478 480 AssertPtrReturnVoid(m_pCloudMachine); 479 481 480 /* Create and start task to acquire state async way: */ 481 UITask *pTask = new UITaskGetCloudInstanceState(m_pCloudMachine->client(), m_strId); 482 connect(pTask, &UITask::sigComplete, 483 this, &UIVirtualMachineItemCloud::sltHandleGetCloudInstanceStateDone); 484 uiCommon().threadPool()->enqueueTask(pTask); 482 /* Create and start task to acquire state async way only if there is no task yet: */ 483 if (!m_pTask) 484 { 485 m_pTask = new UITaskGetCloudInstanceState(m_pCloudMachine->client(), m_strId); 486 connect(m_pTask, &UITask::sigComplete, 487 this, &UIVirtualMachineItemCloud::sltHandleGetCloudInstanceStateDone); 488 uiCommon().threadPool()->enqueueTask(m_pTask); 489 } 485 490 } 486 491 … … 488 493 { 489 494 /* Skip unrelated tasks: */ 490 if (! pTask || pTask->type() != UITask::Type_GetCloudInstanceState)495 if (!m_pTask || pTask != m_pTask) 491 496 return; 497 498 /* Mark our task handled: */ 499 m_pTask = 0; 492 500 493 501 /* Cast task to corresponding sub-class: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.h
r83094 r83095 143 143 /** Holds fake cloud item state. */ 144 144 FakeCloudItemState m_enmFakeCloudItemState; 145 146 /** Holds the state acquire task instance. */ 147 UITask *m_pTask; 145 148 /** @} */ 146 149 }; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp
r83064 r83095 312 312 { 313 313 UIVirtualMachineItem *pCache = qobject_cast<UIVirtualMachineItem*>(sender()); 314 printf("UIChooserAbstractModel::sltHandleCloudMachineStateChange\n, id = %s\n", pCache->id().toUtf8().constData()); 314 315 AssertPtrReturnVoid(pCache); 315 316 sigCloudMachineStateChange(pCache->id());
Note:
See TracChangeset
for help on using the changeset viewer.