Changeset 106707 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Oct 25, 2024 4:18:51 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
r106312 r106707 4659 4659 return; 4660 4660 4661 bool const fUpdateAvailable = m_comUpdateHost.GetState() == KUpdateState_Available; /** @todo Handle other states. */4661 KUpdateState enmState = m_comUpdateHost.GetState(); 4662 4662 if (!m_comUpdateHost.isOk()) 4663 4663 return; 4664 4664 4665 if (fUpdateAvailable) 4666 { 4667 QString strVersion = m_comUpdateHost.GetVersion(); 4668 if (!m_comUpdateHost.isOk()) 4669 return; 4670 4671 QString strURL = m_comUpdateHost.GetDownloadUrl(); 4672 if (!m_comUpdateHost.isOk()) 4673 return; 4674 4675 UINotificationMessage::showUpdateSuccess(strVersion, strURL); 4676 } 4677 else 4678 { 4679 if (m_fForcedCall) 4680 UINotificationMessage::showUpdateNotFound(); 4681 } 4665 switch (enmState) 4666 { 4667 case KUpdateState_Available: 4668 { 4669 QString strVersion = m_comUpdateHost.GetVersion(); 4670 if (!m_comUpdateHost.isOk()) 4671 return; 4672 QString strURL = m_comUpdateHost.GetDownloadUrl(); 4673 if (!m_comUpdateHost.isOk()) 4674 return; 4675 UINotificationMessage::showUpdateSuccess(strVersion, strURL); 4676 break; 4677 } 4678 case KUpdateState_NotAvailable: 4679 { 4680 if (m_fForcedCall) 4681 UINotificationMessage::showUpdateNotFound(); 4682 break; 4683 } 4684 case KUpdateState_Invalid: 4685 case KUpdateState_Error: 4686 case KUpdateState_Max: 4687 /* Error cases are handled not here: */ 4688 break; 4689 case KUpdateState_Downloading: 4690 case KUpdateState_Downloaded: 4691 case KUpdateState_Installing: 4692 case KUpdateState_Installed: 4693 case KUpdateState_UserInteraction: 4694 case KUpdateState_Canceled: 4695 case KUpdateState_Maintenance: 4696 /* These cases are not yet implemented in Main: */ 4697 break; 4698 default: 4699 break; 4700 } 4701 4682 4702 #endif /* VBOX_WITH_UPDATE_AGENT */ 4683 4703 }
Note:
See TracChangeset
for help on using the changeset viewer.