Changeset 94643 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Apr 20, 2022 9:08:37 AM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r94623 r94643 255 255 $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE) \ 256 256 $(if $(VBOX_WITH_QHELP_VIEWER),VBOX_WITH_QHELP_VIEWER) \ 257 $(if $(VBOX_WITH_SDS),VBOX_WITH_SDS,) 257 $(if $(VBOX_WITH_SDS),VBOX_WITH_SDS,) \ 258 $(if $(VBOX_WITH_UPDATE_AGENT),VBOX_WITH_UPDATE_AGENT) 258 259 ifdef VBOX_WITH_DEBUGGER_GUI 259 260 UICommon_DEFS += VBOX_WITH_DEBUGGER_GUI -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
r94516 r94643 4316 4316 connect(this, &UINotificationProgress::sigProgressFinished, 4317 4317 this, &UINotificationProgressNewVersionChecker::sltHandleProgressFinished); 4318 CHost comHost = uiCommon().virtualBox().GetHost(); 4318 4319 #ifdef VBOX_WITH_UPDATE_AGENT 4320 CHost comHost = uiCommon().host(); 4319 4321 if (!comHost.isNull()) 4320 m_comUpdateChecker = comHost.GetUpdate(); 4322 m_comUpdateHost = comHost.GetUpdateHost(); 4323 #endif /* VBOX_WITH_UPDATE_AGENT */ 4321 4324 } 4322 4325 4323 4326 QString UINotificationProgressNewVersionChecker::name() const 4324 4327 { 4325 return UINotificationProgress::tr("Check for New Version ..."); 4328 #ifdef VBOX_WITH_UPDATE_AGENT 4329 if (m_comUpdateHost.isOk()) 4330 return UINotificationProgress::tr("Checking for new version of %s ...", m_comUpdateHost.GetName().toLocal8Bit().data()); 4331 #endif /* VBOX_WITH_UPDATE_AGENT */ 4332 return UINotificationProgress::tr("Checking for new version ..."); 4326 4333 } 4327 4334 … … 4333 4340 CProgress UINotificationProgressNewVersionChecker::createProgress(COMResult &comResult) 4334 4341 { 4335 if (!m_comUpdateChecker.isOk()) 4342 #ifdef VBOX_WITH_UPDATE_AGENT 4343 if (!m_comUpdateHost.isOk()) 4336 4344 return CProgress(); 4337 4345 4338 CProgress comProgress = m_comUpdateChecker.UpdateCheck(KUpdateCheckType_VirtualBox); 4339 comResult = m_comUpdateChecker; 4340 4341 return comProgress; 4346 CProgress comProgress = m_comUpdateHost.Check(); 4347 comResult = m_comUpdateHost; 4348 4349 return comProgress; 4350 #else 4351 return CProgress(); 4352 #endif /* VBOX_WITH_UPDATE_AGENT */ 4342 4353 } 4343 4354 4344 4355 void UINotificationProgressNewVersionChecker::sltHandleProgressFinished() 4345 4356 { 4346 if (m_comUpdateChecker.isNull() && !m_comUpdateChecker.isOk()) 4357 #ifdef VBOX_WITH_UPDATE_AGENT 4358 if (m_comUpdateHost.isNull() && !m_comUpdateHost.isOk()) 4347 4359 return; 4348 4360 4349 bool fUpdateAvailable = m_comUpdateChecker.GetUpdateResponse();4350 if (!m_comUpdate Checker.isOk())4361 bool const fUpdateAvailable = m_comUpdateHost.GetState() == UpdateState_Available; /** @todo Handle other states. */ 4362 if (!m_comUpdateHost.isOk()) 4351 4363 return; 4352 4364 4353 4365 if (fUpdateAvailable) 4354 4366 { 4355 QString strVersion = m_comUpdate Checker.GetUpdateVersion();4356 if (!m_comUpdate Checker.isOk())4367 QString strVersion = m_comUpdateHost.GetVersion(); 4368 if (!m_comUpdateHost.isOk()) 4357 4369 return; 4358 4370 4359 QString strURL = m_comUpdate Checker.GetUpdateURL();4360 if (!m_comUpdate Checker.isOk())4371 QString strURL = m_comUpdateHost.GetDownloadUrl(); 4372 if (!m_comUpdateHost.isOk()) 4361 4373 return; 4362 4374 … … 4368 4380 UINotificationMessage::showUpdateNotFound(); 4369 4381 } 4382 #endif /* VBOX_WITH_UPDATE_AGENT */ 4370 4383 } 4371 4384 -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h
r94516 r94643 42 42 #include "CGuest.h" 43 43 #include "CHost.h" 44 #include "CHostUpdate.h"45 44 #include "CHostNetworkInterface.h" 46 45 #include "CMachine.h" … … 49 48 #include "CSnapshot.h" 50 49 #include "CStringArray.h" 50 #ifdef VBOX_WITH_UPDATE_AGENT 51 # include "CUpdateAgent.h" 52 #endif 51 53 #include "CVFSExplorer.h" 52 54 #include "CVirtualSystemDescription.h" … … 2709 2711 private: 2710 2712 2711 CHostUpdate m_comUpdateChecker; 2713 #ifdef VBOX_WITH_UPDATE_AGENT 2714 CUpdateAgent m_comUpdateHost; 2715 #endif 2712 2716 /** Holds whether this customer has forced privelegies. */ 2713 bool m_fForcedCall;2717 bool m_fForcedCall; 2714 2718 }; 2715 2719
Note:
See TracChangeset
for help on using the changeset viewer.