aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-05-04 08:21:10 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2015-05-04 09:35:26 +0000
commit682d57c9f6da7940dc68a73d3e23fe4bcf5ac2f0 (patch)
tree0a3117890f408fc1a73f905f8d3b15e7d6eff5fd
parent38621d841cfa75b1d849b0e88b38c2f18a0611ac (diff)
parent1648c166dbb541bbe663f3d6e5ad2a39d0735aea (diff)
Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5
-rw-r--r--src/qml/compiler/qv4codegen.cpp2
-rw-r--r--src/quick/items/qquickscreen.cpp27
-rw-r--r--tests/auto/qml/qjsengine/tst_qjsengine.cpp21
3 files changed, 31 insertions, 19 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 02274ca793..9168889c8c 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -538,7 +538,7 @@ IR::Expr *Codegen::subscript(IR::Expr *base, IR::Expr *index)
IR::Expr *Codegen::argument(IR::Expr *expr)
{
- if (expr && !expr->asTemp() && !expr->asArgLocal()) {
+ if (expr && !expr->asTemp()) {
const unsigned t = _block->newTemp();
move(_block->TEMP(t), expr);
expr = _block->TEMP(t);
diff --git a/src/quick/items/qquickscreen.cpp b/src/quick/items/qquickscreen.cpp
index 5bd6430f2d..3bf7229b33 100644
--- a/src/quick/items/qquickscreen.cpp
+++ b/src/quick/items/qquickscreen.cpp
@@ -351,24 +351,15 @@ void QQuickScreenAttached::screenChanged(QScreen *screen)
emit orientationUpdateMaskChanged();
}
- if (!oldScreen || screen->size() != oldScreen->size()) {
- emit widthChanged();
- emit heightChanged();
- }
- if (!oldScreen || screen->name() != oldScreen->name())
- emit nameChanged();
- if (!oldScreen || screen->orientation() != oldScreen->orientation())
- emit orientationChanged();
- if (!oldScreen || screen->primaryOrientation() != oldScreen->primaryOrientation())
- emit primaryOrientationChanged();
- if (!oldScreen || screen->availableVirtualGeometry() != oldScreen->availableVirtualGeometry())
- emit desktopGeometryChanged();
- if (!oldScreen || screen->logicalDotsPerInch() != oldScreen->logicalDotsPerInch())
- emit logicalPixelDensityChanged();
- if (!oldScreen || screen->physicalDotsPerInch() != oldScreen->physicalDotsPerInch())
- emit pixelDensityChanged();
- if (!oldScreen || screen->devicePixelRatio() != oldScreen->devicePixelRatio())
- emit devicePixelRatioChanged();
+ emit widthChanged();
+ emit heightChanged();
+ emit nameChanged();
+ emit orientationChanged();
+ emit primaryOrientationChanged();
+ emit desktopGeometryChanged();
+ emit logicalPixelDensityChanged();
+ emit pixelDensityChanged();
+ emit devicePixelRatioChanged();
connect(screen, SIGNAL(geometryChanged(QRect)),
this, SIGNAL(widthChanged()));
diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
index 61816b6cc0..5a9d6d20eb 100644
--- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp
+++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
@@ -178,6 +178,8 @@ private slots:
void intConversion_QTBUG43309();
void toFixed();
+ void argumentEvaluationOrder();
+
signals:
void testSignal();
};
@@ -3665,6 +3667,25 @@ void tst_QJSEngine::toFixed()
QCOMPARE(result.toString(), QStringLiteral("12.1"));
}
+void tst_QJSEngine::argumentEvaluationOrder()
+{
+ QJSEngine engine;
+ QJSValue ok = engine.evaluate(
+ "function record(arg1, arg2) {\n"
+ " parameters = [arg1, arg2]\n"
+ "}\n"
+ "function test() {\n"
+ " var i = 2;\n"
+ " record(i, i += 2);\n"
+ "}\n"
+ "test()\n"
+ "parameters[0] == 2 && parameters[1] == 4");
+ qDebug() << ok.toString();
+ QVERIFY(ok.isBool());
+ QVERIFY(ok.toBool());
+
+}
+
QTEST_MAIN(tst_QJSEngine)
#include "tst_qjsengine.moc"