remove QtGui dependence of kdecore

Simon Hausmann hausmann at kde.org
Wed Jan 3 15:33:41 GMT 2007


On Wednesday 03 January 2007 14:30, Olivier Goffart wrote:
[...]
> - KStringHandler
>      use QFontMetrics in some functions which truncate strings to limit
> them to some size.
>     maybe theses function could be removed because QFontMetrics provide
> directly the feature since Qt 4.2

I vote for that. (surprise ;)

I hope in the future we'll also be able to get rid of the character based 
squeeze functions, which often expand to just one line of QString code and 
(worse) don't work at all with complex languages. If possible code using them 
is better off to be ported to the pixel width based text eliding functions. 
The one big area of use currently seems to be text set on a QLabel. If we can 
get text eliding as feature into QLabel we should have a safe replacement :)

> - KAboutData use QImage for the program logo.
>     An easy way to get ride of this dependence is to use QVariant.
>     Another would be to only use QImage* or even QImage&, without making
> copies, so it would not be required to link against QtGui

I like the idea of (ab)using QVariant :)

> - KLibLoader
>      clear the clipboard when uploading a plugin because the clipboard may
> contains object from this plugin.

We might be able to solve this with a signal that KApplication could connect 
to.

> On another topic, do you think it make sens to split kio in kio_core and
> kio_ui ?   this would allow to use kioslave in console application.

How useful is that, is it worth it?

It affects 99% of all KDE applications, they have to link against /yet/ 
another library (not helping with startup time and the generated code that 
calls between kio_ui and _core), just for this one or two applications that 
don't want to link against gui?

And this is only about linkage after all. You can still spin a QApplication 
based event loop without connecting to the X server.

Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070103/daf8384e/attachment.sig>


More information about the kde-core-devel mailing list