summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/declarative.pro2
-rw-r--r--tests/auto/declarative/examples/examples.pro3
-rw-r--r--tests/auto/declarative/examples/tst_examples.cpp6
-rw-r--r--tests/auto/declarative/parserstress/parserstress.pro3
-rw-r--r--tests/auto/declarative/parserstress/tst_parserstress.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro3
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro4
-rw-r--r--tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro4
-rw-r--r--tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro4
-rw-r--r--tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro3
-rw-r--r--tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro8
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro5
-rw-r--r--tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro3
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro4
-rw-r--r--tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro4
-rw-r--r--tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro4
-rw-r--r--tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp25
-rw-r--r--tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro3
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro6
-rw-r--r--tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro4
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro4
-rw-r--r--tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp13
-rw-r--r--tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro4
-rw-r--r--tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp5
-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/qdeclarativemousearea/tst_qdeclarativemousearea.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeparticles/tst_qdeclarativeparticles.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro4
-rw-r--r--tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro3
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro4
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro4
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro4
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro4
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedfollow/tst_qdeclarativesmoothedfollow.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro4
-rw-r--r--tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro4
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml20
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/returnToBase.qml21
-rw-r--r--tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro4
-rw-r--r--tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp68
-rw-r--r--tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro5
-rw-r--r--tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro3
-rw-r--r--tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro4
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp83
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro4
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp82
-rw-r--r--tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro4
-rw-r--r--tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro3
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp11
-rw-r--r--tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp10
-rw-r--r--tests/auto/declarative/qdeclarativeviewer/data/orientation.qml20
-rw-r--r--tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro3
-rw-r--r--tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp212
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro3
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro4
-rw-r--r--tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro4
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro4
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro3
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp5
-rw-r--r--tests/auto/declarative/qmlvisual/qmlvisual.pro4
-rw-r--r--tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp5
124 files changed, 821 insertions, 231 deletions
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro
index 484fbef142..3d2dbf0081 100644
--- a/tests/auto/declarative/declarative.pro
+++ b/tests/auto/declarative/declarative.pro
@@ -1,12 +1,12 @@
TEMPLATE = subdirs
!symbian: {
SUBDIRS += \
- examples \
qdeclarativemetatype \
qmetaobjectbuilder
}
SUBDIRS += \
+ examples \
parserstress \
qdeclarativeanchors \
qdeclarativeanimatedimage \
diff --git a/tests/auto/declarative/examples/examples.pro b/tests/auto/declarative/examples/examples.pro
index 92a16f1f81..2e243b4957 100644
--- a/tests/auto/declarative/examples/examples.pro
+++ b/tests/auto/declarative/examples/examples.pro
@@ -7,9 +7,8 @@ SOURCES += tst_examples.cpp
include(../../../../tools/qml/qml.pri)
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/examples/tst_examples.cpp b/tests/auto/declarative/examples/tst_examples.cpp
index 605345e06b..cff0b46d39 100644
--- a/tests/auto/declarative/examples/tst_examples.cpp
+++ b/tests/auto/declarative/examples/tst_examples.cpp
@@ -47,6 +47,11 @@
#include <QDeclarativeView>
#include <QDeclarativeError>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_examples : public QObject
{
Q_OBJECT
@@ -80,6 +85,7 @@ tst_examples::tst_examples()
// Add directories you want excluded here
+ excludedDirs << "doc/src/snippets/declarative/visualdatamodel_rootindex";
#ifdef QT_NO_WEBKIT
excludedDirs << "examples/declarative/modelviews/webview";
diff --git a/tests/auto/declarative/parserstress/parserstress.pro b/tests/auto/declarative/parserstress/parserstress.pro
index 3a675e410c..bb1d69ff9d 100644
--- a/tests/auto/declarative/parserstress/parserstress.pro
+++ b/tests/auto/declarative/parserstress/parserstress.pro
@@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle
SOURCES += tst_parserstress.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = ..\\..\\qscriptjstestsuite\\tests
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/parserstress/tst_parserstress.cpp b/tests/auto/declarative/parserstress/tst_parserstress.cpp
index c86908b17f..522a63a8f5 100644
--- a/tests/auto/declarative/parserstress/tst_parserstress.cpp
+++ b/tests/auto/declarative/parserstress/tst_parserstress.cpp
@@ -46,6 +46,11 @@
#include <QDir>
#include <QFile>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_parserstress : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro b/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
index 452ad55fe5..9798bb6a62 100644
--- a/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
+++ b/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
@@ -4,9 +4,8 @@ SOURCES += tst_qdeclarativeanchors.cpp
macx:CONFIG -= app_bundle
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
index 22f7966cf7..97b77d06b0 100644
--- a/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
+++ b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
@@ -50,6 +50,11 @@
#include <QtDeclarative/private/qdeclarativeanchors_p_p.h>
#include <QtDeclarative/private/qdeclarativeitem_p.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
Q_DECLARE_METATYPE(QDeclarativeAnchors::Anchor)
Q_DECLARE_METATYPE(QDeclarativeAnchorLine::AnchorLine)
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro b/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
index 7213abda12..0a2f0f29b7 100644
--- a/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
@@ -5,9 +5,8 @@ SOURCES += tst_qdeclarativeanimatedimage.cpp ../shared/testhttpserver.cpp
macx:CONFIG -= app_bundle
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
index 237a436213..1001278735 100644
--- a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
@@ -48,6 +48,11 @@
#include "../shared/testhttpserver.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
#define TRY_WAIT(expr) \
do { \
for (int ii = 0; ii < 6; ++ii) { \
diff --git a/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro b/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
index f7ed371191..ed47dcafa2 100644
--- a/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
+++ b/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
@@ -4,9 +4,8 @@ SOURCES += tst_qdeclarativeanimations.cpp
macx:CONFIG -= app_bundle
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
index ed7e5066f5..5cf4c2376a 100644
--- a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
+++ b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
@@ -48,6 +48,11 @@
#include <QVariantAnimation>
#include <QEasingCurve>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativeanimations : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro b/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
index 7137af10b9..cfb59ef458 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
+++ b/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
@@ -4,9 +4,8 @@ SOURCES += tst_qdeclarativebehaviors.cpp
macx:CONFIG -= app_bundle
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
index 45e53042b6..70739fb986 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
+++ b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
@@ -49,6 +49,11 @@
#include <private/qdeclarativeitem_p.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativebehaviors : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro b/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
index 04535db207..a7ba2a8bd8 100644
--- a/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
+++ b/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativebinding.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp
index 8ab7b0bb47..653b34a26d 100644
--- a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp
+++ b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp
@@ -45,6 +45,11 @@
#include <private/qdeclarativerectangle_p.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativebinding : public QObject
{
diff --git a/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro b/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
index 3aa21974dc..a21761b87a 100644
--- a/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
+++ b/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
@@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle
HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativeborderimage.cpp ../shared/testhttpserver.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
index 69b4a89cd9..1b73cf7ae8 100644
--- a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
+++ b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
@@ -54,6 +54,10 @@
#include "../shared/testhttpserver.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
#define SERVER_PORT 14446
#define SERVER_ADDR "http://127.0.0.1:14446"
diff --git a/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro b/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro
index 98c38ad3dd..4124f94692 100644
--- a/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro
+++ b/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro
@@ -5,9 +5,7 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativecomponent.cpp
-symbian: {
- DEFINES += SRCDIR=\".\"
-} else {
+!symbian: {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
index faa1c212cd..8a19b8bca1 100644
--- a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
+++ b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
@@ -45,6 +45,11 @@
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativecomponent.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativecomponent : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro b/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
index bbf8630fab..d06ce4f7ba 100644
--- a/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
+++ b/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeconnection.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp b/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp
index 00e97caa30..d38437272d 100644
--- a/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp
+++ b/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp
@@ -46,6 +46,11 @@
#include "../../../shared/util.h"
#include <QtDeclarative/qdeclarativescriptstring.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativeconnection : public QObject
{
diff --git a/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro b/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro
index 0e1a5b19ff..74bb78c6ed 100644
--- a/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro
+++ b/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro
@@ -3,9 +3,7 @@ contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_qdeclarativecontext.cpp
macx:CONFIG -= app_bundle
-symbian: {
- DEFINES += SRCDIR=\".\"
-} else {
+!symbian: {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
index 7f0e6c07af..605cf8e6d1 100644
--- a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
+++ b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
@@ -46,6 +46,11 @@
#include <QDeclarativeComponent>
#include <QDeclarativeExpression>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativecontext : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro b/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
index 9f1e50c77f..415d4e2d50 100644
--- a/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
+++ b/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
@@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativedom.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
index 6c195668a7..13960b14e8 100644
--- a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
+++ b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
@@ -46,6 +46,11 @@
#include <QtCore/QDebug>
#include <QtCore/QFile>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativedom : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro b/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
index c907be5270..58cad34d28 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
+++ b/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
@@ -12,7 +12,13 @@ INCLUDEPATH += ../shared
# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
# LIBS += -lgcov
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ importFiles.sources = data
+ importFiles.path = .
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index e75abacc11..16e7ec5d13 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -53,6 +53,11 @@
#include "testtypes.h"
#include "testhttpserver.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
/*
This test covers evaluation of ECMAScript expressions and bindings from within
QML. This does not include static QML language issues.
diff --git a/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro b/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro
index 23afd07290..7119ad999e 100644
--- a/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro
+++ b/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro
@@ -4,10 +4,7 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeengine.cpp
-# Define SRCDIR equal to test's source directory
-symbian: {
- DEFINES += SRCDIR=\".\"
-} else {
+!symbian: {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp b/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp
index 0aebea1bdb..56ebd7306f 100644
--- a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp
+++ b/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp
@@ -50,6 +50,11 @@
#include <QDeclarativeComponent>
#include <QDeclarativeNetworkAccessManagerFactory>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativeengine : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro b/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro
index fae11f937f..29b7149c46 100644
--- a/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro
+++ b/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro
@@ -3,9 +3,7 @@ contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_qdeclarativeerror.cpp
macx:CONFIG -= app_bundle
-symbian: {
- DEFINES += SRCDIR=\".\"
-} else {
+!symbian: {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp b/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp
index ba1ebae402..027995398e 100644
--- a/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp
+++ b/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp
@@ -43,6 +43,11 @@
#include <QDeclarativeError>
#include <QDebug>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativeerror : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro b/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
index 7a701096e1..be0ba6c36f 100644
--- a/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
+++ b/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeflickable.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
index 2c6890ec21..2ba5574a36 100644
--- a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
+++ b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
@@ -46,6 +46,11 @@
#include <private/qdeclarativevaluetype_p.h>
#include <math.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativeflickable : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro b/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
index 9b4fbc97b9..759e80b321 100644
--- a/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
+++ b/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeflipable.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp b/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
index f32cdbdb49..f56c0325a2 100644
--- a/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
+++ b/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
@@ -48,6 +48,11 @@
#include <private/qdeclarativerectangle_p.h>
#include <math.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativeflipable : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro b/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro
index c021fcfc5b..24749c61c5 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro
+++ b/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro
@@ -4,9 +4,8 @@ SOURCES += tst_qdeclarativefocusscope.cpp
macx:CONFIG -= app_bundle
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp b/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp
index 04bb1c5179..7732e6dadb 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp
+++ b/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp
@@ -48,6 +48,10 @@
#include <private/qdeclarativetext_p.h>
#include <QtDeclarative/private/qdeclarativefocusscope_p.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
class tst_qdeclarativefocusscope : public QObject
{
diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro b/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro
index 487d0e157d..91bf4a764f 100644
--- a/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro
+++ b/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativefolderlistmodel.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp b/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp
index 3cf9613b96..b2e3a5b516 100644
--- a/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp
@@ -48,6 +48,11 @@
#include <QtCore/qabstractitemmodel.h>
#include <QDebug>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
// From qdeclarastivefolderlistmodel.h
const int FileNameRole = Qt::UserRole+1;
const int FilePathRole = Qt::UserRole+2;
diff --git a/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro b/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
index dbe0dcbd95..01dca2668c 100644
--- a/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
+++ b/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
@@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle
HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativefontloader.cpp ../shared/testhttpserver.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
index 36908d9143..ae23017bdf 100644
--- a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
+++ b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
@@ -47,6 +47,11 @@
#define SERVER_PORT 14448
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativefontloader : public QObject
{
diff --git a/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro b/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
index 033e20ed9a..a99a1b9c3b 100644
--- a/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
+++ b/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativegridview.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
index 2db3ee678a..4e35bc0823 100644
--- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
+++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
@@ -52,6 +52,11 @@
#include <QtDeclarative/private/qdeclarativelistmodel_p.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_QDeclarativeGridView : public QObject
{
Q_OBJECT
@@ -833,21 +838,34 @@ void tst_QDeclarativeGridView::componentChanges()
QSignalSpy highlightSpy(gridView, SIGNAL(highlightChanged()));
QSignalSpy delegateSpy(gridView, SIGNAL(delegateChanged()));
+ QSignalSpy headerSpy(gridView, SIGNAL(headerChanged()));
+ QSignalSpy footerSpy(gridView, SIGNAL(footerChanged()));
gridView->setHighlight(&component);
gridView->setDelegate(&delegateComponent);
+ gridView->setHeader(&component);
+ gridView->setFooter(&component);
QTRY_COMPARE(gridView->highlight(), &component);
QTRY_COMPARE(gridView->delegate(), &delegateComponent);
+ QTRY_COMPARE(gridView->header(), &component);
+ QTRY_COMPARE(gridView->footer(), &component);
QTRY_COMPARE(highlightSpy.count(),1);
QTRY_COMPARE(delegateSpy.count(),1);
+ QTRY_COMPARE(headerSpy.count(),1);
+ QTRY_COMPARE(footerSpy.count(),1);
gridView->setHighlight(&component);
gridView->setDelegate(&delegateComponent);
+ gridView->setHeader(&component);
+ gridView->setFooter(&component);
QTRY_COMPARE(highlightSpy.count(),1);
QTRY_COMPARE(delegateSpy.count(),1);
+ QTRY_COMPARE(headerSpy.count(),1);
+ QTRY_COMPARE(footerSpy.count(),1);
+
delete canvas;
}
@@ -1092,6 +1110,13 @@ void tst_QDeclarativeGridView::enforceRange()
gridview->setCurrentIndex(5);
QTRY_COMPARE(gridview->contentY(), 100.);
+ TestModel model2;
+ for (int i = 0; i < 5; i++)
+ model2.addItem("Item" + QString::number(i), "");
+
+ ctxt->setContextProperty("testModel", &model2);
+ QCOMPARE(gridview->count(), 5);
+
delete canvas;
}
diff --git a/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro b/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
index a8b8eca3e9..244a1e1e90 100644
--- a/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
+++ b/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
@@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle
HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativeimage.cpp ../shared/testhttpserver.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
index 720702a82a..c09f7fc7d6 100644
--- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
+++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
@@ -55,6 +55,10 @@
#include "../shared/testhttpserver.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
#define SERVER_PORT 14451
#define SERVER_ADDR "http://127.0.0.1:14451"
diff --git a/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro b/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro
index 1b828a50bf..bdb6423657 100644
--- a/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro
+++ b/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro
@@ -8,11 +8,9 @@ SOURCES += tst_qdeclarativeimageprovider.cpp
# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
# LIBS += -lgcov
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
index cc4ec20db0..4185790d91 100644
--- a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
+++ b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
@@ -45,6 +45,11 @@
#include <private/qdeclarativeimage_p.h>
#include <QImageReader>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
// QDeclarativeImageProvider::request() is run in an idle thread where possible
// Be generous in our timeout.
#define TRY_WAIT(expr) \
diff --git a/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro b/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
index c6719c075e..2c20e7ef09 100644
--- a/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
+++ b/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
@@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeinfo.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp b/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp
index 36db448c3a..03df71f50c 100644
--- a/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp
+++ b/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp
@@ -46,6 +46,11 @@
#include <QDeclarativeContext>
#include <qdeclarativeinfo.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativeinfo : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro b/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro
index 350f6c64a6..c8a48c9410 100644
--- a/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro
+++ b/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro
@@ -3,9 +3,7 @@ contains(QT_CONFIG,declarative): QT += declarative script
SOURCES += tst_qdeclarativeinstruction.cpp
macx:CONFIG -= app_bundle
-symbian: {
- DEFINES += SRCDIR=\".\"
-} else {
+!symbian: {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
index 1e88255fcc..d5a911aeb5 100644
--- a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
+++ b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
@@ -42,6 +42,11 @@
#include <qtest.h>
#include <private/qdeclarativecompiler_p.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativeinstruction : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro b/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
index f494ef18db..f4901c4428 100644
--- a/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
+++ b/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
@@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeitem.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
index ecc813efbb..c2d366000d 100644
--- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
+++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
@@ -47,6 +47,11 @@
#include <QtDeclarative/qdeclarativeitem.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_QDeclarativeItem : public QObject
{
diff --git a/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro b/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
index 2b7eb1c758..43c451fb32 100644
--- a/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
+++ b/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
@@ -12,9 +12,8 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += ../shared/testhttpserver.cpp
symbian: {
- DEFINES += SRCDIR=\".\"\"\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index 011870c99e..413843abdc 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -55,6 +55,11 @@
#include "../../../shared/util.h"
#include "testhttpserver.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
DEFINE_BOOL_CONFIG_OPTION(qmlCheckTypes, QML_CHECK_TYPES)
diff --git a/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro b/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro
index 79954fe0fc..5076e5150f 100644
--- a/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro
+++ b/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro
@@ -4,12 +4,10 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativelayoutitem.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
-} \ No newline at end of file
+}
diff --git a/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp b/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp
index c0c5abcb39..bbdba74a82 100644
--- a/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp
+++ b/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp
@@ -49,6 +49,11 @@
#include <qgraphicslinearlayout.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativelayoutitem : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro b/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
index 53bb9eca66..e90db499ce 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
+++ b/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
@@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativelistmodel.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
index be4ffe829b..b3b6c2067c 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
@@ -51,6 +51,11 @@
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativelistmodel : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
index b406fde433..2c5a859b1e 100644
--- a/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
+++ b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativelistview.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
index 2aef9bb02d..cd42b63a05 100644
--- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
+++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
@@ -52,6 +52,11 @@
#include <QtDeclarative/private/qlistmodelinterface_p.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_QDeclarativeListView : public QObject
{
Q_OBJECT
@@ -802,6 +807,14 @@ void tst_QDeclarativeListView::enforceRange()
QTRY_COMPARE(listview->currentIndex(), 6);
+ // change model
+ TestModel model2;
+ for (int i = 0; i < 5; i++)
+ model2.addItem("Item" + QString::number(i), "");
+
+ ctxt->setContextProperty("testModel", &model2);
+ QCOMPARE(listview->count(), 5);
+
delete canvas;
}
diff --git a/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro b/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
index 93349283ba..b07bf9e903 100644
--- a/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
+++ b/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
@@ -8,9 +8,8 @@ SOURCES += tst_qdeclarativeloader.cpp \
../shared/testhttpserver.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
index 11cc61be7f..d047a2a0df 100644
--- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
+++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
@@ -50,6 +50,11 @@
#define SERVER_PORT 14450
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
inline QUrl TEST_FILE(const QString &filename)
{
return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename);
diff --git a/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro b/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro
index 0d32ab8f69..f13250e2c5 100644
--- a/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro
+++ b/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro
@@ -3,9 +3,7 @@ contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_qdeclarativemetatype.cpp
macx:CONFIG -= app_bundle
-symbian: {
- DEFINES += SRCDIR=\".\"
-} else {
+!symbian: {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp b/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp
index 76e86c9b4b..8964f8a040 100644
--- a/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp
+++ b/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp
@@ -54,6 +54,11 @@
#include <private/qdeclarativemetatype_p.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativemetatype : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
index 6d17accaa5..2081f0ea4f 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
@@ -56,6 +56,11 @@ private slots:
void importsPlugin();
};
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
#define VERIFY_ERRORS(errorfile) \
if (!errorfile) { \
if (qgetenv("DEBUG") != "" && !component.errors().isEmpty()) \
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro
index 29a100929f..fb3630ffe0 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro
@@ -2,10 +2,10 @@ load(qttest_p4)
SOURCES = tst_qdeclarativemoduleplugin.cpp
QT += declarative
CONFIG -= app_bundle
+
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro b/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
index 6f9c98cd3a..3d39aa8ab0 100644
--- a/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
+++ b/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
@@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle
HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativemousearea.cpp ../shared/testhttpserver.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
index ff3bf45cc4..5a10372c81 100644
--- a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
+++ b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
@@ -46,6 +46,11 @@
#include <QtDeclarative/qdeclarativeview.h>
#include <QtDeclarative/qdeclarativecontext.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_QDeclarativeMouseArea: public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro b/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
index 31172a9c47..f9ca90fe7e 100644
--- a/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
+++ b/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeparticles.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeparticles/tst_qdeclarativeparticles.cpp b/tests/auto/declarative/qdeclarativeparticles/tst_qdeclarativeparticles.cpp
index 093190cdb8..caf69fccfd 100644
--- a/tests/auto/declarative/qdeclarativeparticles/tst_qdeclarativeparticles.cpp
+++ b/tests/auto/declarative/qdeclarativeparticles/tst_qdeclarativeparticles.cpp
@@ -43,6 +43,11 @@
#include <qdeclarativeview.h>
#include <QGraphicsObject>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_QDeclarativeParticles : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro b/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
index 6bef61c152..04fd26b125 100644
--- a/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
+++ b/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativepathview.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
index dffc7ac35c..bf1e13a8e8 100644
--- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
+++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
@@ -57,6 +57,11 @@
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_QDeclarativePathView : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro b/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
index 99a94bc7a6..31303640ec 100644
--- a/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
+++ b/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
@@ -10,9 +10,8 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += ../shared/testhttpserver.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
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 0cc13ad516..f1018b2a3a 100644
--- a/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
+++ b/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
@@ -49,6 +49,11 @@
// These don't let normal people run tests!
//#include "../network-settings.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativepixmapcache : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro b/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
index 2c5b473fb9..5dc7bb810a 100644
--- a/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
+++ b/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
@@ -3,11 +3,9 @@ contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_qdeclarativepositioners.cpp
macx:CONFIG -= app_bundle
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
index e639014f27..62ec707649 100644
--- a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
+++ b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
@@ -48,6 +48,11 @@
#include <qdeclarativeexpression.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_QDeclarativePositioners : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
index f37d952702..4121a335b6 100644
--- a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
+++ b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
@@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeproperty.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp
index 53614fec33..0ca0e03b8e 100644
--- a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp
+++ b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp
@@ -48,6 +48,11 @@
#include <QtCore/qfileinfo.h>
#include <QtCore/qdir.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
inline QUrl TEST_FILE(const QString &filename)
{
QFileInfo fileInfo(__FILE__);
diff --git a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
index b381a9bce2..6af65008eb 100644
--- a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
+++ b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
@@ -4,9 +4,8 @@ SOURCES += tst_qdeclarativeqt.cpp
macx:CONFIG -= app_bundle
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
index 5095be83ac..06561faab8 100644
--- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
+++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
@@ -51,6 +51,11 @@
#include <QCryptographicHash>
#include <QDeclarativeItem>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativeqt : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro b/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
index 51667afcca..f3ff9ed5c9 100644
--- a/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
+++ b/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativerepeater.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
index e6b2fdd663..3cc68f4c8c 100644
--- a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
+++ b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
@@ -48,6 +48,11 @@
#include <private/qdeclarativerepeater_p.h>
#include <private/qdeclarativetext_p.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
inline QUrl TEST_FILE(const QString &filename)
{
return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename);
diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro b/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro
index 6b98f1e620..872aeb9888 100644
--- a/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro
+++ b/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativesmoothedanimation.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp b/tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp
index 7cf318ad0e..d9164f67b1 100644
--- a/tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp
+++ b/tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp
@@ -46,6 +46,11 @@
#include <private/qdeclarativevaluetype_p.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativesmoothedanimation : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro b/tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro
index eb7d793a54..dff4922d58 100644
--- a/tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro
+++ b/tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativesmoothedfollow.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativesmoothedfollow/tst_qdeclarativesmoothedfollow.cpp b/tests/auto/declarative/qdeclarativesmoothedfollow/tst_qdeclarativesmoothedfollow.cpp
index ac750d9641..b9ac23f86a 100644
--- a/tests/auto/declarative/qdeclarativesmoothedfollow/tst_qdeclarativesmoothedfollow.cpp
+++ b/tests/auto/declarative/qdeclarativesmoothedfollow/tst_qdeclarativesmoothedfollow.cpp
@@ -48,6 +48,11 @@
#include <private/qdeclarativevaluetype_p.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativesmoothedfollow : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro b/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro
index 6ed8924e2c..1c17ba07f9 100644
--- a/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro
+++ b/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativespringfollow.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp b/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp
index 8a07d6bd41..e0e2892ab0 100644
--- a/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp
+++ b/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp
@@ -45,6 +45,11 @@
#include <private/qdeclarativevaluetype_p.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativespringfollow : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro b/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
index 9cdb8846b3..1462c9a28b 100644
--- a/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
+++ b/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
@@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativesqldatabase.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp b/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp
index 7486a4b199..f92d7e8575 100644
--- a/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp
+++ b/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp
@@ -53,6 +53,11 @@
#include <QtCore/qdir.h>
#include <QtCore/qfile.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativesqldatabase : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml b/tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml
new file mode 100644
index 0000000000..e17823b6d8
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml
@@ -0,0 +1,20 @@
+import Qt.test 1.0
+import Qt 4.7
+
+Item {
+ id: item
+ width: 100; height: 100
+ MyRectangle.foo: 0
+
+ states: State {
+ name: "foo1"
+ PropertyChanges {
+ target: item
+ MyRectangle.foo: 1
+ width: 50
+ }
+ }
+
+ Component.onCompleted: item.state = "foo1"
+}
+
diff --git a/tests/auto/declarative/qdeclarativestates/data/returnToBase.qml b/tests/auto/declarative/qdeclarativestates/data/returnToBase.qml
new file mode 100644
index 0000000000..e342331d7c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/returnToBase.qml
@@ -0,0 +1,21 @@
+import Qt 4.7
+
+Rectangle {
+ id: theRect
+ property bool triggerState: false
+ property string stateString: ""
+ states: [ State {
+ when: triggerState
+ PropertyChanges {
+ target: theRect
+ stateString: "inState"
+ }
+ },
+ State {
+ name: ""
+ PropertyChanges {
+ target: theRect
+ stateString: "originalState"
+ }
+ }]
+}
diff --git a/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
index 6f4ecb3705..2bae041398 100644
--- a/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
+++ b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativestates.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
index ea074a4882..2913dddb6a 100644
--- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
+++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
@@ -49,6 +49,24 @@
#include <private/qdeclarativestategroup_p.h>
#include <private/qdeclarativeitem_p.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
+class MyAttached : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int foo READ foo WRITE setFoo)
+public:
+ MyAttached(QObject *parent) : QObject(parent), m_foo(13) {}
+
+ int foo() const { return m_foo; }
+ void setFoo(int f) { m_foo = f; }
+
+private:
+ int m_foo;
+};
class MyRect : public QDeclarativeRectangle
{
@@ -61,6 +79,10 @@ public:
int propertyWithNotify() const { return m_prop; }
void setPropertyWithNotify(int i) { m_prop = i; emit oddlyNamedNotifySignal(); }
+
+ static MyAttached *qmlAttachedProperties(QObject *o) {
+ return new MyAttached(o);
+ }
Q_SIGNALS:
void didSomething();
void oddlyNamedNotifySignal();
@@ -69,6 +91,8 @@ private:
int m_prop;
};
+QML_DECLARE_TYPE(MyRect)
+QML_DECLARE_TYPEINFO(MyRect, QML_HAS_ATTACHED_PROPERTIES)
class tst_qdeclarativestates : public QObject
{
@@ -83,6 +107,7 @@ private slots:
void initTestCase();
void basicChanges();
+ void attachedPropertyChanges();
void basicExtension();
void basicBinding();
void signalOverride();
@@ -112,6 +137,7 @@ private slots:
void whenOrdering();
void urlResolution();
void unnamedWhen();
+ void returnToBase();
};
void tst_qdeclarativestates::initTestCase()
@@ -219,6 +245,28 @@ void tst_qdeclarativestates::basicChanges()
}
}
+void tst_qdeclarativestates::attachedPropertyChanges()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent component(&engine, SRCDIR "/data/attachedPropertyChanges.qml");
+ QVERIFY(component.isReady());
+
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item != 0);
+ QCOMPARE(item->width(), 50.0);
+
+ // Ensure attached property has been changed
+ QObject *attObj = qmlAttachedPropertiesObject<MyRect>(item, false);
+ QVERIFY(attObj);
+
+ MyAttached *att = qobject_cast<MyAttached*>(attObj);
+ QVERIFY(att);
+
+ QEXPECT_FAIL("", "QTBUG-11283", Abort);
+ QCOMPARE(att->foo(), 1);
+}
+
void tst_qdeclarativestates::basicExtension()
{
QDeclarativeEngine engine;
@@ -1085,6 +1133,26 @@ void tst_qdeclarativestates::unnamedWhen()
QCOMPARE(rect->property("stateString").toString(), QLatin1String(""));
}
+void tst_qdeclarativestates::returnToBase()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c(&engine, SRCDIR "/data/returnToBase.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect != 0);
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+
+ QCOMPARE(rectPrivate->state(), QLatin1String(""));
+ QCOMPARE(rect->property("stateString").toString(), QLatin1String(""));
+ rect->setProperty("triggerState", true);
+ QCOMPARE(rectPrivate->state(), QLatin1String("anonymousState1"));
+ QCOMPARE(rect->property("stateString").toString(), QLatin1String("inState"));
+ rect->setProperty("triggerState", false);
+ QCOMPARE(rectPrivate->state(), QLatin1String(""));
+ QCOMPARE(rect->property("stateString").toString(), QLatin1String("originalState"));
+}
+
+
QTEST_MAIN(tst_qdeclarativestates)
#include "tst_qdeclarativestates.moc"
diff --git a/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro b/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro
index 786bc1bb11..0062688414 100644
--- a/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro
+++ b/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro
@@ -4,10 +4,7 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativesystempalette.cpp
-# Define SRCDIR equal to test's source directory
-symbian: {
- DEFINES += SRCDIR=\".\"
-} else {
+!symbian: {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp b/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp
index 7927d971aa..dd1fd7a385 100644
--- a/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp
+++ b/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp
@@ -47,6 +47,11 @@
#include <qpalette.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativesystempalette : public QObject
{
diff --git a/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro b/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
index 51c7f4385f..c1a36fdcbb 100644
--- a/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
+++ b/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
@@ -10,9 +10,8 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += ../shared/testhttpserver.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
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 551e17ba22..01120b14f6 100644
--- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
+++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
@@ -51,6 +51,11 @@
#include "../../../shared/util.h"
#include "testhttpserver.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativetext : public QObject
{
diff --git a/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro b/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro
index 2adb2b849f..4b6bd49de2 100644
--- a/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro
+++ b/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro
@@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativetextedit.cpp ../shared/testhttpserver.cpp
HEADERS += ../shared/testhttpserver.h
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
index fbab30e7cf..f7ba7a158d 100644
--- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
+++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
@@ -56,6 +56,11 @@
#include <QStyle>
#include <QInputContext>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativetextedit : public QObject
{
@@ -862,6 +867,7 @@ void tst_qdeclarativetextedit::openInputPanelOnClick()
edit.setFocus(false);
edit.setFocus(true);
edit.setFocus(false);
+ QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, false);
}
@@ -887,6 +893,7 @@ void tst_qdeclarativetextedit::openInputPanelOnFocus()
QDeclarativeTextEditPrivate *editPrivate = static_cast<QDeclarativeTextEditPrivate*>(pri);
editPrivate->showInputPanelOnFocus = true;
+ // test default values
QVERIFY(edit.focusOnPress());
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, false);
@@ -896,76 +903,94 @@ void tst_qdeclarativetextedit::openInputPanelOnFocus()
QApplication::processEvents();
QVERIFY(edit.hasFocus());
QCOMPARE(ic.openInputPanelReceived, true);
- QCOMPARE(ic.closeInputPanelReceived, false);
ic.openInputPanelReceived = false;
// no events on release
QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos()));
QCOMPARE(ic.openInputPanelReceived, false);
- QCOMPARE(ic.closeInputPanelReceived, false);
ic.openInputPanelReceived = false;
- // Even with focus already gained, user needs
- // to be able to open panel by pressing on the editor
+ // if already focused, input panel can be opened on press
+ QVERIFY(edit.hasFocus());
QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos()));
QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, true);
- QCOMPARE(ic.closeInputPanelReceived, false);
ic.openInputPanelReceived = false;
- // input panel closed on focus lost
- edit.setFocus(false);
+ // input method should stay enabled if focus
+ // is lost to an item that also accepts inputs
+ QDeclarativeTextEdit anotherEdit;
+ scene.addItem(&anotherEdit);
+ anotherEdit.setFocus(true);
+ QApplication::processEvents();
+ QCOMPARE(ic.openInputPanelReceived, true);
+ ic.openInputPanelReceived = false;
+ QCOMPARE(view.inputContext(), &ic);
+ QVERIFY(view.testAttribute(Qt::WA_InputMethodEnabled));
+
+ // input method should be disabled if focus
+ // is lost to an item that doesn't accept inputs
+ QDeclarativeItem item;
+ scene.addItem(&item);
+ item.setFocus(true);
QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, false);
- QCOMPARE(ic.closeInputPanelReceived, true);
- ic.closeInputPanelReceived = false;
+ QVERIFY(view.inputContext() == 0);
+ QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled));
- // no automatic input panel events if focusOnPress is false
+ // no automatic input panel events should
+ // be sent if focusOnPress is false
+ edit.setFocusOnPress(false);
+ QCOMPARE(focusOnPressSpy.count(),1);
edit.setFocusOnPress(false);
QCOMPARE(focusOnPressSpy.count(),1);
- QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos()));
- QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos()));
edit.setFocus(false);
edit.setFocus(true);
+ QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos()));
+ QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos()));
+ QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, false);
- edit.setFocusOnPress(false);
- QCOMPARE(focusOnPressSpy.count(),1);
-
- // one show input panel event when openSoftwareInputPanel is called
+ // one show input panel event should
+ // be set when openSoftwareInputPanel is called
edit.openSoftwareInputPanel();
QCOMPARE(ic.openInputPanelReceived, true);
QCOMPARE(ic.closeInputPanelReceived, false);
ic.openInputPanelReceived = false;
- // one close input panel event when closeSoftwareInputPanel is called
+ // one close input panel event should
+ // be sent when closeSoftwareInputPanel is called
edit.closeSoftwareInputPanel();
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, true);
- ic.openInputPanelReceived = false;
+ ic.closeInputPanelReceived = false;
// set focusOnPress back to true
edit.setFocusOnPress(true);
QCOMPARE(focusOnPressSpy.count(),2);
- edit.setFocus(false);
- QCOMPARE(ic.openInputPanelReceived, false);
- QCOMPARE(ic.closeInputPanelReceived, true);
- ic.closeInputPanelReceived = false;
-
edit.setFocusOnPress(true);
QCOMPARE(focusOnPressSpy.count(),2);
-
- // active window focus reason should not cause input panel to open
- QGraphicsObject * editObject = qobject_cast<QGraphicsObject*>(&edit);
- editObject->setFocus(Qt::ActiveWindowFocusReason);
+ edit.setFocus(false);
+ QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, false);
+ ic.closeInputPanelReceived = false;
- // and input panel should not open if focus has already been set
+ // input panel should not re-open
+ // if focus has already been set
+ edit.setFocus(true);
+ QCOMPARE(ic.openInputPanelReceived, true);
+ ic.openInputPanelReceived = false;
edit.setFocus(true);
QCOMPARE(ic.openInputPanelReceived, false);
- QCOMPARE(ic.closeInputPanelReceived, false);
+
+ // input method should be disabled
+ // if TextEdit loses focus
+ edit.setFocus(false);
+ QApplication::processEvents();
+ QVERIFY(view.inputContext() == 0);
+ QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled));
}
void tst_qdeclarativetextedit::geometrySignals()
diff --git a/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro b/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
index 2953567cfe..8f42448587 100644
--- a/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
+++ b/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativetextinput.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index 3cb4da0052..3143580ec1 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -50,6 +50,11 @@
#include <QStyle>
#include <QInputContext>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativetextinput : public QObject
{
@@ -833,6 +838,7 @@ void tst_qdeclarativetextinput::openInputPanelOnFocus()
QDeclarativeTextInputPrivate *inputPrivate = static_cast<QDeclarativeTextInputPrivate*>(pri);
inputPrivate->showInputPanelOnFocus = true;
+ // test default values
QVERIFY(input.focusOnPress());
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, false);
@@ -842,76 +848,94 @@ void tst_qdeclarativetextinput::openInputPanelOnFocus()
QApplication::processEvents();
QVERIFY(input.hasFocus());
QCOMPARE(ic.openInputPanelReceived, true);
- QCOMPARE(ic.closeInputPanelReceived, false);
ic.openInputPanelReceived = false;
// no events on release
QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos()));
QCOMPARE(ic.openInputPanelReceived, false);
- QCOMPARE(ic.closeInputPanelReceived, false);
ic.openInputPanelReceived = false;
- // Even with focus already gained, user needs
- // to be able to open panel by pressing on the editor
+ // if already focused, input panel can be opened on press
+ QVERIFY(input.hasFocus());
QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos()));
QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, true);
- QCOMPARE(ic.closeInputPanelReceived, false);
ic.openInputPanelReceived = false;
- // input panel closed on focus lost
- input.setFocus(false);
+ // input method should stay enabled if focus
+ // is lost to an item that also accepts inputs
+ QDeclarativeTextInput anotherInput;
+ scene.addItem(&anotherInput);
+ anotherInput.setFocus(true);
+ QApplication::processEvents();
+ QCOMPARE(ic.openInputPanelReceived, true);
+ ic.openInputPanelReceived = false;
+ QCOMPARE(view.inputContext(), &ic);
+ QVERIFY(view.testAttribute(Qt::WA_InputMethodEnabled));
+
+ // input method should be disabled if focus
+ // is lost to an item that doesn't accept inputs
+ QDeclarativeItem item;
+ scene.addItem(&item);
+ item.setFocus(true);
QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, false);
- QCOMPARE(ic.closeInputPanelReceived, true);
- ic.closeInputPanelReceived = false;
+ QVERIFY(view.inputContext() == 0);
+ QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled));
- // no automatic input panel events if focusOnPress is false
+ // no automatic input panel events should
+ // be sent if focusOnPress is false
+ input.setFocusOnPress(false);
+ QCOMPARE(focusOnPressSpy.count(),1);
input.setFocusOnPress(false);
QCOMPARE(focusOnPressSpy.count(),1);
- QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos()));
- QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos()));
input.setFocus(false);
input.setFocus(true);
+ QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos()));
+ QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos()));
+ QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, false);
- input.setFocusOnPress(false);
- QCOMPARE(focusOnPressSpy.count(),1);
-
- // one show input panel event when openSoftwareInputPanel is called
+ // one show input panel event should
+ // be set when openSoftwareInputPanel is called
input.openSoftwareInputPanel();
QCOMPARE(ic.openInputPanelReceived, true);
QCOMPARE(ic.closeInputPanelReceived, false);
ic.openInputPanelReceived = false;
- // one close input panel event when closeSoftwareInputPanel is called
+ // one close input panel event should
+ // be sent when closeSoftwareInputPanel is called
input.closeSoftwareInputPanel();
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, true);
- ic.openInputPanelReceived = false;
+ ic.closeInputPanelReceived = false;
// set focusOnPress back to true
input.setFocusOnPress(true);
QCOMPARE(focusOnPressSpy.count(),2);
- input.setFocus(false);
- QCOMPARE(ic.openInputPanelReceived, false);
- QCOMPARE(ic.closeInputPanelReceived, true);
- ic.closeInputPanelReceived = false;
-
input.setFocusOnPress(true);
QCOMPARE(focusOnPressSpy.count(),2);
-
- // active window focus reason should not cause input panel to open
- QGraphicsObject * inputObject = qobject_cast<QGraphicsObject*>(&input);
- inputObject->setFocus(Qt::ActiveWindowFocusReason);
+ input.setFocus(false);
+ QApplication::processEvents();
QCOMPARE(ic.openInputPanelReceived, false);
QCOMPARE(ic.closeInputPanelReceived, false);
+ ic.closeInputPanelReceived = false;
- // and input panel should not open if focus has already been set
+ // input panel should not re-open
+ // if focus has already been set
+ input.setFocus(true);
+ QCOMPARE(ic.openInputPanelReceived, true);
+ ic.openInputPanelReceived = false;
input.setFocus(true);
QCOMPARE(ic.openInputPanelReceived, false);
- QCOMPARE(ic.closeInputPanelReceived, false);
+
+ // input method should be disabled
+ // if TextEdit loses focus
+ input.setFocus(false);
+ QApplication::processEvents();
+ QVERIFY(view.inputContext() == 0);
+ QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled));
}
class MyTextInput : public QDeclarativeTextInput
diff --git a/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro b/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro
index d95165ca22..398139a86a 100644
--- a/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro
+++ b/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro
@@ -4,9 +4,7 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativetimer.cpp
-symbian: {
- DEFINES += SRCDIR=\".\"
-} else {
+!symbian: {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
index da2d1731fb..f49cbd04cc 100644
--- a/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
+++ b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
@@ -46,6 +46,11 @@
#include <QtDeclarative/qdeclarativeitem.h>
#include <QDebug>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativetimer : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
index 02c480cc67..90e46d3967 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
+++ b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
@@ -8,9 +8,8 @@ SOURCES += tst_qdeclarativevaluetypes.cpp \
testtypes.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp
index 53fd68c453..81334f20cc 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp
+++ b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp
@@ -46,6 +46,15 @@
#include <private/qdeclarativevaluetype_p.h>
#include "testtypes.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
+QT_BEGIN_NAMESPACE
+extern int qt_defaultDpi();
+QT_END_NAMESPACE
+
class tst_qdeclarativevaluetypes : public QObject
{
Q_OBJECT
@@ -464,7 +473,7 @@ void tst_qdeclarativevaluetypes::font()
QCOMPARE(object->property("f_overline").toBool(), object->font().overline());
QCOMPARE(object->property("f_strikeout").toBool(), object->font().strikeOut());
QCOMPARE(object->property("f_pointSize").toDouble(), object->font().pointSizeF());
- QCOMPARE(object->property("f_pixelSize").toInt(), object->font().pixelSize());
+ QCOMPARE(object->property("f_pixelSize").toInt(), int((object->font().pointSizeF() * qt_defaultDpi()) / qreal(72.)));
QCOMPARE(object->property("f_capitalization").toInt(), (int)object->font().capitalization());
QCOMPARE(object->property("f_letterSpacing").toDouble(), object->font().letterSpacing());
QCOMPARE(object->property("f_wordSpacing").toDouble(), object->font().wordSpacing());
diff --git a/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro b/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro
index ad54713cd1..21a9195606 100644
--- a/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro
+++ b/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro
@@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeview.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
index b1831053ca..6450e38c57 100644
--- a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
+++ b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
@@ -47,6 +47,11 @@
#include <QtGui/qgraphicswidget.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_QDeclarativeView : public QObject
{
@@ -75,6 +80,7 @@ void tst_QDeclarativeView::resizemodedeclarativeitem()
QVERIFY(canvas);
QSignalSpy sceneResizedSpy(canvas, SIGNAL(sceneResized(QSize)));
canvas->setResizeMode(QDeclarativeView::SizeRootObjectToView);
+ QCOMPARE(QSize(0,0), canvas->initialSize());
canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/resizemodedeclarativeitem.qml"));
QDeclarativeItem* declarativeItem = qobject_cast<QDeclarativeItem*>(canvas->rootObject());
QVERIFY(declarativeItem);
@@ -85,6 +91,7 @@ void tst_QDeclarativeView::resizemodedeclarativeitem()
QCOMPARE(declarativeItem->height(), 200.0);
QCOMPARE(canvas->size(), QSize(200, 200));
QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(canvas->size(), canvas->initialSize());
QCOMPARE(sceneResizedSpy.count(), 1);
// size update from view
@@ -130,6 +137,7 @@ void tst_QDeclarativeView::resizemodedeclarativeitem()
QCOMPARE(declarativeItem->width(), 200.0);
QCOMPARE(declarativeItem->height(), 200.0);
QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(canvas->size(), canvas->initialSize());
QCOMPARE(sceneResizedSpy2.count(), 1);
// size update from root object
@@ -179,6 +187,7 @@ void tst_QDeclarativeView::resizemodegraphicswidget()
QCOMPARE(canvas->size(), QSize(200, 200));
QCOMPARE(canvas->size(), QSize(200, 200));
QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(canvas->size(), canvas->initialSize());
QCOMPARE(sceneResizedSpy.count(), 1);
// size update from view
@@ -218,6 +227,7 @@ void tst_QDeclarativeView::resizemodegraphicswidget()
QCOMPARE(graphicsWidget->size(), QSizeF(200.0, 200.0));
QCOMPARE(canvas->size(), QSize(200, 200));
QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(canvas->size(), canvas->initialSize());
QCOMPARE(sceneResizedSpy2.count(), 1);
// size update from root object
diff --git a/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml b/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml
index be911a3698..57db82db22 100644
--- a/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml
+++ b/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml
@@ -1,18 +1,18 @@
import Qt 4.7
Rectangle {
color: "black"
- width: (runtime.orientation == Orientation.RightUp || runtime.orientation == Orientation.LeftUp) ? 300 : 200
- height: (runtime.orientation == Orientation.RightUp || runtime.orientation == Orientation.LeftUp) ? 200 : 300
+ width: (runtime.orientation == Orientation.Landscape || runtime.orientation == Orientation.LandscapeInverted) ? 300 : 200
+ height: (runtime.orientation == Orientation.Landscape || runtime.orientation == Orientation.LandscapeInverted) ? 200 : 300
Text {
text: {
- if (runtime.orientation == Orientation.TopUp)
- return "TopUp"
- if (runtime.orientation == Orientation.TopDown)
- return "TopDown"
- if (runtime.orientation == Orientation.LeftUp)
- return "LeftUp"
- if (runtime.orientation == Orientation.RightUp)
- return "RightUp"
+ if (runtime.orientation == Orientation.Portrait)
+ return "Portrait"
+ if (runtime.orientation == Orientation.PortraitInverted)
+ return "PortraitInverted"
+ if (runtime.orientation == Orientation.Landscape)
+ return "Landscape"
+ if (runtime.orientation == Orientation.LandscapeInverted)
+ return "LandscapeInverted"
}
color: "white"
}
diff --git a/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro b/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro
index 9bb61619dc..6189916a43 100644
--- a/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro
+++ b/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro
@@ -7,9 +7,8 @@ include(../../../../tools/qml/qml.pri)
SOURCES += tst_qdeclarativeviewer.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
index f296d9eff6..f30f75877c 100644
--- a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
+++ b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
@@ -43,7 +43,14 @@
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativeview.h>
#include <QtDeclarative/qdeclarativeitem.h>
+#include "../../../shared/util.h"
#include "qmlruntime.h"
+#include "../../../shared/util.h"
+
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
class tst_QDeclarativeViewer : public QObject
@@ -54,6 +61,11 @@ public:
private slots:
void orientation();
+ void loading();
+ void fileBrowser();
+ void resizing();
+ void paths();
+ void slowMode();
private:
QDeclarativeEngine engine;
@@ -75,9 +87,13 @@ void tst_QDeclarativeViewer::orientation()
QVERIFY(rootItem);
window.show();
+ QApplication::setActiveWindow(&window);
+ QTest::qWaitForWindowShown(&window);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&window));
+
QCOMPARE(rootItem->width(), 200.0);
QCOMPARE(rootItem->height(), 300.0);
- QCOMPARE(viewer->view()->size(), QSize(200, 300));
+ QTRY_COMPARE(viewer->view()->size(), QSize(200, 300));
QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300));
QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height()));
QCOMPARE(viewer->size(), viewer->sizeHint());
@@ -87,7 +103,7 @@ void tst_QDeclarativeViewer::orientation()
QCOMPARE(rootItem->width(), 300.0);
QCOMPARE(rootItem->height(), 200.0);
- QCOMPARE(viewer->view()->size(), QSize(300, 200));
+ QTRY_COMPARE(viewer->view()->size(), QSize(300, 200));
QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(300, 200));
QCOMPARE(viewer->size(), QSize(300, 200+viewer->menuBar()->height()));
QCOMPARE(viewer->size(), viewer->sizeHint());
@@ -97,10 +113,202 @@ void tst_QDeclarativeViewer::orientation()
QCOMPARE(rootItem->width(), 200.0);
QCOMPARE(rootItem->height(), 300.0);
+ QTRY_COMPARE(viewer->view()->size(), QSize(200, 300));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300));
+ QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height()));
+ QCOMPARE(viewer->size(), viewer->sizeHint());
+}
+
+void tst_QDeclarativeViewer::loading()
+{
+ QDeclarativeViewer *viewer = new QDeclarativeViewer();
+ QVERIFY(viewer);
+ viewer->setSizeToView(true);
+ viewer->open(SRCDIR "/data/orientation.qml");
+ QVERIFY(viewer->view());
+ QVERIFY(viewer->menuBar());
+ QDeclarativeItem* rootItem = qobject_cast<QDeclarativeItem*>(viewer->view()->rootObject());
+ QVERIFY(rootItem);
+ viewer->show();
+
+ QApplication::setActiveWindow(viewer);
+ QTest::qWaitForWindowShown(viewer);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(viewer));
+
+ // initial size
+ QTRY_COMPARE(rootItem->width(), 200.0);
+ QTRY_COMPARE(rootItem->height(), 300.0);
QCOMPARE(viewer->view()->size(), QSize(200, 300));
QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300));
QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height()));
QCOMPARE(viewer->size(), viewer->sizeHint());
+
+ viewer->resize(QSize(400, 500));
+ qApp->processEvents();
+
+ // window resized
+ QTRY_COMPARE(rootItem->width(), 400.0);
+ QTRY_COMPARE(rootItem->height(), 500.0-viewer->menuBar()->height());
+ QCOMPARE(viewer->view()->size(), QSize(400, 500-viewer->menuBar()->height()));
+ QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(400, 500-viewer->menuBar()->height()));
+ QCOMPARE(viewer->size(), QSize(400, 500));
+ QCOMPARE(viewer->size(), viewer->sizeHint());
+
+ viewer->reload();
+ rootItem = qobject_cast<QDeclarativeItem*>(viewer->view()->rootObject());
+ QVERIFY(rootItem);
+
+ // reload cause the window to return back to initial size
+ QTRY_COMPARE(rootItem->width(), 200.0);
+ QTRY_COMPARE(rootItem->height(), 300.0);
+ QCOMPARE(viewer->view()->size(), QSize(200, 300));
+ QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300));
+ QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height()));
+ QCOMPARE(viewer->size(), viewer->sizeHint());
+
+ viewer->resize(QSize(400, 500));
+ qApp->processEvents();
+
+ // window resized again
+ QTRY_COMPARE(rootItem->width(), 400.0);
+ QTRY_COMPARE(rootItem->height(), 500.0-viewer->menuBar()->height());
+ QCOMPARE(viewer->view()->size(), QSize(400, 500-viewer->menuBar()->height()));
+ QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(400, 500-viewer->menuBar()->height()));
+ QCOMPARE(viewer->size(), QSize(400, 500));
+ QCOMPARE(viewer->size(), viewer->sizeHint());
+
+ viewer->open(SRCDIR "/data/orientation.qml");
+ rootItem = qobject_cast<QDeclarativeItem*>(viewer->view()->rootObject());
+ QVERIFY(rootItem);
+
+ // open also causes the window to return back to initial size
+ QTRY_COMPARE(rootItem->width(), 200.0);
+ QTRY_COMPARE(rootItem->height(), 300.0);
+ QCOMPARE(viewer->view()->size(), QSize(200, 300));
+ QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300));
+ QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height()));
+ QCOMPARE(viewer->size(), viewer->sizeHint());
+}
+
+void tst_QDeclarativeViewer::fileBrowser()
+{
+ QDeclarativeViewer *viewer = new QDeclarativeViewer();
+ QVERIFY(viewer);
+ viewer->setUseNativeFileBrowser(false);
+ viewer->openFile();
+ viewer->show();
+
+ QApplication::setActiveWindow(viewer);
+ QTest::qWaitForWindowShown(viewer);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(viewer));
+
+ // Browser.qml successfully loaded
+ QDeclarativeItem* browserItem = qobject_cast<QDeclarativeItem*>(viewer->view()->rootObject());
+ QVERIFY(viewer->view());
+ QVERIFY(viewer->menuBar());
+ QVERIFY(browserItem);
+
+ // load something
+ viewer->open(SRCDIR "/data/orientation.qml");
+ QVERIFY(viewer->view());
+ QVERIFY(viewer->menuBar());
+ QDeclarativeItem* rootItem = qobject_cast<QDeclarativeItem*>(viewer->view()->rootObject());
+ QVERIFY(rootItem);
+ QVERIFY(browserItem != rootItem);
+
+ // go back to Browser.qml
+ viewer->openFile();
+ browserItem = qobject_cast<QDeclarativeItem*>(viewer->view()->rootObject());
+ QVERIFY(viewer->view());
+ QVERIFY(viewer->menuBar());
+ QVERIFY(browserItem);
+}
+
+void tst_QDeclarativeViewer::resizing()
+{
+ QDeclarativeViewer *viewer = new QDeclarativeViewer();
+ QVERIFY(viewer);
+ viewer->open(SRCDIR "/data/orientation.qml");
+ QVERIFY(viewer->view());
+ QVERIFY(viewer->menuBar());
+ QDeclarativeItem* rootItem = qobject_cast<QDeclarativeItem*>(viewer->view()->rootObject());
+ QVERIFY(rootItem);
+ viewer->show();
+
+ QApplication::setActiveWindow(viewer);
+ QTest::qWaitForWindowShown(viewer);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(viewer));
+
+ // initial size
+ QCOMPARE(rootItem->width(), 200.0);
+ QCOMPARE(rootItem->height(), 300.0);
+ QCOMPARE(viewer->view()->size(), QSize(200, 300));
+ QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300));
+ QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height()));
+ QCOMPARE(viewer->size(), viewer->sizeHint());
+
+ viewer->setSizeToView(false);
+
+ // size view to root object
+ rootItem->setWidth(150);
+ rootItem->setHeight(200);
+ qApp->processEvents();
+
+ QCOMPARE(rootItem->width(), 150.0);
+ QCOMPARE(rootItem->height(), 200.0);
+ QCOMPARE(viewer->view()->size(), QSize(150, 200));
+ QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(150, 200));
+ QCOMPARE(viewer->size(), QSize(150, 200+viewer->menuBar()->height()));
+
+ // do not size root object to view
+ viewer->resize(QSize(180,250));
+ QCOMPARE(rootItem->width(), 150.0);
+ QCOMPARE(rootItem->height(), 200.0);
+
+ viewer->setSizeToView(true);
+
+ // size root object to view
+ viewer->resize(QSize(250,350));
+ qApp->processEvents();
+
+ QTRY_COMPARE(rootItem->width(), 250.0);
+ QTRY_COMPARE(rootItem->height(), 350.0-viewer->menuBar()->height());
+ QCOMPARE(viewer->view()->size(), QSize(250, 350-viewer->menuBar()->height()));
+ QCOMPARE(viewer->view()->initialSize(), QSize(200, 300));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(250, 350-viewer->menuBar()->height()));
+ QCOMPARE(viewer->size(), QSize(250, 350));
+
+ // do not size view to root object
+ rootItem->setWidth(150);
+ rootItem->setHeight(200);
+ QTRY_COMPARE(viewer->size(), QSize(250, 350));
+}
+
+void tst_QDeclarativeViewer::paths()
+{
+ QDeclarativeViewer *viewer = new QDeclarativeViewer();
+ QVERIFY(viewer);
+
+ viewer->addLibraryPath("miscImportPath");
+ viewer->view()->engine()->importPathList().contains("miscImportPath");
+
+ viewer->addPluginPath("miscPluginPath");
+ viewer->view()->engine()->pluginPathList().contains("miscPluginPath");
+}
+
+void tst_QDeclarativeViewer::slowMode()
+{
+ QDeclarativeViewer *viewer = new QDeclarativeViewer();
+ QVERIFY(viewer);
+
+ viewer->setSlowMode(true);
+ viewer->setSlowMode(false);
}
QTEST_MAIN(tst_QDeclarativeViewer)
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro b/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro
index c87171bc85..92e5f605b7 100644
--- a/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro
@@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativevisualdatamodel.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
index 8f3fb16b79..90c9c6f722 100644
--- a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
@@ -52,6 +52,11 @@
#include <private/qdeclarativevaluetype_p.h>
#include <math.h>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
static void initStandardTreeModel(QStandardItemModel *model)
{
QStandardItem *item;
diff --git a/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro b/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
index 8caa393b4f..562a9fbf3f 100644
--- a/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
+++ b/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
@@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativewebview.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp b/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp
index beabf86b33..f33e5a4111 100644
--- a/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp
+++ b/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp
@@ -50,6 +50,11 @@
#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
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
index 36b3449f96..2f8f23db35 100644
--- a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
+++ b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
@@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeworkerscript.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
index 7a4315a050..52c11e9b47 100644
--- a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
+++ b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
@@ -53,6 +53,11 @@
Q_DECLARE_METATYPE(QScriptValue)
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_QDeclarativeWorkerScript : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro b/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
index b54f670491..619b239174 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
@@ -8,11 +8,9 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativexmlhttprequest.cpp \
../shared/testhttpserver.cpp
-# Define SRCDIR equal to test's source directory
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp b/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp
index 1d26f2c8eb..8141fcb11a 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp
@@ -48,6 +48,11 @@
#define SERVER_PORT 14445
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_qdeclarativexmlhttprequest : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
index 7c006f10ca..472cffb0ab 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
@@ -9,9 +9,8 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativexmllistmodel.cpp
symbian: {
- DEFINES += SRCDIR=\".\"
importFiles.sources = data
- importFiles.path =
+ importFiles.path = .
DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
index 35790e43ab..bd19bd3743 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
@@ -50,6 +50,11 @@
#include <private/qdeclarativexmllistmodel_p.h>
#include "../../../shared/util.h"
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
typedef QPair<int, int> QDeclarativeXmlListRange;
typedef QList<QVariantList> QDeclarativeXmlModelData;
diff --git a/tests/auto/declarative/qmlvisual/qmlvisual.pro b/tests/auto/declarative/qmlvisual/qmlvisual.pro
index dca9b04c32..cb7e5d7bd8 100644
--- a/tests/auto/declarative/qmlvisual/qmlvisual.pro
+++ b/tests/auto/declarative/qmlvisual/qmlvisual.pro
@@ -5,7 +5,7 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qmlvisual.cpp
symbian: {
- importFiles.path =
+ importFiles.path = .
importFiles.sources = animation \
fillmode \
focusscope \
@@ -28,8 +28,6 @@ symbian: {
selftest_noimages \
webview
DEPLOYMENT = importFiles
-
- DEFINES += QT_TEST_SOURCE_DIR=\".\"
} else {
DEFINES += QT_TEST_SOURCE_DIR=\"\\\"$$PWD\\\"\"
}
diff --git a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
index 71dc451619..a2d32737df 100644
--- a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
+++ b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
@@ -47,6 +47,11 @@
#include <QProcess>
#include <QFile>
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define QT_TEST_SOURCE_DIR "."
+#endif
+
enum Mode { Record, RecordNoVisuals, RecordSnapshot, Play, TestVisuals, RemoveVisuals, UpdateVisuals, UpdatePlatformVisuals, Test };
static QString testdir;