summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-10-28 08:26:20 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-10-28 08:26:20 (GMT)
commit07e1b6615e868af6434bb8e42dc2d44a51075204 (patch)
tree5bc94729576e561eae6bb9470dda0ab61b439f18 /tests/auto
parent1d14bbef27945d7823e9c32745e51d187093f1b7 (diff)
parent30d8810bfab9c8157f80e5e38beda1ad8c0acfb0 (diff)
downloadQt-07e1b6615e868af6434bb8e42dc2d44a51075204.zip
Qt-07e1b6615e868af6434bb8e42dc2d44a51075204.tar.gz
Qt-07e1b6615e868af6434bb8e42dc2d44a51075204.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts: doc/src/declarative/globalobject.qdoc
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/anchors/anchors.pro1
-rw-r--r--tests/auto/declarative/animatedimage/animatedimage.pro1
-rw-r--r--tests/auto/declarative/animations/animations.pro1
-rw-r--r--tests/auto/declarative/animations/tst_animations.cpp25
-rw-r--r--tests/auto/declarative/behaviors/behaviors.pro1
-rw-r--r--tests/auto/declarative/datetimeformatter/datetimeformatter.pro2
-rw-r--r--tests/auto/declarative/declarative.pro5
-rw-r--r--tests/auto/declarative/examples/examples.pro3
-rw-r--r--tests/auto/declarative/layouts/layouts.pro1
-rw-r--r--tests/auto/declarative/listview/listview.pro2
-rw-r--r--tests/auto/declarative/numberformatter/numberformatter.pro2
-rw-r--r--tests/auto/declarative/pathview/pathview.pro2
-rw-r--r--tests/auto/declarative/qfxloader/qfxloader.pro2
-rw-r--r--tests/auto/declarative/qfxpixmapcache/qfxpixmapcache.pro4
-rw-r--r--tests/auto/declarative/qfxtext/qfxtext.pro2
-rw-r--r--tests/auto/declarative/qfxtextedit/qfxtextedit.pro2
-rw-r--r--tests/auto/declarative/qfxtextinput/data/cursorTest.qml8
-rw-r--r--tests/auto/declarative/qfxtextinput/qfxtextinput.pro2
-rw-r--r--tests/auto/declarative/qfxwebview/qfxwebview.pro2
-rw-r--r--tests/auto/declarative/qmldom/qmldom.pro2
-rw-r--r--tests/auto/declarative/qmlecmascript/data/NestedTypeTransientErrors.qml11
-rw-r--r--tests/auto/declarative/qmlecmascript/data/transientErrors.qml10
-rw-r--r--tests/auto/declarative/qmlecmascript/qmlecmascript.pro1
-rw-r--r--tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp23
-rw-r--r--tests/auto/declarative/qmllanguage/data/lib/com/nokia/installedtest/PrivateType.qml2
-rw-r--r--tests/auto/declarative/qmllanguage/qmllanguage.pro3
-rw-r--r--tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp46
-rw-r--r--tests/auto/declarative/qmllist/qmllist.pro2
-rw-r--r--tests/auto/declarative/qmllistaccessor/qmllistaccessor.pro2
-rw-r--r--tests/auto/declarative/qmlmetaproperty/qmlmetaproperty.pro2
-rw-r--r--tests/auto/declarative/qmlpropertymap/qmlpropertymap.pro2
-rw-r--r--tests/auto/declarative/qmltimer/qmltimer.pro2
-rw-r--r--tests/auto/declarative/repeater/repeater.pro3
-rw-r--r--tests/auto/declarative/sql/data/4-iteration-index.js27
-rw-r--r--tests/auto/declarative/sql/sql.pro2
-rw-r--r--tests/auto/declarative/sql/tst_sql.cpp2
-rw-r--r--tests/auto/declarative/states/states.pro2
-rw-r--r--tests/auto/declarative/visual/visual.pro3
38 files changed, 195 insertions, 20 deletions
diff --git a/tests/auto/declarative/anchors/anchors.pro b/tests/auto/declarative/anchors/anchors.pro
index 7b22cfb..1e25a90 100644
--- a/tests/auto/declarative/anchors/anchors.pro
+++ b/tests/auto/declarative/anchors/anchors.pro
@@ -1,5 +1,6 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_anchors.cpp
+macx:CONFIG -= app_bundle
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/animatedimage/animatedimage.pro b/tests/auto/declarative/animatedimage/animatedimage.pro
index 8a92863..4ff9db4 100644
--- a/tests/auto/declarative/animatedimage/animatedimage.pro
+++ b/tests/auto/declarative/animatedimage/animatedimage.pro
@@ -1,5 +1,6 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_animatedimage.cpp
+macx:CONFIG -= app_bundle
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/animations/animations.pro b/tests/auto/declarative/animations/animations.pro
index 419da4e..e13ecb9 100644
--- a/tests/auto/declarative/animations/animations.pro
+++ b/tests/auto/declarative/animations/animations.pro
@@ -1,5 +1,6 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_animations.cpp
+macx:CONFIG -= app_bundle
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/animations/tst_animations.cpp b/tests/auto/declarative/animations/tst_animations.cpp
index 336f0d3..a6f67b8 100644
--- a/tests/auto/declarative/animations/tst_animations.cpp
+++ b/tests/auto/declarative/animations/tst_animations.cpp
@@ -21,6 +21,15 @@ private slots:
void mixedTypes();
};
+#define QTIMED_COMPARE(lhs, rhs) do { \
+ for (int ii = 0; ii < 5; ++ii) { \
+ if (lhs == rhs) \
+ break; \
+ QTest::qWait(50); \
+ } \
+ QCOMPARE(lhs, rhs); \
+} while (false)
+
void tst_animations::simpleNumber()
{
QFxRect rect;
@@ -29,8 +38,8 @@ void tst_animations::simpleNumber()
animation.setProperty("x");
animation.setTo(200);
animation.start();
- QTest::qWait(animation.duration() + 50);
- QCOMPARE(rect.x(), qreal(200));
+ QTest::qWait(animation.duration());
+ QTIMED_COMPARE(rect.x(), qreal(200));
rect.setX(0);
animation.start();
@@ -47,8 +56,8 @@ void tst_animations::simpleColor()
animation.setProperty("color");
animation.setTo(QColor("red"));
animation.start();
- QTest::qWait(animation.duration() + 50);
- QCOMPARE(rect.color(), QColor("red"));
+ QTest::qWait(animation.duration());
+ QTIMED_COMPARE(rect.color(), QColor("red"));
rect.setColor(QColor("blue"));
animation.start();
@@ -71,8 +80,8 @@ void tst_animations::alwaysRunToEnd()
QTest::qWait(1500);
animation.stop();
QVERIFY(rect.x() != qreal(200));
- QTest::qWait(500 + 50);
- QCOMPARE(rect.x(), qreal(200));
+ QTest::qWait(500);
+ QTIMED_COMPARE(rect.x(), qreal(200));
}
void tst_animations::dotProperty()
@@ -83,8 +92,8 @@ void tst_animations::dotProperty()
animation.setProperty("border.width");
animation.setTo(10);
animation.start();
- QTest::qWait(animation.duration() + 50);
- QCOMPARE(rect.border()->width(), 10);
+ QTest::qWait(animation.duration());
+ QTIMED_COMPARE(rect.border()->width(), 10);
rect.border()->setWidth(0);
animation.start();
diff --git a/tests/auto/declarative/behaviors/behaviors.pro b/tests/auto/declarative/behaviors/behaviors.pro
index c96d2c0..8886b0c 100644
--- a/tests/auto/declarative/behaviors/behaviors.pro
+++ b/tests/auto/declarative/behaviors/behaviors.pro
@@ -1,5 +1,6 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_behaviors.cpp
+macx:CONFIG -= app_bundle
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/datetimeformatter/datetimeformatter.pro b/tests/auto/declarative/datetimeformatter/datetimeformatter.pro
index e3d6cd0..62eb303 100644
--- a/tests/auto/declarative/datetimeformatter/datetimeformatter.pro
+++ b/tests/auto/declarative/datetimeformatter/datetimeformatter.pro
@@ -1,3 +1,5 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
SOURCES += tst_datetimeformatter.cpp
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro
index b51e285..b9ab3ca 100644
--- a/tests/auto/declarative/declarative.pro
+++ b/tests/auto/declarative/declarative.pro
@@ -1,12 +1,14 @@
TEMPLATE = subdirs
SUBDIRS += anchors \
+ animatedimage \
animations \
+ behaviors \
datetimeformatter \
+ examples \
layouts \
listview \
numberformatter \
pathview \
- qbindablemap \
qfxloader \
qfxpixmapcache \
qfxtext \
@@ -19,6 +21,7 @@ SUBDIRS += anchors \
qmllist \
qmllistaccessor \
qmlmetaproperty \
+ qmlpropertymap \
qmltimer \
repeater \
sql \
diff --git a/tests/auto/declarative/examples/examples.pro b/tests/auto/declarative/examples/examples.pro
index c50018e..b9bcd28 100644
--- a/tests/auto/declarative/examples/examples.pro
+++ b/tests/auto/declarative/examples/examples.pro
@@ -1,4 +1,5 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
-SOURCES += tst_examples.cpp
macx:CONFIG -= app_bundle
+
+SOURCES += tst_examples.cpp
diff --git a/tests/auto/declarative/layouts/layouts.pro b/tests/auto/declarative/layouts/layouts.pro
index f7e7622..f38e155 100644
--- a/tests/auto/declarative/layouts/layouts.pro
+++ b/tests/auto/declarative/layouts/layouts.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_layouts.cpp
+macx:CONFIG -= app_bundle
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/listview/listview.pro b/tests/auto/declarative/listview/listview.pro
index bf68268..23b0706 100644
--- a/tests/auto/declarative/listview/listview.pro
+++ b/tests/auto/declarative/listview/listview.pro
@@ -1,5 +1,7 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
SOURCES += tst_listview.cpp
# Define SRCDIR equal to test's source directory
diff --git a/tests/auto/declarative/numberformatter/numberformatter.pro b/tests/auto/declarative/numberformatter/numberformatter.pro
index ba391ed..ed7ef22 100644
--- a/tests/auto/declarative/numberformatter/numberformatter.pro
+++ b/tests/auto/declarative/numberformatter/numberformatter.pro
@@ -1,3 +1,5 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
SOURCES += tst_numberformatter.cpp
diff --git a/tests/auto/declarative/pathview/pathview.pro b/tests/auto/declarative/pathview/pathview.pro
index 28bbe49..bddd1e6 100644
--- a/tests/auto/declarative/pathview/pathview.pro
+++ b/tests/auto/declarative/pathview/pathview.pro
@@ -1,5 +1,7 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
SOURCES += tst_pathview.cpp
# Define SRCDIR equal to test's source directory
diff --git a/tests/auto/declarative/qfxloader/qfxloader.pro b/tests/auto/declarative/qfxloader/qfxloader.pro
index 643c18c..aee52cc 100644
--- a/tests/auto/declarative/qfxloader/qfxloader.pro
+++ b/tests/auto/declarative/qfxloader/qfxloader.pro
@@ -1,5 +1,7 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
SOURCES += tst_qfxloader.cpp
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qfxpixmapcache/qfxpixmapcache.pro b/tests/auto/declarative/qfxpixmapcache/qfxpixmapcache.pro
index e9b0417..218eeff 100644
--- a/tests/auto/declarative/qfxpixmapcache/qfxpixmapcache.pro
+++ b/tests/auto/declarative/qfxpixmapcache/qfxpixmapcache.pro
@@ -1,9 +1,9 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
QT += network
-SOURCES += tst_qfxpixmapcache.cpp
-HEADERS =
macx:CONFIG -= app_bundle
+SOURCES += tst_qfxpixmapcache.cpp
+
# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
# LIBS += -lgcov
diff --git a/tests/auto/declarative/qfxtext/qfxtext.pro b/tests/auto/declarative/qfxtext/qfxtext.pro
index f705334..1f3fe37 100644
--- a/tests/auto/declarative/qfxtext/qfxtext.pro
+++ b/tests/auto/declarative/qfxtext/qfxtext.pro
@@ -1,3 +1,5 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
SOURCES += tst_qfxtext.cpp
diff --git a/tests/auto/declarative/qfxtextedit/qfxtextedit.pro b/tests/auto/declarative/qfxtextedit/qfxtextedit.pro
index 90546a4..b5e0464 100644
--- a/tests/auto/declarative/qfxtextedit/qfxtextedit.pro
+++ b/tests/auto/declarative/qfxtextedit/qfxtextedit.pro
@@ -1,5 +1,7 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
SOURCES += tst_qfxtextedit.cpp
# Define SRCDIR equal to test's source directory
diff --git a/tests/auto/declarative/qfxtextinput/data/cursorTest.qml b/tests/auto/declarative/qfxtextinput/data/cursorTest.qml
new file mode 100644
index 0000000..ddc98cc
--- /dev/null
+++ b/tests/auto/declarative/qfxtextinput/data/cursorTest.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+Rectangle { width: 300; height: 300; color: "white"
+ TextInput { text: "Hello world!"; id: textInputObject; objectName: "textInputObject"
+ resources: [ Component { id:cursor; Item { id:cursorInstance; objectName: "cursorInstance";} } ]
+ cursorDelegate: cursor
+ }
+}
diff --git a/tests/auto/declarative/qfxtextinput/qfxtextinput.pro b/tests/auto/declarative/qfxtextinput/qfxtextinput.pro
index 396e66d..fe2e3e3 100644
--- a/tests/auto/declarative/qfxtextinput/qfxtextinput.pro
+++ b/tests/auto/declarative/qfxtextinput/qfxtextinput.pro
@@ -1,5 +1,7 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
SOURCES += tst_qfxtextinput.cpp
# Define SRCDIR equal to test's source directory
diff --git a/tests/auto/declarative/qfxwebview/qfxwebview.pro b/tests/auto/declarative/qfxwebview/qfxwebview.pro
index ee78950..b75e057 100644
--- a/tests/auto/declarative/qfxwebview/qfxwebview.pro
+++ b/tests/auto/declarative/qfxwebview/qfxwebview.pro
@@ -1,5 +1,7 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
SOURCES += tst_qfxwebview.cpp
# Define SRCDIR equal to test's source directory
diff --git a/tests/auto/declarative/qmldom/qmldom.pro b/tests/auto/declarative/qmldom/qmldom.pro
index d566354..7ff317d 100644
--- a/tests/auto/declarative/qmldom/qmldom.pro
+++ b/tests/auto/declarative/qmldom/qmldom.pro
@@ -1,5 +1,7 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
SOURCES += tst_qmldom.cpp
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/qmlecmascript/data/NestedTypeTransientErrors.qml b/tests/auto/declarative/qmlecmascript/data/NestedTypeTransientErrors.qml
new file mode 100644
index 0000000..e19bf24
--- /dev/null
+++ b/tests/auto/declarative/qmlecmascript/data/NestedTypeTransientErrors.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+
+Object {
+ property int b: obj.prop.a
+
+ property var prop;
+ prop: Object {
+ property int a: 10
+ }
+}
+
diff --git a/tests/auto/declarative/qmlecmascript/data/transientErrors.qml b/tests/auto/declarative/qmlecmascript/data/transientErrors.qml
new file mode 100644
index 0000000..4e123c6
--- /dev/null
+++ b/tests/auto/declarative/qmlecmascript/data/transientErrors.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+Object {
+ property var obj: nested
+
+ property var obj2
+ obj2: NestedTypeTransientErrors {
+ id: nested
+ }
+}
diff --git a/tests/auto/declarative/qmlecmascript/qmlecmascript.pro b/tests/auto/declarative/qmlecmascript/qmlecmascript.pro
index ff4d20f..46ae045 100644
--- a/tests/auto/declarative/qmlecmascript/qmlecmascript.pro
+++ b/tests/auto/declarative/qmlecmascript/qmlecmascript.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
macx:CONFIG -= app_bundle
+
SOURCES += tst_qmlecmascript.cpp \
testtypes.cpp
HEADERS += testtypes.h
diff --git a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
index 67a98b1..48c2249 100644
--- a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
+++ b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
@@ -66,6 +66,7 @@ private slots:
void signalTriggeredBindings();
void listProperties();
void exceptionClearsOnReeval();
+ void transientErrors();
private:
QmlEngine engine;
@@ -847,6 +848,28 @@ void tst_qmlecmascript::exceptionClearsOnReeval()
QCOMPARE(object->property("test").toBool(), true);
}
+static int transientErrorsMsgCount = 0;
+static void transientErrorsMsgHandler(QtMsgType, const char *)
+{
+ ++transientErrorsMsgCount;
+}
+
+// Check that transient binding errors are not displayed
+void tst_qmlecmascript::transientErrors()
+{
+ QmlComponent component(&engine, TEST_FILE("transientErrors.qml"));
+
+ transientErrorsMsgCount = 0;
+ QtMsgHandler old = qInstallMsgHandler(transientErrorsMsgHandler);
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ qInstallMsgHandler(old);
+
+ QCOMPARE(transientErrorsMsgCount, 0);
+}
+
QTEST_MAIN(tst_qmlecmascript)
#include "tst_qmlecmascript.moc"
diff --git a/tests/auto/declarative/qmllanguage/data/lib/com/nokia/installedtest/PrivateType.qml b/tests/auto/declarative/qmllanguage/data/lib/com/nokia/installedtest/PrivateType.qml
new file mode 100644
index 0000000..93c7630
--- /dev/null
+++ b/tests/auto/declarative/qmllanguage/data/lib/com/nokia/installedtest/PrivateType.qml
@@ -0,0 +1,2 @@
+import Qt 4.6
+Image {}
diff --git a/tests/auto/declarative/qmllanguage/qmllanguage.pro b/tests/auto/declarative/qmllanguage/qmllanguage.pro
index 4e4be9c..80228a9 100644
--- a/tests/auto/declarative/qmllanguage/qmllanguage.pro
+++ b/tests/auto/declarative/qmllanguage/qmllanguage.pro
@@ -1,9 +1,10 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
SOURCES += tst_qmllanguage.cpp \
testtypes.cpp
HEADERS += testtypes.h
-macx:CONFIG -= app_bundle
# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
# LIBS += -lgcov
diff --git a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp
index 2746e98..6494c40 100644
--- a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp
+++ b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp
@@ -7,6 +7,9 @@
#include <QtCore/qdir.h>
#include "testtypes.h"
+#include "../../../shared/util.h"
+#include "../../network-settings.h"
+
/*
This test case covers QML language issues. This covers everything that does
involve evaluating ECMAScript expressions and bindings.
@@ -69,6 +72,8 @@ private slots:
void importsBuiltin();
void importsLocal_data();
void importsLocal();
+ void importsRemote_data();
+ void importsRemote();
void importsInstalled_data();
void importsInstalled();
void importsOrder_data();
@@ -805,6 +810,8 @@ void tst_qmllanguage::testType(const QString& qml, const QString& type)
{
QmlComponent component(&engine, qml.toUtf8(), TEST_FILE("empty.qml")); // just a file for relative local imports
+ QTRY_VERIFY(!component.isLoading());
+
if (type.isEmpty()) {
QVERIFY(component.isError());
} else {
@@ -824,8 +831,12 @@ QML_DEFINE_TYPE(com.nokia.Test, 1, 8, 9, Test, TestType2)
QML_DEFINE_TYPE(com.nokia.Test, 1, 12, 13, Test, TestType2)
QML_DEFINE_TYPE(com.nokia.Test, 1, 9, 11, OldTest, TestType)
+// Import tests (QT-558)
+
void tst_qmllanguage::importsBuiltin_data()
{
+ // QT-610
+
QTest::addColumn<QString>("qml");
QTest::addColumn<QString>("type");
@@ -842,7 +853,7 @@ void tst_qmllanguage::importsBuiltin_data()
"Test {}"
<< "TestType";
QTest::newRow("qualified wrong")
- << "import com.nokia.Test 1.0 as T\n"
+ << "import com.nokia.Test 1.0 as T\n" // QT-610
"Test {}"
<< "";
QTest::newRow("qualified right")
@@ -934,7 +945,7 @@ void tst_qmllanguage::importsLocal_data()
// import locals
QTest::newRow("local import")
- << "import \"subdir\"\n"
+ << "import \"subdir\"\n" // QT-613
"Test {}"
<< "QFxRect";
QTest::newRow("local import as")
@@ -959,20 +970,47 @@ void tst_qmllanguage::importsLocal()
testType(qml,type);
}
+void tst_qmllanguage::importsRemote_data()
+{
+ QTest::addColumn<QString>("qml");
+ QTest::addColumn<QString>("type");
+
+ QString serverdir = "http://"
+ + QtNetworkSettings::serverName()
+ + "/qtest/declarative/qmllanguage";
+
+ QTest::newRow("remote import") << "import \""+serverdir+"\"\nTest {}" << "QFxRect";
+ QTest::newRow("remote import with subdir") << "import \""+serverdir+"\"\nTestSubDir {}" << "QFxText";
+ QTest::newRow("remote import with local") << "import \""+serverdir+"\"\nTestLocal {}" << "QFxImage";
+}
+
+void tst_qmllanguage::importsRemote()
+{
+ QFETCH(QString, qml);
+ QFETCH(QString, type);
+ testType(qml,type);
+}
+
void tst_qmllanguage::importsInstalled_data()
{
+ // QT-610
+
QTest::addColumn<QString>("qml");
QTest::addColumn<QString>("type");
// import installed
- QTest::newRow("installed import")
+ QTest::newRow("installed import 1")
<< "import com.nokia.installedtest 1.0\n"
"InstalledTest {}"
<< "QFxRect";
- QTest::newRow("installed import")
+ QTest::newRow("installed import 2")
<< "import com.nokia.installedtest 1.4\n"
"InstalledTest {}"
<< "QFxText";
+ QTest::newRow("installed import visibility") // QT-614
+ << "import com.nokia.installedtest 1.4\n"
+ "PrivateType {}"
+ << "";
}
void tst_qmllanguage::importsInstalled()
diff --git a/tests/auto/declarative/qmllist/qmllist.pro b/tests/auto/declarative/qmllist/qmllist.pro
index e5558f1..b2145ed 100644
--- a/tests/auto/declarative/qmllist/qmllist.pro
+++ b/tests/auto/declarative/qmllist/qmllist.pro
@@ -1,3 +1,5 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
SOURCES += tst_qmllist.cpp
diff --git a/tests/auto/declarative/qmllistaccessor/qmllistaccessor.pro b/tests/auto/declarative/qmllistaccessor/qmllistaccessor.pro
index 4aa0450..ce2915e 100644
--- a/tests/auto/declarative/qmllistaccessor/qmllistaccessor.pro
+++ b/tests/auto/declarative/qmllistaccessor/qmllistaccessor.pro
@@ -1,3 +1,5 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
SOURCES += tst_qmllistaccessor.cpp
diff --git a/tests/auto/declarative/qmlmetaproperty/qmlmetaproperty.pro b/tests/auto/declarative/qmlmetaproperty/qmlmetaproperty.pro
index af67373..542c14e 100644
--- a/tests/auto/declarative/qmlmetaproperty/qmlmetaproperty.pro
+++ b/tests/auto/declarative/qmlmetaproperty/qmlmetaproperty.pro
@@ -1,3 +1,5 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
SOURCES += tst_qmlmetaproperty.cpp
diff --git a/tests/auto/declarative/qmlpropertymap/qmlpropertymap.pro b/tests/auto/declarative/qmlpropertymap/qmlpropertymap.pro
index 94f138f..967ab76 100644
--- a/tests/auto/declarative/qmlpropertymap/qmlpropertymap.pro
+++ b/tests/auto/declarative/qmlpropertymap/qmlpropertymap.pro
@@ -1,3 +1,5 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
SOURCES += tst_qmlpropertymap.cpp
diff --git a/tests/auto/declarative/qmltimer/qmltimer.pro b/tests/auto/declarative/qmltimer/qmltimer.pro
index e7edd96..2b244ed 100644
--- a/tests/auto/declarative/qmltimer/qmltimer.pro
+++ b/tests/auto/declarative/qmltimer/qmltimer.pro
@@ -1,5 +1,7 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
SOURCES += tst_qmltimer.cpp
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/repeater/repeater.pro b/tests/auto/declarative/repeater/repeater.pro
index 1d30b7b..968904b 100644
--- a/tests/auto/declarative/repeater/repeater.pro
+++ b/tests/auto/declarative/repeater/repeater.pro
@@ -1,7 +1,8 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
-SOURCES += tst_repeater.cpp
macx:CONFIG -= app_bundle
+SOURCES += tst_repeater.cpp
+
# Define SRCDIR equal to test's source directory
DEFINES += SRCDIR=\\\"$$PWD\\\"
diff --git a/tests/auto/declarative/sql/data/4-iteration-index.js b/tests/auto/declarative/sql/data/4-iteration-index.js
new file mode 100644
index 0000000..298737d
--- /dev/null
+++ b/tests/auto/declarative/sql/data/4-iteration-index.js
@@ -0,0 +1,27 @@
+var db = openDatabase("QmlTestDB", "", "Test database from Qt autotests", 1000000);
+var r=0;
+
+db.transaction(
+ function(tx) {
+ tx.executeSql('SELECT * FROM Greeting', [],
+ function(tx, rs) {
+ var r1=""
+ for(var i = 0; i < rs.rows.length; i++) {
+ r1 += rs.rows[i].salutation + ", " + rs.rows[i].salutee + ";"
+ }
+ if (r1 != "hello, world;hello, world;hello, world;hello, world;")
+ r = "SELECTED DATA WRONG: "+r1;
+ },
+ function(tx, error) { if (r==0) r="SELECT FAILED: "+error.message }
+ );
+ },
+ function(tx, error) { if (r==0) r="TRANSACTION FAILED: "+error.message },
+ function(tx, result) { if (r==0) r="passed" }
+);
+
+
+function test()
+{
+ if (r == 0) r = "transaction_not_finished";
+ return r;
+}
diff --git a/tests/auto/declarative/sql/sql.pro b/tests/auto/declarative/sql/sql.pro
index 36a867f..48e06a2 100644
--- a/tests/auto/declarative/sql/sql.pro
+++ b/tests/auto/declarative/sql/sql.pro
@@ -1,5 +1,7 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
SOURCES += tst_sql.cpp
# Define SRCDIR equal to test's source directory
diff --git a/tests/auto/declarative/sql/tst_sql.cpp b/tests/auto/declarative/sql/tst_sql.cpp
index 22e9ba4..0ebdccd 100644
--- a/tests/auto/declarative/sql/tst_sql.cpp
+++ b/tests/auto/declarative/sql/tst_sql.cpp
@@ -86,7 +86,7 @@ QString tst_sql::dbDir() const
void tst_sql::checkDatabasePath()
{
// Check default storage path (we can't use it since we don't want to mess with user's data)
- QVERIFY(engine->offlineStoragePath().contains("Nokia"));
+ QVERIFY(engine->offlineStoragePath().contains("tst_sql"));
QVERIFY(engine->offlineStoragePath().contains("OfflineStorage"));
}
diff --git a/tests/auto/declarative/states/states.pro b/tests/auto/declarative/states/states.pro
index 0474ea5..a1f3b02 100644
--- a/tests/auto/declarative/states/states.pro
+++ b/tests/auto/declarative/states/states.pro
@@ -1,5 +1,7 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
SOURCES += tst_states.cpp
# Define SRCDIR equal to test's source directory
diff --git a/tests/auto/declarative/visual/visual.pro b/tests/auto/declarative/visual/visual.pro
index a06fa21..7ae2bed 100644
--- a/tests/auto/declarative/visual/visual.pro
+++ b/tests/auto/declarative/visual/visual.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative
-SOURCES += tst_visual.cpp
macx:CONFIG -= app_bundle
+SOURCES += tst_visual.cpp
+
DEFINES += QT_TEST_SOURCE_DIR=\"\\\"$$PWD\\\"\"