VirtualBox

Changeset 107412 in vbox


Ignore:
Timestamp:
Jan 6, 2025 12:00:49 PM (5 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
166463
Message:

FE/Qt: bugref:3409: Runtime UI: Fixing lots of parfait warnings in UI session code, related to implicit type conversion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r106556 r107412  
    586586    if (comMouse.isNull())
    587587        return false;
    588     comMouse.PutMouseEvent(iDx, iDy, iDz, iDw, iButtonState);
     588    comMouse.PutMouseEvent((LONG)iDx, (LONG)iDy,
     589                           (LONG)iDz, (LONG)iDw,
     590                           (LONG)iButtonState);
    589591    return comMouse.isOk();
    590592}
     
    595597    if (comMouse.isNull())
    596598        return false;
    597     comMouse.PutMouseEventAbsolute(iX, iY, iDz, iDw, iButtonState);
     599    comMouse.PutMouseEventAbsolute((LONG)iX, (LONG)iY,
     600                                   (LONG)iDz, (LONG)iDw,
     601                                   (LONG)iButtonState);
    598602    return comMouse.isOk();
    599603}
     
    604608    if (comMouse.isNull())
    605609        return false;
    606     comMouse.PutEventMultiTouch(iCount, contacts, fIsTouchScreen, uScanTime);
     610    comMouse.PutEventMultiTouch((LONG)iCount, contacts, fIsTouchScreen, (ULONG)uScanTime);
    607611    return comMouse.isOk();
    608612}
     
    783787                default: break;
    784788            }
    785             const long iPort = comAttachment.GetPort();
     789            const int iPort = comAttachment.GetPort();
    786790            fSuccess = comAttachment.isOk();
    787791            if (!fSuccess)
     
    790794                break;
    791795            }
    792             const long iDevice = comAttachment.GetDevice();
     796            const int iDevice = comAttachment.GetDevice();
    793797            fSuccess = comAttachment.isOk();
    794798            if (!fSuccess)
     
    12521256{
    12531257    CMachine comMachine = machine();
    1254     CNetworkAdapter comAdapter = comMachine.GetNetworkAdapter(uSlot);
     1258    CNetworkAdapter comAdapter = comMachine.GetNetworkAdapter((ULONG)uSlot);
    12551259    bool fSuccess = comMachine.isOk();
    12561260    if (!fSuccess)
     
    13171321{
    13181322    CMachine comMachine = machine();
    1319     CNetworkAdapter comAdapter = comMachine.GetNetworkAdapter(uSlot);
     1323    CNetworkAdapter comAdapter = comMachine.GetNetworkAdapter((ULONG)uSlot);
    13201324    bool fSuccess = comMachine.isOk();
    13211325    if (!fSuccess)
     
    13361340{
    13371341    CMachine comMachine = machine();
    1338     CNetworkAdapter comAdapter = comMachine.GetNetworkAdapter(uSlot);
     1342    CNetworkAdapter comAdapter = comMachine.GetNetworkAdapter((ULONG)uSlot);
    13391343    bool fSuccess = comMachine.isOk();
    13401344    if (!fSuccess)
     
    16411645    LONG iGuestXOrigin = 0, iGuestYOrigin = 0;
    16421646    KGuestMonitorStatus enmGuestMonitorStatus = KGuestMonitorStatus_Disabled;
    1643     comDisplay.GetScreenResolution(uScreenId, uGuestWidth, uGuestHeight, uGuestBitsPerPixel,
     1647    comDisplay.GetScreenResolution((ULONG)uScreenId, uGuestWidth, uGuestHeight, uGuestBitsPerPixel,
    16441648                                   iGuestXOrigin, iGuestYOrigin, enmGuestMonitorStatus);
    16451649    const bool fSuccess = comDisplay.isOk();
     
    16651669    ULONG uGuestXOrigin = 0, uGuestYOrigin = 0, uGuestWidth = 0, uGuestHeight = 0;
    16661670    BOOL fGuestEnabled = FALSE;
    1667     comMachine.QuerySavedGuestScreenInfo(uScreenId, uGuestXOrigin, uGuestYOrigin, uGuestWidth, uGuestHeight, fGuestEnabled);
     1671    comMachine.QuerySavedGuestScreenInfo((ULONG)uScreenId, uGuestXOrigin, uGuestYOrigin,
     1672                                         uGuestWidth, uGuestHeight, fGuestEnabled);
    16681673    const bool fSuccess = comMachine.isOk();
    16691674    if (!fSuccess)
     
    16841689{
    16851690    CDisplay comDisplay = display();
    1686     comDisplay.SetVideoModeHint(uScreenId, fEnabled, fChangeOrigin, xOrigin, yOrigin,
    1687                                 uWidth, uHeight, uBitsPerPixel, fNotify);
     1691    comDisplay.SetVideoModeHint((ULONG)uScreenId,
     1692                                fEnabled,
     1693                                fChangeOrigin,
     1694                                (LONG)xOrigin, (LONG)yOrigin,
     1695                                (ULONG)uWidth, (ULONG)uHeight, (ULONG)uBitsPerPixel,
     1696                                fNotify);
    16881697    const bool fSuccess = comDisplay.isOk();
    16891698    if (!fSuccess)
     
    17001709    LONG iGuestXOrigin = 0, iGuestYOrigin = 0;
    17011710    ULONG uGuestWidth = 0, uGuestHeight = 0, uGuestBitsPerPixel = 0;
    1702     comDisplay.GetVideoModeHint(uScreenId, fGuestEnabled, fGuestChangeOrigin,
     1711    comDisplay.GetVideoModeHint((ULONG)uScreenId, fGuestEnabled, fGuestChangeOrigin,
    17031712                                iGuestXOrigin, iGuestYOrigin, uGuestWidth, uGuestHeight,
    17041713                                uGuestBitsPerPixel);
     
    17271736    {
    17281737        /* Take screen-data to array first: */
    1729         const QVector<BYTE> screenData = comDisplay.TakeScreenShotToArray(uScreenId, uWidth, uHeight, enmFormat);
     1738        const QVector<BYTE> screenData = comDisplay.TakeScreenShotToArray((ULONG)uScreenId,
     1739                                                                          (ULONG)uWidth,
     1740                                                                          (ULONG)uHeight,
     1741                                                                          enmFormat);
    17301742        fSuccess = comDisplay.isOk();
    17311743        if (!fSuccess)
     
    17421754    {
    17431755        /* Take the screen-shot directly: */
    1744         comDisplay.TakeScreenShot(uScreenId, pBits, uWidth, uHeight, enmFormat);
     1756        comDisplay.TakeScreenShot((ULONG)uScreenId,
     1757                                  pBits,
     1758                                  (ULONG)uWidth,
     1759                                  (ULONG)uHeight,
     1760                                  enmFormat);
    17451761        fSuccess = comDisplay.isOk();
    17461762        if (!fSuccess && comDisplay.rc() != VBOX_E_NOT_SUPPORTED) /* VBOX_E_NOT_SUPPORTED: screens size 0x0 can't be snapshotted */
     
    17541770    CMachine comMachine = machine();
    17551771    ULONG uGuestWidth = 0, uGuestHeight = 0;
    1756     QVector<KBitmapFormat> guestFormats = comMachine.QuerySavedScreenshotInfo(uScreenId, uGuestWidth, uGuestHeight);
     1772    QVector<KBitmapFormat> guestFormats = comMachine.QuerySavedScreenshotInfo((ULONG)uScreenId,
     1773                                                                              uGuestWidth, uGuestHeight);
    17571774    const bool fSuccess = comMachine.isOk();
    17581775    if (!fSuccess)
     
    17721789    CMachine comMachine = machine();
    17731790    ULONG uGuestWidth = 0, uGuestHeight = 0;
    1774     const QVector<BYTE> guestScreenshot = comMachine.ReadSavedScreenshotToArray(uScreenId, enmFormat,
     1791    const QVector<BYTE> guestScreenshot = comMachine.ReadSavedScreenshotToArray((ULONG)uScreenId, enmFormat,
    17751792                                                                                uGuestWidth, uGuestHeight);
    17761793    const bool fSuccess = comMachine.isOk();
     
    18211838    if (comDisplay.isNull())
    18221839        return false;
    1823     comDisplay.ViewportChanged(uScreenId, xOrigin, yOrigin, uWidth, uHeight);
     1840    comDisplay.ViewportChanged((ULONG)uScreenId, (ULONG)xOrigin, (ULONG)yOrigin, (ULONG)uWidth, (ULONG)uHeight);
    18241841    const bool fSuccess = comDisplay.isOk();
    18251842    if (!fSuccess)
     
    18411858{
    18421859    CDisplay comDisplay = display();
    1843     comDisplay.InvalidateAndUpdateScreen(uScreenId);
     1860    comDisplay.InvalidateAndUpdateScreen((ULONG)uScreenId);
    18441861    const bool fSuccess = comDisplay.isOk();
    18451862    if (!fSuccess)
     
    23262343    {
    23272344        const QRect rct = activeMachineWindow()->frameGeometry();
    2328         m_pDbgGuiVT->pfnAdjustRelativePos(m_pDbgGui, rct.x(), rct.y(), rct.width(), rct.height());
     2345        m_pDbgGuiVT->pfnAdjustRelativePos(m_pDbgGui, rct.x(), rct.y(), (uint)rct.width(), (uint)rct.height());
    23292346    }
    23302347}
     
    26372654    ulong cGuestScreenCount = 0;
    26382655    acquireMonitorCount(cGuestScreenCount);
    2639     m_frameBufferVector.resize(cGuestScreenCount);
     2656    m_frameBufferVector.resize((int)cGuestScreenCount);
    26402657
    26412658    /* Create new frame-buffers: */
     
    27652782        CPlatform comPlatform             = machine().GetPlatform();
    27662783        CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(comPlatform.GetArchitecture());
    2767         const ulong cCount = comProperties.GetMaxNetworkAdapters(comPlatform.GetChipsetType());
    2768         for (ulong uAdapterIndex = 0; uAdapterIndex < cCount; ++uAdapterIndex)
     2784        const ULONG cCount = comProperties.GetMaxNetworkAdapters(comPlatform.GetChipsetType());
     2785        for (ULONG uAdapterIndex = 0; uAdapterIndex < cCount; ++uAdapterIndex)
    27692786        {
    27702787            CNetworkAdapter comNetworkAdapter = machine().GetNetworkAdapter(uAdapterIndex);
Note: See TracChangeset for help on using the changeset viewer.

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