KParts / plugi loading and encoding

David Faure faure at kde.org
Fri Feb 27 19:52:08 GMT 2009


On Friday 27 February 2009, Christian Ehrlicher wrote:
> Hi,
> 
> once more an encoding problem...
> 
> KParts Plugin::loadPlugin() currently needs a const char * as libname 
> which is wrong (it also superflous because it gets converted back to a 
> QString when KLibLoader::createInstance() is called).
> 
> Therefore I wanted to deprecate this function and add loadPlugin() which 
> takes a QString. While this looks BC to me it's not SC because it will 
> break compile when a QByteArray is given to loadPlugin.
> -->
> loadPlugin( parent, QFile::encodeName( library ) ) will result in error 
> about a ambiguous call to loadPlugin... :(
> 
> Any ideas how to fix this?

By adding a third overload, for QByteArray. Unfortunately that's the only SC solution.

-- 
David Faure, faure at kde.org, sponsored by Qt Software @ Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list