Version: SVN (using KDE 4.2.2) OS: Linux Installed from: Compiled From Sources 1. Open a Collection for Editing in an instance Parley 2. Open a new instance of Parley and create a new blank collection. 3. Select & Copy some rows in the first instance of Parley 4. Switch to the second instance and paste into a new, blank lesson Result: the content all ends up in the first column Expected Behavior: the content should be parsed into the appropriate columns. ex. 1st Parley shows: Lang1 | Lang2 ------------- foo | bar after copy paste 2nd Parley shows: Lang1 | Lang2 -------------------- foo - bar | Note: Copying and pasting within the same parley instance works fine.
I've discovered the source of this bug. It's because parley doesn't correctly implement the QMimeData api for copy/pasting between apps. src/vocabulary/vocabularyview.cpp the slot slotEditPaste() does: const VocabularyMimeData *vocMimeData = qobject_cast<const VocabularyMimeData *>(mimeData); then proceeds to pull data from the VocabMimeData object, which explains why copy/pasting works in the same instance of parley.
After some further poking around, it seems nigh impossible to easily fix this bug in Parley alone. The "correct" solution would be to have the VocabularyMimeData::retrieveData() method return a serialized list of it's KEduVocExpressions when a certain mimetype (possibly "text/kdevocexpression") is requested of it. I propose adding a method to libkdeedu/keduvocdocument/keduvocexpression.h that serializes the contents of the expression. Something like QString expressionToClipboard() const; and of course, the opposite KEduVocExpression expressionFromClipboard(const QString &data); However, it looks like KEduVocExpression is a pretty complex type containing a QMap<int, KEduVocTranslation> as well as a KEduVocLesson* I assume some information could be tossed when copy/pasting? surely the grade information isn't needed?
Moved to the editor component. This is something we would have to look into. One solution would be to convert to csv for copy/paste, perhaps.
Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved.