Bug 56238

Summary: Middle-click paste from tcl apps doesn't work in QTextEdit
Product: [Frameworks and Libraries] kdelibs Reporter: mrudolf
Component: qtAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: ismail, l.lunak, mario.cupelli, scherer.michael, sromero
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: qtextedit.cpp.patch
qtextedit.cpp.patch

Description mrudolf 2003-03-22 12:54:10 UTC
Version:            (using KDE KDE 3.1.1)
Installed from:    Compiled From Sources

Middle-click paste from non-KDE apps (f. e. Tcl ones) doesn't work in multiline editbox. It does work when pasting into single-line editbox, so it is possible to paste using such widget, but it is extremly awkward.
(same behaviour for Qt 3.1.1 and Qt 3.1.2)
Comment 1 Lubos Lunak 2003-03-24 12:35:35 UTC
Which specific application for example? 
 
Comment 2 mrudolf 2003-03-25 00:45:09 UTC
Subject: Re:  Middle-click paste from non-KDE apps doesn't work in multiline editbox

W poniedzia
Comment 3 Stephan Kulow 2003-04-12 11:53:52 UTC
definitly a Qt problem. I look into it though 
Comment 4 Stephan Kulow 2003-04-12 12:22:38 UTC
I admit I tested copy&paste :) 
Comment 5 Stephan Kulow 2003-04-12 13:58:54 UTC
QMimeSource::provides('text/plain') doesn't return TRUE, because 
tcl includes the charset. I think, it should strip off the charset befor 
it compares it to the wanted charset. But I don't know the dirty details 
of XClipboard. 
 
Provide 'text/plain' -> 'text/plain;charset=UTF-8' 
Provide 'text/plain' -> 'text/plain;charset=ISO-8859-1' 
Provide 'text/plain' -> 'MULTIPLE' 
Provide 'text/plain' -> 'TARGETS' 
Provide 'text/plain' -> 'TIMESTAMP' 
Provide 'text/plain' -> 'TK_APPLICATION' 
Provide 'text/plain' -> 'TK_WINDOW' 
 
Comment 6 Lubos Lunak 2003-04-14 15:10:37 UTC
*** Bug 57215 has been marked as a duplicate of this bug. ***
Comment 7 Lubos Lunak 2003-04-14 15:18:02 UTC
Subject: Clipboard fix for QTextEdit

 Hello,

 please apply the attached patch for widgets/qtextedit. QTextEdit currently 
uses QMimeSource::provides(), which doesn't work well with "text/plain" if it 
has also encoding specified (e.g. when pasting from tcl apps or aterm). The 
patch replaces it with a call to canDecode() method in QRichTextDrag, which 
handles the encoding fine.



Created an attachment (id=1358)
qtextedit.cpp.patch
Comment 8 Stephan Kulow 2003-04-15 13:17:38 UTC
Subject: Re:  Middle-click paste from tcl apps doesn't work in QTextEdit

On Monday 14 April 2003 15:18, Lubos Lunak wrote:
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.
>      
> http://bugs.kde.org/show_bug.cgi?id=56238     
> 
> 
> 
> 
> ------- Additional Comments From l.lunak@suse.cz  2003-04-14 15:18 -------
> Subject: Clipboard fix for QTextEdit
> 
>  Hello,
> 
>  please apply the attached patch for widgets/qtextedit. QTextEdit currently 
> uses QMimeSource::provides(), which doesn't work well with "text/plain" if it 
> has also encoding specified (e.g. when pasting from tcl apps or aterm). The 
> patch replaces it with a call to canDecode() method in QRichTextDrag, which 
> handles the encoding fine.
> 
> 
> 
> Created an attachment (id=1358)
>  --> (http://bugs.kde.org/attachment.cgi?id=1358&action=view)
> qtextedit.cpp.patch
> 
The patch is empty for me.

Greetings, Stephan

Comment 9 Lubos Lunak 2003-04-15 14:04:26 UTC
Created attachment 1365 [details]
qtextedit.cpp.patch

Maybe bugzilla bug? The attachment is fine in my sent mail folder.
Comment 10 Lubos Lunak 2003-05-12 13:59:47 UTC
*** Bug 58378 has been marked as a duplicate of this bug. ***
Comment 11 Ismail Donmez 2003-05-12 16:19:17 UTC
I can reproduce with xpdf too. 
Comment 12 qt-bugs 2003-05-14 18:23:03 UTC
Subject: Re: [Issue N20628] Clipboard fix for QTextEdit

On Monday, 14. Apr 2003 15:17 Lubos Lunak wrote:
>
>  Hello,
>
>  please apply the attached patch for widgets/qtextedit. QTextEdit
>  currently
> uses QMimeSource::provides(), which doesn't work well with
> "text/plain" if it
> has also encoding specified (e.g. when pasting from tcl apps or
> aterm). The
> patch replaces it with a call to canDecode() method in QRichTextDrag,
> which
> handles the encoding fine.
>
> --
> Lubos Lunak

Hi Lubos

Done. Thanks for the report.

best regards

Anders Bakken
--
Trolltech AS, Waldemar Thranes gate 98, NO-0175 Oslo, Norway

Comment 13 Lubos Lunak 2003-05-14 18:34:17 UTC
Fixed in Qt. 
 
Comment 14 Lubos Lunak 2003-06-13 10:27:51 UTC
*** Bug 59637 has been marked as a duplicate of this bug. ***