[Interest] fromWinHICON missing from Qt 5

lars.knoll at nokia.com lars.knoll at nokia.com
Tue Sep 4 21:29:03 CEST 2012


On Sep 4, 2012, at 2:17 AM, ext Joseph Crowell <joseph.w.crowell at gmail.com<mailto:joseph.w.crowell at gmail.com>> wrote:

On 9/4/2012 3:13 AM, Justin Karneges wrote:
On Monday, September 03, 2012 01:24:56 PM lars.knoll at nokia.com<mailto:lars.knoll at nokia.com> wrote:
> On Sep 2, 2012, at 3:57 PM, ext Thiago Macieira <thiago.macieira at intel.com><mailto:thiago.macieira at intel.com> wrote:
> > On domingo, 2 de setembro de 2012 22.23.01, Joseph Crowell wrote:
> >> QPixmap QPixmap::fromWinHICON( HICON ); Is there a reason this has been
> >> removed?
> >
> > Yes, the QPixmap API is platform-independent, completely. The equivalent
> > fromWinHBITMAP, fromMacCGImageRef, fromSymbianCFbsBitmap,
> > fromSymbianRSgImage and fromX11Pixmap are also gone.
> >
> >> If so, is there any another method which results in the same
> >> return values from a windows resource dll?
> >
> > QPixmap qt_pixmapFromWinHICON(HICON icon);
> >
> > I can't find it in any header and it isn't documented, but it's exported
> > from QtGui. Therefore, treat it as private API for now, until future
> > plans emerge.
> >
> > For the X11 ones, the idea is to add it to the proposed QtX11Support
> > library, which would also bring back QX11Embed{Container,Widget},
> > QX11DisplayInfo, etc. I don't know where the Mac plans place theirs.
>
> See
> https://codereview.qt-project.org/#admin,project,playground/qtmacextras,inf
> o for the mac specific things.
>
> I think we should also consider adding a QtWinSupport library for windows
> specific functionality.



Interesting approach. So the idea here is to have APIs that are platform independent, even if the underlying code paths (e.g. within QPixmap) must certainly differ by platform? And if the APIs themselves must differ by platform, split into special "support" libraries?

It was my impression this was the whole point of Qt: A single platform independent API which is a wrapper around different code paths for each operating system.. If we had to split all platform specific code in to a "support" library, it would be a very large library indeed. I think what they mean is that functions/methods within the API which can only be USED from a specific OS (fromWinHBITMAP and fromWinHICON for example) should be in an OS support library. Remember the main API is supposed to be the same on all platforms.

Exactly that. Move methods and classes that are specific to a certain platform (and only work on that one platform) into a support library. so QX11Embed is an example as fromWinHBITMAP is.

Cheers,
Lars





Justin



_______________________________________________
Interest mailing list
Interest at qt-project.org<mailto:Interest at qt-project.org>
http://lists.qt-project.org/mailman/listinfo/interest


_______________________________________________
Interest mailing list
Interest at qt-project.org<mailto:Interest at qt-project.org>
http://lists.qt-project.org/mailman/listinfo/interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120904/d3c579f6/attachment.html>


More information about the Interest mailing list