KPrinter Blues

I’ve been lurking around KDE for a while now, doing odd bits and pieces here and there on KDE 4. But now I’m working on something substantial (together with John Layt): making kdeprint work again.

Last week, it didn’t work. Despite all the amazing work of Michael Goffioul all those years ago in creating it, it’s looking a little tired. It hasn’t really had any serious love for many years, and the transition to Qt4 did for it.

It now works, just about. The problem, it turned out, was that the port from K3Process to KProcess hadn’t been done properly in the kded module. That’s fixed, but the codebase is reasonably large and other things are not working right.

On top of that, there’s the maintainability aspect to consider. The current code, for example, wraps QPrinter rather than inheriting from it (for good reason: it was written at the time of Qt2, when QPrinter was very inflexible) which means every QPrinter method has to be wrapped.

But, Qt4 to the rescue! The QPrinter option system has been abstracted into QPrintEngine, the painting is all done with a wrapped QPaintEngine and now QPrintDialog acts on QPrinter, rather than the other way around. We can hopefully leverage this to make the kdeprint codebase smaller and simpler.

However, there are less than four weeks to do this in. kdelibs (and kdesupport, and kdebase/runtime) go into release mode on 3rd October. Yikes.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: