aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-12-13 12:46:38 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-12-13 12:46:38 +0100
commit67cb80db8ea1581d632db30ff26b03b1287cb393 (patch)
tree2ca6d413be39d5e2d470487a03bf2c780ac61068 /src
parentcb66e55fe15a8f49a5c943cf762961ee7b6769cd (diff)
parent290251541e615358dcc7a289ff2adb30f309c132 (diff)
Merge remote-tracking branch 'origin/5.14.0' into 5.14
Diffstat (limited to 'src')
-rw-r--r--src/qml/parser/qqmljs.g6
-rw-r--r--src/quick/scenegraph/shaders/outlinedtext_core.vert2
-rw-r--r--src/quick/scenegraph/shaders/styledtext_core.vert2
-rw-r--r--src/quick/scenegraph/shaders/textmask_core.vert2
-rw-r--r--src/quick/util/qquickpixmapcache.cpp8
5 files changed, 13 insertions, 7 deletions
diff --git a/src/qml/parser/qqmljs.g b/src/qml/parser/qqmljs.g
index 8ac7633ae0..0d9507fe2f 100644
--- a/src/qml/parser/qqmljs.g
+++ b/src/qml/parser/qqmljs.g
@@ -122,6 +122,7 @@
--%left T_PLUS T_MINUS
%nonassoc T_IDENTIFIER T_COLON T_SIGNAL T_PROPERTY T_READONLY T_ON T_SET T_GET T_OF T_STATIC T_FROM T_AS
%nonassoc REDUCE_HERE
+%right T_WITHOUTAS T_AS
%start TopLevel
@@ -4390,7 +4391,10 @@ ImportsList: ImportsList T_COMMA ImportSpecifier;
} break;
./
-ImportSpecifier: ImportedBinding;
+-- When enconutering an IdentifierReference it can resolve to both ImportedBinding and IdentifierName
+-- Using %right and %prec, we tell qlalr that it should not reduce immediately, but rather shift
+-- so that we have a chance of actually parsing the correct rule if there is an "as" identifier
+ImportSpecifier: ImportedBinding %prec T_WITHOUTAS;
/.
case $rule_number: {
auto importSpecifier = new (pool) AST::ImportSpecifier(stringRef(1));
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());