Qtopia-interest Archive, October 2007
Possible 4.3.2 BUG? gfxdrivers _not_ case-insensitive when compiled as plugins
Message 1 in thread
The documentation for QScreenDriverPlugin::create() on
http://doc.trolltech.com/4.3-snapshot states "Implement this function
to create a driver matching the type specified by the given key and
displayId parameters. Note that keys are case-insensitive.". In the
documentation for "How to Create Qt Plugins" it lists
QScreenDriverPlugin as case sensitive.
When calling QScreenDriverPlugin::create() the various drivers compare
the key in a case-insensitive way, however QFactoryLoader's key
matching method is case sensitive for gfxdrivers. This introduces a
discrepancy between drivers compiled into Qtopia Core (case
insensitive) and drivers compiled as plugins (case sensitive).
E.g.
When configured with -plugin-gfx-qvfb,
"./t1 -qws -display qvfb" fails to find the plugin
"./t1 -qws -display QVFb" works
When configured with -qt-gfx-qvfb,
"./t1 -qws -display qvfb" works
"./t1 -qws -display QVFb" also works
I think either driver writers should implement
QScreenDriverPlugin::create() to be case sensitive when matching keys
or QFactoryLoader should ignore case when matching keys.
I know this is a minor issue, but I've spent the last few hours
debugging QFactoryLoader to work out why it couldn't find a plugin I'm
writing. :-)
Cheers,
Tom
--
[ signature omitted ]
Message 2 in thread
Hi Tom,
On Thursday 04 October 2007 18:42:55 Tom Cooksey wrote:
> The documentation for QScreenDriverPlugin::create() on
> http://doc.trolltech.com/4.3-snapshot states "Implement this function
> to create a driver matching the type specified by the given key and
> displayId parameters. Note that keys are case-insensitive.". In the
> documentation for "How to Create Qt Plugins" it lists
> QScreenDriverPlugin as case sensitive.
>
> When calling QScreenDriverPlugin::create() the various drivers compare
> the key in a case-insensitive way, however QFactoryLoader's key
> matching method is case sensitive for gfxdrivers. This introduces a
> discrepancy between drivers compiled into Qtopia Core (case
> insensitive) and drivers compiled as plugins (case sensitive).
>
> E.g.
> When configured with -plugin-gfx-qvfb,
> "./t1 -qws -display qvfb" fails to find the plugin
> "./t1 -qws -display QVFb" works
>
> When configured with -qt-gfx-qvfb,
> "./t1 -qws -display qvfb" works
> "./t1 -qws -display QVFb" also works
>
> I think either driver writers should implement
> QScreenDriverPlugin::create() to be case sensitive when matching keys
> or QFactoryLoader should ignore case when matching keys.
>
> I know this is a minor issue, but I've spent the last few hours
> debugging QFactoryLoader to work out why it couldn't find a plugin I'm
> writing. :-)
>
we definitely don't want people to spend hours of debugging the Qt libraries
so I see this as a valid bug/usability issue. I'm leaning towards making this
a code bug and not a documentation bug as I find it hard to remember which
letters are capitalized in QVFb (not to mention it's much faster to write
everything in lower case).
Anyway, some fix should appear in the snapshots soon.
Thanks for reporting this,
--
[ signature omitted ]