[X2Go-Dev] Bug#1601: Bug#1601: Patch for x2goclient Qt5 build on Windows

Ulrich Sibiller ulrich.sibiller at gmail.com
Tue May 9 19:25:39 CEST 2023


Iirc I have made some patches for the windows version. I thought they had
been merged but I must check that. For now try this:


#if QT_VERSION >= 0x050200
   largeIcon=QtWin::toHICON(icon.scaled(iconx,icony,
Qt::IgnoreAspectRatio,Qt::SmoothTransformation));
   smallIcon=QtWin::toHICON(icon.scaled(smallx,smally,
Qt::IgnoreAspectRatio,Qt::SmoothTransformation));
#else
   largeIcon=icon.scaled(iconx,icony,
Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON();
   smallIcon=icon.scaled(smallx,smally,
Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON();
#endif


Uli

Orion Poplawski <orion at nwra.com> schrieb am Di., 9. Mai 2023, 19:00:

> Package: x2goclient
> Version: 4.1.2.2
> Tag: patch
>
>
> When compiling against Qt5 5.15.9 I get:
>
> ../src/wapi.cpp: In function 'void wapiSetWindowIcon(HWND, const
> QPixmap&)':
> ../src/wapi.cpp:224:88: error: 'class QPixmap' has no member named
> 'toWinHICON'
>    224 |     largeIcon=icon.scaled(iconx,icony,
> Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON ();
>        |                        ^~~~~~~~~~
> ../src/wapi.cpp:225:90: error: 'class QPixmap' has no member named
> 'toWinHICON'
>    225 |     smallIcon=icon.scaled(smallx,smally,
> Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON ();
>        |                          ^~~~~~~~~~
>
> Now, the only call to wapiSetWindowIcon() is commented out, so I just
> commented out the wapiSetWindowIcon() code as we...  Looks like the
> current function to use is QImage::toHICON().
>
> I'm also curious that you need to shift to a Windows API call -
> shouldn't we be able to do everything in Qt?
>
>
>
> --
> Orion Poplawski
> he/him/his  - surely the least important thing about me
> IT Systems Manager                         720-772-5637
> NWRA, Boulder/CoRA Office             FAX: 303-415-9702
> 3380 Mitchell Lane                       orion at nwra.com
> Boulder, CO 80301                 https://www.nwra.com/
> _______________________________________________
> x2go-dev mailing list
> x2go-dev at lists.x2go.org
> https://lists.x2go.org/listinfo/x2go-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x2go.org/pipermail/x2go-dev/attachments/20230509/6140cc48/attachment-0001.htm>


More information about the x2go-dev mailing list