summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-11-12 12:45:41 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-11-13 12:38:10 (GMT)
commit82ed20ab5480a1f1f1f7a0828c8bc17780e237a7 (patch)
tree011d9ac8949686a042775ba17a474a3832bd8de8
parenta44aacb1df2f3a99978530adf4a53ddd5f8635fa (diff)
downloadQt-82ed20ab5480a1f1f1f7a0828c8bc17780e237a7.zip
Qt-82ed20ab5480a1f1f1f7a0828c8bc17780e237a7.tar.gz
Qt-82ed20ab5480a1f1f1f7a0828c8bc17780e237a7.tar.bz2
Fixed searching and copy/paste from PDF documents.
Previously copy and paste from PDFs made by Qt would paste garbage into the target document, and searching was not possible. The bug happened because the internal buffer would open its data stream in truncate mode rather than append mode, thereby losing content, and producing a slightly corrupted PDF. Task: QTBUG-4912 Task: QTBUG-3661 RevBy: Trond Kjernåsen (cherry picked from commit f7ee0c9efcb6cb36a95f49bc998524e25480f8ba)
-rw-r--r--src/gui/painting/qpdf.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index 41a7fbb..b640858 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -145,7 +145,7 @@ namespace QPdf {
fileBackingActive(false),
handleDirty(false)
{
- dev->open(QIODevice::ReadWrite);
+ dev->open(QIODevice::ReadWrite | QIODevice::Append);
}
ByteStream::ByteStream(bool fileBacking)