Changeset 98801 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 1, 2023 8:39:09 AM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 156120
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
r98786 r98801 746 746 747 747 /* static */ 748 void UINotificationMessage::cannotAcquire VRDEServerInfoParameter(const CVRDEServerInfo &comVRDEServerInfo)749 { 750 createMessage( 751 QApplication::translate("UIMessageCenter", " VRDE Server Infofailure ..."),752 QApplication::translate("UIMessageCenter", "Failed to acquire VRDE serverparameter.") +753 UIErrorString::formatErrorInfo(com VRDEServerInfo));748 void UINotificationMessage::cannotAcquireGuestParameter(const CGuest &comGuest) 749 { 750 createMessage( 751 QApplication::translate("UIMessageCenter", "Guest failure ..."), 752 QApplication::translate("UIMessageCenter", "Failed to acquire guest parameter.") + 753 UIErrorString::formatErrorInfo(comGuest)); 754 754 } 755 755 … … 851 851 QApplication::translate("UIMessageCenter", "Failed to acquire VRDE server parameter.") + 852 852 UIErrorString::formatErrorInfo(comServer)); 853 } 854 855 /* static */ 856 void UINotificationMessage::cannotAcquireVRDEServerInfoParameter(const CVRDEServerInfo &comServerInfo) 857 { 858 createMessage( 859 QApplication::translate("UIMessageCenter", "VRDE server info failure ..."), 860 QApplication::translate("UIMessageCenter", "Failed to acquire VRDE server info parameter.") + 861 UIErrorString::formatErrorInfo(comServerInfo)); 853 862 } 854 863 … … 916 925 QApplication::translate("UIMessageCenter", "Failed to acquire cloud machine parameter.") + 917 926 UIErrorString::formatErrorInfo(comCloudMachine), 918 QString(), QString(), pParent);919 }920 921 /* static */922 void UINotificationMessage::cannotAcquireGuestParameter(const CGuest &comGuest, UINotificationCenter *pParent /* = 0 */)923 {924 createMessage(925 QApplication::translate("UIMessageCenter", "Guest failure ..."),926 QApplication::translate("UIMessageCenter", "Failed to acquire guest parameter.") +927 UIErrorString::formatErrorInfo(comGuest),928 927 QString(), QString(), pParent); 929 928 } -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h
r98786 r98801 83 83 class CVRDEServerInfo; 84 84 class CUnattended; 85 86 85 87 86 /** UINotificationObject extension for message functionality. */ … … 324 323 * @param comConsole Brings the object parameter get acquired from. */ 325 324 static void cannotAcquireConsoleParameter(const CConsole &comConsole); 325 /** Notifies about inability to acquire IGuest parameter. 326 * @param comGuest Brings the object parameter get acquired from. */ 327 static void cannotAcquireGuestParameter(const CGuest &comGuest); 326 328 /** Notifies about inability to acquire ISnapshot parameter. 327 329 * @param comSnapshot Brings the object parameter get acquired from. */ … … 384 386 static void cannotAcquireCloudMachineParameter(const CCloudMachine &comCloudMachine, 385 387 UINotificationCenter *pParent = 0); 386 /** Notifies about inability to acquire IGuest parameter.387 * @param comGuest Brings the object parameter get acquired from. */388 static void cannotAcquireGuestParameter(const CGuest &comGuest,389 UINotificationCenter *pParent = 0);390 388 391 389 /** Notifies about inability to change IMedium parameter. -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r98787 r98801 642 642 } 643 643 644 bool UIMachine::acquireVRDEServerPort(long &iPort) 645 { 646 return uisession()->acquireVRDEServerPort(iPort); 647 } 648 644 649 bool UIMachine::acquireWhetherRecordingSettingsPresent(bool &fPresent) 645 650 { … … 672 677 } 673 678 674 bool UIMachine::acquireGuestAdditionsVersion(QString &strGAVersion) 675 { 676 return uisession()->acquireGuestAdditionsVersion(strGAVersion); 677 } 678 bool UIMachine::acquireGuestAdditionsRevision(ULONG &uRevision) 679 bool UIMachine::acquireGuestAdditionsVersion(QString &strVersion) 680 { 681 return uisession()->acquireGuestAdditionsVersion(strVersion); 682 } 683 684 bool UIMachine::acquireGuestAdditionsRevision(ulong &uRevision) 679 685 { 680 686 return uisession()->acquireGuestAdditionsRevision(uRevision); … … 804 810 { 805 811 return uisession()->setNetworkCableConnected(uSlot, fConnected); 806 }807 808 bool UIMachine::acquireVRDEServerPort(LONG &uPort)809 {810 return uisession()->acquireVRDEServerPort(uPort);811 812 } 812 813 … … 944 945 } 945 946 946 bool UIMachine::acquireUptime(LONG64 & uLoad)947 { 948 return uisession()->acquireUptime( uLoad);947 bool UIMachine::acquireUptime(LONG64 &iUpTime) 948 { 949 return uisession()->acquireUptime(iUpTime); 949 950 } 950 951 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r98787 r98801 382 382 /** Defines whether VRDE server is enabled. */ 383 383 bool setVRDEServerEnabled(bool fEnabled); 384 /** Acquires VRDE server port. */ 385 bool acquireVRDEServerPort(long &iPort); 384 386 385 387 /** Acquires whether recording settings is present. */ … … 400 402 bool isGuestSupportsSeamless() const; 401 403 /** Acquires the guest addition's version. */ 402 bool acquireGuestAdditionsVersion(QString &str GAVersion);404 bool acquireGuestAdditionsVersion(QString &strVersion); 403 405 /** Acquires the guest addition's revision. */ 404 bool acquireGuestAdditionsRevision( ULONG&uRevision);406 bool acquireGuestAdditionsRevision(ulong &uRevision); 405 407 /** @} */ 406 408 … … 548 550 /** Set whether network adapter cable is connected. */ 549 551 bool setNetworkCableConnected(ulong uSlot, bool fConnected); 550 /** Acquires VRDE server port. */551 bool acquireVRDEServerPort(LONG &uPort);552 552 /** @} */ 553 553 … … 605 605 /** Acquires effective CPU @a uLoad. */ 606 606 bool acquireEffectiveCPULoad(ulong &uLoad); 607 /** Acquires uptime @a uUpTime as milliseconds. */608 bool acquireUptime(LONG64 & uUpTime);607 /** Acquires uptime @a iUpTime as milliseconds. */ 608 bool acquireUptime(LONG64 &iUpTime); 609 609 610 610 #ifdef VBOX_WITH_DEBUGGER_GUI -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r98787 r98801 945 945 } 946 946 947 bool UISession::acquireVRDEServerPort(LONG &uPort)948 {949 CConsole comConsole = console();950 CVRDEServerInfo comVRDEServerInfo = comConsole.GetVRDEServerInfo();951 bool fSuccess = comConsole.isOk();952 953 if (!fSuccess)954 UINotificationMessage::cannotAcquireConsoleParameter(comConsole);955 LONG uVRDEPort = comVRDEServerInfo.GetPort();956 fSuccess = comVRDEServerInfo.isOk();957 958 if (!fSuccess)959 UINotificationMessage::cannotAcquireVRDEServerInfoParameter(comVRDEServerInfo);960 uPort = uVRDEPort;961 return fSuccess;962 }963 964 947 bool UISession::guestAdditionsUpgradable() 965 948 { … … 985 968 } 986 969 987 bool UISession::acquireGuestAdditionsVersion(QString &str GAVersion)988 { 989 CGuest &comGuest = guest();990 QString strVersion = comGuest.GetAdditionsVersion();970 bool UISession::acquireGuestAdditionsVersion(QString &strVersion) 971 { 972 CGuest comGuest = guest(); 973 const QString strGAVersion = comGuest.GetAdditionsVersion(); 991 974 const bool fSuccess = comGuest.isOk(); 992 975 if (!fSuccess) 993 976 UINotificationMessage::cannotAcquireGuestParameter(comGuest); 994 977 else 995 str GAVersion = strVersion;996 return fSuccess; 997 } 998 999 bool UISession::acquireGuestAdditionsRevision( ULONG&uRevision)1000 { 1001 CGuest &comGuest = guest();1002 ULONG uRev= comGuest.GetAdditionsRevision();978 strVersion = strGAVersion; 979 return fSuccess; 980 } 981 982 bool UISession::acquireGuestAdditionsRevision(ulong &uRevision) 983 { 984 CGuest comGuest = guest(); 985 const ULONG uGARevision = comGuest.GetAdditionsRevision(); 1003 986 const bool fSuccess = comGuest.isOk(); 1004 987 if (!fSuccess) 1005 988 UINotificationMessage::cannotAcquireGuestParameter(comGuest); 1006 989 else 1007 uRevision = u Rev;990 uRevision = uGARevision; 1008 991 return fSuccess; 1009 992 } … … 1497 1480 } 1498 1481 1482 bool UISession::acquireVRDEServerPort(long &iPort) 1483 { 1484 CConsole comConsole = console(); 1485 const CVRDEServerInfo comVRDEServerInfo = comConsole.GetVRDEServerInfo(); 1486 bool fSuccess = comConsole.isOk(); 1487 if (!fSuccess) 1488 UINotificationMessage::cannotAcquireConsoleParameter(comConsole); 1489 else 1490 { 1491 const LONG iVRDEPort = comVRDEServerInfo.GetPort(); 1492 fSuccess = comVRDEServerInfo.isOk(); 1493 if (!fSuccess) 1494 UINotificationMessage::cannotAcquireVRDEServerInfoParameter(comVRDEServerInfo); 1495 else 1496 iPort = iVRDEPort; 1497 } 1498 return fSuccess; 1499 } 1500 1499 1501 bool UISession::acquireWhetherRecordingSettingsPresent(bool &fPresent) 1500 1502 { … … 1651 1653 1652 1654 void UISession::generateMachineInformationAudio(const UIExtraDataMetaDefs::DetailsElementOptionTypeAudio &fOptions, 1653 UITextTable &returnTable)1655 UITextTable &returnTable) 1654 1656 { 1655 1657 CMachine comMachine = machine(); … … 1658 1660 1659 1661 void UISession::generateMachineInformationNetwork(const UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork &fOptions, 1660 UITextTable &returnTable)1662 UITextTable &returnTable) 1661 1663 { 1662 1664 CMachine comMachine = machine(); … … 1664 1666 } 1665 1667 void UISession::generateMachineInformationSerial(const UIExtraDataMetaDefs::DetailsElementOptionTypeSerial &fOptions, 1666 UITextTable &returnTable)1668 UITextTable &returnTable) 1667 1669 { 1668 1670 CMachine comMachine = machine(); … … 1671 1673 1672 1674 void UISession::generateMachineInformationUSB(const UIExtraDataMetaDefs::DetailsElementOptionTypeUsb &fOptions, 1673 UITextTable &returnTable)1675 UITextTable &returnTable) 1674 1676 { 1675 1677 CMachine comMachine = machine(); … … 1769 1771 } 1770 1772 1771 bool UISession::acquireUptime(LONG64 & uUpTime)1773 bool UISession::acquireUptime(LONG64 &iUpTime) 1772 1774 { 1773 1775 CMachineDebugger comDebugger = debugger(); 1774 LONG64 uTime = comDebugger.GetUptime();1776 const LONG64 iGuestUpTime = comDebugger.GetUptime(); 1775 1777 const bool fSuccess = comDebugger.isOk(); 1776 1778 if (!fSuccess) 1777 1779 UINotificationMessage::cannotAcquireMachineDebuggerParameter(comDebugger); 1778 1780 else 1779 uUpTime = uTime;1781 iUpTime = iGuestUpTime; 1780 1782 return fSuccess; 1781 1783 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r98787 r98801 361 361 /** Set whether network adapter cable is connected. */ 362 362 bool setNetworkCableConnected(ulong uSlot, bool fConnected); 363 /** Acquires VRDE server port. */364 bool acquireVRDEServerPort(LONG &uPort);365 363 /** @} */ 366 364 … … 378 376 bool guestAdditionsUpgradable(); 379 377 /** Acquires the guest addition's version. */ 380 bool acquireGuestAdditionsVersion(QString &str GAVersion);378 bool acquireGuestAdditionsVersion(QString &strVersion); 381 379 /** Acquires the guest addition's revision. */ 382 bool acquireGuestAdditionsRevision( ULONG&uRevision);380 bool acquireGuestAdditionsRevision(ulong &uRevision); 383 381 /** @} */ 384 382 … … 463 461 /** Defines whether VRDE server is enabled. */ 464 462 bool setVRDEServerEnabled(bool fEnabled); 463 /** Acquires VRDE server port. */ 464 bool acquireVRDEServerPort(long &iPort); 465 465 466 466 /** Acquires whether recording settings is present. */ … … 520 520 /** Acquires effective CPU @a uLoad. */ 521 521 bool acquireEffectiveCPULoad(ulong &uLoad); 522 /** Acquires uptime @a uUpTime. */523 bool acquireUptime(LONG64 & uUpTime);522 /** Acquires uptime @a iUpTime as milliseconds. */ 523 bool acquireUptime(LONG64 &iUpTime); 524 524 525 525 #ifdef VBOX_WITH_DEBUGGER_GUI -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.cpp
r98786 r98801 401 401 else 402 402 { 403 ULONGuRevision = 0;403 ulong uRevision = 0; 404 404 gpMachine->acquireGuestAdditionsRevision(uRevision); 405 405 if (uRevision != 0) … … 412 412 { 413 413 AssertPtrReturnVoid(gpMachine); 414 LONGiVRDEPort = 0;414 long iVRDEPort = 0; 415 415 gpMachine->acquireVRDEServerPort(iVRDEPort); 416 QString strVRDEInfo = (iVRDEPort == 0 || iVRDEPort == -1) ? 417 m_strVRDEPortNotAvailable : QString("%1").arg(iVRDEPort); 418 updateInfoRow(InfoRow_RemoteDesktop, QString("%1").arg(m_strRemoteDesktopLabel), strVRDEInfo); 416 const QString strVRDEInfo = (iVRDEPort == 0 || iVRDEPort == -1) 417 ? m_strVRDEPortNotAvailable 418 : QString("%1").arg(iVRDEPort); 419 updateInfoRow(InfoRow_RemoteDesktop, QString("%1").arg(m_strRemoteDesktopLabel), strVRDEInfo); 419 420 } 420 421
Note:
See TracChangeset
for help on using the changeset viewer.