summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/corelib/threads/doc/src/mandelbrot.qdoc16
-rw-r--r--examples/vulkan/hellovulkancubes/renderer.cpp2
-rw-r--r--examples/vulkan/hellovulkantexture/hellovulkantexture.cpp2
-rw-r--r--examples/vulkan/shared/trianglerenderer.cpp4
-rw-r--r--examples/widgets/tools/treemodelcompleter/mainwindow.cpp2
-rw-r--r--src/3rdparty/pcre2/LICENCE-SLJIT22
-rw-r--r--src/3rdparty/pcre2/qt_attribution.json19
-rw-r--r--src/3rdparty/pixman/qt_attribution.json1
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_tools_qeasingcurve.cpp15
-rw-r--r--src/corelib/doc/snippets/qstring/main.cpp2
-rw-r--r--src/corelib/tools/qeasingcurve.cpp17
-rw-r--r--src/dbus/doc/src/qtdbus-module.qdoc2
-rw-r--r--src/gui/doc/src/qtgui.qdoc5
-rw-r--r--src/gui/image/qbmphandler.cpp2
-rw-r--r--src/gui/painting/qdrawhelper.cpp58
-rw-r--r--src/gui/vulkan/qvulkanwindow.cpp14
-rw-r--r--src/network/doc/src/qtnetwork.qdoc3
-rw-r--r--src/opengl/doc/src/qtopengl-index.qdoc2
-rw-r--r--src/opengl/doc/src/qtopengl-module.qdoc2
-rw-r--r--src/plugins/platforms/android/qandroidinputcontext.cpp16
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiautils.cpp22
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h2
-rw-r--r--src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp19
-rw-r--r--src/printsupport/doc/src/qtprintsupport-module.qdoc2
-rw-r--r--src/sql/doc/src/qtsql.qdoc2
-rw-r--r--src/testlib/doc/src/qttest-index.qdoc2
-rw-r--r--src/testlib/doc/src/qttest.qdoc2
-rw-r--r--src/testlib/doc/src/qttestlib-manual.qdoc2
-rw-r--r--src/widgets/doc/src/qtwidgets.qdoc2
-rw-r--r--src/xml/doc/src/qtxml-index.qdoc2
-rw-r--r--src/xml/doc/src/qtxml.qdoc2
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp18
32 files changed, 222 insertions, 61 deletions
diff --git a/examples/corelib/threads/doc/src/mandelbrot.qdoc b/examples/corelib/threads/doc/src/mandelbrot.qdoc
index dd0e4e5ef2..274874632e 100644
--- a/examples/corelib/threads/doc/src/mandelbrot.qdoc
+++ b/examples/corelib/threads/doc/src/mandelbrot.qdoc
@@ -39,7 +39,7 @@
The heavy computation here is the Mandelbrot set, probably the
world's most famous fractal. These days, while sophisticated
- programs such as \l{http://xaos.sourceforge.net/}{XaoS} that provide real-time zooming in the
+ programs such as \l{http://matek.hu/xaos/doku.php}{XaoS} that provide real-time zooming in the
Mandelbrot set, the standard Mandelbrot algorithm is just slow
enough for our purposes.
@@ -201,7 +201,7 @@
\snippet threads/mandelbrot/renderthread.cpp 9
Once we're done with all the iterations, we call
- QWaitCondition::wait() to put the thread to sleep by calling,
+ QWaitCondition::wait() to put the thread to sleep,
unless \c restart is \c true. There's no use in keeping a worker
thread looping indefinitely while there's nothing to do.
@@ -232,7 +232,7 @@
\snippet threads/mandelbrot/mandelbrotwidget.cpp 0
- The implementation starts with a few contants that we'll need
+ The implementation starts with a few constants that we'll need
later on.
\snippet threads/mandelbrot/mandelbrotwidget.cpp 1
@@ -256,15 +256,15 @@
slot later on. Qt knows how to take of copy of many C++ and Qt
types, but QImage isn't one of them. We must therefore call the
template function qRegisterMetaType() before we can use QImage
- as parameter in queued connections.
+ as a parameter in queued connections.
\snippet threads/mandelbrot/mandelbrotwidget.cpp 2
\snippet threads/mandelbrot/mandelbrotwidget.cpp 3
\snippet threads/mandelbrot/mandelbrotwidget.cpp 4
In \l{QWidget::paintEvent()}{paintEvent()}, we start by filling
- the background with black. If we have nothing yet to paint (\c
- pixmap is null), we print a message on the widget asking the user
+ the background with black. If we have nothing to paint yet (\c
+ pixmap is null), we display a message on the widget asking the user
to be patient and return from the function immediately.
\snippet threads/mandelbrot/mandelbrotwidget.cpp 5
@@ -293,7 +293,7 @@
Notice that we rely on \c resizeEvent() being automatically
called by Qt when the widget is shown the first time to generate
- the image the very first time.
+ the initial image.
\snippet threads/mandelbrot/mandelbrotwidget.cpp 11
@@ -307,7 +307,7 @@
control the zoom level. QWheelEvent::delta() returns the angle of
the wheel mouse movement, in eights of a degree. For most mice,
one wheel step corresponds to 15 degrees. We find out how many
- mouse steps we have and determine the zoom factor in consequence.
+ mouse steps we have and determine the resulting zoom factor.
For example, if we have two wheel steps in the positive direction
(i.e., +30 degrees), the zoom factor becomes \c ZoomInFactor
to the second power, i.e. 0.8 * 0.8 = 0.64.
diff --git a/examples/vulkan/hellovulkancubes/renderer.cpp b/examples/vulkan/hellovulkancubes/renderer.cpp
index 2e913bcae8..5ada79ce79 100644
--- a/examples/vulkan/hellovulkancubes/renderer.cpp
+++ b/examples/vulkan/hellovulkancubes/renderer.cpp
@@ -53,7 +53,7 @@
#include <QtConcurrentRun>
#include <QTime>
-static float quadVert[] = {
+static float quadVert[] = { // Y up, front = CW
-1, -1, 0,
-1, 1, 0,
1, -1, 0,
diff --git a/examples/vulkan/hellovulkantexture/hellovulkantexture.cpp b/examples/vulkan/hellovulkantexture/hellovulkantexture.cpp
index ffe1a31442..67ae0ca5dc 100644
--- a/examples/vulkan/hellovulkantexture/hellovulkantexture.cpp
+++ b/examples/vulkan/hellovulkantexture/hellovulkantexture.cpp
@@ -59,7 +59,7 @@
// Vulkan Y is negated in clip space and the near/far plane is at 0/1 instead
// of -1/1. These will be corrected for by an extra transformation when
// calculating the modelview-projection matrix.
-static float vertexData[] = {
+static float vertexData[] = { // Y up, front = CW
// x, y, z, u, v
-1, -1, 0, 0, 1,
-1, 1, 0, 0, 0,
diff --git a/examples/vulkan/shared/trianglerenderer.cpp b/examples/vulkan/shared/trianglerenderer.cpp
index 6ed7e65ff9..b48f564003 100644
--- a/examples/vulkan/shared/trianglerenderer.cpp
+++ b/examples/vulkan/shared/trianglerenderer.cpp
@@ -56,7 +56,7 @@
// Vulkan Y is negated in clip space and the near/far plane is at 0/1 instead
// of -1/1. These will be corrected for by an extra transformation when
// calculating the modelview-projection matrix.
-static float vertexData[] = {
+static float vertexData[] = { // Y up, front = CCW
0.0f, 0.5f, 1.0f, 0.0f, 0.0f,
-0.5f, -0.5f, 0.0f, 1.0f, 0.0f,
0.5f, -0.5f, 0.0f, 0.0f, 1.0f
@@ -337,7 +337,7 @@ void TriangleRenderer::initResources()
rs.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO;
rs.polygonMode = VK_POLYGON_MODE_FILL;
rs.cullMode = VK_CULL_MODE_NONE; // we want the back face as well
- rs.frontFace = VK_FRONT_FACE_CLOCKWISE;
+ rs.frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE;
rs.lineWidth = 1.0f;
pipelineInfo.pRasterizationState = &rs;
diff --git a/examples/widgets/tools/treemodelcompleter/mainwindow.cpp b/examples/widgets/tools/treemodelcompleter/mainwindow.cpp
index 4aabb04023..a8b51c7aa0 100644
--- a/examples/widgets/tools/treemodelcompleter/mainwindow.cpp
+++ b/examples/widgets/tools/treemodelcompleter/mainwindow.cpp
@@ -232,7 +232,7 @@ void MainWindow::highlight(const QModelIndex &index)
return;
QModelIndex sourceIndex = proxy->mapToSource(index);
treeView->selectionModel()->select(sourceIndex, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
- treeView->scrollTo(index);
+ treeView->scrollTo(sourceIndex);
}
//! [6]
diff --git a/src/3rdparty/pcre2/LICENCE-SLJIT b/src/3rdparty/pcre2/LICENCE-SLJIT
new file mode 100644
index 0000000000..74db958183
--- /dev/null
+++ b/src/3rdparty/pcre2/LICENCE-SLJIT
@@ -0,0 +1,22 @@
+ Copyright 2013-2013 Tilera Corporation(jiwang@tilera.com). All rights reserved.
+ Copyright Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are
+permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice, this list of
+ conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ of conditions and the following disclaimer in the documentation and/or other materials
+ provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/src/3rdparty/pcre2/qt_attribution.json b/src/3rdparty/pcre2/qt_attribution.json
index d09c1cc2c9..4b635cafee 100644
--- a/src/3rdparty/pcre2/qt_attribution.json
+++ b/src/3rdparty/pcre2/qt_attribution.json
@@ -1,3 +1,4 @@
+[
{
"Id": "pcre2",
"Name": "PCRE2",
@@ -15,4 +16,22 @@
Copyright (c) 2009-2018 Zoltan Herczeg
Copyright (c) 2007-2012 Google Inc.
Copyright (c) 2013-2013 Tilera Corporation (jiwang@tilera.com)"
+},
+{
+ "Id": "pcre2-sljit",
+ "Name": "PCRE2 - Stack-less Just-In-Time Compiler",
+ "QDocModule": "qtcore",
+ "QtUsage": "Optionally used in Qt Core (QRegularExpression). Configure with -system-pcre or -no-pcre to avoid.",
+
+ "Path": "src/sljit",
+ "Description": "The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5.",
+ "Homepage": "http://www.pcre.org/",
+ "Version": "10.31",
+ "DownloadLocation": "https://ftp.pcre.org/pub/pcre/pcre2-10.31.tar.bz2",
+ "License": "BSD 2-clause \"Simplified\" License",
+ "LicenseId": "BSD-2-Clause",
+ "LicenseFile": "LICENCE-SLJIT",
+ "Copyright": "Copyright (c) Zoltan Herczeg
+Copyright 2013-2013 Tilera Corporation(jiwang@tilera.com)"
}
+] \ No newline at end of file
diff --git a/src/3rdparty/pixman/qt_attribution.json b/src/3rdparty/pixman/qt_attribution.json
index 607bda754d..1268b2e22f 100644
--- a/src/3rdparty/pixman/qt_attribution.json
+++ b/src/3rdparty/pixman/qt_attribution.json
@@ -6,6 +6,7 @@
"Description": "pixman is a library that provides low-level pixel manipulation features such as image compositing and trapezoid rasterization.",
"Homepage": "http://www.pixman.org/",
+ "Version": "0.17.12",
"License": "MIT License",
"LicenseFile": "LICENSE",
"LicenseId": "MIT",
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qeasingcurve.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qeasingcurve.cpp
index 0485bd290a..97453e2b06 100644
--- a/src/corelib/doc/snippets/code/src_corelib_tools_qeasingcurve.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_tools_qeasingcurve.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -49,6 +49,17 @@
****************************************************************************/
//! [0]
-qreal myEasingFunction(qreal progress);
+ QEasingCurve easing(QEasingCurve::InOutQuad);
+
+ for (qreal t = 0.0; t < 1.0; t+=0.1)
+ qWarning() << "Effective progress" << t << " is
+ << easing.valueForProgress(t);
//! [0]
+//! [1]
+ QPropertyAnimation animation;
+ animation.setStartValue(0);
+ animation.setEndValue(1000);
+ animation.setDuration(1000);
+ animation.setEasingCurve(QEasingCurve::InOutQuad);
+//! [1]
diff --git a/src/corelib/doc/snippets/qstring/main.cpp b/src/corelib/doc/snippets/qstring/main.cpp
index b936f0c057..c8842eec00 100644
--- a/src/corelib/doc/snippets/qstring/main.cpp
+++ b/src/corelib/doc/snippets/qstring/main.cpp
@@ -291,7 +291,7 @@ void Widget::argFunction()
//! [97]
//! [98]
- str = "%1%2%3";
+ str = "%1%3%2";
str.arg("Hello", QString::number(20), QString::number(50)); // returns "Hello5020"
//! [98]
diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp
index e66db58ed7..235ca625c1 100644
--- a/src/corelib/tools/qeasingcurve.cpp
+++ b/src/corelib/tools/qeasingcurve.cpp
@@ -72,24 +72,15 @@
curve is a linear curve. This is the default behaviour.
For example,
- \code
- QEasingCurve easing(QEasingCurve::InOutQuad);
- for(qreal t = 0.0; t < 1.0; t+=0.1)
- qWarning() << "Effective progress" << t << " is
- << easing.valueForProgress(t);
- \endcode
+ \snippet code/src_corelib_tools_qeasingcurve.cpp 0
+
will print the effective progress of the interpolation between 0 and 1.
When using a QPropertyAnimation, the associated easing curve will be used to control the
progress of the interpolation between startValue and endValue:
- \code
- QPropertyAnimation animation;
- animation.setStartValue(0);
- animation.setEndValue(1000);
- animation.setDuration(1000);
- animation.setEasingCurve(QEasingCurve::InOutQuad);
- \endcode
+
+ \snippet code/src_corelib_tools_qeasingcurve.cpp 1
The ability to set an amplitude, overshoot, or period depends on
the QEasingCurve type. Amplitude access is available to curves
diff --git a/src/dbus/doc/src/qtdbus-module.qdoc b/src/dbus/doc/src/qtdbus-module.qdoc
index 965475ab8d..0ef5999b11 100644
--- a/src/dbus/doc/src/qtdbus-module.qdoc
+++ b/src/dbus/doc/src/qtdbus-module.qdoc
@@ -51,6 +51,7 @@
\snippet code/doc_src_qtdbus.cpp 0
+ \if !defined(qtforpython)
If you're using qmake to build your application, you can add this
line to your .pro file to make it link against the Qt D-Bus
libraries:
@@ -60,6 +61,7 @@
\note The source code for this module is located in the \c{src/qdbus}
directory. When installing Qt from source, this module is built when Qt's
tools are built.
+ \endif
See the \l {Qt D-Bus}{D-Bus} page for detailed information on
how to use this module.
diff --git a/src/gui/doc/src/qtgui.qdoc b/src/gui/doc/src/qtgui.qdoc
index a425c8a84d..53fd55bd39 100644
--- a/src/gui/doc/src/qtgui.qdoc
+++ b/src/gui/doc/src/qtgui.qdoc
@@ -46,11 +46,12 @@
\snippet code/doc_src_qtgui.pro 0
+ \if !defined(qtforpython)
If you use \l qmake to build your projects, \l{Qt GUI} is included by
default. To disable Qt GUI, add the following line to your \c .pro file:
\snippet code/doc_src_qtgui.pro 1
-
+ \endif
*/
/*!
@@ -75,10 +76,12 @@
\snippet code/doc_src_qtgui.pro 0
+ \if !defined(qtforpython)
If you use \l qmake to build your projects, Qt GUI is included by
default. To disable Qt GUI, add the following line to your \c .pro file:
\snippet code/doc_src_qtgui.pro 1
+ \endif
\section1 Application Windows
diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp
index 587f375ce7..5dff4ab0ac 100644
--- a/src/gui/image/qbmphandler.cpp
+++ b/src/gui/image/qbmphandler.cpp
@@ -188,6 +188,8 @@ 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)
+ return false;
return true;
}
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 9bb1498ff0..b277278fe0 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -5801,6 +5801,46 @@ static inline int qRgbAvg(QRgb rgb)
return (qRed(rgb) * 5 + qGreen(rgb) * 6 + qBlue(rgb) * 5) / 16;
}
+static inline QRgb rgbBlend(QRgb d, QRgb s, uint rgbAlpha)
+{
+#if defined(__SSE2__)
+ __m128i vd = _mm_cvtsi32_si128(d);
+ __m128i vs = _mm_cvtsi32_si128(s);
+ __m128i va = _mm_cvtsi32_si128(rgbAlpha);
+ const __m128i vz = _mm_setzero_si128();
+ vd = _mm_unpacklo_epi8(vd, vz);
+ vs = _mm_unpacklo_epi8(vs, vz);
+ va = _mm_unpacklo_epi8(va, vz);
+ __m128i vb = _mm_xor_si128(_mm_set1_epi16(255), va);
+ vs = _mm_mullo_epi16(vs, va);
+ vd = _mm_mullo_epi16(vd, vb);
+ vd = _mm_add_epi16(vd, vs);
+ vd = _mm_add_epi16(vd, _mm_srli_epi16(vd, 8));
+ vd = _mm_add_epi16(vd, _mm_set1_epi16(0x80));
+ vd = _mm_srli_epi16(vd, 8);
+ vd = _mm_packus_epi16(vd, vd);
+ return _mm_cvtsi128_si32(vd);
+#else
+ const int dr = qRed(d);
+ const int dg = qGreen(d);
+ const int db = qBlue(d);
+
+ const int sr = qRed(s);
+ const int sg = qGreen(s);
+ const int sb = qBlue(s);
+
+ const int mr = qRed(rgbAlpha);
+ const int mg = qGreen(rgbAlpha);
+ const int mb = qBlue(rgbAlpha);
+
+ const int nr = qt_div_255(sr * mr + dr * (255 - mr));
+ const int ng = qt_div_255(sg * mg + dg * (255 - mg));
+ const int nb = qt_div_255(sb * mb + db * (255 - mb));
+
+ return 0xff000000 | (nr << 16) | (ng << 8) | nb;
+#endif
+}
+
static inline void alphargbblend_generic(uint coverage, QRgba64 *dest, int x, const QRgba64 &srcLinear, const QRgba64 &src, const QColorProfile *colorProfile)
{
if (coverage == 0xff000000) {
@@ -5823,20 +5863,20 @@ static inline void alphargbblend_generic(uint coverage, QRgba64 *dest, int x, co
}
}
-static inline void alphargbblend_argb32(quint32 *dst, uint coverage, QRgba64 srcLinear, quint32 src, const QColorProfile *colorProfile)
+static inline void alphargbblend_argb32(quint32 *dst, uint coverage, const QRgba64 &srcLinear, quint32 src, const QColorProfile *colorProfile)
{
if (coverage == 0xff000000) {
// nothing
} else if (coverage == 0xffffffff) {
*dst = src;
- } else {
- if (*dst >= 0xff000000) {
- rgbBlendPixel(dst, coverage, srcLinear, colorProfile);
- } else {
- // Give up and do a naive gray alphablend. Needed to deal with ARGB32 and invalid ARGB32_premultiplied, see QTBUG-60571
- const int a = qRgbAvg(coverage);
- *dst = INTERPOLATE_PIXEL_255(src, a, *dst, 255 - a);
- }
+ } else if (*dst < 0xff000000) {
+ // Give up and do a naive gray alphablend. Needed to deal with ARGB32 and invalid ARGB32_premultiplied, see QTBUG-60571
+ const int a = qRgbAvg(coverage);
+ *dst = INTERPOLATE_PIXEL_255(src, a, *dst, 255 - a);
+ } else if (!colorProfile) {
+ *dst = rgbBlend(*dst, src, coverage);
+ } else {
+ rgbBlendPixel(dst, coverage, srcLinear, colorProfile);
}
}
diff --git a/src/gui/vulkan/qvulkanwindow.cpp b/src/gui/vulkan/qvulkanwindow.cpp
index 7dea743ea8..e45a16170e 100644
--- a/src/gui/vulkan/qvulkanwindow.cpp
+++ b/src/gui/vulkan/qvulkanwindow.cpp
@@ -2694,15 +2694,11 @@ QImage QVulkanWindow::grab()
system differences between OpenGL and Vulkan.
By pre-multiplying the projection matrix with this matrix, applications can
- continue to assume OpenGL-style Y coordinates in clip space (i.e. Y pointing
- upwards), and can set minDepth and maxDepth to 0 and 1, respectively,
- without any further corrections to the vertex Z positions, while using the
- projection matrices retrieved from the QMatrix4x4 functions, such as
- QMatrix4x4::perspective(), as-is.
-
- \note With vertex data following the default OpenGL rules (that is, the
- front face being CCW), the correct winding order in the rasterization state
- after applying this matrix is clockwise (\c{VK_FRONT_FACE_CLOCKWISE}).
+ continue to assume that Y is pointing upwards, and can set minDepth and
+ maxDepth in the viewport to 0 and 1, respectively, without having to do any
+ further corrections to the vertex Z positions. Geometry from OpenGL
+ applications can then be used as-is, assuming a rasterization state matching
+ the OpenGL culling and front face settings.
*/
QMatrix4x4 QVulkanWindow::clipCorrectionMatrix()
{
diff --git a/src/network/doc/src/qtnetwork.qdoc b/src/network/doc/src/qtnetwork.qdoc
index 517e0a72cb..c931a1c19f 100644
--- a/src/network/doc/src/qtnetwork.qdoc
+++ b/src/network/doc/src/qtnetwork.qdoc
@@ -40,10 +40,13 @@
\code
#include <QtNetwork>
\endcode
+
+ \if !defined(qtforpython)
To link against the Qt Network module, add this line to the project file:
\code
QT += network
\endcode
+ \endif
\section1 Articles and Guides
diff --git a/src/opengl/doc/src/qtopengl-index.qdoc b/src/opengl/doc/src/qtopengl-index.qdoc
index 30b657f6db..4694f68a93 100644
--- a/src/opengl/doc/src/qtopengl-index.qdoc
+++ b/src/opengl/doc/src/qtopengl-index.qdoc
@@ -51,10 +51,12 @@
\snippet code/doc_src_qtopengl.cpp 0
+ \if !defined(qtforpython)
To link against the module, add this line to your \l qmake \c
.pro file:
\snippet code/doc_src_qtopengl.pro 1
+ \endif
The Qt OpenGL module is implemented as a platform-independent Qt/C++
wrapper around the platform-dependent GLX (version 1.3 or later),
diff --git a/src/opengl/doc/src/qtopengl-module.qdoc b/src/opengl/doc/src/qtopengl-module.qdoc
index e9b1258266..336d37c73f 100644
--- a/src/opengl/doc/src/qtopengl-module.qdoc
+++ b/src/opengl/doc/src/qtopengl-module.qdoc
@@ -57,10 +57,12 @@
\snippet code/doc_src_qtopengl.cpp 0
+ \if !defined(qtforpython)
To link against the module, add this line to your \l qmake \c
.pro file:
\snippet code/doc_src_qtopengl.pro 1
+ \endif
The Qt OpenGL module is implemented as a platform-independent Qt/C++
wrapper around the platform-dependent GLX (version 1.3 or later),
diff --git a/src/plugins/platforms/android/qandroidinputcontext.cpp b/src/plugins/platforms/android/qandroidinputcontext.cpp
index f548a1fa96..c46a435db1 100644
--- a/src/plugins/platforms/android/qandroidinputcontext.cpp
+++ b/src/plugins/platforms/android/qandroidinputcontext.cpp
@@ -58,6 +58,7 @@
#include <private/qhighdpiscaling_p.h>
#include <QTextCharFormat>
+#include <QTextBoundaryFinder>
#include <QDebug>
@@ -892,8 +893,19 @@ jint QAndroidInputContext::getCursorCapsMode(jint /*reqModes*/)
return res;
const uint qtInputMethodHints = query->value(Qt::ImHints).toUInt();
-
- if (!(qtInputMethodHints & Qt::ImhLowercaseOnly) && !(qtInputMethodHints & Qt::ImhNoAutoUppercase))
+ const int localPos = query->value(Qt::ImCursorPosition).toInt();
+
+ bool atWordBoundary = (localPos == 0);
+ if (!atWordBoundary) {
+ QString surroundingText = query->value(Qt::ImSurroundingText).toString();
+ surroundingText.truncate(localPos);
+ // Add a character to see if it is at the end of the sentence or not
+ QTextBoundaryFinder finder(QTextBoundaryFinder::Sentence, surroundingText + QLatin1Char('A'));
+ finder.setPosition(localPos);
+ if (finder.isAtBoundary())
+ atWordBoundary = finder.isAtBoundary();
+ }
+ if (atWordBoundary && !(qtInputMethodHints & Qt::ImhLowercaseOnly) && !(qtInputMethodHints & Qt::ImhNoAutoUppercase))
res |= CAP_MODE_SENTENCES;
if (qtInputMethodHints & Qt::ImhUppercaseOnly)
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiautils.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiautils.cpp
index 294eed7701..89e5aad6a6 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiautils.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiautils.cpp
@@ -57,11 +57,25 @@ QWindow *windowForAccessible(const QAccessibleInterface *accessible)
{
QWindow *window = accessible->window();
if (!window) {
- QAccessibleInterface *acc = accessible->parent();
- while (acc && acc->isValid() && !window) {
- window = acc->window();
- QAccessibleInterface *par = acc->parent();
+ const QAccessibleInterface *acc = accessible;
+ const QAccessibleInterface *par = accessible->parent();
+ while (par && par->isValid() && !window) {
+ window = par->window();
acc = par;
+ par = par->parent();
+ }
+ if (!window) {
+ // Workaround for WebEngineView not knowing its parent.
+ const auto appWindows = QGuiApplication::topLevelWindows();
+ for (QWindow *w : appWindows) {
+ if (QAccessibleInterface *root = w->accessibleRoot()) {
+ int count = root->childCount();
+ for (int i = 0; i < count; ++i) {
+ if (root->child(i) == acc)
+ return w;
+ }
+ }
+ }
}
}
return window;
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index 9966e06c7b..c9dde35558 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -412,6 +412,8 @@ public:
bool imageNeedsEndianSwap() const
{
+ if (!hasShm())
+ return false; // The non-Shm path does its own swapping
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
return m_setup->image_byte_order != XCB_IMAGE_ORDER_MSB_FIRST;
#else
diff --git a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
index 2a770d0245..491d903137 100644
--- a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
+++ b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
@@ -109,7 +109,7 @@ static QVariant::Type qGetColumnType(const QString &tpName)
}
static QSqlError qMakeError(sqlite3 *access, const QString &descr, QSqlError::ErrorType type,
- int errorCode = -1)
+ int errorCode)
{
return QSqlError(descr,
QString(reinterpret_cast<const QChar *>(sqlite3_errmsg16(access))),
@@ -803,7 +803,9 @@ bool QSQLiteDriver::open(const QString & db, const QString &, const QString &, c
openMode |= SQLITE_OPEN_NOMUTEX;
- if (sqlite3_open_v2(db.toUtf8().constData(), &d->access, openMode, NULL) == SQLITE_OK) {
+ const int res = sqlite3_open_v2(db.toUtf8().constData(), &d->access, openMode, NULL);
+
+ if (res == SQLITE_OK) {
sqlite3_busy_timeout(d->access, timeOut);
setOpen(true);
setOpenError(false);
@@ -816,14 +818,15 @@ bool QSQLiteDriver::open(const QString & db, const QString &, const QString &, c
#endif
return true;
} else {
+ setLastError(qMakeError(d->access, tr("Error opening database"),
+ QSqlError::ConnectionError, res));
+ setOpenError(true);
+
if (d->access) {
sqlite3_close(d->access);
d->access = 0;
}
- setLastError(qMakeError(d->access, tr("Error opening database"),
- QSqlError::ConnectionError));
- setOpenError(true);
return false;
}
}
@@ -840,8 +843,10 @@ void QSQLiteDriver::close()
sqlite3_update_hook(d->access, NULL, NULL);
}
- if (sqlite3_close(d->access) != SQLITE_OK)
- setLastError(qMakeError(d->access, tr("Error closing database"), QSqlError::ConnectionError));
+ const int res = sqlite3_close(d->access);
+
+ if (res != SQLITE_OK)
+ setLastError(qMakeError(d->access, tr("Error closing database"), QSqlError::ConnectionError, res));
d->access = 0;
setOpen(false);
setOpenError(false);
diff --git a/src/printsupport/doc/src/qtprintsupport-module.qdoc b/src/printsupport/doc/src/qtprintsupport-module.qdoc
index 686d16f38a..0e851e593c 100644
--- a/src/printsupport/doc/src/qtprintsupport-module.qdoc
+++ b/src/printsupport/doc/src/qtprintsupport-module.qdoc
@@ -38,8 +38,10 @@
\snippet code/doc_src_qtprintsupport.cpp 1
+ \if !defined(qtforpython)
To link against the module, add this line to your \l qmake \c
.pro file:
\snippet code/doc_src_qtprintsupport.pro 0
+ \endif
*/
diff --git a/src/sql/doc/src/qtsql.qdoc b/src/sql/doc/src/qtsql.qdoc
index f0d74739b0..39c0e44187 100644
--- a/src/sql/doc/src/qtsql.qdoc
+++ b/src/sql/doc/src/qtsql.qdoc
@@ -87,10 +87,12 @@
\snippet code/doc_src_qtsql.cpp 0
+ \if !defined(qtforpython)
To link against the module, add this line to your \l qmake \c
.pro file:
\snippet code/doc_src_qtsql.pro 1
+ \endif
See the \l{SQL Programming} guide for information about using this
module in your applications.
diff --git a/src/testlib/doc/src/qttest-index.qdoc b/src/testlib/doc/src/qttest-index.qdoc
index b3c2be7375..8c817b3653 100644
--- a/src/testlib/doc/src/qttest-index.qdoc
+++ b/src/testlib/doc/src/qttest-index.qdoc
@@ -41,9 +41,11 @@
\snippet code/doc_src_qttest.cpp 0
+ \if !define(qtforpython)
To link against Qt Test, add this line to the project file:
\snippet code/doc_src_qttest.pro 1
+ \endif
\section1 Articles and Guides
diff --git a/src/testlib/doc/src/qttest.qdoc b/src/testlib/doc/src/qttest.qdoc
index 696111f2f3..e61fd71e69 100644
--- a/src/testlib/doc/src/qttest.qdoc
+++ b/src/testlib/doc/src/qttest.qdoc
@@ -42,10 +42,12 @@
\snippet code/doc_src_qttest.cpp 0
+ \if !defined(qtforpython)
To link against the module, add this line to your \l qmake \c
.pro file:
\snippet code/doc_src_qttest.pro 1
+ \endif
See \l{Qt Test Overview} for an introduction on how to use
Qt's unit testing features with your applications.
diff --git a/src/testlib/doc/src/qttestlib-manual.qdoc b/src/testlib/doc/src/qttestlib-manual.qdoc
index 9bd210d71f..363ec17c6c 100644
--- a/src/testlib/doc/src/qttestlib-manual.qdoc
+++ b/src/testlib/doc/src/qttestlib-manual.qdoc
@@ -109,6 +109,7 @@
For more examples, refer to the \l{Qt Test Tutorial}.
+ \if !defined(qtforpython)
\section1 Building a Test
If you are using \c qmake as your build tool, just add the
@@ -132,6 +133,7 @@
See \l {Chapter 1: Writing a Unit Test}{Writing a Unit Test} for a step by
step explanation.
+ \endif
\section1 Qt Test Command Line Arguments
diff --git a/src/widgets/doc/src/qtwidgets.qdoc b/src/widgets/doc/src/qtwidgets.qdoc
index e0a5b094cd..72ba22681c 100644
--- a/src/widgets/doc/src/qtwidgets.qdoc
+++ b/src/widgets/doc/src/qtwidgets.qdoc
@@ -38,9 +38,11 @@
\snippet code/doc_src_qtwidgets.cpp 1
+ \if !defined(qtforpython)
To link against the module, add this line to your \l qmake \c
.pro file:
\snippet code/doc_src_qtwidgets.pro 0
+ \endif
*/
diff --git a/src/xml/doc/src/qtxml-index.qdoc b/src/xml/doc/src/qtxml-index.qdoc
index 91f2515d60..dfb9b45fa7 100644
--- a/src/xml/doc/src/qtxml-index.qdoc
+++ b/src/xml/doc/src/qtxml-index.qdoc
@@ -38,10 +38,12 @@
\snippet code/doc_src_qtxml.cpp 0
+ \if !defined(qtforpython)
To link against the module, add this line to your \l qmake \c
.pro file:
\snippet code/doc_src_qtxml.pro 1
+ \endif
The \l{Qt XML C++ Classes} page gives an overview over the available classes
in this module.
diff --git a/src/xml/doc/src/qtxml.qdoc b/src/xml/doc/src/qtxml.qdoc
index dbad66a507..ad9b08b623 100644
--- a/src/xml/doc/src/qtxml.qdoc
+++ b/src/xml/doc/src/qtxml.qdoc
@@ -41,8 +41,10 @@
\snippet code/doc_src_qtxml.cpp 0
+ \if !defined(qtforpython)
To link against the module, add this line to your \l qmake \c
.pro file:
\snippet code/doc_src_qtxml.pro 1
+ \endif
*/
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
index 1f055e9c33..8cf43e243b 100644
--- a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
+++ b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
@@ -197,6 +197,8 @@ private slots:
void sqlite_enableRegexp_data() { generic_data("QSQLITE"); }
void sqlite_enableRegexp();
+ void sqlite_openError();
+
private:
void createTestTables(QSqlDatabase db);
void dropTestTables(QSqlDatabase db);
@@ -2332,6 +2334,22 @@ void tst_QSqlDatabase::sqlite_enableRegexp()
QFAIL_SQL(q, next());
}
+void tst_QSqlDatabase::sqlite_openError()
+{
+ // see QTBUG-70506
+ if (!QSqlDatabase::drivers().contains("QSQLITE"))
+ QSKIP("Database driver QSQLITE not available");
+
+ QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE", "sqlite_openError");
+ db.setDatabaseName("/doesnotexist/foo.sqlite");
+ QVERIFY(db.isValid());
+
+ QVERIFY(!db.open());
+ QSqlError error = db.lastError();
+ QCOMPARE(error.nativeErrorCode(), "14"); // SQLITE_CANTOPEN
+ QCOMPARE(error.databaseText(), "unable to open database file");
+}
+
void tst_QSqlDatabase::cloneDatabase()
{
QFETCH(QString, dbName);