summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-02-24 23:41:08 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-02-24 23:41:08 (GMT)
commit091467faaed8728e3f49dbb402f71372f088f808 (patch)
tree3746645f09be54da75215d63905c07323f6ef132 /tests/auto/declarative
parent800d6691c5fd9c7139ff8b32aab39eab72e443f8 (diff)
parentf39bb2af2d81640d30222cd5abc31b076105dd8b (diff)
downloadQt-091467faaed8728e3f49dbb402f71372f088f808.zip
Qt-091467faaed8728e3f49dbb402f71372f088f808.tar.gz
Qt-091467faaed8728e3f49dbb402f71372f088f808.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/setindex.qml33
-rw-r--r--tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp15
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml (renamed from tests/auto/declarative/qdeclarativeinfo/data/qdeclarativeObject.qml)0
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.1.qml (renamed from tests/auto/declarative/qdeclarativelanguage/data/qdeclarativeAttachedPropertiesObjectMethod.1.qml)0
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.2.qml (renamed from tests/auto/declarative/qdeclarativelanguage/data/qdeclarativeAttachedPropertiesObjectMethod.2.qml)0
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/script.12.errors.txt2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/testtypes.h1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp3
-rw-r--r--tests/auto/declarative/qdeclarativelistreference/tst_qdeclarativelistreference.cpp1
-rw-r--r--tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp3
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp1
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/testtypes.h1
13 files changed, 59 insertions, 3 deletions
diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
index 1c8cbbc..40cd737 100644
--- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
+++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
@@ -49,7 +49,6 @@
#include <QtDeclarative/qdeclarativecontext.h>
#include <QtDeclarative/qdeclarativecomponent.h>
#include <QtDeclarative/qdeclarativeexpression.h>
-#include <QtDeclarative/qdeclarativemetatype.h>
#include <QtDeclarative/qdeclarativemetaproperty.h>
#include <private/qdeclarativebinding_p.h>
@@ -58,6 +57,7 @@
#include <private/qdeclarativedebugclient_p.h>
#include <private/qdeclarativedebugservice_p.h>
#include <private/qdeclarativerectangle_p.h>
+#include <private/qdeclarativemetatype_p.h>
#include "../shared/debugutil_p.h"
diff --git a/tests/auto/declarative/qdeclarativegridview/data/setindex.qml b/tests/auto/declarative/qdeclarativegridview/data/setindex.qml
new file mode 100644
index 0000000..908b365
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativegridview/data/setindex.qml
@@ -0,0 +1,33 @@
+import Qt 4.6
+
+Rectangle {
+ width: 200
+ height: 200
+ Component {
+ id: appDelegate
+
+ Item {
+ id : wrapper
+ Script {
+ function startupFunction()
+ {
+ if (index == 5) view.currentIndex = index;
+
+ }
+ }
+ Component.onCompleted: startupFunction();
+ width: 30; height: 30
+ Text { text: index }
+ }
+ }
+
+ GridView {
+ id: view
+ objectName: "grid"
+ anchors.fill: parent
+ cellWidth: 30; cellHeight: 30
+ model: 35
+ delegate: appDelegate
+ focus: true
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
index 9a7f517..9c7468d 100644
--- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
+++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
@@ -66,6 +66,7 @@ private slots:
void defaultValues();
void properties();
void positionViewAtIndex();
+ void QTBUG_8456();
private:
QDeclarativeView *createView();
@@ -657,6 +658,7 @@ void tst_QDeclarativeGridView::currentIndex()
gridview->setFlow(QDeclarativeGridView::TopToBottom);
+ QEXPECT_FAIL("", "QTBUG-8475", Abort);
QTest::keyClick(canvas, Qt::Key_Right);
QCOMPARE(gridview->currentIndex(), 5);
@@ -882,6 +884,19 @@ void tst_QDeclarativeGridView::positionViewAtIndex()
delete canvas;
}
+void tst_QDeclarativeGridView::QTBUG_8456()
+{
+ QDeclarativeView *canvas = createView();
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/setindex.qml"));
+ qApp->processEvents();
+
+ QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
+ QVERIFY(gridview != 0);
+
+ QCOMPARE(gridview->currentIndex(), 0);
+}
+
QDeclarativeView *tst_QDeclarativeGridView::createView()
{
QDeclarativeView *canvas = new QDeclarativeView(0);
diff --git a/tests/auto/declarative/qdeclarativeinfo/data/qdeclarativeObject.qml b/tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml
index ce05f89..ce05f89 100644
--- a/tests/auto/declarative/qdeclarativeinfo/data/qdeclarativeObject.qml
+++ b/tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qdeclarativeAttachedPropertiesObjectMethod.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.1.qml
index 429c327..429c327 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/qdeclarativeAttachedPropertiesObjectMethod.1.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.1.qml
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qdeclarativeAttachedPropertiesObjectMethod.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.2.qml
index 0f57b61..0f57b61 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/qdeclarativeAttachedPropertiesObjectMethod.2.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.2.qml
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/script.12.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/script.12.errors.txt
index 85c8396..f8297f5 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/script.12.errors.txt
+++ b/tests/auto/declarative/qdeclarativelanguage/data/script.12.errors.txt
@@ -1 +1 @@
-4:5:QmlJS declaration outside Script element
+4:5:JavaScript declaration outside Script element
diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.h b/tests/auto/declarative/qdeclarativelanguage/testtypes.h
index 1a8bd11..fc1ede7 100644
--- a/tests/auto/declarative/qdeclarativelanguage/testtypes.h
+++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.h
@@ -52,6 +52,7 @@
#include <QtDeclarative/qdeclarativeparserstatus.h>
#include <QtDeclarative/qdeclarativepropertyvaluesource.h>
#include <QtDeclarative/qdeclarativescriptstring.h>
+#include <QtDeclarative/qdeclarativemetaproperty.h>
QVariant myCustomVariantTypeConverter(const QString &data);
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index 9d68ba9..ae07112 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -45,7 +45,10 @@
#include <QtCore/qdebug.h>
#include <QtCore/qfileinfo.h>
#include <QtCore/qdir.h>
+
#include <private/qdeclarativemetaproperty_p.h>
+#include <private/qdeclarativemetatype_p.h>
+
#include "testtypes.h"
#include "../../../shared/util.h"
diff --git a/tests/auto/declarative/qdeclarativelistreference/tst_qdeclarativelistreference.cpp b/tests/auto/declarative/qdeclarativelistreference/tst_qdeclarativelistreference.cpp
index 03d641d..5c6ceef 100644
--- a/tests/auto/declarative/qdeclarativelistreference/tst_qdeclarativelistreference.cpp
+++ b/tests/auto/declarative/qdeclarativelistreference/tst_qdeclarativelistreference.cpp
@@ -47,6 +47,7 @@
#include <QDeclarativeComponent>
#include <QtDeclarative/qdeclarative.h>
#include <QtDeclarative/qdeclarativeprivate.h>
+#include <QtDeclarative/qdeclarativemetaproperty.h>
#include <QDebug>
inline QUrl TEST_FILE(const QString &filename)
diff --git a/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp b/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp
index ca16214..4333e02 100644
--- a/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp
+++ b/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp
@@ -40,7 +40,6 @@
****************************************************************************/
#include <qtest.h>
-#include <QDeclarativeMetaType>
#include <QLocale>
#include <QPixmap>
#include <QBitmap>
@@ -53,6 +52,8 @@
#include <QQuaternion>
#include <qdeclarative.h>
+#include <private/qdeclarativemetatype_p.h>
+
class tst_qdeclarativemetatype : public QObject
{
Q_OBJECT
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp
index 6433791..154693c 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp
@@ -38,6 +38,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include <QStringList>
#include <QtDeclarative/qdeclarativeextensionplugin.h>
#include <QtDeclarative/qdeclarative.h>
#include <QDebug>
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h b/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h
index c4a9187..8b80e16 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h
+++ b/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h
@@ -52,6 +52,7 @@
#include <QFont>
#include <qdeclarative.h>
#include <QDeclarativePropertyValueSource>
+#include <QDeclarativeMetaProperty>
class MyTypeObject : public QObject
{