QPA/Windows: Avoid confusing warning about empty QPixmap
Fix the condition to really don't call scaledPixmap() on an empty pixmap. This amends db328ca975bc63f3baf3d021dcff1ea37fa6b6a0. Pick-to: 6.7 6.5 Task-number: QTBUG-122755 Change-Id: I10470704fff162f699a936f7b61451c02e3bf4e9 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit c1d2de095e420315c626fc08d6d6a5e2a34a1870) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
1ec258dfb4
commit
19706de70e
@ -272,7 +272,7 @@ void QWindowsOleDropSource::createCursors()
|
||||
hotSpotScaleFactor = QHighDpiScaling::factor(platformScreen);
|
||||
pixmapScaleFactor = hotSpotScaleFactor / pixmap.devicePixelRatio();
|
||||
}
|
||||
QPixmap scaledPixmap = (hasPixmap && qFuzzyCompare(pixmapScaleFactor, 1.0))
|
||||
QPixmap scaledPixmap = (!hasPixmap || qFuzzyCompare(pixmapScaleFactor, 1.0))
|
||||
? pixmap
|
||||
: pixmap.scaled((QSizeF(pixmap.size()) * pixmapScaleFactor).toSize(),
|
||||
Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
|
Loading…
x
Reference in New Issue
Block a user