summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-04-07 10:18:50 +0200
committerLiang Qi <liang.qi@qt.io>2017-04-07 10:24:33 +0200
commit5d6073be27cb951b692bbcc4dc0dd54cc09c9fd4 (patch)
treec87c236cd1b9c15eb5f40df3d86915687ab6c59a /src/gui
parent97d7d80e7355019bb23bb03c2a82908e4436deb0 (diff)
parentbbb67ca32cebad312f02e916dff54e591b92af24 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: mkspecs/linux-icc/qmake.conf mkspecs/macx-icc/qmake.conf mkspecs/win32-icc/qmake.conf src/gui/painting/qgrayraster.c Change-Id: Ib08c45ea3215be05f986ecb3e1f4b37d209aa775
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui.pro8
-rw-r--r--src/gui/image/qbmphandler.cpp6
-rw-r--r--src/gui/image/qbmphandler_p.h2
-rw-r--r--src/gui/image/qimagereader.cpp3
-rw-r--r--src/gui/kernel/qguiapplication.cpp2
-rw-r--r--src/gui/kernel/qopenglcontext.cpp34
-rw-r--r--src/gui/kernel/qplatforminputcontextfactory.cpp2
-rw-r--r--src/gui/kernel/qrasterwindow.cpp8
-rw-r--r--src/gui/kernel/qrasterwindow.h1
-rw-r--r--src/gui/painting/qblendfunctions_p.h12
-rw-r--r--src/gui/painting/qdrawhelper_p.h42
-rw-r--r--src/gui/painting/qgrayraster.c16
-rw-r--r--src/gui/painting/qpdf.cpp2
-rw-r--r--src/gui/painting/qtransform.cpp6
-rw-r--r--src/gui/text/qplatformfontdatabase.cpp10
-rw-r--r--src/gui/text/qplatformfontdatabase.h1
-rw-r--r--src/gui/text/qtextdocumentfragment.cpp4
-rw-r--r--src/gui/text/qtextengine.cpp7
18 files changed, 108 insertions, 58 deletions
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index 0682fd2274..02983123b1 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -58,13 +58,13 @@ win32: CMAKE_WINDOWS_BUILD = True
qtConfig(angle) {
CMAKE_GL_INCDIRS = $$CMAKE_INCLUDE_DIR
CMAKE_ANGLE_EGL_DLL_RELEASE = libEGL.dll
- CMAKE_ANGLE_EGL_IMPLIB_RELEASE = libEGL.lib
+ CMAKE_ANGLE_EGL_IMPLIB_RELEASE = libEGL.$${QMAKE_EXTENSION_STATICLIB}
CMAKE_ANGLE_GLES2_DLL_RELEASE = libGLESv2.dll
- CMAKE_ANGLE_GLES2_IMPLIB_RELEASE = libGLESv2.lib
+ CMAKE_ANGLE_GLES2_IMPLIB_RELEASE = libGLESv2.$${QMAKE_EXTENSION_STATICLIB}
CMAKE_ANGLE_EGL_DLL_DEBUG = libEGLd.dll
- CMAKE_ANGLE_EGL_IMPLIB_DEBUG = libEGLd.lib
+ CMAKE_ANGLE_EGL_IMPLIB_DEBUG = libEGLd.$${QMAKE_EXTENSION_STATICLIB}
CMAKE_ANGLE_GLES2_DLL_DEBUG = libGLESv2d.dll
- CMAKE_ANGLE_GLES2_IMPLIB_DEBUG = libGLESv2d.lib
+ CMAKE_ANGLE_GLES2_IMPLIB_DEBUG = libGLESv2d.$${QMAKE_EXTENSION_STATICLIB}
CMAKE_QT_OPENGL_IMPLEMENTATION = GLESv2
} else {
diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp
index 9545abfd21..324fe01414 100644
--- a/src/gui/image/qbmphandler.cpp
+++ b/src/gui/image/qbmphandler.cpp
@@ -183,14 +183,14 @@ static bool read_dib_infoheader(QDataStream &s, BMP_INFOHDR &bi)
return true;
}
-static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int startpos, QImage &image)
+static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, qint64 offset, qint64 startpos, QImage &image)
{
QIODevice* d = s.device();
if (d->atEnd()) // end of stream/file
return false;
#if 0
- qDebug("offset...........%d", offset);
- qDebug("startpos.........%d", startpos);
+ qDebug("offset...........%lld", offset);
+ qDebug("startpos.........%lld", startpos);
qDebug("biSize...........%d", bi.biSize);
qDebug("biWidth..........%d", bi.biWidth);
qDebug("biHeight.........%d", bi.biHeight);
diff --git a/src/gui/image/qbmphandler_p.h b/src/gui/image/qbmphandler_p.h
index 7d3cbab322..3e1fc3d511 100644
--- a/src/gui/image/qbmphandler_p.h
+++ b/src/gui/image/qbmphandler_p.h
@@ -121,7 +121,7 @@ private:
State state;
BMP_FILEHDR fileHeader;
BMP_INFOHDR infoHeader;
- int startpos;
+ qint64 startpos;
};
QT_END_NAMESPACE
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 55c3a4704a..cd7c95b166 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -471,7 +471,8 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
--numFormats;
++currentFormat;
- currentFormat %= _qt_NumFormats;
+ if (currentFormat >= _qt_NumFormats)
+ currentFormat = 0;
}
}
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index b665750181..a3b2c4c1e4 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -2008,6 +2008,8 @@ void QGuiApplicationPrivate::processWheelEvent(QWindowSystemInterfacePrivate::Wh
buttons, e->modifiers, e->phase, e->source, e->inverted);
ev.setTimestamp(e->timestamp);
QGuiApplication::sendSpontaneousEvent(window, &ev);
+#else
+ Q_UNUSED(e);
#endif /* ifndef QT_NO_WHEELEVENT */
}
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 8aea593bf0..3dc06ae60e 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -982,6 +982,40 @@ bool QOpenGLContext::makeCurrent(QSurface *surface)
QOpenGLContext *previous = QOpenGLContextPrivate::setCurrentContext(this);
if (d->platformGLContext->makeCurrent(surface->surfaceHandle())) {
+ static bool needsWorkaroundSet = false;
+ static bool needsWorkaround = false;
+
+ if (!needsWorkaroundSet) {
+ QByteArray env;
+#ifdef Q_OS_ANDROID
+ env = qgetenv(QByteArrayLiteral("QT_ANDROID_DISABLE_GLYPH_CACHE_WORKAROUND"));
+ needsWorkaround = env.isEmpty() || env == QByteArrayLiteral("0") || env == QByteArrayLiteral("false");
+#endif
+ env = qgetenv(QByteArrayLiteral("QT_ENABLE_GLYPH_CACHE_WORKAROUND"));
+ if (env == QByteArrayLiteral("1") || env == QByteArrayLiteral("true"))
+ needsWorkaround = true;
+
+ if (!needsWorkaround) {
+ const char *rendererString = reinterpret_cast<const char *>(functions()->glGetString(GL_RENDERER));
+ if (rendererString)
+ needsWorkaround =
+ qstrncmp(rendererString, "Mali-4xx", 6) == 0 // Mali-400, Mali-450
+ || qstrncmp(rendererString, "Adreno (TM) 2xx", 13) == 0 // Adreno 200, 203, 205
+ || qstrncmp(rendererString, "Adreno 2xx", 8) == 0 // Same as above but without the '(TM)'
+ || qstrncmp(rendererString, "Adreno (TM) 30x", 14) == 0 // Adreno 302, 305
+ || qstrncmp(rendererString, "Adreno 30x", 9) == 0 // Same as above but without the '(TM)'
+ || qstrncmp(rendererString, "Adreno (TM) 4xx", 13) == 0 // Adreno 405, 418, 420, 430
+ || qstrncmp(rendererString, "Adreno 4xx", 8) == 0 // Same as above but without the '(TM)'
+ || qstrcmp(rendererString, "GC800 core") == 0
+ || qstrcmp(rendererString, "GC1000 core") == 0
+ || qstrcmp(rendererString, "Immersion.16") == 0;
+ }
+ needsWorkaroundSet = true;
+ }
+
+ if (needsWorkaround)
+ d->workaround_brokenFBOReadBack = true;
+
d->surface = surface;
d->shareGroup->d_func()->deletePendingResources(this);
diff --git a/src/gui/kernel/qplatforminputcontextfactory.cpp b/src/gui/kernel/qplatforminputcontextfactory.cpp
index 5f4f8d88fa..c59d89fabe 100644
--- a/src/gui/kernel/qplatforminputcontextfactory.cpp
+++ b/src/gui/kernel/qplatforminputcontextfactory.cpp
@@ -82,6 +82,8 @@ QPlatformInputContext *QPlatformInputContextFactory::create(const QString& key)
delete ic;
}
+#else
+ Q_UNUSED(key);
#endif
return 0;
}
diff --git a/src/gui/kernel/qrasterwindow.cpp b/src/gui/kernel/qrasterwindow.cpp
index d8d448249e..73871e0f39 100644
--- a/src/gui/kernel/qrasterwindow.cpp
+++ b/src/gui/kernel/qrasterwindow.cpp
@@ -105,6 +105,14 @@ QRasterWindow::QRasterWindow(QWindow *parent)
d_func()->backingstore.reset(new QBackingStore(this));
}
+QRasterWindow::~QRasterWindow()
+{
+ Q_D(QRasterWindow);
+ // Delete backingstore while window is still alive, as it
+ // might need to reference the window in the process
+ d->backingstore.reset(nullptr);
+}
+
/*!
\internal
*/
diff --git a/src/gui/kernel/qrasterwindow.h b/src/gui/kernel/qrasterwindow.h
index 76312bcda2..9b29183ad6 100644
--- a/src/gui/kernel/qrasterwindow.h
+++ b/src/gui/kernel/qrasterwindow.h
@@ -54,6 +54,7 @@ class Q_GUI_EXPORT QRasterWindow : public QPaintDeviceWindow
public:
explicit QRasterWindow(QWindow *parent = Q_NULLPTR);
+ ~QRasterWindow();
protected:
int metric(PaintDeviceMetric metric) const Q_DECL_OVERRIDE;
diff --git a/src/gui/painting/qblendfunctions_p.h b/src/gui/painting/qblendfunctions_p.h
index 7ee04987fe..167f725143 100644
--- a/src/gui/painting/qblendfunctions_p.h
+++ b/src/gui/painting/qblendfunctions_p.h
@@ -375,12 +375,12 @@ void qt_transform_image_rasterize(DestT *destPixels, int dbpl,
--ii;
}
switch (i & 7) {
- case 7: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line;
- case 6: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line;
- case 5: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line;
- case 4: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line;
- case 3: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line;
- case 2: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line;
+ case 7: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line; Q_FALLTHROUGH();
+ case 6: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line; Q_FALLTHROUGH();
+ case 5: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line; Q_FALLTHROUGH();
+ case 4: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line; Q_FALLTHROUGH();
+ case 3: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line; Q_FALLTHROUGH();
+ case 2: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line; Q_FALLTHROUGH();
case 1: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line;
}
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index cf2213042d..1f97621171 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -833,13 +833,13 @@ inline void qt_memfill(T *dest, T value, int count)
int n = (count + 7) / 8;
switch (count & 0x07)
{
- case 0: do { *dest++ = value;
- case 7: *dest++ = value;
- case 6: *dest++ = value;
- case 5: *dest++ = value;
- case 4: *dest++ = value;
- case 3: *dest++ = value;
- case 2: *dest++ = value;
+ case 0: do { *dest++ = value; Q_FALLTHROUGH();
+ case 7: *dest++ = value; Q_FALLTHROUGH();
+ case 6: *dest++ = value; Q_FALLTHROUGH();
+ case 5: *dest++ = value; Q_FALLTHROUGH();
+ case 4: *dest++ = value; Q_FALLTHROUGH();
+ case 3: *dest++ = value; Q_FALLTHROUGH();
+ case 2: *dest++ = value; Q_FALLTHROUGH();
case 1: *dest++ = value;
} while (--n > 0);
}
@@ -875,13 +875,13 @@ do { \
int n = ((length) + 7) / 8; \
switch ((length) & 0x07) \
{ \
- case 0: do { *--_d = *--_s; \
- case 7: *--_d = *--_s; \
- case 6: *--_d = *--_s; \
- case 5: *--_d = *--_s; \
- case 4: *--_d = *--_s; \
- case 3: *--_d = *--_s; \
- case 2: *--_d = *--_s; \
+ case 0: do { *--_d = *--_s; Q_FALLTHROUGH(); \
+ case 7: *--_d = *--_s; Q_FALLTHROUGH(); \
+ case 6: *--_d = *--_s; Q_FALLTHROUGH(); \
+ case 5: *--_d = *--_s; Q_FALLTHROUGH(); \
+ case 4: *--_d = *--_s; Q_FALLTHROUGH(); \
+ case 3: *--_d = *--_s; Q_FALLTHROUGH(); \
+ case 2: *--_d = *--_s; Q_FALLTHROUGH(); \
case 1: *--_d = *--_s; \
} while (--n > 0); \
} \
@@ -895,13 +895,13 @@ do { \
int n = ((length) + 7) / 8; \
switch ((length) & 0x07) \
{ \
- case 0: do { *_d++ = *_s++; \
- case 7: *_d++ = *_s++; \
- case 6: *_d++ = *_s++; \
- case 5: *_d++ = *_s++; \
- case 4: *_d++ = *_s++; \
- case 3: *_d++ = *_s++; \
- case 2: *_d++ = *_s++; \
+ case 0: do { *_d++ = *_s++; Q_FALLTHROUGH(); \
+ case 7: *_d++ = *_s++; Q_FALLTHROUGH(); \
+ case 6: *_d++ = *_s++; Q_FALLTHROUGH(); \
+ case 5: *_d++ = *_s++; Q_FALLTHROUGH(); \
+ case 4: *_d++ = *_s++; Q_FALLTHROUGH(); \
+ case 3: *_d++ = *_s++; Q_FALLTHROUGH(); \
+ case 2: *_d++ = *_s++; Q_FALLTHROUGH(); \
case 1: *_d++ = *_s++; \
} while (--n > 0); \
} \
diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c
index 49e53973b0..7b35cd6143 100644
--- a/src/gui/painting/qgrayraster.c
+++ b/src/gui/painting/qgrayraster.c
@@ -183,6 +183,8 @@ typedef ptrdiff_t QT_FT_PtrDist;
#include <private/qrasterdefs_p.h>
#include <private/qgrayraster_p.h>
+#include <qcompilerdetection.h>
+
#include <stdlib.h>
#include <stdio.h>
@@ -1201,13 +1203,13 @@ QT_FT_END_STMNT
*/
switch ( spans->len )
{
- case 7: *q++ = coverage;
- case 6: *q++ = coverage;
- case 5: *q++ = coverage;
- case 4: *q++ = coverage;
- case 3: *q++ = coverage;
- case 2: *q++ = coverage;
- case 1: *q = coverage;
+ case 7: *q++ = coverage; Q_FALLTHROUGH();
+ case 6: *q++ = coverage; Q_FALLTHROUGH();
+ case 5: *q++ = coverage; Q_FALLTHROUGH();
+ case 4: *q++ = coverage; Q_FALLTHROUGH();
+ case 3: *q++ = coverage; Q_FALLTHROUGH();
+ case 2: *q++ = coverage; Q_FALLTHROUGH();
+ case 1: *q = coverage; Q_FALLTHROUGH();
case 0: break;
default:
QT_FT_MEM_SET( q, coverage, spans->len );
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index 25e051d739..2b892159c5 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -2808,6 +2808,7 @@ void QPdfEnginePrivate::drawTextItem(const QPointF &p, const QTextItemInt &ti)
qreal size = ti.fontEngine->fontDef.pixelSize;
int synthesized = ti.fontEngine->synthesized();
qreal stretch = synthesized & QFontEngine::SynthesizedStretch ? ti.fontEngine->fontDef.stretch/100. : 1.;
+ Q_ASSERT(stretch > qreal(0));
QTransform trans;
// Build text rendering matrix (Trm). We need it to map the text area to user
@@ -2884,6 +2885,7 @@ void QPdfEnginePrivate::drawTextItem(const QPointF &p, const QTextItemInt &ti)
return;
int synthesized = ti.fontEngine->synthesized();
qreal stretch = synthesized & QFontEngine::SynthesizedStretch ? ti.fontEngine->fontDef.stretch/100. : 1.;
+ Q_ASSERT(stretch > qreal(0));
*currentPage << "BT\n"
<< "/F" << font->object_id << size << "Tf "
diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp
index 673f64fbca..7f06915444 100644
--- a/src/gui/painting/qtransform.cpp
+++ b/src/gui/painting/qtransform.cpp
@@ -2094,7 +2094,8 @@ QTransform::TransformationType QTransform::type() const
if (!qFuzzyIsNull(m_13) || !qFuzzyIsNull(m_23) || !qFuzzyIsNull(m_33 - 1)) {
m_type = TxProject;
break;
- }
+ }
+ Q_FALLTHROUGH();
case TxShear:
case TxRotate:
if (!qFuzzyIsNull(affine._m12) || !qFuzzyIsNull(affine._m21)) {
@@ -2105,16 +2106,19 @@ QTransform::TransformationType QTransform::type() const
m_type = TxShear;
break;
}
+ Q_FALLTHROUGH();
case TxScale:
if (!qFuzzyIsNull(affine._m11 - 1) || !qFuzzyIsNull(affine._m22 - 1)) {
m_type = TxScale;
break;
}
+ Q_FALLTHROUGH();
case TxTranslate:
if (!qFuzzyIsNull(affine._dx) || !qFuzzyIsNull(affine._dy)) {
m_type = TxTranslate;
break;
}
+ Q_FALLTHROUGH();
case TxNone:
m_type = TxNone;
break;
diff --git a/src/gui/text/qplatformfontdatabase.cpp b/src/gui/text/qplatformfontdatabase.cpp
index ac3d274b36..599b18ac05 100644
--- a/src/gui/text/qplatformfontdatabase.cpp
+++ b/src/gui/text/qplatformfontdatabase.cpp
@@ -465,16 +465,6 @@ bool QPlatformFontDatabase::fontsAlwaysScalable() const
return ret;
}
-QFontEngine::SubpixelAntialiasingType QPlatformFontDatabase::subpixelAntialiasingTypeHint() const
-{
- static int type = -1;
- if (type == -1) {
- if (QScreen *screen = QGuiApplication::primaryScreen())
- type = screen->handle()->subpixelAntialiasingTypeHint();
- }
- return static_cast<QFontEngine::SubpixelAntialiasingType>(type);
-}
-
// ### copied to tools/makeqpf/qpf2.cpp
// see the Unicode subset bitfields in the MSDN docs
diff --git a/src/gui/text/qplatformfontdatabase.h b/src/gui/text/qplatformfontdatabase.h
index 13d8cbde60..2d99183ca3 100644
--- a/src/gui/text/qplatformfontdatabase.h
+++ b/src/gui/text/qplatformfontdatabase.h
@@ -116,7 +116,6 @@ public:
virtual QString resolveFontFamilyAlias(const QString &family) const;
virtual bool fontsAlwaysScalable() const;
virtual QList<int> standardSizes() const;
- QFontEngine::SubpixelAntialiasingType subpixelAntialiasingTypeHint() const;
// helper
static QSupportedWritingSystems writingSystemsFromTrueTypeBits(quint32 unicodeRange[4], quint32 codePageRange[2]);
diff --git a/src/gui/text/qtextdocumentfragment.cpp b/src/gui/text/qtextdocumentfragment.cpp
index 079b2e01f7..3a78296c57 100644
--- a/src/gui/text/qtextdocumentfragment.cpp
+++ b/src/gui/text/qtextdocumentfragment.cpp
@@ -408,6 +408,8 @@ QTextDocumentFragment QTextDocumentFragment::fromPlainText(const QString &plainT
return res;
}
+#ifndef QT_NO_TEXTHTMLPARSER
+
static QTextListFormat::Style nextListStyle(QTextListFormat::Style style)
{
if (style == QTextListFormat::ListDisc)
@@ -417,8 +419,6 @@ static QTextListFormat::Style nextListStyle(QTextListFormat::Style style)
return style;
}
-#ifndef QT_NO_TEXTHTMLPARSER
-
QTextHtmlImporter::QTextHtmlImporter(QTextDocument *_doc, const QString &_html, ImportMode mode, const QTextDocument *resourceProvider)
: indent(0), compressNextWhitespace(PreserveWhiteSpace), doc(_doc), importMode(mode)
{
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index f3ed8ef63a..4d24fb50af 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -579,12 +579,14 @@ static bool bidiItemize(QTextEngine *engine, QScriptAnalysis *analysis, QBidiCon
else
eor = current;
status.eor = QChar::DirEN;
- dir = QChar::DirAN; break;
+ dir = QChar::DirAN;
+ break;
case QChar::DirES:
case QChar::DirCS:
if(status.eor == QChar::DirEN || dir == QChar::DirAN) {
eor = current; break;
}
+ Q_FALLTHROUGH();
case QChar::DirBN:
case QChar::DirB:
case QChar::DirS:
@@ -614,11 +616,13 @@ static bool bidiItemize(QTextEngine *engine, QScriptAnalysis *analysis, QBidiCon
eor = current; status.eor = dirCurrent;
}
}
+ break;
default:
break;
}
break;
}
+ Q_FALLTHROUGH();
case QChar::DirAN:
hasBidi = true;
dirCurrent = QChar::DirAN;
@@ -642,6 +646,7 @@ static bool bidiItemize(QTextEngine *engine, QScriptAnalysis *analysis, QBidiCon
if(status.eor == QChar::DirAN) {
eor = current; break;
}
+ Q_FALLTHROUGH();
case QChar::DirES:
case QChar::DirET:
case QChar::DirBN: