diff options
author | Liang Qi <liang.qi@qt.io> | 2019-12-17 07:25:13 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-12-17 07:25:13 +0100 |
commit | e7650520ef2d986051e00a86a5fe47d3859cbd44 (patch) | |
tree | 4af3a37717cecec181c456fcf2c6097e2dc83182 /src | |
parent | 1989323559a7bc08a469f9708c644dcad1f57600 (diff) | |
parent | 896f772581849f970df5ecb2b73a829c9a0348b4 (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
.qmake.conf
src/qml/jsruntime/qv4engine.cpp
src/qml/parser/qqmljs.g
Change-Id: I5f89199ef7a846032a3118cba1298de992c22f8f
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/masm/stubs/wtf/Optional.h | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4sequenceobject.cpp | 16 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgrhisupport.cpp | 6 | ||||
-rw-r--r-- | src/quick/scenegraph/shaders/outlinedtext_core.vert | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/shaders/styledtext_core.vert | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/shaders/textmask_core.vert | 2 | ||||
-rw-r--r-- | src/quick/util/qquickpixmapcache.cpp | 8 |
8 files changed, 32 insertions, 8 deletions
diff --git a/src/3rdparty/masm/stubs/wtf/Optional.h b/src/3rdparty/masm/stubs/wtf/Optional.h index 602dbc1b43..e0fd4421a9 100644 --- a/src/3rdparty/masm/stubs/wtf/Optional.h +++ b/src/3rdparty/masm/stubs/wtf/Optional.h @@ -43,7 +43,7 @@ #include <QtQml/private/qtqmlglobal_p.h> #include <memory> -#if __cplusplus > 201402L && QT_HAS_INCLUDE(<optional>) +#if __cplusplus > 201402L && __has_include(<optional>) #include <optional> #else diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 590cebfa7c..cd2327a45e 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -222,7 +222,7 @@ ExecutionEngine::ExecutionEngine(QJSEngine *jsEngine) ok = false; maxCallDepth = qEnvironmentVariableIntValue("QV4_MAX_CALL_DEPTH", &ok); if (!ok || maxCallDepth <= 0) { -#if defined(QT_NO_DEBUG) && !defined(__SANITIZE_ADDRESS__) && !QT_HAS_FEATURE(address_sanitizer) +#if defined(QT_NO_DEBUG) && !defined(__SANITIZE_ADDRESS__) && !__has_feature(address_sanitizer) maxCallDepth = 1234; #else // no (tail call) optimization is done, so there'll be a lot mare stack frames active diff --git a/src/qml/jsruntime/qv4sequenceobject.cpp b/src/qml/jsruntime/qv4sequenceobject.cpp index 77a98247ac..5055e13223 100644 --- a/src/qml/jsruntime/qv4sequenceobject.cpp +++ b/src/qml/jsruntime/qv4sequenceobject.cpp @@ -375,6 +375,22 @@ public: ++arrayIndex; if (attrs) *attrs = QV4::Attr_Data; + + // TODO: Replace the container->at() below with operator[] in Qt6! + // TODO: But _not_ in Qt5! + // + // gcc 5.3.1 as shipped on RHEL 7.6 includes a copy of basic_string<char> + // into QtQml, when it sees a std::vector::at(). The basic_string symbols + // are publicly visible and preferred over the ones from libstdc++ when + // building user code. Therefore, removing this at() breaks binary + // compatibility. We _do_ want to remove it in Qt6, though. + // + // The exact mechanism is that at() checks its argument and can throw an + // out_of_range exception. The construction of this exception then triggers + // some string manipulation that uses the std::basic_string symbols. Clearly, + // this is a compiler bug. And clearly, we don't want the check as we can't + // catch the exception anyway. + if (pd) pd->value = convertElementToValue(s->engine(), s->d()->container->at(index)); return PropertyKey::fromArrayIndex(index); diff --git a/src/quick/scenegraph/qsgrhisupport.cpp b/src/quick/scenegraph/qsgrhisupport.cpp index afcfa53e83..9194d3e730 100644 --- a/src/quick/scenegraph/qsgrhisupport.cpp +++ b/src/quick/scenegraph/qsgrhisupport.cpp @@ -465,6 +465,10 @@ QOffscreenSurface *QSGRhiSupport::maybeCreateOffscreenSurface(QWindow *window) // must be called on the render thread QRhi *QSGRhiSupport::createRhi(QWindow *window, QOffscreenSurface *offscreenSurface) { +#if !QT_CONFIG(opengl) && !QT_CONFIG(vulkan) + Q_UNUSED(window); +#endif + QRhi *rhi = nullptr; QRhi::Flags flags; @@ -487,6 +491,8 @@ QRhi *QSGRhiSupport::createRhi(QWindow *window, QOffscreenSurface *offscreenSurf rhiParams.window = window; rhi = QRhi::create(backend, &rhiParams, flags); } +#else + Q_UNUSED(offscreenSurface); #endif #if QT_CONFIG(vulkan) if (backend == QRhi::Vulkan) { diff --git a/src/quick/scenegraph/shaders/outlinedtext_core.vert b/src/quick/scenegraph/shaders/outlinedtext_core.vert index ae945b013a..a854355460 100644 --- a/src/quick/scenegraph/shaders/outlinedtext_core.vert +++ b/src/quick/scenegraph/shaders/outlinedtext_core.vert @@ -21,6 +21,6 @@ void main() sCoordDown = (tCoord - vec2(0.0, 1.0)) * textureScale; sCoordLeft = (tCoord - vec2(-1.0, 0.0)) * textureScale; sCoordRight = (tCoord - vec2(1.0, 0.0)) * textureScale; - vec3 dprSnapPos = round(vCoord.xyz * dpr + 0.5) / dpr; + vec3 dprSnapPos = floor(vCoord.xyz * dpr + 0.5) / dpr; gl_Position = matrix * vec4(dprSnapPos, vCoord.w); }
\ No newline at end of file diff --git a/src/quick/scenegraph/shaders/styledtext_core.vert b/src/quick/scenegraph/shaders/styledtext_core.vert index 7e313eb797..04a0e88da8 100644 --- a/src/quick/scenegraph/shaders/styledtext_core.vert +++ b/src/quick/scenegraph/shaders/styledtext_core.vert @@ -15,6 +15,6 @@ void main() { sampleCoord = tCoord * textureScale; shiftedSampleCoord = (tCoord - shift) * textureScale; - vec3 dprSnapPos = round(vCoord.xyz * dpr + 0.5) / dpr; + vec3 dprSnapPos = floor(vCoord.xyz * dpr + 0.5) / dpr; gl_Position = matrix * vec4(dprSnapPos, vCoord.w); } diff --git a/src/quick/scenegraph/shaders/textmask_core.vert b/src/quick/scenegraph/shaders/textmask_core.vert index 5c510a2d23..b0efc1e731 100644 --- a/src/quick/scenegraph/shaders/textmask_core.vert +++ b/src/quick/scenegraph/shaders/textmask_core.vert @@ -12,6 +12,6 @@ uniform float dpr; void main() { sampleCoord = tCoord * textureScale; - vec3 dprSnapPos = round(vCoord.xyz * dpr + 0.5) / dpr; + vec3 dprSnapPos = floor(vCoord.xyz * dpr + 0.5) / dpr; gl_Position = matrix * vec4(dprSnapPos, vCoord.w); } diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp index 56ad8ebf0b..e1b30f2b2c 100644 --- a/src/quick/util/qquickpixmapcache.cpp +++ b/src/quick/util/qquickpixmapcache.cpp @@ -567,9 +567,10 @@ void QQuickPixmapReader::networkRequestDone(QNetworkReply *reply) QBuffer buff(&all); buff.open(QIODevice::ReadOnly); int frameCount; - if (!readImage(reply->url(), &buff, &image, &errorString, &readSize, &frameCount, job->requestSize, job->providerOptions, nullptr, job->data->frame)) + int const frame = job->data ? job->data->frame : 0; + if (!readImage(reply->url(), &buff, &image, &errorString, &readSize, &frameCount, job->requestSize, job->providerOptions, nullptr, frame)) error = QQuickPixmapReply::Decoding; - else + else if (job->data) job->data->frameCount = frameCount; } // send completion event to the QQuickPixmapReply @@ -882,7 +883,8 @@ void QQuickPixmapReader::processJob(QQuickPixmapReply *runningJob, const QUrl &u return; } else { int frameCount; - if (!readImage(url, &f, &image, &errorStr, &readSize, &frameCount, runningJob->requestSize, runningJob->providerOptions, nullptr, runningJob->data->frame)) { + int const frame = runningJob->data ? runningJob->data->frame : 0; + if ( !readImage(url, &f, &image, &errorStr, &readSize, &frameCount, runningJob->requestSize, runningJob->providerOptions, nullptr, frame)) { errorCode = QQuickPixmapReply::Loading; if (f.fileName() != localFile) errorStr += QString::fromLatin1(" (%1)").arg(f.fileName()); |