kdialog/knotify and URLs

Kevin Krammer kevin.krammer at gmx.at
Fri Nov 4 22:07:16 GMT 2005


Hi,

a user on the German KDE Forum (www.kde-forum.org) asked why URLs in 
messageboxes created by kdialog or KNotify (via DCOP) didn't work.

For example
kdialog --msgbox "<a href='http://www.kde.org/'>KDE</a>"

shows an information messagebox with a link, the cursor changes to hand cursor 
when over the link but clicking does nothing, thus making it look broken :(

The issue is a result if the default for the "options" parameter to the 
KMessageBox methods. It needs AllowLink to be passed to react on clicks but 
the default is only Notify.
The attached patch (against 3.5 branch) would fix that for kdialog.

The weird thing however is KNotify.
Unless I lost the track somewhere, its notifyByMessagebox method calls 
KMessageBox methods that do not exist!

For example I couldn't locate a method
KMessageBox::sorryWId( WId, const QString&, const QString&, bool);

I only found
KMessageBox::sorryWId( WId, const QString&, const QString&, int );
in kdelibs/kdeui/kmessagebox.h which obviously is compatible due implicit type 
conversion.
(the one for informationWId seems to pass 0 instead of QString::null for the 
dontShowAgainName parameter)

Cheers,
Kevin

-- 
Kevin Krammer <kevin.krammer at gmx.at>
Qt/KDE Developer, Debian User
Moderator: www.mrunix.de (German), www.qtforum.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdialog.diff
Type: text/x-diff
Size: 979 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20051104/359b78d5/attachment.diff>
-------------- 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/20051104/359b78d5/attachment.sig>


More information about the kde-core-devel mailing list