November 12, 2008
Back in the days of kde3, while writing a KDE application, I encountered quite a big problem while trying to use the aboutbox stuff from KDE (that means kaboutdata and the now called kaboutapplicationdialog). I talked to some guys on #kde-devel, and I have been told that, yes, this will be changed for KDE4.
Now that I (mostly) use and (rarely) develop for KDE4, I have been hit again by the same problem. Before reporting to the bugtracking system of KDE, I would like to know what people think. Most importantly, do people outside of KDE proper do actually use this ?
Description of the problem
There is a field called bugsEmailAddress in the constructor of KAboutData, which is used by KAboutApplicationDialog to decide what to display. Using this field, something like
"Please report bugs to <a href=\"mailto:%1\">%2</a>.\n"
will be used to display the link in the about box. What does it mean ? First, it means that it is not possible to have a link to a web bug tracker. You need to provide a mail, and nothing else. Seeing how common are web bugtrackers, this is rather strange.
Though… what about KDE’s own applications ? The default value for bugsEmailAddress is “firstname.lastname@example.org”. So far, it makes perfectly sense. But if you open any KDE application, you’ll see a link to the web page. Why is it so ? look in kdelibs/kdeui/dialogs/kaboutapplicationdialog.cpp :
if ( .. || aboutData->bugAddress() == "email@example.com")
text = "Please use http://bugs.kde.org..."
I can only guess why this was done this way : probably for some historical reason and then nobody bothered about fixing it. I’m sure they have not done something as ugly on purpose.
So as a conclusion
- KDE uses a link to their web tracker.
- You are not allowed to such a luxury and you need to provide an email address.
Toward a fix ?
The obvious fix is to store an URL or linkAddress in KAboutData and use that in the About dialog. Adding a clear sentence to the documentation : “if you want to use an email address, just add mailto: in front of the argument”.
Now, instead of ranting, my first reaction was to go and fix that (I swear, trust me). Even few years ago. But.. then I’m confronted to a problem : probably some people use this, and I would break quite a lot of about boxes, and everybody will hate me. Not something I want of course.. I tried to talk about this on IRC, but nobody is really interested in this. And finally, i did not dare changing this, and wend the old way : I wrote my own about box.
Today, I have found a way to turn around the problem : You can use the method setCustomAuthorText() and then, KDE will not do anything and let you decide about what to display in this tab. Hourray 🙂