Changeset 98382 in vbox for trunk/src/VBox
- Timestamp:
- Feb 1, 2023 12:59:50 PM (23 months ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo
-
old new 19 19 /branches/dsen/gui2:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644 20 20 /branches/dsen/gui3:79645-79692 21 /branches/dsen/gui4:155183-155185,155187,155198,155200-155201,155205,155228 21 /branches/dsen/gui4:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243 22 22 /trunk/src:92342,154921
-
- Property svn:mergeinfo
-
trunk/src/VBox
- Property svn:mergeinfo
-
old new 19 19 /branches/dsen/gui2/src/VBox:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644 20 20 /branches/dsen/gui3/src/VBox:79645-79692 21 /branches/dsen/gui4/src/VBox:155183-155185,155187,155198,155200-155201,155205,155228 21 /branches/dsen/gui4/src/VBox:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243
-
- Property svn:mergeinfo
-
trunk/src/VBox/Frontends
- Property svn:mergeinfo
-
old new 16 16 /branches/dsen/gui2/src/VBox/Frontends:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644 17 17 /branches/dsen/gui3/src/VBox/Frontends:79645-79692 18 /branches/dsen/gui4/src/VBox/Frontends:155183-155185,155187,155198,155200-155201,155205,155228 18 /branches/dsen/gui4/src/VBox/Frontends:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243
-
- Property svn:mergeinfo
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp
r98309 r98382 450 450 { 451 451 CKeyboardLedsChangedEvent comEventSpecific(pEvent); 452 emit sigKeyboardLedsChange Event(comEventSpecific.GetNumLock(),453 454 452 emit sigKeyboardLedsChange(comEventSpecific.GetNumLock(), 453 comEventSpecific.GetCapsLock(), 454 comEventSpecific.GetScrollLock()); 455 455 break; 456 456 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h
r98309 r98382 169 169 void sigCursorPositionChange(bool fContainsData, unsigned long uX, unsigned long uY); 170 170 /** Notifies about keyboard LEDs change for @a fNumLock, @a fCapsLock and @a fScrollLock. */ 171 void sigKeyboardLedsChange Event(bool fNumLock, bool fCapsLock, bool fScrollLock);171 void sigKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock); 172 172 /** Notifies about machine @a state change. */ 173 173 void sigStateChange(KMachineState state); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.cpp
r98377 r98382 63 63 void sigCursorPositionChange(bool fContainsData, unsigned long uX, unsigned long uY); 64 64 /** Notifies about keyboard LEDs change for @a fNumLock, @a fCapsLock and @a fScrollLock. */ 65 void sigKeyboardLedsChange Event(bool fNumLock, bool fCapsLock, bool fScrollLock);65 void sigKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock); 66 66 /** Notifies about machine @a state change. */ 67 67 void sigStateChange(KMachineState state); … … 251 251 this, &UIConsoleEventHandlerProxy::sigCursorPositionChange, 252 252 Qt::DirectConnection); 253 connect(m_pQtListener->getWrapped(), &UIMainEventListener::sigKeyboardLedsChange Event,254 this, &UIConsoleEventHandlerProxy::sigKeyboardLedsChange Event,253 connect(m_pQtListener->getWrapped(), &UIMainEventListener::sigKeyboardLedsChange, 254 this, &UIConsoleEventHandlerProxy::sigKeyboardLedsChange, 255 255 Qt::DirectConnection); 256 256 connect(m_pQtListener->getWrapped(), &UIMainEventListener::sigStateChange, … … 359 359 this, &UIConsoleEventHandler::sigCursorPositionChange, 360 360 Qt::QueuedConnection); 361 connect(m_pProxy, &UIConsoleEventHandlerProxy::sigKeyboardLedsChange Event,362 this, &UIConsoleEventHandler::sigKeyboardLedsChange Event,361 connect(m_pProxy, &UIConsoleEventHandlerProxy::sigKeyboardLedsChange, 362 this, &UIConsoleEventHandler::sigKeyboardLedsChange, 363 363 Qt::QueuedConnection); 364 364 connect(m_pProxy, &UIConsoleEventHandlerProxy::sigStateChange, -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.h
r98377 r98382 68 68 void sigCursorPositionChange(bool fContainsData, unsigned long uX, unsigned long uY); 69 69 /** Notifies about keyboard LEDs change for @a fNumLock, @a fCapsLock and @a fScrollLock. */ 70 void sigKeyboardLedsChange Event(bool fNumLock, bool fCapsLock, bool fScrollLock);70 void sigKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock); 71 71 /** Notifies about machine @a state change. */ 72 72 void sigStateChange(KMachineState state); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r98379 r98382 68 68 #include "CAudioSettings.h" 69 69 #include "CGraphicsAdapter.h" 70 #include "CHostNetworkInterface.h" 70 71 #include "CHostUSBDevice.h" 71 #include "CRecordingSettings.h" 72 #include "CSystemProperties.h" 73 #include "CStorageController.h" 72 #include "CHostVideoInputDevice.h" 73 #include "CMedium.h" 74 74 #include "CMediumAttachment.h" 75 75 #include "CNetworkAdapter.h" 76 #include "CHostNetworkInterface.h" 77 #include "CVRDEServer.h" 76 #include "CSnapshot.h" 77 #include "CRecordingSettings.h" 78 #include "CStorageController.h" 79 #include "CSystemProperties.h" 78 80 #include "CUSBController.h" 79 81 #include "CUSBDeviceFilter.h" 80 82 #include "CUSBDeviceFilters.h" 81 #include "CHostVideoInputDevice.h" 82 #include "CSnapshot.h" 83 #include "CMedium.h" 83 #include "CVRDEServer.h" 84 84 85 85 /* External includes: */ … … 408 408 } 409 409 410 bool UISession::guestAdditionsUpgradable() 411 { 412 if (!machine().isOk()) 413 return false; 414 415 /* Auto GA update is currently for Windows and Linux guests only */ 416 const CGuestOSType osType = uiCommon().vmGuestOSType(machine().GetOSTypeId()); 417 if (!osType.isOk()) 418 return false; 419 420 const QString strGuestFamily = osType.GetFamilyId(); 421 bool fIsWindowOrLinux = strGuestFamily.contains("windows", Qt::CaseInsensitive) || strGuestFamily.contains("linux", Qt::CaseInsensitive); 422 423 if (!fIsWindowOrLinux) 424 return false; 425 426 /* Also check whether we have something to update automatically: */ 427 if (m_ulGuestAdditionsRunLevel < (ULONG)KAdditionsRunLevelType_Userland) 428 return false; 429 430 return true; 431 } 432 410 433 bool UISession::setPause(bool fOn) 411 434 { … … 495 518 #endif /* RT_OS_DARWIN */ 496 519 497 void UISession::sltKeyboardLedsChange Event(bool fNumLock, bool fCapsLock, bool fScrollLock)520 void UISession::sltKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock) 498 521 { 499 522 /* Check if something had changed: */ … … 767 790 void UISession::sltAdditionsChange() 768 791 { 769 /* Variable flags: */770 ULONG ulGuestAdditionsRunLevel = guest().GetAdditionsRunLevel();792 /* Acquire actual states: */ 793 const ULONG ulGuestAdditionsRunLevel = guest().GetAdditionsRunLevel(); 771 794 LONG64 lLastUpdatedIgnored; 772 bool fIsGuestSupportsGraphics = guest().GetFacilityStatus(KAdditionsFacilityType_Graphics, lLastUpdatedIgnored) 773 == KAdditionsFacilityStatus_Active; 774 bool fIsGuestSupportsSeamless = guest().GetFacilityStatus(KAdditionsFacilityType_Seamless, lLastUpdatedIgnored) 775 == KAdditionsFacilityStatus_Active; 795 const bool fIsGuestSupportsGraphics = guest().GetFacilityStatus(KAdditionsFacilityType_Graphics, lLastUpdatedIgnored) 796 == KAdditionsFacilityStatus_Active; 797 const bool fIsGuestSupportsSeamless = guest().GetFacilityStatus(KAdditionsFacilityType_Seamless, lLastUpdatedIgnored) 798 == KAdditionsFacilityStatus_Active; 799 776 800 /* Check if something had changed: */ 777 if ( m_ulGuestAdditionsRunLevel != ulGuestAdditionsRunLevel ||778 m_fIsGuestSupportsGraphics != fIsGuestSupportsGraphics ||779 m_fIsGuestSupportsSeamless != fIsGuestSupportsSeamless)801 if ( m_ulGuestAdditionsRunLevel != ulGuestAdditionsRunLevel 802 || m_fIsGuestSupportsGraphics != fIsGuestSupportsGraphics 803 || m_fIsGuestSupportsSeamless != fIsGuestSupportsSeamless) 780 804 { 781 805 /* Store new data: */ … … 791 815 792 816 /* Notify listeners about GA state really changed: */ 793 LogRel(("GUI: UISession::sltAdditionsChange: GA state really changed, notifying listeners \n"));817 LogRel(("GUI: UISession::sltAdditionsChange: GA state really changed, notifying listeners.\n")); 794 818 emit sigAdditionsStateActualChange(); 795 819 } 820 else 821 LogRel(("GUI: UISession::sltAdditionsChange: GA state doesn't really changed, still notifying listeners.\n")); 796 822 797 823 /* Notify listeners about GA state change event came: */ 798 LogRel(("GUI: UISession::sltAdditionsChange: GA state change event came, notifying listeners\n"));799 824 emit sigAdditionsStateChange(); 800 825 } … … 940 965 connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigCursorPositionChange, 941 966 this, &UISession::sigCursorPositionChange); 942 connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigKeyboardLedsChange Event,943 this, &UISession::sltKeyboardLedsChange Event);967 connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigKeyboardLedsChange, 968 this, &UISession::sltKeyboardLedsChange); 944 969 connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigStateChange, 945 970 this, &UISession::sltStateChange); … … 1743 1768 } 1744 1769 1745 bool UISession::guestAdditionsUpgradable()1746 {1747 if (!machine().isOk())1748 return false;1749 1750 /* Auto GA update is currently for Windows and Linux guests only */1751 const CGuestOSType osType = uiCommon().vmGuestOSType(machine().GetOSTypeId());1752 if (!osType.isOk())1753 return false;1754 1755 const QString strGuestFamily = osType.GetFamilyId();1756 bool fIsWindowOrLinux = strGuestFamily.contains("windows", Qt::CaseInsensitive) || strGuestFamily.contains("linux", Qt::CaseInsensitive);1757 1758 if (!fIsWindowOrLinux)1759 return false;1760 1761 /* Also check whether we have something to update automatically: */1762 const ULONG ulGuestAdditionsRunLevel = guest().GetAdditionsRunLevel();1763 if (ulGuestAdditionsRunLevel < (ULONG)KAdditionsRunLevelType_Userland)1764 return false;1765 1766 return true;1767 }1768 1769 1770 #ifdef VBOX_GUI_WITH_KEYS_RESET_HANDLER 1770 1771 /** -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r98379 r98382 165 165 const QString& machineName() const { return m_strMachineName; } 166 166 167 UIActionPool* actionPool() const { return m_pActionPool; }168 167 KMachineState machineStatePrevious() const { return m_machineStatePrevious; } 169 168 KMachineState machineState() const { return m_machineState; } 169 UIActionPool *actionPool() const { return m_pActionPool; } 170 170 UIMachineLogic* machineLogic() const; 171 171 QWidget* mainMachineWindow() const; … … 232 232 * detail of the Additions which the GUI should not ideally have to know. */ 233 233 bool isGuestSupportsSeamless() const { return isGuestSupportsGraphics() && m_fIsGuestSupportsSeamless; } 234 /** Returns whether GA can be upgraded. */ 235 bool guestAdditionsUpgradable(); 234 236 235 237 /* Keyboard getters: */ … … 334 336 335 337 /* Console events slots */ 336 void sltKeyboardLedsChange Event(bool fNumLock, bool fCapsLock, bool fScrollLock);338 void sltKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock); 337 339 void sltStateChange(KMachineState state); 338 340 void sltAdditionsChange(); … … 426 428 /** Updates action restrictions. */ 427 429 void updateActionRestrictions(); 428 429 /* Check if GA can be upgraded. */430 bool guestAdditionsUpgradable();431 430 432 431 /* Private variables: */
Note:
See TracChangeset
for help on using the changeset viewer.