Sebastian Trueg writes an update on K3b
for KDE 4 (pre-alpha, but running):
Porting to K3b has progressed quite a lot these last days. After Laurent Montel (the KDE4 porting machine) did all the heavy lifting, including making it compile and porting almost the complete build system (great work, Laurent!) I started to make K3b work again. And a lot of stuff already does.
K3b still makes heavy use of kdes3support though. This mainly includes all the listviews and K3Process. The latter will be hard to port, since K3b directly links the stdout and stdin file descriptors of processes such as mkisofs and cdrecord to gain maximum performance when piping data during on-the-fly burning. With QProcess there is no way to access the file descriptors directly (at least no portable one as far as I know). Thus, I would have to do a lot of signal-slotting since there is also no way to use QProcess synchronously in a multi-threaded application. I would love to get some good ideas on this topic.
One thing I think is pretty cool and could even go into kdelibs is my K3bMetaItemModel which merges multiple QAbstractItemModels into one. You can see in action in the K3b screenshot recreating the good old places file tree, including the devices. I actually think a places view like this should also go into Dolphin or Konqueror. At least home and root could be merged properly like this. Anyway, I think it is nice and useful.
Another thing in the current K3b trunk is the complete change of the K3b plugin system. It used to have its own implementation (whilst now I use proper KServices), and the configure widgets are KCM modules which means I can use Rafael Fernández López's awesome plugin configure view. He already promised to make the checkboxes optional, since in K3b you cannot disable plugins. Anyway, it looks nice, works great, and prevents a lot of code duplication.
Last but not least, we have a look at one of the action dialogs just to show that they work again. Now while this may seem like no big thing, you should have seen how it looked before it was ported properly to KDialog, the new QComboBox, and the new QWidget background behaviour!
All in all, porting K3b to KDE 4 is mostly mind-numbing work consisting of fixing compile errors, then fixing crashes, then making it actually do what it should do, and finally to remove any trace of kde3support. But sometimes it is fun, too, for example when implementing the K3bMetaItemModel, or when I can reuse many cool new KDE technologies. Solid
comes to mind, although K3b does not make much use of it since it has its own device detection that is optimized for optical devices and gathers much more information than Solid does (Kévin Ottens, I know we talked about this a long while ago, but what can I say: I was lazy in this regard. ;)
By the way, I could use some help on the porting. I think there are even a lot of small things which can be considered JJs. Some small things come to mind: port the audio output system to Phonon, make the K3bDeviceDelegate paint nicer devices in the file tree, extract all the nice KFileItemDelegate goodness including animated hovering and put it into a generic KItemDelegate to be reused for the devices (and many more items throughout KDE for that matter), and so on...