summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2011-11-22 14:19:27 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2011-11-22 14:43:06 (GMT)
commit431bb1e39f2df69329607b96f7178aea42962318 (patch)
treeeb323cc1986b33c3b64b3dddb56d00255a08ac36 /src
parentbd5dfa8fd2f4d5dc4a1fe0984a53b966cff6470f (diff)
downloadQt-431bb1e39f2df69329607b96f7178aea42962318.zip
Qt-431bb1e39f2df69329607b96f7178aea42962318.tar.gz
Qt-431bb1e39f2df69329607b96f7178aea42962318.tar.bz2
Symbian: don't merge native clipboard, overwrite.
If copying text from a Qt application that has both plaintext and formatted text representations, then S60 applications only see the plaintext. If copying data from an S60 application, the Qt application can see the plaintext. However as this was merged with the existing clipboard contents in Qt, the formatted text was unchanged. Now, we clear the internal clipboard QMimeData before writing the contents of the symbian clipboard to it. This ensures stale data from a previous copy is not left behind. Task-Number: ou1cimx1#927246 Reviewed-By: mread
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qclipboard_s60.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qclipboard_s60.cpp b/src/gui/kernel/qclipboard_s60.cpp
index f5314bd..dc812fb 100644
--- a/src/gui/kernel/qclipboard_s60.cpp
+++ b/src/gui/kernel/qclipboard_s60.cpp
@@ -187,6 +187,7 @@ void readSymbianStoreLX(QMimeData* aData, CClipboard* clipboard)
QString string = qt_TDesC2QString(buf);
CleanupStack::PopAndDestroy(text);
+ aData->clear();
aData->setText(string);
}
@@ -196,6 +197,8 @@ void readFromStreamLX(QMimeData* aData,RReadStream& aStream)
// dependencies between cleanup styles, and no cleanup stack dependencies on stacked objects.
TCardinality mimeTypeCount;
aStream >> mimeTypeCount;
+ if (mimeTypeCount > 0)
+ aData->clear();
for (int i = 0; i< mimeTypeCount;i++)
{
// mime type