VirtualBox

Changeset 107421 in vbox for trunk/src


Ignore:
Timestamp:
Jan 6, 2025 4:01:26 PM (4 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
166473
Message:

FE/Qt: bugref:3409: Runtime UI: Fixing few parfait warnings in Machine-view code, related to implicit type conversion.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
2 edited

Legend:

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

    r107420 r107421  
    11891189    QPixmap pixmapMask = uimachine()->cursorMaskPixmap();
    11901190    const QPoint hotspot = uimachine()->cursorHotspot();
    1191     uint uXHot = hotspot.x();
    1192     uint uYHot = hotspot.y();
     1191    int iXHot = hotspot.x();
     1192    int iYHot = hotspot.y();
    11931193
    11941194    /* If there is no mask: */
     
    11971197        /* Scale the shape pixmap and
    11981198         * compose the cursor on the basis of shape only: */
    1199         updateMousePointerPixmapScaling(pixmapShape, uXHot, uYHot);
    1200         m_cursor = QCursor(pixmapShape, uXHot, uYHot);
     1199        updateMousePointerPixmapScaling(pixmapShape, iXHot, iYHot);
     1200        m_cursor = QCursor(pixmapShape, iXHot, iYHot);
    12011201    }
    12021202    /* Otherwise: */
     
    12051205        /* Scale the shape and the mask pixmaps and
    12061206         * compose the cursor on the basis of shape and mask both: */
    1207         updateMousePointerPixmapScaling(pixmapShape, uXHot, uYHot);
    1208         /// @todo updateMousePointerPixmapScaling(pixmapMask, uXHot, uYHot);
    1209         m_cursor = QCursor(QBitmap::fromPixmap(pixmapShape), QBitmap::fromPixmap(pixmapMask), uXHot, uYHot);
     1207        updateMousePointerPixmapScaling(pixmapShape, iXHot, iYHot);
     1208        /// @todo updateMousePointerPixmapScaling(pixmapMask, iXHot, iYHot);
     1209        m_cursor = QCursor(QBitmap::fromPixmap(pixmapShape), QBitmap::fromPixmap(pixmapMask), iXHot, iYHot);
    12101210    }
    12111211
     
    21962196}
    21972197
    2198 void UIMachineView::updateMousePointerPixmapScaling(QPixmap &pixmap, uint &uXHot, uint &uYHot)
     2198void UIMachineView::updateMousePointerPixmapScaling(QPixmap &pixmap, int &iXHot, int &iYHot)
    21992199{
    22002200#if defined(VBOX_WS_MAC)
     
    22082208        pixmap = pixmap.scaled(pixmap.width() * dScaleFactor, pixmap.height() * dScaleFactor,
    22092209                               Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
    2210         uXHot *= dScaleFactor;
    2211         uYHot *= dScaleFactor;
     2210        iXHot *= dScaleFactor;
     2211        iYHot *= dScaleFactor;
    22122212    }
    22132213
     
    22212221        /* Scale the pixmap down: */
    22222222        pixmap.setDevicePixelRatio(dDevicePixelRatio);
    2223         uXHot /= dDevicePixelRatio;
    2224         uYHot /= dDevicePixelRatio;
     2223        iXHot /= dDevicePixelRatio;
     2224        iYHot /= dDevicePixelRatio;
    22252225    }
    22262226
     
    22532253        pixmap = pixmap.scaled(pixmap.width() * dScaleMultiplier, pixmap.height() * dScaleMultiplier,
    22542254                               Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
    2255         uXHot *= dScaleMultiplier;
    2256         uYHot *= dScaleMultiplier;
     2255        iXHot *= dScaleMultiplier;
     2256        iYHot *= dScaleMultiplier;
    22572257    }
    22582258
     
    22632263        /* Scale the pixmap down: */
    22642264        pixmap.setDevicePixelRatio(dDevicePixelRatio);
    2265         uXHot /= dDevicePixelRatio;
    2266         uYHot /= dDevicePixelRatio;
     2265        iXHot /= dDevicePixelRatio;
     2266        iYHot /= dDevicePixelRatio;
    22672267    }
    22682268# endif
     
    22712271
    22722272    Q_UNUSED(pixmap);
    2273     Q_UNUSED(uXHot);
    2274     Q_UNUSED(uYHot);
     2273    Q_UNUSED(iXHot);
     2274    Q_UNUSED(iYHot);
    22752275
    22762276#endif
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r106061 r107421  
    383383    QSize scaledBackward(QSize size) const;
    384384
    385     /** Updates mouse pointer @a pixmap, @a uXHot and @a uYHot according to scaling attributes. */
    386     void updateMousePointerPixmapScaling(QPixmap &pixmap, uint &uXHot, uint &uYHot);
     385    /** Updates mouse pointer @a pixmap, @a iXHot and @a iYHot according to scaling attributes. */
     386    void updateMousePointerPixmapScaling(QPixmap &pixmap, int &iXHot, int &iYHot);
    387387
    388388    /* Protected members: */
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