summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-04-07 10:47:20 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2016-04-07 10:47:20 +0200
commitee0951d69b38f766e67262487be95b88501aa4a5 (patch)
tree116c334060500be340d4d61c99026316b0df3ce9 /src/gui
parent0bb645b1ccc5a9d57b21cf0b2c4306b8e48c611c (diff)
parentd37239aa419ee4adff4b0a8d5c1403cadff72319 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: src/network/access/qftp.cpp src/widgets/itemviews/qheaderview.cpp src/widgets/itemviews/qlistview.cpp tests/auto/network/access/qftp/tst_qftp.cpp Change-Id: I9f928f25d45d8944dd60bb583f649fc1615bc5d9
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qopenglcontext.cpp4
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp2
-rw-r--r--src/gui/painting/qpdf.cpp7
3 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 81c0971ea0..59bf2bb065 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -516,8 +516,10 @@ void QOpenGLContext::setScreen(QScreen *screen)
void QOpenGLContextPrivate::_q_screenDestroyed(QObject *object)
{
Q_Q(QOpenGLContext);
- if (object == static_cast<QObject *>(screen))
+ if (object == static_cast<QObject *>(screen)) {
+ screen = 0;
q->setScreen(0);
+ }
}
/*!
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 4ab029cf7a..348ccfffda 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -3893,7 +3893,7 @@ void QClipData::setClipRect(const QRect &rect)
void QClipData::setClipRegion(const QRegion &region)
{
if (region.rectCount() == 1) {
- setClipRect(region.rects().at(0));
+ setClipRect(region.boundingRect());
return;
}
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index f83f1c997e..10f0fcc21d 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -1562,6 +1562,7 @@ void QPdfEnginePrivate::embedFont(QFontSubset *font)
int toUnicode = requestObject();
QFontEngine::Properties properties = font->fontEngine->properties();
+ QByteArray postscriptName = properties.postscriptName.replace(' ', '_');
{
qreal scale = 1000/properties.emSquare.toReal();
@@ -1575,7 +1576,7 @@ void QPdfEnginePrivate::embedFont(QFontSubset *font)
s << (char)('A' + (tag % 26));
tag /= 26;
}
- s << '+' << properties.postscriptName << "\n"
+ s << '+' << postscriptName << "\n"
"/Flags " << 4 << "\n"
"/FontBBox ["
<< properties.boundingBox.x()*scale
@@ -1618,7 +1619,7 @@ void QPdfEnginePrivate::embedFont(QFontSubset *font)
QPdf::ByteStream s(&cid);
s << "<< /Type /Font\n"
"/Subtype /CIDFontType2\n"
- "/BaseFont /" << properties.postscriptName << "\n"
+ "/BaseFont /" << postscriptName << "\n"
"/CIDSystemInfo << /Registry (Adobe) /Ordering (Identity) /Supplement 0 >>\n"
"/FontDescriptor " << fontDescriptor << "0 R\n"
"/CIDToGIDMap /Identity\n"
@@ -1642,7 +1643,7 @@ void QPdfEnginePrivate::embedFont(QFontSubset *font)
QPdf::ByteStream s(&font);
s << "<< /Type /Font\n"
"/Subtype /Type0\n"
- "/BaseFont /" << properties.postscriptName << "\n"
+ "/BaseFont /" << postscriptName << "\n"
"/Encoding /Identity-H\n"
"/DescendantFonts [" << cidfont << "0 R]\n"
"/ToUnicode " << toUnicode << "0 R"