KPasteTextAction not working

Andras Mantia amantia at
Thu Jan 29 22:10:49 GMT 2004

Hash: SHA1


 I was a little shocked today to see that the new KPasteTextAction is not 
working. It uses DCOP signals to get the clipboard history from Klipper and 
set the clipboard & paste the selected item from the history. This worked 
when I've implemented it, but does not work here. The problem is with the:

DCOPRef klipper("klipper","klipper");"setClipboardContents(QString)", clipboardText);

call. It sets the specified item in klipper, but does not put the text into 
the clipboard, thus nothing is pasted. 
 I've tried to find out where is the problem, but couldn't. If I print out the 
clipboard content in the Klipper DCOP method, it shows that it was set, but 
in the KPasteTextAction or the application which handles this action the same 
query for the clipboard return an empty string.	It happens also if I delay 
the activated() signal with several seconds, so it doesn't seem to be a 
timing problem.
 On a second (now simple) press on the action button inserts the previously 
selected item in the document correctly, and the same debug output shows that 
now there is data in the clipboard.

I can suspect two things:

- - qtcopy (can someone try to use this paste from history functionality e.g in 
KEdit with Qt 3.2.x ?)
- - klipper: there were some changes in Klipper in the last months. One is 
Waldo's newInstance() fix, the other is made by Lubos regarding the polling 
of the clipboard. If it's not a qtcopy problem, I would guess it's the latter 
one causing the problem. Can this be?

Please, if someone has more knowledge about it, look at what can be wrong.


- -- 
Quanta Plus developer -
K Desktop Environment -
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)


More information about the kde-core-devel mailing list