VirtualBox

Changeset 103537 in vbox


Ignore:
Timestamp:
Feb 22, 2024 3:58:21 PM (9 months ago)
Author:
vboxsync
Message:

FE/Qt: Cleanup UIDefs from assertion stuff and some global includes; Updating linked code accordingly.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r103362 r103537  
    176176    /* Get VirtualBox: */
    177177    const CVirtualBox comVBox = uiCommon().virtualBox();
    178     AssertWrapperOk(comVBox);
    179178    /* Get VirtualBox event source: */
    180179    CEventSource comEventSourceVBox = comVBox.GetEventSource();
    181     AssertWrapperOk(comEventSourceVBox);
     180    Assert(comVBox.isOk());
    182181
    183182    /* Enumerate all the required event-types: */
     
    189188    /* Register event listener for VirtualBox event source: */
    190189    comEventSourceVBox.RegisterListener(m_comEventListener, eventTypes, FALSE /* active? */);
    191     AssertWrapperOk(comEventSourceVBox);
     190    Assert(comEventSourceVBox.isOk());
    192191
    193192    /* Register event sources in their listeners as well: */
     
    222221    /* Get VirtualBox: */
    223222    const CVirtualBox comVBox = uiCommon().virtualBox();
    224     AssertWrapperOk(comVBox);
    225223    /* Get VirtualBox event source: */
    226224    CEventSource comEventSourceVBox = comVBox.GetEventSource();
    227     AssertWrapperOk(comEventSourceVBox);
     225    Assert(comVBox.isOk());
    228226
    229227    /* Unregister event listener for VirtualBox event source: */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp

    r103464 r103537  
    13501350    const WId id = (WId)comMachine.ShowConsoleWindow();
    13511351#endif
    1352     AssertWrapperOk(comMachine);
     1352    Assert(comMachine.isOk());
    13531353    if (!comMachine.isOk())
    13541354        return false;
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h

    r103339 r103537  
    4646#include "UILibraryDefs.h"
    4747
    48 /* COM includes: */
    49 #include "COMEnums.h"
    50 
    5148/* Other VBox includes: */
    5249#include <VBox/log.h>
    53 #include <VBox/com/defs.h>
    54 
    55 /* Defines: */
    56 #ifdef RT_STRICT
    57 # define AssertWrapperOk(w)         AssertMsg(w.isOk(), (#w " is not okay (RC=0x%08X)", w.lastRC()))
    58 # define AssertWrapperOkMsg(w, m)   AssertMsg(w.isOk(), (#w ": " m " (RC=0x%08X)", w.lastRC()))
    59 #else
    60 # define AssertWrapperOk(w)         do {} while (0)
    61 # define AssertWrapperOkMsg(w, m)   do {} while (0)
    62 #endif
    6350
    6451
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp

    r101560 r103537  
    20932093{
    20942094    CVirtualBox vbox = uiCommon().virtualBox();
    2095     QString strFullVersion;
    2096     if (uiCommon().brandingIsActive())
    2097     {
    2098         strFullVersion = QString("%1 r%2 - %3").arg(vbox.GetVersion())
    2099                                                .arg(vbox.GetRevision())
    2100                                                .arg(uiCommon().brandingGetKey("Name"));
    2101     }
    2102     else
    2103     {
    2104         strFullVersion = QString("%1 r%2").arg(vbox.GetVersion())
    2105                                           .arg(vbox.GetRevision());
    2106     }
    2107     AssertWrapperOk(vbox);
    2108 
     2095    const QString strFullVersion = uiCommon().brandingIsActive()
     2096                                 ? QString("%1 r%2 - %3").arg(vbox.GetVersion())
     2097                                                         .arg(vbox.GetRevision())
     2098                                                         .arg(uiCommon().brandingGetKey("Name"))
     2099                                 : QString("%1 r%2").arg(vbox.GetVersion())
     2100                                                    .arg(vbox.GetRevision());
    21092101    (new VBoxAboutDlg(windowManager().mainWindowShown(), strFullVersion))->show();
    21102102}
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIProgressEventHandler.cpp

    r98103 r103537  
    6565    /* Get CProgress event source: */
    6666    CEventSource comEventSourceProgress = m_comProgress.GetEventSource();
    67     AssertWrapperOk(comEventSourceProgress);
     67    Assert(m_comProgress.isOk());
    6868
    6969    /* Enumerate all the required event-types: */
     
    7575    /* Register event listener for CProgress event source: */
    7676    comEventSourceProgress.RegisterListener(m_comEventListener, eventTypes, FALSE /* active? */);
    77     AssertWrapperOk(comEventSourceProgress);
     77    Assert(comEventSourceProgress.isOk());
    7878
    7979    /* Register event sources in their listeners as well: */
     
    113113    /* Get CProgress event source: */
    114114    CEventSource comEventSourceProgress = m_comProgress.GetEventSource();
    115     AssertWrapperOk(comEventSourceProgress);
     115    Assert(m_comProgress.isOk());
    116116
    117117    /* Unregister event listener for CProgress event source: */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVirtualBoxClientEventHandler.cpp

    r98103 r103537  
    119119    /* Get VirtualBoxClient: */
    120120    const CVirtualBoxClient comVBoxClient = uiCommon().virtualBoxClient();
    121     AssertWrapperOk(comVBoxClient);
    122121    /* Get VirtualBoxClient event source: */
    123122    m_comEventSource = comVBoxClient.GetEventSource();
    124     AssertWrapperOk(m_comEventSource);
     123    Assert(comVBoxClient.isOk());
    125124
    126125    /* Enumerate all the required event-types: */
     
    131130    /* Register event listener for event source aggregator: */
    132131    m_comEventSource.RegisterListener(m_comEventListener, eventTypes, FALSE /* active? */);
    133     AssertWrapperOk(m_comEventSource);
     132    Assert(m_comEventSource.isOk());
    134133
    135134    /* Register event sources in their listeners as well: */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVirtualBoxEventHandler.cpp

    r100737 r103537  
    168168    /* Get VirtualBox: */
    169169    const CVirtualBox comVBox = uiCommon().virtualBox();
    170     AssertWrapperOk(comVBox);
    171170    /* Get VirtualBox event source: */
    172171    m_comEventSource = comVBox.GetEventSource();
    173     AssertWrapperOk(m_comEventSource);
     172    Assert(comVBox.isOk());
    174173
    175174    /* Enumerate all the required event-types: */
     
    198197    /* Register event listener for event source aggregator: */
    199198    m_comEventSource.RegisterListener(m_comEventListener, eventTypes, FALSE /* active? */);
    200     AssertWrapperOk(m_comEventSource);
     199    Assert(m_comEventSource.isOk());
    201200
    202201    /* Register event sources in their listeners as well: */
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestProcessControlWidget.cpp

    r98875 r103537  
    442442    /* Get CProgress event source: */
    443443    CEventSource comEventSource = m_comGuest.GetEventSource();
    444     AssertWrapperOk(comEventSource);
     444    Assert(m_comGuest.isOk());
    445445
    446446    /* Enumerate all the required event-types: */
     
    448448    eventTypes << KVBoxEventType_OnGuestSessionRegistered;
    449449
    450 
    451450    /* Register event listener for CProgress event source: */
    452451    comEventSource.RegisterListener(m_comEventListener, eventTypes, FALSE /* active? */);
    453     AssertWrapperOk(comEventSource);
     452    Assert(comEventSource.isOk());
    454453
    455454    /* Register event sources in their listeners as well: */
     
    553552    /* Get CProgress event source: */
    554553    CEventSource comEventSource = m_comGuest.GetEventSource();
    555     AssertWrapperOk(comEventSource);
     554    Assert(m_comGuest.isOk());
    556555
    557556    /* Unregister event listener for CProgress event source: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.cpp

    r100606 r103537  
    236236    /* Register event listener for console event source: */
    237237    comEventSourceConsole.RegisterListener(m_comEventListener, eventTypes, FALSE /* active? */);
    238     AssertWrapperOk(comEventSourceConsole);
     238    Assert(comEventSourceConsole.isOk());
    239239
    240240    /* Register event sources in their listeners as well: */
     
    330330    /* Get console event source: */
    331331    CEventSource comEventSourceConsole = comConsole.GetEventSource();
    332     AssertWrapperOk(comEventSourceConsole);
     332    Assert(comConsole.isOk());
    333333
    334334    /* Unregister event listener for console event source: */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette