[Kde-pim] Text formatting stripped from text pasted into kmail composer.

Thomas McGuire Thomas.McGuire at gmx.net
Tue Apr 1 19:17:20 BST 2008


Hi,

On Saturday 15 March 2008, Stephen Kelly wrote:
> [..]
>
> Using cursor.setCharFormat( cursor.block().charFormat() ) to remove the
> link also removes all other formatting (size, colour, font-weight).
> Removing only the link formatting is tricky without knowing what that
> formatting is.
>
> Any ideas on that one?
I think it can be ignored, minor problem.

> Another issue I've found is that when editing a link at the beginning of a
> line, the preceeding newline is removed. I think it's a qt bug and I
> couldn't come up with a workaround for it.
>
> Alignment is currently removed when creating a link one the first word in a
> line. This is probably related to the above.
I couldn't reproduce the above two bugs; maybe it was fixed in qt-copy?

>   - Adds 'http://' to the href as a default protocol. If the recipient of a
>     mail recieves a document with <a href="www.google.com">text</a>, I
> think the href is appended to the url of the parent page. At least with a
> simple test on my machine with konqi and ff, the link becomes
>         file:///home/stephen/www.google.com
>     With the new patch it becomes
>         http://www.google.com
With this, the user can not insert mailto: links, and I guess there are more 
cases, so I removed that again.

> In response to Ingo's mail I've also
>   - Tried changing 'Link' to 'ki18nc("A Url link.", "Link")', but got
>     compile error:
>         error: no matching function for call
>         to ‘KAction::setIconText(KLocalizedString)
It's i18nc(). I've changed that.

> I also don't like the minimum width thing, but I wasn't sure what to do
> about it. I didn't want people to need to have to resize the dialog each
> time they use it.
I added size saving using the methods provided by KDialog in rev. 792597. The 
size is saved in the global config, I hope that is OK.

> So remaining issues are:
>   - Removing only link formatting when removing a link

>   - Workaround for removing newline when editing link. I'll submit it to
>     qt-bugs soon. It's happening at the line:
>         cursor.insertText( linkText, format );
As said above, I can't reproduce this anymore

>   - I'd like to show the insert-link icon in the status bar as well. Is
> that possible?
Can probably be done with QStatusBar::insertWidget().

>   - Need to ask artists to create the icon.
Somebody already added it to the missing icons wiki page (I guess you), so we 
will get an icon before 4.1 (especially because it is also in the fd.o naming 
spec)

> Anything else?

I committed the patch now, and made some adjustments (refer to the commit log 
for details).
I think it is ready to move to kdelibs now, should I go ahead with the move 
and send a patch to kde-core-devel?

Regards,
Thomas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20080401/5fb2a58f/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list