summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-11-12 12:45:41 (GMT)
committeraxis <qt-info@nokia.com>2009-11-12 14:07:09 (GMT)
commitf7ee0c9efcb6cb36a95f49bc998524e25480f8ba (patch)
treed62d94f0031b68684a75c97561952401435b2f95 /src
parent05c1839531008d3cab40fb6fdaa22667c2133d7e (diff)
downloadQt-f7ee0c9efcb6cb36a95f49bc998524e25480f8ba.zip
Qt-f7ee0c9efcb6cb36a95f49bc998524e25480f8ba.tar.gz
Qt-f7ee0c9efcb6cb36a95f49bc998524e25480f8ba.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
Diffstat (limited to 'src')
-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)