aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-11-07 13:06:34 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2017-11-09 14:25:06 +0000
commit05220b707b1bd901adb61ecae77177b88ed832ca (patch)
tree6239d425d87d5bf79f14bd5c81106d0ec2a8ae5b /tests
parent9cb3bc655a42f386607316d228a64422d453b201 (diff)
Fix tst_qquickshadereffect
The expected signal counts were not matching. Since the test has not been run in the CI, it went unnoticed. Furthermore, the test crashed due to a missing null pointer check. Change-Id: Iff80a2ea17832eb7bc531ac9eb2fc482f2c69e38 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qquickshadereffect/tst_qquickshadereffect.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/quick/qquickshadereffect/tst_qquickshadereffect.cpp b/tests/auto/quick/qquickshadereffect/tst_qquickshadereffect.cpp
index fe33dbd4d8..1731253da6 100644
--- a/tests/auto/quick/qquickshadereffect/tst_qquickshadereffect.cpp
+++ b/tests/auto/quick/qquickshadereffect/tst_qquickshadereffect.cpp
@@ -52,8 +52,8 @@ public:
int signalsConnected = 0;
protected:
- void connectNotify(const QMetaMethod &) { ++signalsConnected; }
- void disconnectNotify(const QMetaMethod &) { --signalsConnected; }
+ void connectNotify(const QMetaMethod &) override { ++signalsConnected; }
+ void disconnectNotify(const QMetaMethod &) override { --signalsConnected; }
signals:
void dummyChanged();
@@ -257,7 +257,7 @@ void tst_qquickshadereffect::lookThroughShaderCode()
QQmlComponent component(&engine);
component.setData("import QtQuick 2.0\nimport ShaderEffectTest 1.0\nTestShaderEffect {}", QUrl());
QScopedPointer<TestShaderEffect> item(qobject_cast<TestShaderEffect*>(component.create()));
- QCOMPARE(item->signalsConnected, 1);
+ QCOMPARE(item->signalsConnected, 0);
QString expected;
if ((presenceFlags & VertexPresent) == 0)
@@ -274,7 +274,7 @@ void tst_qquickshadereffect::lookThroughShaderCode()
QCOMPARE(item->parseLog(), expected);
// If the uniform was successfully parsed, the notify signal has been connected to an update slot.
- QCOMPARE(item->signalsConnected, (presenceFlags & SourcePresent) ? 2 : 1);
+ QCOMPARE(item->signalsConnected, (presenceFlags & SourcePresent) ? 1 : 0);
}
void tst_qquickshadereffect::deleteSourceItem()