On Wednesday, 28 de September de 2011 14:38:40 Harri Porten wrote:
> How will anyone be able to tell them apart without a way to check which
> plugin is active? Or has this changed?

What are you going to do with this native resource after you get it from 
QPlatformNativeInterface? You plan on calling some some function in wayland or 
XCB or directfb, right?

Then you need to have code to deal with the many plugins active.

Or was your question asking how to determine which plugin is active? If that's 
the case, I support you that we need such a function.

> I know, that ideally Qt should provide a portable API avoid the use of
> native resources. But realistically this will never all cases. So what to
> do? Add some runtime detection? In the case of nativeResourceForWindow()
> I'd say it would already suffice to mandate that the resource names have
> to unique. Either by a pure text prefix
> 
>    nativeResourceForWindow("xlib/display");
> 
> or a distinct parameter:
> 
>     nativeResourceForWindow("xlib", "display");
> 
> As it is I foresee weird crashes after casting void* pointers. In our
> product's code we already had to take the risk...

The only thing this buys us is that you detect which plugin is active by 
getting null pointers if you ask resources of the wrong plugin. You will not 
get a valid XLib display if the plugin in use is Wayland.

This all boils down to a runtime determination of which plugin is active.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

Reply via email to