fix:if the applciation has a very large icon ,the application will crash

This commit is contained in:
YiFang Xiao 2022-04-17 20:37:36 +08:00
parent a4c1e2793a
commit 0ea3ad0149

View file

@ -243,6 +243,8 @@ bool Class::loadIconFromFile( QString const & _filename, bool isFullName )
{
// Load successful
//some icon is very large ,will crash the application.
img = img.scaledToWidth( 48 );
// Apply the color key
img.setAlphaChannel( img.createMaskFromColor( QColor( 192, 192, 192 ).rgb(),