diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-01-23 10:13:28 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-01-23 10:13:29 +0100 |
commit | e3da05f39a5b000bbb6194396d688bf26af771fd (patch) | |
tree | 6b1e0b84a2ef9b7abdd465c0aecb5688fcb40f1a /src/gui | |
parent | 0c007a87be88f44151616b7251cfed5508913e0f (diff) | |
parent | 9822d57d858068cfe5a07281ef069ef8c4c7b7b3 (diff) |
Merge remote-tracking branch 'origin/5.12.1' into 5.12
Change-Id: Icebd151eae0cf9d400319a42573290d1a911ce26
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/doc/qtgui.qdocconf | 5 | ||||
-rw-r--r-- | src/gui/image/qbmphandler.cpp | 2 | ||||
-rw-r--r-- | src/gui/image/qimage.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qplatformwindow.h | 2 | ||||
-rw-r--r-- | src/gui/kernel/qtestsupport_gui.cpp | 10 | ||||
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 3 | ||||
-rw-r--r-- | src/gui/painting/qpdf.cpp | 7 | ||||
-rw-r--r-- | src/gui/text/qtextengine.cpp | 12 |
8 files changed, 24 insertions, 19 deletions
diff --git a/src/gui/doc/qtgui.qdocconf b/src/gui/doc/qtgui.qdocconf index e546c817a7..b8b8a00cd6 100644 --- a/src/gui/doc/qtgui.qdocconf +++ b/src/gui/doc/qtgui.qdocconf @@ -54,7 +54,10 @@ exampledirs += ../../../examples/gui \ imagedirs += images \ ../../../examples/gui/doc/images \ - ../../../doc/src/images \ + ../../../doc/src/images + +# Included in qttestlib.qdocconf instead +excludefiles += ../kernel/qtestsupport_gui.cpp manifestmeta.highlighted.names = "QtGui/Analog Clock Window Example" diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp index 5dff4ab0ac..7257853c3e 100644 --- a/src/gui/image/qbmphandler.cpp +++ b/src/gui/image/qbmphandler.cpp @@ -188,7 +188,7 @@ static bool read_dib_infoheader(QDataStream &s, BMP_INFOHDR &bi) if (!(comp == BMP_RGB || (nbits == 4 && comp == BMP_RLE4) || (nbits == 8 && comp == BMP_RLE8) || ((nbits == 16 || nbits == 32) && comp == BMP_BITFIELDS))) return false; // weird compression type - if (bi.biWidth < 0 || quint64(bi.biWidth) * qAbs(bi.biHeight) > 16384 * 16384) + if (bi.biWidth <= 0 || !bi.biHeight || quint64(bi.biWidth) * qAbs(bi.biHeight) > 16384 * 16384) return false; return true; diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 6801e2e1ea..9897c3aa6f 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -3543,7 +3543,7 @@ void QImage::rgbSwapped_inplace() The loader attempts to read the image using the specified \a format, e.g., PNG or JPG. If \a format is not specified (which is the default), it is auto-detected based on the file's suffix and header. For details, see - {QImageReader::setAutoDetectImageFormat()}{QImageReader}. + QImageReader::setAutoDetectImageFormat(). The file name can either refer to an actual file on disk or to one of the application's embedded resources. See the diff --git a/src/gui/kernel/qplatformwindow.h b/src/gui/kernel/qplatformwindow.h index 1590a10554..075ac0f82b 100644 --- a/src/gui/kernel/qplatformwindow.h +++ b/src/gui/kernel/qplatformwindow.h @@ -108,7 +108,7 @@ public: virtual bool isActive() const; virtual bool isAncestorOf(const QPlatformWindow *child) const; virtual bool isEmbedded() const; - virtual bool isForeignWindow() const { return window()->type() == Qt::ForeignWindow; }; + virtual bool isForeignWindow() const { return false; }; virtual QPoint mapToGlobal(const QPoint &pos) const; virtual QPoint mapFromGlobal(const QPoint &pos) const; diff --git a/src/gui/kernel/qtestsupport_gui.cpp b/src/gui/kernel/qtestsupport_gui.cpp index 56e0eb52b3..8a6f662274 100644 --- a/src/gui/kernel/qtestsupport_gui.cpp +++ b/src/gui/kernel/qtestsupport_gui.cpp @@ -44,23 +44,21 @@ QT_BEGIN_NAMESPACE -/*! \fn bool qWaitForWindowActive(QWindow *window, int timeout) - \relates QTest +/*! \since 5.0 Waits for \a timeout milliseconds or until the \a window is active. Returns \c true if \c window is active within \a timeout milliseconds, otherwise returns \c false. - \sa QTest::qWaitForWindowExposed(), QWindow::isActive() + \sa qWaitForWindowExposed(), QWindow::isActive() */ Q_GUI_EXPORT bool QTest::qWaitForWindowActive(QWindow *window, int timeout) { return QTest::qWaitFor([&]() { return window->isActive(); }, timeout); } -/*! \fn bool qWaitForWindowExposed(QWindow *window, int timeout) - \relates QTest +/*! \since 5.0 Waits for \a timeout milliseconds or until the \a window is exposed. @@ -73,7 +71,7 @@ Q_GUI_EXPORT bool QTest::qWaitForWindowActive(QWindow *window, int timeout) area is completely covered by other windows, or if the window is otherwise not visible. This function will then time out when waiting for such a window. - \sa QTest::qWaitForWindowActive(), QWindow::isExposed() + \sa qWaitForWindowActive(), QWindow::isExposed() */ Q_GUI_EXPORT bool QTest::qWaitForWindowExposed(QWindow *window, int timeout) { diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index e0da4d0ea7..f1e08826a8 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -919,8 +919,7 @@ void QWindow::setFlag(Qt::WindowType flag, bool on) */ Qt::WindowType QWindow::type() const { - Q_D(const QWindow); - return static_cast<Qt::WindowType>(int(d->windowFlags & Qt::WindowType_Mask)); + return static_cast<Qt::WindowType>(int(flags() & Qt::WindowType_Mask)); } /*! diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index e69726b617..ae3df6f9ec 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -1953,13 +1953,14 @@ void QPdfEnginePrivate::writePage() "/Contents %d 0 R\n" "/Resources %d 0 R\n" "/Annots %d 0 R\n" - "/MediaBox [0 0 %f %f]\n", + "/MediaBox [0 0 %s %s]\n", pageRoot, pageStream, resources, annots, // make sure we use the pagesize from when we started the page, since the user may have changed it - currentPage->pageSize.width() / userUnit, currentPage->pageSize.height() / userUnit); + QByteArray::number(currentPage->pageSize.width() / userUnit, 'f').constData(), + QByteArray::number(currentPage->pageSize.height() / userUnit, 'f').constData()); if (pdfVersion >= QPdfEngine::Version_1_6) - xprintf("/UserUnit %f\n", userUnit); + xprintf("/UserUnit %s\n", QByteArray::number(userUnit, 'f').constData()); xprintf(">>\n" "endobj\n"); diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index bdb5592e9e..506df0664d 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1972,14 +1972,18 @@ void QTextEngine::shape(int item) const } // fix log clusters to point to the previous glyph, as the object doesn't have a glyph of it's own. // This is required so that all entries in the array get initialized and are ordered correctly. - ushort *lc = logClusters(&li); - *lc = item ? lc[-1] : 0; + if (layoutData->logClustersPtr) { + ushort *lc = logClusters(&li); + *lc = (lc != layoutData->logClustersPtr) ? lc[-1] : 0; + } } else if (li.analysis.flags == QScriptAnalysis::Tab) { // set up at least the ascent/descent/leading of the script item for the tab fontEngine(li, &li.ascent, &li.descent, &li.leading); // see the comment above - ushort *lc = logClusters(&li); - *lc = item ? lc[-1] : 0; + if (layoutData->logClustersPtr) { + ushort *lc = logClusters(&li); + *lc = (lc != layoutData->logClustersPtr) ? lc[-1] : 0; + } } else { shapeText(item); } |