Bug 162768 - paste function inserts double text
Summary: paste function inserts double text
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 163579 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-05-28 21:04 UTC by Przemyslaw Kaminski
Modified: 2009-01-09 17:44 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Przemyslaw Kaminski 2008-05-28 21:04:09 UTC
Version:            (using Devel)
Installed from:    Compiled sources
OS:                Linux

I copy the text 'abc' to the Klipboard. Then in the Kopete chat window (msn, but it shouldn't matter?) I hit CTRL-V to paste and I get 'abcabc', i.e. twice the copied text.
I checked it with KWrite to see if it's a Klipper problem, but the program works fine. So this should be an issue with Kopete.
I'm using the most recent kdemod binaries. (SVN >= 20080527)
Comment 1 Christophe Marin 2008-05-28 21:41:24 UTC
kdelibs rev. 813776

I can confirm with other programs (e.g. kmail composer window or textareas in konqueror).



Only control-V pastes text twice, RMB/paste is not affected
Comment 2 FiNeX 2008-05-28 21:59:13 UTC
Confirmed in kmail composer window and konqueror textarea.
Probably this is a kdelibs related problem.

I'm using trunk (r813587).
Comment 3 Valerio Pilo 2008-05-30 23:44:14 UTC
Duplicate pasted text only occurs when using the keyboard shortcut (ie. not from menu or popup's Paste action). Probably due to commit 813327.
Comment 4 Roman Jarosz 2008-05-31 12:43:37 UTC
I can confirm that commit 813327 broke it.
Comment 5 Michael Pyne 2008-05-31 18:50:37 UTC
I can confirm the problem, have not tried reverting 813327 but I have no reason to suspect otherwise.

I suspect that the new keyPressEvent function which calls QTextEdit::keyPressEvent() is getting called even when the ShortcutOverride event has been handled.  Would that be a Qt bug?
Comment 6 András Manţia 2008-05-31 22:07:38 UTC
In Knode today I see triple pastes for the same text, copied from Konqueror...
Comment 7 Thomas McGuire 2008-06-01 23:27:31 UTC
Confirmed, now the double-pastes also occur in KDE3 applications for me.
Comment 8 András Manţia 2008-06-02 00:21:45 UTC
This doesn't happen in every app though. In Kwrite for example it works fine...
Comment 9 András Manţia 2008-06-02 00:25:50 UTC
A wild guess: applications using KTextEdit for the editor part suffer from the 
problem, the rest work fine.
Comment 10 David Faure 2008-06-02 14:20:17 UTC
SVN commit 815633 by dfaure:

Fix KTextEdit shortcuts triggering twice due to my bad ShortcutOverride handling.
BUG: 162768


 M  +1 -0      tests/CMakeLists.txt  
 M  +14 -0     tests/klineedit_unittest.cpp  
 A             tests/ktextedit_unittest.cpp   [License: LGPL (v2+)]
 M  +20 -14    widgets/klineedit.cpp  
 M  +0 -6      widgets/klineedit.h  
 M  +61 -7     widgets/ktextedit.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=815633
Comment 11 David Faure 2008-06-02 14:53:29 UTC
Thomas: are you sure about kde3 applications? This breakage was kde4-only...
Comment 12 FiNeX 2008-06-09 10:53:46 UTC
*** Bug 163579 has been marked as a duplicate of this bug. ***
Comment 13 Paul van Erk 2009-01-09 16:28:45 UTC
I'm running KDE 4.2 openSUSE Factory with QT 4 Factory and this bug is still present or back. Pastes in single-line fields show double.
Comment 14 Paul van Erk 2009-01-09 16:41:52 UTC
Actually, I just noticed that ctrl-z and shift-ctrl-z double-up as well. So it looks to be ctrl input stuff
Comment 15 Christophe Marin 2009-01-09 16:53:26 UTC
Paul : what you notice is another issue which is already fixed (the Opensuse snapshot was already published, you have to wait for the next one).
Comment 16 Paul van Erk 2009-01-09 17:44:41 UTC
Great, thanks for the info. I'll leave y'all alone now. :)