Summary: | Copying and Pasting across parley instances does not work | ||
---|---|---|---|
Product: | [Applications] parley | Reporter: | Casey Link <unnamedrambler> |
Component: | editor | Assignee: | parley bug tracker <parley-bugs-null> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | inge |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Casey Link
2009-04-30 23:18:01 UTC
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. |