Bug 241205 - Cut/Copy/Paste does not work
Summary: Cut/Copy/Paste does not work
Status: RESOLVED DUPLICATE of bug 232767
Alias: None
Product: basket
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR major
Target Milestone: ---
Assignee: Kelvie Wong
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-09 15:21 UTC by Dominik Steenken
Modified: 2018-09-02 16:13 UTC (History)
8 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 Dominik Steenken 2010-06-09 15:21:41 UTC
Version:           unspecified (using KDE 4.4.3) 
OS:                Linux

Hi,

  this is maybe already fixed in a newer version, but the basket version available with openSUSE still has this bug:
  Cut/Copy/Paste does not work. At all. When i cut or copy a note (it does not matter whether it is a compund note or a singular one) and then try to paste it, i get an empty note. Compund notes produce the correct compound structure, but are still empty. I have already lost a number of notes because of this since, whith cutting the notes are lost and there appears to be no undo.

Reproducible: Always

Steps to Reproduce:
Create a note. Cut it out. Try to paste it. (same basket, different basket, does not matter).

Actual Results:  
Pasted note has the correct structure, but is empty

Expected Results:  
Pasted note should be identical to original note.

The version distributed with openSUSE identifies itself as 1.0.cmake
Comment 1 Robert Marmorstein 2010-06-09 19:01:36 UTC
Already fixed in latest git.  Not in any release, though.  I believe this duplicates an existing bug report, but I can't find it now, so maybe it didn't get moved over from the mantis.
Comment 2 Benjamin M 2011-06-28 18:47:39 UTC
I can confirm this on 1.81 with openSUSE 11.4 packages. I'd be surprised if that git version hasn't made it into the betas yet after a year. 

Definitely needs fixing before 2.0 comes out. I just cut and lost a note and was frustrated... But, I know, it's just a beta. :-)
Comment 3 Marc Levesque 2011-07-04 21:21:25 UTC
"BasKet Note Pads 1.0.cmake, Using KDE Development Platforme 4.4.5 (KDE 4.4.5)"

on "kubuntu 10.04 Platform Version 4.4.5 (KDE 4.4.5)"

cut or copy and then paste of notes from one basket to another basket produces visually empty notes.

if basket note pad is shutdown and started again the pasted notes, which were empty, now contain the content they should.

"bug" also listed here https://bugs.launchpad.net/basket/+bug/550158

Addendum:

I wonder if upgrading to kubuntu 10.10 will fix this issue, or if some other setup is recommended. I haven't used BasKet for a year, but I would like to start again, I really like it and will do what is required to get it working.

Thanks,
Marc Levesque
Comment 4 Martin Kampas 2011-09-08 14:24:29 UTC
The same with 1.81 on Gentoo. I noticed it is not possible to drag&drop nor cut&paste into text editor. The following small patch fixes cut&paste. It also partially fixes drag&drop - some clever editors, like those based on Kate-part, preffer the list-of-URLs to the text/plain MIME data and as a result open the files inside ~/.kde4/share/apps/basket/baskets/... corresponding to the dragged notes instead of pasting the plain text form.

Summary of the changes:
1. Consecutive calls to QDrag::setMimeData() destroys previously set data
2. KUrl::List::populateMimeData() needs the flag NoTextExport to not replace text data with URL list

diff -r ./notedrag.cpp ./notedrag.cpp-original
87,90c87,90
<     serializeText(noteList, mimeData);
<     serializeHtml(noteList, mimeData);
<     serializeImage(noteList, mimeData);
<     serializeLinks(noteList, mimeData, cutting);
---
>     serializeText(noteList, multipleDrag);
>     serializeHtml(noteList, multipleDrag);
>     serializeImage(noteList, multipleDrag);
>     serializeLinks(noteList, multipleDrag, cutting);
140c140
< void NoteDrag::serializeText(NoteSelection *noteList, QMimeData *mimeData)
---
> void NoteDrag::serializeText(NoteSelection *noteList, QDrag *multipleDrag)
149a150
>         QMimeData* mimeData = new QMimeData;
150a152
>         multipleDrag->setMimeData(mimeData);
154c156
< void NoteDrag::serializeHtml(NoteSelection *noteList, QMimeData *mimeData)
---
> void NoteDrag::serializeHtml(NoteSelection *noteList, QDrag *multipleDrag)
164a167
>         QMimeData *mimeData = new QMimeData;
168a172
>         multipleDrag->setMimeData(mimeData);
172c176
< void NoteDrag::serializeImage(NoteSelection *noteList, QMimeData *mimeData)
---
> void NoteDrag::serializeImage(NoteSelection *noteList, QDrag *multipleDrag)
203a208
>         QMimeData *mimeData = new QMimeData;
204a210
>         multipleDrag->setMimeData(mimeData);
208c214
< void NoteDrag::serializeLinks(NoteSelection *noteList, QMimeData *mimeData, bool cutting)
---
> void NoteDrag::serializeLinks(NoteSelection *noteList, QDrag *multipleDrag, bool cutting)
223c229,230
<         urls.populateMimeData(mimeData, KUrl::MetaDataMap(), KUrl::NoTextExport);
---
>         QMimeData* mimeData = new QMimeData;
>         urls.populateMimeData(mimeData);
252a260
>         multipleDrag->setMimeData(mimeData);
diff -r ./notedrag.h ./notedrag.h-original
58,61c58,61
<     static void serializeText(NoteSelection *noteList, QMimeData *mimeData);
<     static void serializeHtml(NoteSelection *noteList, QMimeData *mimeData);
<     static void serializeImage(NoteSelection *noteList, QMimeData *mimeData);
<     static void serializeLinks(NoteSelection *noteList, QMimeData *mimeData, bool cutting);
---
>     static void serializeText(NoteSelection *noteList, QDrag *multipleDrag);
>     static void serializeHtml(NoteSelection *noteList, QDrag *multipleDrag);
>     static void serializeImage(NoteSelection *noteList, QDrag *multipleDrag);
>     static void serializeLinks(NoteSelection *noteList, QDrag *multipleDrag, bool cutting);
Comment 5 Marcos Marado 2011-10-18 18:16:27 UTC
Hi there,

This seems to be a duplicate of https://bugs.kde.org/show_bug.cgi?id=232767
Comment 6 Robert Downing 2012-02-25 19:40:23 UTC
Have encountered this problem with Tables 2.4 Beta 6. 

Cut works correctly, places data on clipboard, but paste does not pull data off the clipboard.

Copy works correctly, places data on clipboard, but paste does not pull data off the clipboard.

Verified data exists on clipboard by using Klipper.

In both cases, selecting cut or copied data with Klipper allows paste, but paste of multiple columns does not work correctly (data from same row, multiple columns is merged into single column).
Comment 7 Gregor Mi 2018-09-02 16:13:06 UTC

*** This bug has been marked as a duplicate of bug 232767 ***