summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-11-12 13:45:41 +0100
committeraxis <qt-info@nokia.com>2009-12-08 14:04:48 +0100
commit76f82b74780cb252782c31e6e690f8529b43b38f (patch)
tree7fec6d41c3fbab8ebe27b5884b86aa220028aabf /src
parent04f4d1444a49db9e27b483bbc91c713e80ab0792 (diff)
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)
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 65e4a1e1cf..b5cf54c67f 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -141,7 +141,7 @@ namespace QPdf {
fileBackingActive(false),
handleDirty(false)
{
- dev->open(QIODevice::ReadWrite);
+ dev->open(QIODevice::ReadWrite | QIODevice::Append);
}
ByteStream::ByteStream(bool fileBacking)