summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-11-12 12:45:41 (GMT)
committeraxis <qt-info@nokia.com>2009-12-08 13:04:48 (GMT)
commit76f82b74780cb252782c31e6e690f8529b43b38f (patch)
tree7fec6d41c3fbab8ebe27b5884b86aa220028aabf
parent04f4d1444a49db9e27b483bbc91c713e80ab0792 (diff)
downloadQt-76f82b74780cb252782c31e6e690f8529b43b38f.zip
Qt-76f82b74780cb252782c31e6e690f8529b43b38f.tar.gz
Qt-76f82b74780cb252782c31e6e690f8529b43b38f.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 65e4a1e..b5cf54c 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)