Changeset 86771 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Oct 30, 2020 1:18:39 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r86769 r86771 407 407 /* Propagate current items to update the Details-pane: */ 408 408 m_pPaneToolsMachine->setItems(currentItems()); 409 /* Repeat the task a bit delayed: */410 pItem->toCloud()->updateInfoAsync(true /* delayed? */);411 409 } 412 410 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.cpp
r86748 r86771 40 40 , m_enmMachineState(KCloudMachineState_Invalid) 41 41 , m_enmFakeCloudItemState(enmState) 42 , m_fRefreshScheduled(false) 42 43 , m_pTimer(0) 43 44 { … … 50 51 , m_enmMachineState(KCloudMachineState_Invalid) 51 52 , m_enmFakeCloudItemState(UIFakeCloudVirtualMachineItemState_NotApplicable) 53 , m_fRefreshScheduled(false) 52 54 , m_pTimer(0) 53 55 { … … 57 59 UIVirtualMachineItemCloud::~UIVirtualMachineItemCloud() 58 60 { 61 cleanup(); 59 62 } 60 63 … … 71 74 } 72 75 73 void UIVirtualMachineItemCloud::updateInfoAsync(bool fDelayed) 74 { 76 void UIVirtualMachineItemCloud::updateInfoAsync(bool fDelayed, bool fSubscribe /* = false */) 77 { 78 /* Mark update scheduled if requested: */ 79 if (fSubscribe) 80 m_fRefreshScheduled = true; 81 75 82 /* Ignore refresh request if timer or progress is already running: */ 76 83 if (m_pTimer->isActive() || m_pProgressHandler) … … 84 91 void UIVirtualMachineItemCloud::waitForAsyncInfoUpdateFinished() 85 92 { 93 /* Mark update canceled in any case: */ 94 m_fRefreshScheduled = false; 95 86 96 /* Cancel the progress-handler if any: */ 87 97 if (m_pProgressHandler) … … 333 343 if (!fCanceled) 334 344 emit sigRefreshFinished(); 345 346 /* Refresh again if scheduled: */ 347 if (m_fRefreshScheduled) 348 updateInfoAsync(true /* async? */); 335 349 } 336 350 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.h
r86748 r86771 80 80 81 81 /** Updates cloud VM info async way, @a fDelayed if requested or instant otherwise. */ 82 void updateInfoAsync(bool fDelayed );82 void updateInfoAsync(bool fDelayed, bool fSubscribe = false); 83 83 /** Makes sure async info update is finished. 84 84 * @note This method creates own event-loop to avoid blocking calling thread event processing, … … 160 160 QString m_strFakeCloudItemErrorMessage; 161 161 162 /** Holds whether we should update info. */ 163 bool m_fRefreshScheduled; 162 164 /** Holds the machine refresh timer instance. */ 163 165 QTimer *m_pTimer; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp
r86769 r86771 233 233 AssertPtrReturnVoid(pCloudMachineItem); 234 234 if (fSelected && pCloudMachineItem->accessible()) 235 pCloudMachineItem->updateInfoAsync(false /* delayed? */ );235 pCloudMachineItem->updateInfoAsync(false /* delayed? */, true /* subscribe */); 236 236 else 237 237 pCloudMachineItem->waitForAsyncInfoUpdateFinished();
Note:
See TracChangeset
for help on using the changeset viewer.