summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorKari Oikarinen <kari.oikarinen@qt.io>2019-02-20 12:37:31 +0200
committerKari Oikarinen <kari.oikarinen@qt.io>2019-02-20 12:37:31 +0200
commit33707f5b2fa45eea6c1163d98cf9d23015bacf02 (patch)
tree6e24046e64432bccf11d00177f425de1f4d2c9c7 /src/gui
parent655e8623afed01de63ce43f55227fb019e800fe9 (diff)
parent2fc4635e9889ade1ae79b787cc18aae654e65e3b (diff)
Merge 5.12 into 5.12.2
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/configure.json3
-rw-r--r--src/gui/painting/qbackingstore.cpp23
-rw-r--r--src/gui/text/qtextdocumentfragment.cpp3
3 files changed, 17 insertions, 12 deletions
diff --git a/src/gui/configure.json b/src/gui/configure.json
index 70d0817791..44140bc7b6 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
@@ -59,8 +59,9 @@
},
"bcm_host": {
"export": "",
+ "headers": ["bcm_host.h"],
"sources": [
- "-lbcm_host"
+ { "type": "makeSpec", "spec": "BCM_HOST" }
]
},
"dxguid": {
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index 0dfb52e7c3..d935deb4d6 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -62,7 +62,7 @@ public:
}
QWindow *window;
- QPlatformBackingStore *platformBackingStore;
+ QPlatformBackingStore *platformBackingStore = nullptr;
QScopedPointer<QImage> highDpiBackingstore;
QRegion staticContents;
QSize size;
@@ -95,8 +95,6 @@ public:
QBackingStore::QBackingStore(QWindow *window)
: d_ptr(new QBackingStorePrivate(window))
{
- d_ptr->platformBackingStore = QGuiApplicationPrivate::platformIntegration()->createPlatformBackingStore(window);
- d_ptr->platformBackingStore->setBackingStore(this);
}
/*!
@@ -131,7 +129,8 @@ void QBackingStore::beginPaint(const QRegion &region)
d_ptr->highDpiBackingstore->devicePixelRatio() != d_ptr->window->devicePixelRatio())
resize(size());
- d_ptr->platformBackingStore->beginPaint(QHighDpi::toNativeLocalRegion(region, d_ptr->window));
+ QPlatformBackingStore *platformBackingStore = handle();
+ platformBackingStore->beginPaint(QHighDpi::toNativeLocalRegion(region, d_ptr->window));
// When QtGui is applying a high-dpi scale factor the backing store
// creates a "large" backing store image. This image needs to be
@@ -139,7 +138,7 @@ void QBackingStore::beginPaint(const QRegion &region)
// devicePixelRatio. Do this on a separate image instance that shares
// the image data to avoid having the new devicePixelRatio be propagated
// back to the platform plugin.
- QPaintDevice *device = d_ptr->platformBackingStore->paintDevice();
+ QPaintDevice *device = platformBackingStore->paintDevice();
if (QHighDpiScaling::isActive() && device->devType() == QInternal::Image) {
QImage *source = static_cast<QImage *>(device);
const bool needsNewImage = d_ptr->highDpiBackingstore.isNull()
@@ -168,7 +167,7 @@ void QBackingStore::beginPaint(const QRegion &region)
*/
QPaintDevice *QBackingStore::paintDevice()
{
- QPaintDevice *device = d_ptr->platformBackingStore->paintDevice();
+ QPaintDevice *device = handle()->paintDevice();
if (QHighDpiScaling::isActive() && device->devType() == QInternal::Image)
return d_ptr->highDpiBackingstore.data();
@@ -189,7 +188,7 @@ void QBackingStore::endPaint()
if (paintDevice()->paintingActive())
qWarning() << "QBackingStore::endPaint() called with active painter on backingstore paint device";
- d_ptr->platformBackingStore->endPaint();
+ handle()->endPaint();
}
static bool isRasterSurface(QWindow *window)
@@ -247,7 +246,7 @@ void QBackingStore::flush(const QRegion &region, QWindow *window, const QPoint &
Q_ASSERT(window == topLevelWindow || topLevelWindow->isAncestorOf(window, QWindow::ExcludeTransients));
- d_ptr->platformBackingStore->flush(window, QHighDpi::toNativeLocalRegion(region, window),
+ handle()->flush(window, QHighDpi::toNativeLocalRegion(region, window),
QHighDpi::toNativeLocalPosition(offset, window));
}
@@ -259,7 +258,7 @@ void QBackingStore::flush(const QRegion &region, QWindow *window, const QPoint &
void QBackingStore::resize(const QSize &size)
{
d_ptr->size = size;
- d_ptr->platformBackingStore->resize(QHighDpi::toNativePixels(size, d_ptr->window), d_ptr->staticContents);
+ handle()->resize(QHighDpi::toNativePixels(size, d_ptr->window), d_ptr->staticContents);
}
/*!
@@ -286,7 +285,7 @@ bool QBackingStore::scroll(const QRegion &area, int dx, int dy)
if (qFloor(nativeDx) != nativeDx || qFloor(nativeDy) != nativeDy)
return false;
- return d_ptr->platformBackingStore->scroll(QHighDpi::toNativeLocalRegion(area, d_ptr->window),
+ return handle()->scroll(QHighDpi::toNativeLocalRegion(area, d_ptr->window),
nativeDx, nativeDy);
}
@@ -367,6 +366,10 @@ void Q_GUI_EXPORT qt_scrollRectInImage(QImage &img, const QRect &rect, const QPo
*/
QPlatformBackingStore *QBackingStore::handle() const
{
+ if (!d_ptr->platformBackingStore) {
+ d_ptr->platformBackingStore = QGuiApplicationPrivate::platformIntegration()->createPlatformBackingStore(d_ptr->window);
+ d_ptr->platformBackingStore->setBackingStore(const_cast<QBackingStore*>(this));
+ }
return d_ptr->platformBackingStore;
}
diff --git a/src/gui/text/qtextdocumentfragment.cpp b/src/gui/text/qtextdocumentfragment.cpp
index e7eaa54a45..6b3604afb5 100644
--- a/src/gui/text/qtextdocumentfragment.cpp
+++ b/src/gui/text/qtextdocumentfragment.cpp
@@ -1139,7 +1139,8 @@ QTextHtmlImporter::ProcessNodeResult QTextHtmlImporter::processBlockNode()
// ####################
// block.setFloatPosition(node->cssFloat);
- if (wsm == QTextHtmlParserNode::WhiteSpacePre) {
+ if (wsm == QTextHtmlParserNode::WhiteSpacePre
+ || wsm == QTextHtmlParserNode::WhiteSpaceNoWrap) {
block.setNonBreakableLines(true);
modifiedBlockFormat = true;
}