summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-15 22:13:33 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-15 22:13:33 (GMT)
commit792978f693087dfecb1b9a6479e13ab75305d0d6 (patch)
tree906874fe561b06061f6c22f665d3304d1e2026cc /examples
parentfdcb62d5d6a3e295273042555d2551eb491a5b2d (diff)
parent737c0c8d9aa319384ef0bcbed4e709deb2239e75 (diff)
downloadQt-792978f693087dfecb1b9a6479e13ab75305d0d6.zip
Qt-792978f693087dfecb1b9a6479e13ab75305d0d6.tar.gz
Qt-792978f693087dfecb1b9a6479e13ab75305d0d6.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (89 commits) Compile with user defined Qt namespace Fix regression from previous commit Import "content" with as qualifier to support network without qmldir Small fixes to photoviewer demo Fix benchmark. Add basic QUrl benchmarks. Add busy indicator to photoviewer demo Set maximumExtents correctly for highlightRangeMode: StrictlyEnforceRange fix installation of imports libraries QDeclarative::isWritable optimization. Make easing docs more consistent with other grouped property docs. Make the loader a focusscope. Fix typo. Use reliable local server for HTTP testing. Fix installation of imports libraries Change PathView offset property to use range 0 - 1.0 Tweak benchmark Optimization: Use linked list for context children Add new declarative photoviewer demo Remove dead code ...
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/animations/color-animation.qml1
-rw-r--r--examples/declarative/colorbrowser/colorbrowser.qml4
-rw-r--r--examples/declarative/dynamic/dynamic.qml1
-rw-r--r--examples/declarative/extending/adding/main.cpp2
-rw-r--r--examples/declarative/extending/attached/main.cpp12
-rw-r--r--examples/declarative/extending/binding/main.cpp15
-rw-r--r--examples/declarative/extending/coercion/main.cpp8
-rw-r--r--examples/declarative/extending/default/main.cpp8
-rw-r--r--examples/declarative/extending/extended/main.cpp2
-rw-r--r--examples/declarative/extending/grouped/main.cpp10
-rw-r--r--examples/declarative/extending/properties/main.cpp4
-rw-r--r--examples/declarative/extending/signal/main.cpp12
-rw-r--r--examples/declarative/extending/valuesource/main.cpp14
-rw-r--r--examples/declarative/imageprovider/imageprovider.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml1
15 files changed, 49 insertions, 47 deletions
diff --git a/examples/declarative/animations/color-animation.qml b/examples/declarative/animations/color-animation.qml
index 6740522..025134b 100644
--- a/examples/declarative/animations/color-animation.qml
+++ b/examples/declarative/animations/color-animation.qml
@@ -1,4 +1,5 @@
import Qt 4.6
+import Qt.labs.particles 1.0
Item {
id: window
diff --git a/examples/declarative/colorbrowser/colorbrowser.qml b/examples/declarative/colorbrowser/colorbrowser.qml
index 421ae07..d4c21e7 100644
--- a/examples/declarative/colorbrowser/colorbrowser.qml
+++ b/examples/declarative/colorbrowser/colorbrowser.qml
@@ -16,7 +16,7 @@ Rectangle {
GridView {
id: gridView; model: visualModel.parts.grid; width: mainWindow.width; height: mainWindow.height
cellWidth: 160; cellHeight: 160; interactive: false
- onCurrentIndexChanged: listView.positionViewAtIndex(currentIndex)
+ onCurrentIndexChanged: listView.positionViewAtIndex(currentIndex, ListView.Contain)
}
}
@@ -25,7 +25,7 @@ Rectangle {
ListView {
id: listView; model: visualModel.parts.list; orientation: Qt.Horizontal
width: mainWindow.width; height: mainWindow.height; interactive: false
- onCurrentIndexChanged: gridView.positionViewAtIndex(currentIndex)
+ onCurrentIndexChanged: gridView.positionViewAtIndex(currentIndex, GridView.Contain)
highlightRangeMode: ListView.StrictlyEnforceRange; snapMode: ListView.SnapOneItem
}
}
diff --git a/examples/declarative/dynamic/dynamic.qml b/examples/declarative/dynamic/dynamic.qml
index 6af3e81..7de4d38 100644
--- a/examples/declarative/dynamic/dynamic.qml
+++ b/examples/declarative/dynamic/dynamic.qml
@@ -1,4 +1,5 @@
import Qt 4.6
+import Qt.labs.particles 1.0
import "qml"
Item {
diff --git a/examples/declarative/extending/adding/main.cpp b/examples/declarative/extending/adding/main.cpp
index 76e0736..b9e5aa3 100644
--- a/examples/declarative/extending/adding/main.cpp
+++ b/examples/declarative/extending/adding/main.cpp
@@ -48,7 +48,7 @@ int main(int argc, char ** argv)
{
QCoreApplication app(argc, argv);
- QML_REGISTER_TYPE(People, 1,0, Person, Person);
+ qmlRegisterType<Person>("People", 1,0, "Person");
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine, ":example.qml");
diff --git a/examples/declarative/extending/attached/main.cpp b/examples/declarative/extending/attached/main.cpp
index 684d8d3..fd2d525 100644
--- a/examples/declarative/extending/attached/main.cpp
+++ b/examples/declarative/extending/attached/main.cpp
@@ -49,12 +49,12 @@ int main(int argc, char ** argv)
{
QCoreApplication app(argc, argv);
- QML_REGISTER_NOCREATE_TYPE(BirthdayPartyAttached);
- QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty);
- QML_REGISTER_NOCREATE_TYPE(ShoeDescription);
- QML_REGISTER_NOCREATE_TYPE(Person);
- QML_REGISTER_TYPE(People, 1,0, Boy, Boy);
- QML_REGISTER_TYPE(People, 1,0, Girl, Girl);
+ qmlRegisterType<BirthdayPartyAttached>();
+ qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
+ qmlRegisterType<ShoeDescription>();
+ qmlRegisterType<Person>();
+ qmlRegisterType<Boy>("People", 1,0, "Boy");
+ qmlRegisterType<Girl>("People", 1,0, "Girl");
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine, ":example.qml");
diff --git a/examples/declarative/extending/binding/main.cpp b/examples/declarative/extending/binding/main.cpp
index 873f8c9..ce6c50d 100644
--- a/examples/declarative/extending/binding/main.cpp
+++ b/examples/declarative/extending/binding/main.cpp
@@ -49,14 +49,13 @@
int main(int argc, char ** argv)
{
QCoreApplication app(argc, argv);
-
- QML_REGISTER_NOCREATE_TYPE(BirthdayPartyAttached);
- QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty);
- QML_REGISTER_TYPE(People, 1,0, HappyBirthday, HappyBirthday);
- QML_REGISTER_NOCREATE_TYPE(ShoeDescription);
- QML_REGISTER_NOCREATE_TYPE(Person);
- QML_REGISTER_TYPE(People, 1,0, Boy, Boy);
- QML_REGISTER_TYPE(People, 1,0, Girl, Girl);
+ qmlRegisterType<BirthdayPartyAttached>();
+ qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
+ qmlRegisterType<HappyBirthday>("People", 1,0, "HappyBirthday");
+ qmlRegisterType<ShoeDescription>();
+ qmlRegisterType<Person>();
+ qmlRegisterType<Boy>("People", 1,0, "Boy");
+ qmlRegisterType<Girl>("People", 1,0, "Girl");
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine, ":example.qml");
diff --git a/examples/declarative/extending/coercion/main.cpp b/examples/declarative/extending/coercion/main.cpp
index 1e2209f..312aff9 100644
--- a/examples/declarative/extending/coercion/main.cpp
+++ b/examples/declarative/extending/coercion/main.cpp
@@ -49,12 +49,12 @@ int main(int argc, char ** argv)
{
QCoreApplication app(argc, argv);
- QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty);
+ qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
// ![0]
- QML_REGISTER_NOCREATE_TYPE(Person);
+ qmlRegisterType<Person>();
// ![0]
- QML_REGISTER_TYPE(People, 1,0, Boy, Boy);
- QML_REGISTER_TYPE(People, 1,0, Girl, Girl);
+ qmlRegisterType<Boy>("People", 1,0, "Boy");
+ qmlRegisterType<Girl>("People", 1,0, "Girl");
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine, ":example.qml");
diff --git a/examples/declarative/extending/default/main.cpp b/examples/declarative/extending/default/main.cpp
index 7d7f8a1..06282ad 100644
--- a/examples/declarative/extending/default/main.cpp
+++ b/examples/declarative/extending/default/main.cpp
@@ -49,10 +49,10 @@ int main(int argc, char ** argv)
{
QCoreApplication app(argc, argv);
- QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty);
- QML_REGISTER_NOCREATE_TYPE(Person);
- QML_REGISTER_TYPE(People, 1,0, Boy, Boy);
- QML_REGISTER_TYPE(People, 1,0, Girl, Girl);
+ qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
+ qmlRegisterType<Person>();
+ qmlRegisterType<Boy>("People", 1,0, "Boy");
+ qmlRegisterType<Girl>("People", 1,0, "Girl");
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine, ":example.qml");
diff --git a/examples/declarative/extending/extended/main.cpp b/examples/declarative/extending/extended/main.cpp
index 5cbeea3..ca7242d 100644
--- a/examples/declarative/extending/extended/main.cpp
+++ b/examples/declarative/extending/extended/main.cpp
@@ -49,7 +49,7 @@ int main(int argc, char ** argv)
{
QApplication app(argc, argv);
- QML_REGISTER_EXTENDED_TYPE(People, 1,0, QLineEdit, QLineEdit, LineEditExtension);
+ qmlRegisterExtendedType<QLineEdit, LineEditExtension>("People", 1,0, "QLineEdit");
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine, ":example.qml");
diff --git a/examples/declarative/extending/grouped/main.cpp b/examples/declarative/extending/grouped/main.cpp
index 15a0bb5..b383a8b 100644
--- a/examples/declarative/extending/grouped/main.cpp
+++ b/examples/declarative/extending/grouped/main.cpp
@@ -49,11 +49,11 @@ int main(int argc, char ** argv)
{
QCoreApplication app(argc, argv);
- QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty);
- QML_REGISTER_NOCREATE_TYPE(ShoeDescription);
- QML_REGISTER_NOCREATE_TYPE(Person);
- QML_REGISTER_TYPE(People, 1,0, Boy, Boy);
- QML_REGISTER_TYPE(People, 1,0, Girl, Girl);
+ qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
+ qmlRegisterType<ShoeDescription>();
+ qmlRegisterType<Person>();
+ qmlRegisterType<Boy>("People", 1,0, "Boy");
+ qmlRegisterType<Girl>("People", 1,0, "Girl");
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine, ":example.qml");
diff --git a/examples/declarative/extending/properties/main.cpp b/examples/declarative/extending/properties/main.cpp
index ce69ad2..350f8bd 100644
--- a/examples/declarative/extending/properties/main.cpp
+++ b/examples/declarative/extending/properties/main.cpp
@@ -49,8 +49,8 @@ int main(int argc, char ** argv)
{
QCoreApplication app(argc, argv);
- QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty);
- QML_REGISTER_TYPE(People, 1,0, Person, Person);
+ qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
+ qmlRegisterType<Person>("People", 1,0, "Person");
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine, ":example.qml");
diff --git a/examples/declarative/extending/signal/main.cpp b/examples/declarative/extending/signal/main.cpp
index afc1a66..1b23a46 100644
--- a/examples/declarative/extending/signal/main.cpp
+++ b/examples/declarative/extending/signal/main.cpp
@@ -49,12 +49,12 @@ int main(int argc, char ** argv)
{
QCoreApplication app(argc, argv);
- QML_REGISTER_NOCREATE_TYPE(BirthdayPartyAttached);
- QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty);
- QML_REGISTER_NOCREATE_TYPE(ShoeDescription);
- QML_REGISTER_NOCREATE_TYPE(Person);
- QML_REGISTER_TYPE(People, 1,0, Boy, Boy);
- QML_REGISTER_TYPE(People, 1,0, Girl, Girl);
+ qmlRegisterType<BirthdayPartyAttached>();
+ qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
+ qmlRegisterType<ShoeDescription>();
+ qmlRegisterType<Person>();
+ qmlRegisterType<Boy>("People", 1,0, "Boy");
+ qmlRegisterType<Girl>("People", 1,0, "Girl");
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine, ":example.qml");
diff --git a/examples/declarative/extending/valuesource/main.cpp b/examples/declarative/extending/valuesource/main.cpp
index 873f8c9..2574917 100644
--- a/examples/declarative/extending/valuesource/main.cpp
+++ b/examples/declarative/extending/valuesource/main.cpp
@@ -50,13 +50,13 @@ int main(int argc, char ** argv)
{
QCoreApplication app(argc, argv);
- QML_REGISTER_NOCREATE_TYPE(BirthdayPartyAttached);
- QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty);
- QML_REGISTER_TYPE(People, 1,0, HappyBirthday, HappyBirthday);
- QML_REGISTER_NOCREATE_TYPE(ShoeDescription);
- QML_REGISTER_NOCREATE_TYPE(Person);
- QML_REGISTER_TYPE(People, 1,0, Boy, Boy);
- QML_REGISTER_TYPE(People, 1,0, Girl, Girl);
+ qmlRegisterType<BirthdayPartyAttached>();
+ qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
+ qmlRegisterType<HappyBirthday>("People", 1,0, "HappyBirthday");
+ qmlRegisterType<ShoeDescription>();
+ qmlRegisterType<Person>();
+ qmlRegisterType<Boy>("People", 1,0, "Boy");
+ qmlRegisterType<Girl>("People", 1,0, "Girl");
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine, ":example.qml");
diff --git a/examples/declarative/imageprovider/imageprovider.qml b/examples/declarative/imageprovider/imageprovider.qml
index f899b1e..a1f2794 100644
--- a/examples/declarative/imageprovider/imageprovider.qml
+++ b/examples/declarative/imageprovider/imageprovider.qml
@@ -1,5 +1,5 @@
import Qt 4.6
-import "ImageProviderCore"
+import ImageProviderCore 1.0
//![0]
ListView {
width: 100
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
index 9ef455a..a6ef62c 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
@@ -1,4 +1,5 @@
import Qt 4.6
+import Qt.labs.particles 1.0
Item { id:block
property int type: 0