aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest/quicktestresult.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmltest/quicktestresult.cpp')
-rw-r--r--src/qmltest/quicktestresult.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/qmltest/quicktestresult.cpp b/src/qmltest/quicktestresult.cpp
index 3f91ce85a8..e405a53936 100644
--- a/src/qmltest/quicktestresult.cpp
+++ b/src/qmltest/quicktestresult.cpp
@@ -108,6 +108,14 @@ public Q_SLOTS:
pixel += x;
return QColor::fromRgba(*pixel);
}
+
+ bool equals(QuickTestImageObject *other) const
+ {
+ if (!other)
+ return m_image.isNull();
+
+ return m_image == other->m_image;
+ }
private:
QImage m_image;
};
@@ -478,8 +486,8 @@ void QuickTestResult::stringify(QQmlV4Function *args)
//Check for Object Type
if (value->isObject()
- && !value->asFunctionObject()
- && !value->asArrayObject()) {
+ && !value->as<QV4::FunctionObject>()
+ && !value->as<QV4::ArrayObject>()) {
QVariant v = scope.engine->toVariant(value, QMetaType::UnknownType);
if (v.isValid()) {
switch (v.type()) {
@@ -500,7 +508,7 @@ void QuickTestResult::stringify(QQmlV4Function *args)
if (result.isEmpty()) {
QString tmp = value->toQStringNoThrow();
- if (value->asArrayObject())
+ if (value->as<QV4::ArrayObject>())
result.append(QString::fromLatin1("[%1]").arg(tmp));
else
result.append(tmp);