summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/declarative.pro47
-rw-r--r--tests/auto/declarative/examples/examples.pro6
-rw-r--r--tests/auto/declarative/moduleqt47/moduleqt47.pro4
-rw-r--r--tests/auto/declarative/parserstress/parserstress.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro4
-rw-r--r--tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro4
-rw-r--r--tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp100
-rw-r--r--tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/realToInt.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp13
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro4
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro4
-rw-r--r--tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro4
-rw-r--r--tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro4
-rw-r--r--tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro4
-rw-r--r--tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro4
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro4
-rw-r--r--tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro4
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro4
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro4
-rw-r--r--tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro4
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro4
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp3
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro4
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro4
-rw-r--r--tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro4
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro4
-rw-r--r--tests/auto/declarative/qdeclarativespringanimation/qdeclarativespringanimation.pro4
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro4
-rw-r--r--tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro4
-rw-r--r--tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro4
-rw-r--r--tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro4
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro4
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro6
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro4
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/basic.html17
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/basic.icobin318 -> 0 bytes
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/basic.pngbin3961 -> 0 bytes
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/basic.qml6
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/elements.html14
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/elements.qml8
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/forward.html12
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/forward.pngbin2377 -> 0 bytes
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/javaScript.html11
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/javaScript.qml12
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/loadError.qml6
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/newwindows.html16
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/newwindows.qml34
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/pixelCache.html10
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/pixelCache.qml6
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml34
-rw-r--r--tests/auto/declarative/qdeclarativewebview/data/sethtml.qml6
-rw-r--r--tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro16
-rw-r--r--tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp520
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro4
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro4
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro4
-rw-r--r--tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp30
-rw-r--r--tests/auto/declarative/qmlvisual/qmlvisual.pro4
-rw-r--r--tests/auto/declarative/qperformancetimer/tst_qperformancetimer.cpp2
-rw-r--r--tests/auto/declarative/symbianlibs.pri9
80 files changed, 292 insertions, 863 deletions
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro
index 1f0d32a..98e15e8 100644
--- a/tests/auto/declarative/declarative.pro
+++ b/tests/auto/declarative/declarative.pro
@@ -8,6 +8,26 @@ SUBDIRS += \
SUBDIRS += \
examples \
parserstress \
+ qdeclarativecomponent \
+ qdeclarativecontext \
+ qdeclarativeengine \
+ qdeclarativeerror \
+ qdeclarativefolderlistmodel \
+ qdeclarativeinfo \
+ qdeclarativelayoutitem \
+ qdeclarativelistreference \
+ qdeclarativemoduleplugin \
+ qdeclarativeparticles \
+ qdeclarativepixmapcache \
+ qdeclarativeqt \
+ qdeclarativeview \
+ qdeclarativeviewer \
+ qdeclarativexmlhttprequest \
+ qmlvisual \
+ moduleqt47
+
+contains(QT_CONFIG, private_tests) {
+ SUBDIRS += \
qdeclarativeanchors \
qdeclarativeanimatedimage \
qdeclarativeanimations \
@@ -15,68 +35,47 @@ SUBDIRS += \
qdeclarativebehaviors \
qdeclarativebinding \
qdeclarativeborderimage \
- qdeclarativecomponent \
qdeclarativeconnection \
- qdeclarativecontext \
qdeclarativedebug \
qdeclarativedebugclient \
qdeclarativedebugservice \
qdeclarativedom \
qdeclarativeecmascript \
- qdeclarativeengine \
- qdeclarativeerror \
- qdeclarativefolderlistmodel \
- qdeclarativefontloader \
qdeclarativeflickable \
qdeclarativeflipable \
qdeclarativefocusscope \
+ qdeclarativefontloader \
qdeclarativegridview \
qdeclarativeimage \
qdeclarativeimageprovider \
- qdeclarativeinfo \
qdeclarativeinstruction \
qdeclarativeitem \
qdeclarativelanguage \
- qdeclarativelayoutitem \
qdeclarativelistmodel \
- qdeclarativelistreference \
qdeclarativelistview \
qdeclarativeloader \
- qdeclarativemoduleplugin \
qdeclarativemousearea \
- qdeclarativeparticles \
qdeclarativepathview \
qdeclarativepincharea \
- qdeclarativepixmapcache \
qdeclarativepositioners \
qdeclarativeproperty \
qdeclarativepropertymap \
- qdeclarativeqt \
qdeclarativerepeater \
qdeclarativesmoothedanimation \
qdeclarativespringanimation \
+ qdeclarativestyledtext \
qdeclarativesqldatabase \
qdeclarativestates \
- qdeclarativestyledtext \
qdeclarativesystempalette \
qdeclarativetext \
qdeclarativetextedit \
qdeclarativetextinput \
qdeclarativetimer \
qdeclarativevaluetypes \
- qdeclarativeview \
- qdeclarativeviewer \
qdeclarativevisualdatamodel \
qdeclarativeworkerscript \
- qdeclarativexmlhttprequest \
qdeclarativexmllistmodel \
- qmlvisual \
- qpacketprotocol \
- moduleqt47
-
-contains(QT_CONFIG, webkit) {
- SUBDIRS += \
- qdeclarativewebview
+ qpacketprotocol
}
# Tests which should run in Pulse
diff --git a/tests/auto/declarative/examples/examples.pro b/tests/auto/declarative/examples/examples.pro
index 2e243b4..dafc146 100644
--- a/tests/auto/declarative/examples/examples.pro
+++ b/tests/auto/declarative/examples/examples.pro
@@ -6,10 +6,12 @@ SOURCES += tst_examples.cpp
include(../../../../tools/qml/qml.pri)
+include(../symbianlibs.pri)
+
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/moduleqt47/moduleqt47.pro b/tests/auto/declarative/moduleqt47/moduleqt47.pro
index 4ee634e..ff773e8 100644
--- a/tests/auto/declarative/moduleqt47/moduleqt47.pro
+++ b/tests/auto/declarative/moduleqt47/moduleqt47.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_moduleqt47.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/parserstress/parserstress.pro b/tests/auto/declarative/parserstress/parserstress.pro
index bb1d69f..6ef2432 100644
--- a/tests/auto/declarative/parserstress/parserstress.pro
+++ b/tests/auto/declarative/parserstress/parserstress.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_parserstress.cpp
symbian: {
- importFiles.sources = ..\\..\\qscriptjstestsuite\\tests
+ importFiles.files = ..\\..\\qscriptjstestsuite\\tests
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro b/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
index 9798bb6..f09e8d9 100644
--- a/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
+++ b/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
@@ -4,9 +4,9 @@ SOURCES += tst_qdeclarativeanchors.cpp
macx:CONFIG -= app_bundle
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro b/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
index 0a2f0f2..3d040a6 100644
--- a/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
@@ -5,9 +5,9 @@ SOURCES += tst_qdeclarativeanimatedimage.cpp ../shared/testhttpserver.cpp
macx:CONFIG -= app_bundle
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro b/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
index ed47dca..d00d51a 100644
--- a/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
+++ b/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
@@ -4,9 +4,9 @@ SOURCES += tst_qdeclarativeanimations.cpp
macx:CONFIG -= app_bundle
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp b/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp
index 64f327b..1168471 100644
--- a/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp
+++ b/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro b/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
index cfb59ef..7416827 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
+++ b/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
@@ -4,9 +4,9 @@ SOURCES += tst_qdeclarativebehaviors.cpp
macx:CONFIG -= app_bundle
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro b/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
index a7ba2a8..fe12635 100644
--- a/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
+++ b/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativebinding.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro b/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
index a21761b..a7463e8 100644
--- a/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
+++ b/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
@@ -6,9 +6,9 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativeborderimage.cpp ../shared/testhttpserver.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro b/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
index d06ce4f..6f9550d 100644
--- a/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
+++ b/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeconnection.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
index 69f9732..e63b14e 100644
--- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
+++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
@@ -112,6 +112,7 @@ private slots:
void tst_QDeclarativeDebugContextReference();
void tst_QDeclarativeDebugPropertyReference();
+ void setBindingForObject();
void setMethodBody();
void queryObjectTree();
void setBindingInStates();
@@ -663,7 +664,13 @@ void tst_QDeclarativeDebug::queryAvailableEngines()
QCOMPARE(e.name(), m_engine->objectName());
}
+ // Make query invalid by deleting client
+ q_engines = m_dbg->queryAvailableEngines(this);
+ QCOMPARE(q_engines->state(), QDeclarativeDebugQuery::Waiting);
+ delete m_dbg;
+ QCOMPARE(q_engines->state(), QDeclarativeDebugQuery::Error);
delete q_engines;
+ m_dbg = new QDeclarativeEngineDebug(m_conn, this);
}
void tst_QDeclarativeDebug::queryRootContexts()
@@ -671,6 +678,7 @@ void tst_QDeclarativeDebug::queryRootContexts()
QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this);
waitForQuery(q_engines);
int engineId = q_engines->engines()[0].debugId();
+ delete q_engines;
QDeclarativeDebugRootContextQuery *q_context;
@@ -702,8 +710,13 @@ void tst_QDeclarativeDebug::queryRootContexts()
QVERIFY(context.contexts()[0].debugId() >= 0);
QCOMPARE(context.contexts()[0].name(), QString("tst_QDeclarativeDebug_childContext"));
- delete q_engines;
+ // Make query invalid by deleting client
+ q_context = m_dbg->queryRootContexts(engineId, this);
+ QCOMPARE(q_context->state(), QDeclarativeDebugQuery::Waiting);
+ delete m_dbg;
+ QCOMPARE(q_context->state(), QDeclarativeDebugQuery::Error);
delete q_context;
+ m_dbg = new QDeclarativeEngineDebug(m_conn, this);
}
void tst_QDeclarativeDebug::queryObject()
@@ -735,7 +748,14 @@ void tst_QDeclarativeDebug::queryObject()
delete q_engines;
delete q_context;
+
+ // Make query invalid by deleting client
+ q_obj = recursive ? m_dbg->queryObjectRecursive(rootObject, this) : m_dbg->queryObject(rootObject, this);
+ QCOMPARE(q_obj->state(), QDeclarativeDebugQuery::Waiting);
+ delete m_dbg;
+ QCOMPARE(q_obj->state(), QDeclarativeDebugQuery::Error);
delete q_obj;
+ m_dbg = new QDeclarativeEngineDebug(m_conn, this);
// check source as defined in main()
QDeclarativeDebugFileReference source = obj.source();
@@ -810,7 +830,14 @@ void tst_QDeclarativeDebug::queryExpressionResult()
delete q_engines;
delete q_context;
+
+ // Make query invalid by deleting client
+ q_expr = m_dbg->queryExpressionResult(objectId, expr, this);
+ QCOMPARE(q_expr->state(), QDeclarativeDebugQuery::Waiting);
+ delete m_dbg;
+ QCOMPARE(q_expr->state(), QDeclarativeDebugQuery::Error);
delete q_expr;
+ m_dbg = new QDeclarativeEngineDebug(m_conn, this);
}
void tst_QDeclarativeDebug::queryExpressionResult_data()
@@ -954,6 +981,77 @@ void tst_QDeclarativeDebug::tst_QDeclarativeDebugPropertyReference()
compareProperties(r, ref);
}
+void tst_QDeclarativeDebug::setBindingForObject()
+{
+ QDeclarativeDebugObjectReference rootObject = findRootObject();
+ QVERIFY(rootObject.debugId() != -1);
+ QDeclarativeDebugPropertyReference widthPropertyRef = findProperty(rootObject.properties(), "width");
+
+ QCOMPARE(widthPropertyRef.value(), QVariant(10));
+ QCOMPARE(widthPropertyRef.binding(), QString());
+
+ //
+ // set literal
+ //
+ m_dbg->setBindingForObject(rootObject.debugId(), "width", "15", true);
+
+ rootObject = findRootObject();
+ widthPropertyRef = findProperty(rootObject.properties(), "width");
+
+ QCOMPARE(widthPropertyRef.value(), QVariant(15));
+ QCOMPARE(widthPropertyRef.binding(), QString());
+
+ //
+ // set expression
+ //
+ m_dbg->setBindingForObject(rootObject.debugId(), "width", "height", false);
+
+ rootObject = findRootObject();
+ widthPropertyRef = findProperty(rootObject.properties(), "width");
+
+ QCOMPARE(widthPropertyRef.value(), QVariant(20));
+ QCOMPARE(widthPropertyRef.binding(), QString("height"));
+
+ //
+ // reset
+ //
+ m_dbg->resetBindingForObject(rootObject.debugId(), "width");
+
+ rootObject = findRootObject();
+ widthPropertyRef = findProperty(rootObject.properties(), "width");
+
+ // QCOMPARE(widthPropertyRef.value(), QVariant(0)); // TODO: Shouldn't this work?
+ QCOMPARE(widthPropertyRef.binding(), QString());
+
+ //
+ // set handler
+ //
+ rootObject = findRootObject();
+ QCOMPARE(rootObject.children().size(), 4); // Rectangle, Text, MouseArea, QDeclarativeComponentAttached
+ QDeclarativeDebugObjectReference mouseAreaObject = rootObject.children().at(2);
+ QDeclarativeDebugObjectQuery *q_obj = m_dbg->queryObjectRecursive(mouseAreaObject, this);
+ waitForQuery(q_obj);
+ mouseAreaObject = q_obj->object();
+
+ QCOMPARE(mouseAreaObject.className(), QString("MouseArea"));
+
+ QDeclarativeDebugPropertyReference onEnteredRef = findProperty(mouseAreaObject.properties(), "onEntered");
+
+ QCOMPARE(onEnteredRef.name(), QString("onEntered"));
+ QCOMPARE(onEnteredRef.value(), QVariant("{ console.log('hello') }"));
+
+ m_dbg->setBindingForObject(mouseAreaObject.debugId(), "onEntered", "{console.log('hello, world') }", false) ;
+
+ rootObject = findRootObject();
+ mouseAreaObject = rootObject.children().at(2);
+ q_obj = m_dbg->queryObjectRecursive(mouseAreaObject, this);
+ waitForQuery(q_obj);
+ mouseAreaObject = q_obj->object();
+ onEnteredRef = findProperty(mouseAreaObject.properties(), "onEntered");
+ QCOMPARE(onEnteredRef.name(), QString("onEntered"));
+ QCOMPARE(onEnteredRef.value(), QVariant("{console.log('hello, world') }"));
+}
+
void tst_QDeclarativeDebug::setBindingInStates()
{
// Check if changing bindings of propertychanges works
diff --git a/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro b/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
index 415d4e2..8ac69aa 100644
--- a/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
+++ b/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativedom.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/realToInt.qml b/tests/auto/declarative/qdeclarativeecmascript/data/realToInt.qml
new file mode 100644
index 0000000..cbbbbf9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/realToInt.qml
@@ -0,0 +1,11 @@
+import QtQuick 1.0
+import Qt.test 1.0
+
+MyQmlObject {
+ function test1() {
+ value = 4.2
+ }
+ function test2() {
+ value = 7.9
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro b/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
index 58cad34..69d25a4 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
+++ b/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
@@ -13,9 +13,9 @@ INCLUDEPATH += ../shared
# LIBS += -lgcov
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index 1ec12fe..be8f221 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -176,6 +176,7 @@ private slots:
void aliasBindingsOverrideTarget();
void aliasWritesOverrideBindings();
void pushCleanContext();
+ void realToInt();
void include();
@@ -3081,6 +3082,18 @@ void tst_qdeclarativeecmascript::pushCleanContext()
QCOMPARE(func2.call().toInt32(), 6);
}
+void tst_qdeclarativeecmascript::realToInt()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("realToInt.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject*>(component.create());
+ QVERIFY(object != 0);
+
+ QMetaObject::invokeMethod(object, "test1");
+ QCOMPARE(object->value(), int(4));
+ QMetaObject::invokeMethod(object, "test2");
+ QCOMPARE(object->value(), int(8));
+}
+
QTEST_MAIN(tst_qdeclarativeecmascript)
#include "tst_qdeclarativeecmascript.moc"
diff --git a/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro b/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
index be0ba6c..c176e07 100644
--- a/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
+++ b/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeflickable.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro b/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
index 759e80b..3b6d19a 100644
--- a/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
+++ b/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeflipable.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro b/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro
index 24749c6..eab983f 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro
+++ b/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro
@@ -4,9 +4,9 @@ SOURCES += tst_qdeclarativefocusscope.cpp
macx:CONFIG -= app_bundle
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro b/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro
index 91bf4a7..b7e5e5f 100644
--- a/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro
+++ b/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativefolderlistmodel.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro b/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
index 01dca26..357268b 100644
--- a/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
+++ b/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
@@ -6,9 +6,9 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativefontloader.cpp ../shared/testhttpserver.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro b/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
index a99a1b9..bc196fb 100644
--- a/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
+++ b/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativegridview.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro b/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
index 244a1e1..a22c8b5 100644
--- a/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
+++ b/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
@@ -6,9 +6,9 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativeimage.cpp ../shared/testhttpserver.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro b/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
index 2c20e7e..423390f 100644
--- a/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
+++ b/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeinfo.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro b/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
index f4901c4..d8007a0 100644
--- a/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
+++ b/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeitem.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro b/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
index 43c451f..cae85a7 100644
--- a/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
+++ b/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
@@ -12,9 +12,9 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += ../shared/testhttpserver.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro b/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro
index 5076e51..d89f16c 100644
--- a/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro
+++ b/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativelayoutitem.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro b/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
index e90db49..b5c5cf2 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
+++ b/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
@@ -6,9 +6,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativelistmodel.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
index 8c99f08..1633ffc 100644
--- a/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
+++ b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
@@ -6,9 +6,9 @@ HEADERS += incrementalmodel.h
SOURCES += tst_qdeclarativelistview.cpp incrementalmodel.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro b/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
index b07bf9e..1ede509 100644
--- a/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
+++ b/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
@@ -8,9 +8,9 @@ SOURCES += tst_qdeclarativeloader.cpp \
../shared/testhttpserver.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro
index a92d3a2..98cd472 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro
@@ -7,9 +7,9 @@ QT += declarative network
CONFIG -= app_bundle
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro b/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
index 3d39aa8..ed9313f 100644
--- a/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
+++ b/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
@@ -6,9 +6,9 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativemousearea.cpp ../shared/testhttpserver.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro b/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
index f9ca90f..2cf8268 100644
--- a/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
+++ b/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeparticles.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro b/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
index 04fd26b..e0404c5 100644
--- a/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
+++ b/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativepathview.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro b/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
index 3130364..88871e9 100644
--- a/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
+++ b/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
@@ -10,9 +10,9 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += ../shared/testhttpserver.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp b/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
index 11595a9..edb182c 100644
--- a/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
+++ b/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
@@ -82,7 +82,6 @@ private slots:
#ifndef QT_NO_CONCURRENT
void networkCrash();
#endif
-
private:
QDeclarativeEngine engine;
QUrl thisfile;
@@ -373,6 +372,7 @@ void createNetworkServer()
eventLoop.exec();
}
+#ifndef QT_NO_CONCURRENT
// QT-3957
void tst_qdeclarativepixmapcache::networkCrash()
{
@@ -387,6 +387,7 @@ void tst_qdeclarativepixmapcache::networkCrash()
}
future.cancel();
}
+#endif
#endif
diff --git a/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro b/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
index 5dc7bb8..27e5948 100644
--- a/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
+++ b/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
@@ -4,9 +4,9 @@ SOURCES += tst_qdeclarativepositioners.cpp
macx:CONFIG -= app_bundle
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
index 4121a33..1750860 100644
--- a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
+++ b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeproperty.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
index 9e698fe..4b197eb 100644
--- a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
+++ b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
@@ -4,9 +4,9 @@ SOURCES += tst_qdeclarativeqt.cpp
macx:CONFIG -= app_bundle
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro b/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
index f3ff9ed..5230f69 100644
--- a/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
+++ b/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativerepeater.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro b/tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro
index c2d30a0..171f308 100644
--- a/tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro
+++ b/tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro
@@ -9,9 +9,9 @@ INCLUDEPATH += ../shared
# LIBS += -lgcov
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro b/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro
index 872aeb9..1e77d6e 100644
--- a/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro
+++ b/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativesmoothedanimation.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativespringanimation/qdeclarativespringanimation.pro b/tests/auto/declarative/qdeclarativespringanimation/qdeclarativespringanimation.pro
index 213b262..da477fc 100644
--- a/tests/auto/declarative/qdeclarativespringanimation/qdeclarativespringanimation.pro
+++ b/tests/auto/declarative/qdeclarativespringanimation/qdeclarativespringanimation.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativespringanimation.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro b/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
index 1462c9a..0d335a5 100644
--- a/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
+++ b/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
@@ -6,9 +6,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativesqldatabase.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
index 2bae041..4a0cc24 100644
--- a/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
+++ b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativestates.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro b/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
index c1a36fd..290cda3 100644
--- a/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
+++ b/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
@@ -10,9 +10,9 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += ../shared/testhttpserver.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
index 82b6f73..557603f 100644
--- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
+++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
@@ -1233,10 +1233,12 @@ void tst_qdeclarativetext::lineHeight()
qreal h2 = myText->height();
myText->setLineHeight(2.0);
+ QEXPECT_FAIL("", "QTBUG-17325", Continue);
QVERIFY(myText->height() == h2 * 2.0);
myText->setLineHeightMode(QDeclarativeText::FixedHeight);
myText->setLineHeight(10);
+ QEXPECT_FAIL("", "QTBUG-17325", Continue);
QCOMPARE(myText->height(), myText->lineCount() * 10.0);
delete canvas;
diff --git a/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro b/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro
index 4b6bd49..aaf753e 100644
--- a/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro
+++ b/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro
@@ -6,9 +6,9 @@ SOURCES += tst_qdeclarativetextedit.cpp ../shared/testhttpserver.cpp
HEADERS += ../shared/testhttpserver.h
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro b/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
index 8f42448..0fee1c9 100644
--- a/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
+++ b/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativetextinput.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
index 90e46d3..59b3526 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
+++ b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
@@ -8,9 +8,9 @@ SOURCES += tst_qdeclarativevaluetypes.cpp \
testtypes.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro b/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro
index 21a9195..fc4790d 100644
--- a/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro
+++ b/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeview.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro b/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro
index 6189916..8d4b410 100644
--- a/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro
+++ b/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro
@@ -6,10 +6,12 @@ include(../../../../tools/qml/qml.pri)
SOURCES += tst_qdeclarativeviewer.cpp
+include(../symbianlibs.pri)
+
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro b/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro
index 92e5f60..fe3d794 100644
--- a/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativevisualdatamodel.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativewebview/data/basic.html b/tests/auto/declarative/qdeclarativewebview/data/basic.html
deleted file mode 100644
index 22e3e24..0000000
--- a/tests/auto/declarative/qdeclarativewebview/data/basic.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<html>
-<head><title>Basic</title>
-<link rel="icon" sizes="48x48" href="basic.png">
-<script type="text/javascript">
-<!--
-window.onload = function(){ window.status = "status here"; }
-// -->
-</script>
-</head>
-<body leftmargin="0" marginwidth="0">
-<table width="123">
-<tbody>
-<tr><td>This is a basic test.</td></tr>
-</tbody>
-</table>
-</body>
-</html>
diff --git a/tests/auto/declarative/qdeclarativewebview/data/basic.ico b/tests/auto/declarative/qdeclarativewebview/data/basic.ico
deleted file mode 100644
index 8f3d05e..0000000
--- a/tests/auto/declarative/qdeclarativewebview/data/basic.ico
+++ /dev/null
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativewebview/data/basic.png b/tests/auto/declarative/qdeclarativewebview/data/basic.png
deleted file mode 100644
index 35717cc..0000000
--- a/tests/auto/declarative/qdeclarativewebview/data/basic.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativewebview/data/basic.qml b/tests/auto/declarative/qdeclarativewebview/data/basic.qml
deleted file mode 100644
index 73330cd..0000000
--- a/tests/auto/declarative/qdeclarativewebview/data/basic.qml
+++ /dev/null
@@ -1,6 +0,0 @@
-import QtQuick 1.0
-import QtWebKit 1.0
-
-WebView {
- url: "basic.html"
-}
diff --git a/tests/auto/declarative/qdeclarativewebview/data/elements.html b/tests/auto/declarative/qdeclarativewebview/data/elements.html
deleted file mode 100644
index 9236867..0000000
--- a/tests/auto/declarative/qdeclarativewebview/data/elements.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<body leftmargin=0 topmargin=0>
-<table width="300px" border=1 cellpadding=0 cellspacing=0>
-<tr>
-<td align=center width=25%%><p>A</p></td>
-<td width=75% height=50px>
- <table width=100% border=1 cellpadding=0 cellspacing=0>
- <tr>
- <td align=center width=50% height=50px><p>B</p></td>
- <td align=center width=50% height=50px><p>C</p></td>
- </tr>
- </table>
-</td>
-</tr>
-</table>
diff --git a/tests/auto/declarative/qdeclarativewebview/data/elements.qml b/tests/auto/declarative/qdeclarativewebview/data/elements.qml
deleted file mode 100644
index b86dd9d..0000000
--- a/tests/auto/declarative/qdeclarativewebview/data/elements.qml
+++ /dev/null
@@ -1,8 +0,0 @@
-import QtQuick 1.0
-import QtWebKit 1.0
-
-WebView {
- url: "elements.html"
- width: 310
- height: 100
-}
diff --git a/tests/auto/declarative/qdeclarativewebview/data/forward.html b/tests/auto/declarative/qdeclarativewebview/data/forward.html
deleted file mode 100644
index 62ab62d..0000000
--- a/tests/auto/declarative/qdeclarativewebview/data/forward.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<html>
-<head><title>Forward</title>
-<link rel="icon" sizes="32x32" href="forward.png">
-</head>
-<body leftmargin="0" marginwidth="0">
-<table width="123">
-<tbody>
-<tr><td>This is more.</td></tr>
-</tbody>
-</table>
-</body>
-</html>
diff --git a/tests/auto/declarative/qdeclarativewebview/data/forward.png b/tests/auto/declarative/qdeclarativewebview/data/forward.png
deleted file mode 100644
index a82533e..0000000
--- a/tests/auto/declarative/qdeclarativewebview/data/forward.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativewebview/data/javaScript.html b/tests/auto/declarative/qdeclarativewebview/data/javaScript.html
deleted file mode 100644
index 35270bc..0000000
--- a/tests/auto/declarative/qdeclarativewebview/data/javaScript.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html>
-<head><title>JavaScript</title>
-<link rel="icon" sizes="48x48" href="basic.png">
-<script type="text/javascript">
-<!--
-window.onload = function(){ window.status = "status here"; }
-// -->
-</script>
-</head>
-<body>
-This is a JS test.
diff --git a/tests/auto/declarative/qdeclarativewebview/data/javaScript.qml b/tests/auto/declarative/qdeclarativewebview/data/javaScript.qml
deleted file mode 100644
index 527e3b9..0000000
--- a/tests/auto/declarative/qdeclarativewebview/data/javaScript.qml
+++ /dev/null
@@ -1,12 +0,0 @@
-import QtQuick 1.0
-import QtWebKit 1.0
-
-WebView {
- url: "javaScript.html"
- javaScriptWindowObjects: [
- QtObject {
- property string qmlprop: "qmlvalue"
- WebView.windowObjectName: "myjsname"
- }
- ]
-}
diff --git a/tests/auto/declarative/qdeclarativewebview/data/loadError.qml b/tests/auto/declarative/qdeclarativewebview/data/loadError.qml
deleted file mode 100644
index baab1a0..0000000
--- a/tests/auto/declarative/qdeclarativewebview/data/loadError.qml
+++ /dev/null
@@ -1,6 +0,0 @@
-import QtQuick 1.0
-import QtWebKit 1.0
-
-WebView {
- url: "does-not-exist.html"
-}
diff --git a/tests/auto/declarative/qdeclarativewebview/data/newwindows.html b/tests/auto/declarative/qdeclarativewebview/data/newwindows.html
deleted file mode 100644
index dd541f9..0000000
--- a/tests/auto/declarative/qdeclarativewebview/data/newwindows.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<html>
-<head>
-<script type="text/javascript">
-<!--
-function clickTheLink()
-{
- var ev = document.createEvent('MouseEvents');
- ev.initEvent( "click", true, false );
- document.getElementById('thelink').dispatchEvent(ev);
-}
-// -->
-</script>
-</head>
-<h1>Multiple windows...</h1>
-
-<a id=thelink target="_blank" href="newwindows.html">Popup!</a>
diff --git a/tests/auto/declarative/qdeclarativewebview/data/newwindows.qml b/tests/auto/declarative/qdeclarativewebview/data/newwindows.qml
deleted file mode 100644
index e66631d..0000000
--- a/tests/auto/declarative/qdeclarativewebview/data/newwindows.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-// Demonstrates opening new WebViews from HTML
-
-import QtQuick 1.0
-import QtWebKit 1.0
-
-Grid {
- columns: 3
- id: pages
- height: 300; width: 600
- property int total: 0
-
- Component {
- id: webViewPage
- Rectangle {
- width: webView.width
- height: webView.height
- border.color: "gray"
-
- WebView {
- id: webView
- width: 150 // force predictable for test
- newWindowComponent: webViewPage
- newWindowParent: pages
- url: "newwindows.html"
- Timer {
- interval: 10; running: total<4; repeat: false;
- onTriggered: { if (webView.status==WebView.Ready) { total++; webView.evaluateJavaScript("clickTheLink()") } }
- }
- }
- }
- }
-
- Loader { sourceComponent: webViewPage }
-}
diff --git a/tests/auto/declarative/qdeclarativewebview/data/pixelCache.html b/tests/auto/declarative/qdeclarativewebview/data/pixelCache.html
deleted file mode 100644
index 9412674..0000000
--- a/tests/auto/declarative/qdeclarativewebview/data/pixelCache.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<body topmargin=0 leftmargin=0>
-<table width=120 cellpadding=0 cellspacing=0>
-<tr><td>
-<h1>Pixel Cache</h1>
-This test is for the pixel cache. Because this is a long document,
-as it scrolls, more of the document will need to be rendered.
-If the pixelCacheSize is small, the first parts of the document will
-no longer be in the cache when it returns.
-</table>
diff --git a/tests/auto/declarative/qdeclarativewebview/data/pixelCache.qml b/tests/auto/declarative/qdeclarativewebview/data/pixelCache.qml
deleted file mode 100644
index 08e4d65..0000000
--- a/tests/auto/declarative/qdeclarativewebview/data/pixelCache.qml
+++ /dev/null
@@ -1,6 +0,0 @@
-import Test 1.0
-
-MyWebView {
- anchors.fill: parent
- url: "pixelCache.html"
-}
diff --git a/tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml b/tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml
deleted file mode 100644
index db06887..0000000
--- a/tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-import QtQuick 1.0
-import QtWebKit 1.0
-
-Item {
- width: 240
- height: 160
- Grid {
- anchors.fill: parent
- objectName: "newWindowParent"
- id: newWindowParent
- }
-
- Row {
- anchors.fill: parent
- id: oldWindowParent
- objectName: "oldWindowParent"
- }
-
- Loader {
- sourceComponent: webViewComponent
- }
- Component {
- id: webViewComponent
- WebView {
- id: webView
- objectName: "webView"
- newWindowComponent: webViewComponent
- newWindowParent: oldWindowParent
- url: "basic.html"
- renderingEnabled: true
- pressGrabTime: 200
- }
- }
-}
diff --git a/tests/auto/declarative/qdeclarativewebview/data/sethtml.qml b/tests/auto/declarative/qdeclarativewebview/data/sethtml.qml
deleted file mode 100644
index 7889704..0000000
--- a/tests/auto/declarative/qdeclarativewebview/data/sethtml.qml
+++ /dev/null
@@ -1,6 +0,0 @@
-import QtQuick 1.0
-import QtWebKit 1.0
-
-WebView {
- html: "<p>This is a <b>string</b> set on the WebView"
-}
diff --git a/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro b/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
deleted file mode 100644
index 562a9fb..0000000
--- a/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
+++ /dev/null
@@ -1,16 +0,0 @@
-load(qttest_p4)
-contains(QT_CONFIG,declarative): QT += declarative
-contains(QT_CONFIG,webkit): QT += webkit
-macx:CONFIG -= app_bundle
-
-SOURCES += tst_qdeclarativewebview.cpp
-
-symbian: {
- importFiles.sources = data
- importFiles.path = .
- DEPLOYMENT = importFiles
-} else {
- DEFINES += SRCDIR=\\\"$$PWD\\\"
-}
-
-CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp b/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp
deleted file mode 100644
index 9f99e83..0000000
--- a/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp
+++ /dev/null
@@ -1,520 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <qtest.h>
-#include <QtTest/QSignalSpy>
-#include "../../../shared/util.h"
-#include <QtDeclarative/qdeclarativeengine.h>
-#include <QtDeclarative/qdeclarativecomponent.h>
-#include <private/qdeclarativepositioners_p.h>
-#include <QtWebKit/qwebpage.h>
-#include <QtWebKit/qwebframe.h>
-#include <QtCore/qdir.h>
-#include <QtCore/qfile.h>
-#include <QtGui/qpainter.h>
-
-#ifdef Q_OS_SYMBIAN
-// In Symbian OS test data is located in applications private dir
-#define SRCDIR "."
-#endif
-
-class tst_qdeclarativewebview : public QObject
-{
- Q_OBJECT
-public:
- tst_qdeclarativewebview() {}
-
-private slots:
- void initTestCase();
- void basicProperties();
- void settings();
- void historyNav();
- void multipleWindows();
- void elementAreaAt();
- void loadError();
- void setHtml();
- void javaScript();
- void cleanupTestCase();
- //void pixelCache();
- void newWindowParent();
- void newWindowComponent();
- void renderingEnabled();
- void pressGrabTime();
-
-private:
- void checkNoErrors(const QDeclarativeComponent& component);
- QDeclarativeEngine engine;
- QString tmpDir() const
- {
- static QString tmpd = QDir::tempPath()+"/tst_qdeclarativewebview-"
- + QDateTime::currentDateTime().toString(QLatin1String("yyyyMMddhhmmss"));
- return tmpd;
- }
-};
-
-void tst_qdeclarativewebview::initTestCase()
-{
-}
-
-static QString strippedHtml(QString html)
-{
- html.replace(QRegExp("\\s+"),"");
- return html;
-}
-
-static QString fileContents(const QString& filename)
-{
- QFile file(filename);
- file.open(QIODevice::ReadOnly);
- return QString::fromUtf8(file.readAll());
-}
-
-
-static void removeRecursive(const QString& dirname)
-{
- QDir dir(dirname);
- QFileInfoList entries(dir.entryInfoList(QDir::Dirs|QDir::Files|QDir::NoDotAndDotDot));
- for (int i = 0; i < entries.count(); ++i)
- if (entries[i].isDir())
- removeRecursive(entries[i].filePath());
- else
- dir.remove(entries[i].fileName());
- QDir().rmdir(dirname);
-}
-
-void tst_qdeclarativewebview::cleanupTestCase()
-{
- removeRecursive(tmpDir());
-}
-
-void tst_qdeclarativewebview::checkNoErrors(const QDeclarativeComponent& component)
-{
- // Wait until the component is ready
- QTRY_VERIFY(component.isReady() || component.isError());
-
- if (component.isError()) {
- QList<QDeclarativeError> errors = component.errors();
- for (int ii = 0; ii < errors.count(); ++ii) {
- const QDeclarativeError &error = errors.at(ii);
- QByteArray errorStr = QByteArray::number(error.line()) + ":" +
- QByteArray::number(error.column()) + ":" +
- error.description().toUtf8();
- qWarning() << errorStr;
- }
- }
- QVERIFY(!component.isError());
-}
-
-void tst_qdeclarativewebview::basicProperties()
-{
- QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/basic.qml"));
- checkNoErrors(component);
- QWebSettings::enablePersistentStorage(tmpDir());
-
- QObject *wv = component.create();
- QVERIFY(wv != 0);
- QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
- QCOMPARE(wv->property("title").toString(),QString("Basic"));
- QTRY_COMPARE(qvariant_cast<QPixmap>(wv->property("icon")).width(), 48);
- QCOMPARE(qvariant_cast<QPixmap>(wv->property("icon")),QPixmap(SRCDIR "/data/basic.png"));
- QCOMPARE(wv->property("statusText").toString(),QString("status here"));
- QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/basic.html")), strippedHtml(wv->property("html").toString()));
- QCOMPARE(wv->property("preferredWidth").toInt(), 0);
- QCOMPARE(wv->property("preferredHeight").toInt(), 0);
- QCOMPARE(wv->property("url").toUrl(), QUrl::fromLocalFile(SRCDIR "/data/basic.html"));
- QCOMPARE(wv->property("status").toInt(), 1 /*QDeclarativeWebView::Ready*/);
- QVERIFY(qvariant_cast<QAction*>(wv->property("reload")));
- QVERIFY(qvariant_cast<QAction*>(wv->property("reload"))->isEnabled());
- QVERIFY(qvariant_cast<QAction*>(wv->property("back")));
- QVERIFY(!qvariant_cast<QAction*>(wv->property("back"))->isEnabled());
- QVERIFY(qvariant_cast<QAction*>(wv->property("forward")));
- QVERIFY(!qvariant_cast<QAction*>(wv->property("forward"))->isEnabled());
- QVERIFY(qvariant_cast<QAction*>(wv->property("stop")));
- QVERIFY(!qvariant_cast<QAction*>(wv->property("stop"))->isEnabled());
-
- wv->setProperty("pixelCacheSize", 0); // mainly testing that it doesn't crash or anything!
- QCOMPARE(wv->property("pixelCacheSize").toInt(),0);
- qvariant_cast<QAction*>(wv->property("reload"))->trigger();
- QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
-}
-
-void tst_qdeclarativewebview::settings()
-{
- QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/basic.qml"));
- checkNoErrors(component);
- QObject *wv = component.create();
- QVERIFY(wv != 0);
- QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
-
- QObject *s = QDeclarativeProperty(wv,"settings").object();
- QVERIFY(s != 0);
-
- // merely tests that setting gets stored (in QWebSettings)
- // behavioural tests are in WebKit.
- for (int b=0; b<=1; ++b) {
- bool on = !!b;
-
- s->setProperty("autoLoadImages", on);
- s->setProperty("developerExtrasEnabled", on);
- s->setProperty("javaEnabled", on);
- s->setProperty("javascriptCanAccessClipboard", on);
- s->setProperty("javascriptCanOpenWindows", on);
- s->setProperty("javascriptEnabled", on);
- s->setProperty("linksIncludedInFocusChain", on);
- s->setProperty("localContentCanAccessRemoteUrls", on);
- s->setProperty("localStorageDatabaseEnabled", on);
- s->setProperty("offlineStorageDatabaseEnabled", on);
- s->setProperty("offlineWebApplicationCacheEnabled", on);
- s->setProperty("pluginsEnabled", on);
- s->setProperty("printElementBackgrounds", on);
- s->setProperty("privateBrowsingEnabled", on);
- s->setProperty("zoomTextOnly", on);
-
- QVERIFY(s->property("autoLoadImages") == on);
- QVERIFY(s->property("developerExtrasEnabled") == on);
- QVERIFY(s->property("javaEnabled") == on);
- QVERIFY(s->property("javascriptCanAccessClipboard") == on);
- QVERIFY(s->property("javascriptCanOpenWindows") == on);
- QVERIFY(s->property("javascriptEnabled") == on);
- QVERIFY(s->property("linksIncludedInFocusChain") == on);
- QVERIFY(s->property("localContentCanAccessRemoteUrls") == on);
- QVERIFY(s->property("localStorageDatabaseEnabled") == on);
- QVERIFY(s->property("offlineStorageDatabaseEnabled") == on);
- QVERIFY(s->property("offlineWebApplicationCacheEnabled") == on);
- QVERIFY(s->property("pluginsEnabled") == on);
- QVERIFY(s->property("printElementBackgrounds") == on);
- QVERIFY(s->property("privateBrowsingEnabled") == on);
- QVERIFY(s->property("zoomTextOnly") == on);
-
- QVERIFY(s->property("autoLoadImages") == on);
- QVERIFY(s->property("developerExtrasEnabled") == on);
- QVERIFY(s->property("javaEnabled") == on);
- QVERIFY(s->property("javascriptCanAccessClipboard") == on);
- QVERIFY(s->property("javascriptCanOpenWindows") == on);
- QVERIFY(s->property("javascriptEnabled") == on);
- QVERIFY(s->property("linksIncludedInFocusChain") == on);
- QVERIFY(s->property("localContentCanAccessRemoteUrls") == on);
- QVERIFY(s->property("localStorageDatabaseEnabled") == on);
- QVERIFY(s->property("offlineStorageDatabaseEnabled") == on);
- QVERIFY(s->property("offlineWebApplicationCacheEnabled") == on);
- QVERIFY(s->property("pluginsEnabled") == on);
- QVERIFY(s->property("printElementBackgrounds") == on);
- QVERIFY(s->property("privateBrowsingEnabled") == on);
- QVERIFY(s->property("zoomTextOnly") == on);
- }
-}
-
-void tst_qdeclarativewebview::historyNav()
-{
- QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/basic.qml"));
- checkNoErrors(component);
- QWebSettings::enablePersistentStorage(tmpDir());
-
- QObject *wv = component.create();
- QVERIFY(wv != 0);
- for (int i=1; i<=2; ++i) {
- QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
- QCOMPARE(wv->property("title").toString(),QString("Basic"));
- QTRY_COMPARE(qvariant_cast<QPixmap>(wv->property("icon")).width(), 48);
- QCOMPARE(qvariant_cast<QPixmap>(wv->property("icon")),QPixmap(SRCDIR "/data/basic.png"));
- QCOMPARE(wv->property("statusText").toString(),QString("status here"));
- QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/basic.html")), strippedHtml(wv->property("html").toString()));
- QCOMPARE(wv->property("preferredWidth").toDouble(), 0.0);
- QCOMPARE(wv->property("url").toUrl(), QUrl::fromLocalFile(SRCDIR "/data/basic.html"));
- QCOMPARE(wv->property("status").toInt(), 1 /*QDeclarativeWebView::Ready*/);
- QVERIFY(qvariant_cast<QAction*>(wv->property("reload")));
- QVERIFY(qvariant_cast<QAction*>(wv->property("reload"))->isEnabled());
- QVERIFY(qvariant_cast<QAction*>(wv->property("back")));
- QVERIFY(!qvariant_cast<QAction*>(wv->property("back"))->isEnabled());
- QVERIFY(qvariant_cast<QAction*>(wv->property("forward")));
- QVERIFY(!qvariant_cast<QAction*>(wv->property("forward"))->isEnabled());
- QVERIFY(qvariant_cast<QAction*>(wv->property("stop")));
- QVERIFY(!qvariant_cast<QAction*>(wv->property("stop"))->isEnabled());
-
- qvariant_cast<QAction*>(wv->property("reload"))->trigger();
- }
-
- wv->setProperty("url", QUrl::fromLocalFile(SRCDIR "/data/forward.html"));
- QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
- QCOMPARE(wv->property("title").toString(),QString("Forward"));
- QTRY_COMPARE(qvariant_cast<QPixmap>(wv->property("icon")).width(), 32);
- QCOMPARE(qvariant_cast<QPixmap>(wv->property("icon")),QPixmap(SRCDIR "/data/forward.png"));
- QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/forward.html")), strippedHtml(wv->property("html").toString()));
- QCOMPARE(wv->property("url").toUrl(), QUrl::fromLocalFile(SRCDIR "/data/forward.html"));
- QCOMPARE(wv->property("status").toInt(), 1 /*QDeclarativeWebView::Ready*/);
- QCOMPARE(wv->property("statusText").toString(),QString(""));
- QVERIFY(qvariant_cast<QAction*>(wv->property("reload")));
- QVERIFY(qvariant_cast<QAction*>(wv->property("reload"))->isEnabled());
- QVERIFY(qvariant_cast<QAction*>(wv->property("back")));
- QVERIFY(qvariant_cast<QAction*>(wv->property("back"))->isEnabled());
- QVERIFY(qvariant_cast<QAction*>(wv->property("forward")));
- QVERIFY(!qvariant_cast<QAction*>(wv->property("forward"))->isEnabled());
- QVERIFY(qvariant_cast<QAction*>(wv->property("stop")));
- QVERIFY(!qvariant_cast<QAction*>(wv->property("stop"))->isEnabled());
-
- qvariant_cast<QAction*>(wv->property("back"))->trigger();
-
- QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
- QCOMPARE(wv->property("title").toString(),QString("Basic"));
- QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/basic.html")), strippedHtml(wv->property("html").toString()));
- QCOMPARE(wv->property("url").toUrl(), QUrl::fromLocalFile(SRCDIR "/data/basic.html"));
- QCOMPARE(wv->property("status").toInt(), 1 /*QDeclarativeWebView::Ready*/);
- QVERIFY(qvariant_cast<QAction*>(wv->property("reload")));
- QVERIFY(qvariant_cast<QAction*>(wv->property("reload"))->isEnabled());
- QVERIFY(qvariant_cast<QAction*>(wv->property("back")));
- QVERIFY(!qvariant_cast<QAction*>(wv->property("back"))->isEnabled());
- QVERIFY(qvariant_cast<QAction*>(wv->property("forward")));
- QVERIFY(qvariant_cast<QAction*>(wv->property("forward"))->isEnabled());
- QVERIFY(qvariant_cast<QAction*>(wv->property("stop")));
- QVERIFY(!qvariant_cast<QAction*>(wv->property("stop"))->isEnabled());
-}
-
-void tst_qdeclarativewebview::multipleWindows()
-{
- QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/newwindows.qml"));
- checkNoErrors(component);
-
- QDeclarativeGrid *grid = qobject_cast<QDeclarativeGrid*>(component.create());
- QVERIFY(grid != 0);
- QTRY_COMPARE(grid->children().count(), 2+4); // Component, Loader (with 1 WebView), 4 new-window WebViews
- QDeclarativeItem* popup = qobject_cast<QDeclarativeItem*>(grid->children().at(2)); // first popup after Component and Loader.
- QVERIFY(popup != 0);
- QTRY_COMPARE(popup->x(), 150.0);
-}
-
-void tst_qdeclarativewebview::loadError()
-{
- QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/loadError.qml"));
- checkNoErrors(component);
- QWebSettings::enablePersistentStorage(tmpDir());
-
- QObject *wv = component.create();
- QVERIFY(wv != 0);
- for (int i=1; i<=2; ++i) {
- QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
- QCOMPARE(wv->property("title").toString(),QString(""));
- QCOMPARE(wv->property("statusText").toString(),QString("")); // HTML 'status bar' text, not error message
- QCOMPARE(wv->property("url").toUrl(), QUrl::fromLocalFile(SRCDIR "/data/does-not-exist.html")); // Unlike QWebPage, which loses url
- QCOMPARE(wv->property("status").toInt(), 3 /*QDeclarativeWebView::Error*/);
-
- qvariant_cast<QAction*>(wv->property("reload"))->trigger();
- }
-}
-
-void tst_qdeclarativewebview::setHtml()
-{
- QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/sethtml.qml"));
- checkNoErrors(component);
- QObject *wv = component.create();
- QVERIFY(wv != 0);
- QCOMPARE(wv->property("html").toString(),QString("<html><head></head><body><p>This is a <b>string</b> set on the WebView</p></body></html>"));
-
- QSignalSpy spy(wv, SIGNAL(htmlChanged()));
- wv->setProperty("html", QString("<html><head><title>Basic</title></head><body><p>text</p></body></html>"));
- QCOMPARE(spy.count(),1);
-}
-
-void tst_qdeclarativewebview::elementAreaAt()
-{
- QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/elements.qml"));
- checkNoErrors(component);
- QObject *wv = component.create();
- QVERIFY(wv != 0);
- QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
-
- /* not now it's a plugin...
- QCOMPARE(wv->elementAreaAt(40,30,100,100),QRect(1,1,75,54)); // Area A in data/elements.html
- QCOMPARE(wv->elementAreaAt(130,30,200,100),QRect(78,3,110,50)); // Area B
- QCOMPARE(wv->elementAreaAt(40,30,400,400),QRect(0,0,310,100)); // Whole view
- QCOMPARE(wv->elementAreaAt(130,30,280,280),QRect(76,1,223,54)); // Area BC
- QCOMPARE(wv->elementAreaAt(130,30,400,400),QRect(0,0,310,100)); // Whole view
- */
-}
-
-void tst_qdeclarativewebview::javaScript()
-{
- QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/javaScript.qml"));
- checkNoErrors(component);
- QObject *wv = component.create();
- QVERIFY(wv != 0);
- QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
- /* not now it's a plugin...
- QCOMPARE(wv->evaluateJavaScript("123").toInt(), 123);
- QCOMPARE(wv->evaluateJavaScript("window.status").toString(), QString("status here"));
- QCOMPARE(wv->evaluateJavaScript("window.myjsname.qmlprop").toString(), QString("qmlvalue"));
- */
-}
-
-/*
-Cannot be done now that webkit is a plugin
-
-void tst_qdeclarativewebview::pixelCache()
-{
-
- QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/pixelCache.qml"));
- checkNoErrors(component);
- MyWebView *wv = qobject_cast<MyWebView*>(component.create());
- QVERIFY(wv != 0);
- QTRY_COMPARE(wv->property("progress"), 1.0);
- QPixmap pm(150,150);
- QPainter p(&pm);
- wv->paint(&p,0,0);
- const int expected = 120*(150+128); // 120 = width of HTML page, 150=pixmap height, 128=cache extra area
- QCOMPARE(wv->property("pixelsPainted"), expected);
- wv->paint(&p,0,0);
- QCOMPARE(wv->property("pixelsPainted"), expected); // nothing new needed to be painted
- wv->setProperty("pixelCacheSize", 0); // clears the cache
- wv->paint(&p,0,0);
- QCOMPARE(wv->property("pixelsPainted"), expected*2); // everything needed to be painted
- // Note that painted things always go into the cache (even if they don't "fit"),
- // just that they will be removed if anything else needs to be painted.
- wv->setProperty("pixelCacheSize", expected); // won't clear the cache
- wv->paint(&p,0,0);
- QCOMPARE(wv->property("pixelsPainted"), expected*2); // still there
- wv->setProperty("pixelCacheSize", expected-1); // too small - will clear the cache
- wv->paint(&p,0,0);
- QCOMPARE(wv->property("pixelsPainted"), expected*3); // repainted
-}
-*/
-
-void tst_qdeclarativewebview::newWindowParent()
-{
- QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
- checkNoErrors(component);
- QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(component.create());
- QObject *wv = rootItem->findChild<QObject*>("webView");
- QVERIFY(rootItem != 0);
- QVERIFY(wv != 0);
- QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
-
- QDeclarativeItem* oldWindowParent = rootItem->findChild<QDeclarativeItem*>("oldWindowParent");
- QCOMPARE(qvariant_cast<QDeclarativeItem*>(wv->property("newWindowParent")), oldWindowParent);
- QSignalSpy newWindowParentSpy(wv, SIGNAL(newWindowParentChanged()));
-
- QDeclarativeItem* newWindowParent = rootItem->findChild<QDeclarativeItem*>("newWindowParent");
- wv->setProperty("newWindowParent", QVariant::fromValue(newWindowParent));
- QVERIFY(newWindowParent);
- QVERIFY(oldWindowParent);
- QVERIFY(oldWindowParent->childItems().count() == 0);
- QCOMPARE(wv->property("newWindowParent"), QVariant::fromValue(newWindowParent));
- QCOMPARE(newWindowParentSpy.count(),1);
-
- wv->setProperty("newWindowParent", QVariant::fromValue(newWindowParent));
- QCOMPARE(newWindowParentSpy.count(),1);
-
- wv->setProperty("newWindowParent", QVariant::fromValue((QDeclarativeItem*)0));
- QCOMPARE(newWindowParentSpy.count(),2);
-}
-
-void tst_qdeclarativewebview::newWindowComponent()
-{
- QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
- checkNoErrors(component);
- QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(component.create());
- QObject *wv = rootItem->findChild<QObject*>("webView");
- QVERIFY(rootItem != 0);
- QVERIFY(wv != 0);
- QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
-
- QDeclarativeComponent substituteComponent(&engine);
- substituteComponent.setData("import QtQuick 1.0; WebView { objectName: 'newWebView'; url: 'basic.html'; }", QUrl::fromLocalFile(""));
- QSignalSpy newWindowComponentSpy(wv, SIGNAL(newWindowComponentChanged()));
-
- wv->setProperty("newWindowComponent", QVariant::fromValue(&substituteComponent));
- QCOMPARE(wv->property("newWindowComponent"), QVariant::fromValue(&substituteComponent));
- QCOMPARE(newWindowComponentSpy.count(),1);
-
- wv->setProperty("newWindowComponent", QVariant::fromValue(&substituteComponent));
- QCOMPARE(newWindowComponentSpy.count(),1);
-
- wv->setProperty("newWindowComponent", QVariant::fromValue((QDeclarativeComponent*)0));
- QCOMPARE(newWindowComponentSpy.count(),2);
-}
-
-void tst_qdeclarativewebview::renderingEnabled()
-{
- QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
- checkNoErrors(component);
- QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(component.create());
- QObject *wv = rootItem->findChild<QObject*>("webView");
- QVERIFY(rootItem != 0);
- QVERIFY(wv != 0);
- QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
-
- QVERIFY(wv->property("renderingEnabled").toBool());
- QSignalSpy renderingEnabledSpy(wv, SIGNAL(renderingEnabledChanged()));
-
- wv->setProperty("renderingEnabled", false);
- QVERIFY(!wv->property("renderingEnabled").toBool());
- QCOMPARE(renderingEnabledSpy.count(),1);
-
- wv->setProperty("renderingEnabled", false);
- QCOMPARE(renderingEnabledSpy.count(),1);
-
- wv->setProperty("renderingEnabled", true);
- QCOMPARE(renderingEnabledSpy.count(),2);
-}
-
-void tst_qdeclarativewebview::pressGrabTime()
-{
- QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
- checkNoErrors(component);
- QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(component.create());
- QObject *wv = rootItem->findChild<QObject*>("webView");
- QVERIFY(rootItem != 0);
- QVERIFY(wv != 0);
- QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
- QCOMPARE(wv->property("pressGrabTime").toInt(), 200);
- QSignalSpy pressGrabTimeSpy(wv, SIGNAL(pressGrabTimeChanged()));
-
- wv->setProperty("pressGrabTime", 100);
- QCOMPARE(wv->property("pressGrabTime").toInt(), 100);
- QCOMPARE(pressGrabTimeSpy.count(),1);
-
- wv->setProperty("pressGrabTime", 100);
- QCOMPARE(pressGrabTimeSpy.count(),1);
-
- wv->setProperty("pressGrabTime", 0);
- QCOMPARE(pressGrabTimeSpy.count(),2);
-}
-
-QTEST_MAIN(tst_qdeclarativewebview)
-
-#include "tst_qdeclarativewebview.moc"
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
index 2f8f23d..e20c3e6 100644
--- a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
+++ b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
@@ -5,9 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeworkerscript.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro b/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
index 619b239..8aefb8e 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
@@ -9,9 +9,9 @@ SOURCES += tst_qdeclarativexmlhttprequest.cpp \
../shared/testhttpserver.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
index efcea12..64b8267 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
@@ -9,9 +9,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativexmllistmodel.cpp
symbian: {
- importFiles.sources = data
+ importFiles.files = data
importFiles.path = .
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp b/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
index 06baed8..f12bcc3 100644
--- a/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
+++ b/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
@@ -140,9 +140,9 @@ void tst_QMetaObjectBuilder::mocVersionCheck()
// whenenver moc changes. Once QMetaObjectBuilder has been
// updated, this test can be changed to check for the next version.
int version = int(QObject::staticMetaObject.d.data[0]);
- QVERIFY(version == 4 || version == 5);
+ QVERIFY(version == 4 || version == 5 || version == 6);
version = int(staticMetaObject.d.data[0]);
- QVERIFY(version == 4 || version == 5);
+ QVERIFY(version == 4 || version == 5 || version == 6);
}
void tst_QMetaObjectBuilder::create()
@@ -546,6 +546,8 @@ void tst_QMetaObjectBuilder::property()
QVERIFY(!nullProp.isUser());
QVERIFY(!nullProp.hasStdCppSet());
QVERIFY(!nullProp.isEnumOrFlag());
+ QVERIFY(!nullProp.isConstant());
+ QVERIFY(!nullProp.isFinal());
QCOMPARE(nullProp.index(), 0);
// Add a property and check its attributes.
@@ -563,6 +565,8 @@ void tst_QMetaObjectBuilder::property()
QVERIFY(!prop1.isUser());
QVERIFY(!prop1.hasStdCppSet());
QVERIFY(!prop1.isEnumOrFlag());
+ QVERIFY(!prop1.isConstant());
+ QVERIFY(!prop1.isFinal());
QCOMPARE(prop1.index(), 0);
QCOMPARE(builder.propertyCount(), 1);
@@ -581,6 +585,8 @@ void tst_QMetaObjectBuilder::property()
QVERIFY(!prop2.isUser());
QVERIFY(!prop2.hasStdCppSet());
QVERIFY(!prop2.isEnumOrFlag());
+ QVERIFY(!prop2.isConstant());
+ QVERIFY(!prop2.isFinal());
QCOMPARE(prop2.index(), 1);
QCOMPARE(builder.propertyCount(), 2);
@@ -602,6 +608,8 @@ void tst_QMetaObjectBuilder::property()
prop1.setUser(true);
prop1.setStdCppSet(true);
prop1.setEnumOrFlag(true);
+ prop1.setConstant(true);
+ prop1.setFinal(true);
// Check that prop1 is changed, but prop2 is not.
QCOMPARE(prop1.name(), QByteArray("foo"));
@@ -616,6 +624,8 @@ void tst_QMetaObjectBuilder::property()
QVERIFY(prop1.isUser());
QVERIFY(prop1.hasStdCppSet());
QVERIFY(prop1.isEnumOrFlag());
+ QVERIFY(prop1.isConstant());
+ QVERIFY(prop1.isFinal());
QVERIFY(prop2.isReadable());
QVERIFY(prop2.isWritable());
QCOMPARE(prop2.name(), QByteArray("bar"));
@@ -628,6 +638,8 @@ void tst_QMetaObjectBuilder::property()
QVERIFY(!prop2.isUser());
QVERIFY(!prop2.hasStdCppSet());
QVERIFY(!prop2.isEnumOrFlag());
+ QVERIFY(!prop2.isConstant());
+ QVERIFY(!prop2.isFinal());
// Remove prop1 and check that prop2 becomes index 0.
builder.removeProperty(0);
@@ -643,6 +655,8 @@ void tst_QMetaObjectBuilder::property()
QVERIFY(!prop2.isUser());
QVERIFY(!prop2.hasStdCppSet());
QVERIFY(!prop2.isEnumOrFlag());
+ QVERIFY(!prop2.isConstant());
+ QVERIFY(!prop2.isFinal());
QCOMPARE(prop2.index(), 0);
// Perform index-based lookup again.
@@ -666,6 +680,8 @@ void tst_QMetaObjectBuilder::property()
prop2.setUser(false); \
prop2.setStdCppSet(false); \
prop2.setEnumOrFlag(false); \
+ prop2.setConstant(false); \
+ prop2.setFinal(false); \
} while (0)
#define COUNT_FLAGS() \
((prop2.isReadable() ? 1 : 0) + \
@@ -677,7 +693,9 @@ void tst_QMetaObjectBuilder::property()
(prop2.isEditable() ? 1 : 0) + \
(prop2.isUser() ? 1 : 0) + \
(prop2.hasStdCppSet() ? 1 : 0) + \
- (prop2.isEnumOrFlag() ? 1 : 0))
+ (prop2.isEnumOrFlag() ? 1 : 0) + \
+ (prop2.isConstant() ? 1 : 0) + \
+ (prop2.isFinal() ? 1 : 0))
#define CHECK_FLAG(setFunc,isFunc) \
do { \
CLEAR_FLAGS(); \
@@ -696,6 +714,8 @@ void tst_QMetaObjectBuilder::property()
CHECK_FLAG(setUser, isUser);
CHECK_FLAG(setStdCppSet, hasStdCppSet);
CHECK_FLAG(setEnumOrFlag, isEnumOrFlag);
+ CHECK_FLAG(setConstant, isConstant);
+ CHECK_FLAG(setFinal, isFinal);
// Check that nothing else changed.
QVERIFY(checkForSideEffects(builder, QMetaObjectBuilder::Properties));
@@ -920,9 +940,9 @@ void tst_QMetaObjectBuilder::relatedMetaObject()
QVERIFY(checkForSideEffects(builder, QMetaObjectBuilder::RelatedMetaObjects));
}
-static int smetacall(QMetaObject::Call, int, void **)
+static void smetacall(QObject *, QMetaObject::Call, int, void **)
{
- return 0;
+ return;
}
void tst_QMetaObjectBuilder::staticMetacall()
diff --git a/tests/auto/declarative/qmlvisual/qmlvisual.pro b/tests/auto/declarative/qmlvisual/qmlvisual.pro
index b2c5b4f..416f8d9 100644
--- a/tests/auto/declarative/qmlvisual/qmlvisual.pro
+++ b/tests/auto/declarative/qmlvisual/qmlvisual.pro
@@ -6,7 +6,7 @@ SOURCES += tst_qmlvisual.cpp
symbian: {
importFiles.path = .
- importFiles.sources = animation \
+ importFiles.files = animation \
fillmode \
focusscope \
ListView \
@@ -27,7 +27,7 @@ symbian: {
repeater \
selftest_noimages \
webview
- DEPLOYMENT = importFiles
+ DEPLOYMENT += importFiles
} else {
DEFINES += QT_TEST_SOURCE_DIR=\"\\\"$$PWD\\\"\"
}
diff --git a/tests/auto/declarative/qperformancetimer/tst_qperformancetimer.cpp b/tests/auto/declarative/qperformancetimer/tst_qperformancetimer.cpp
index 2029c8a..057a8ca 100644
--- a/tests/auto/declarative/qperformancetimer/tst_qperformancetimer.cpp
+++ b/tests/auto/declarative/qperformancetimer/tst_qperformancetimer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/declarative/symbianlibs.pri b/tests/auto/declarative/symbianlibs.pri
new file mode 100644
index 0000000..4452f67
--- /dev/null
+++ b/tests/auto/declarative/symbianlibs.pri
@@ -0,0 +1,9 @@
+#additional libs required for orientation sensor
+symbian {
+ !contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) {
+ LIBS += -lsensrvclient -lsensrvutil
+ }
+ contains(QT_CONFIG, s60): {
+ LIBS += -lavkon -lcone
+ }
+}