diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-02-03 00:01:13 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-02-03 00:04:03 (GMT) |
commit | 17d0ed5af4922645a268b6550742fb521d459c8e (patch) | |
tree | 43f4077630bd896da88715dec894392c63ac666b | |
parent | 35a211cd95e0d09ef0b547b57f01f0a9ff41da2f (diff) | |
download | Qt-17d0ed5af4922645a268b6550742fb521d459c8e.zip Qt-17d0ed5af4922645a268b6550742fb521d459c8e.tar.gz Qt-17d0ed5af4922645a268b6550742fb521d459c8e.tar.bz2 |
Disallow ids that start with uppercase letters and update docs and
examples accordingly.
Task-number: QT-2786
102 files changed, 365 insertions, 360 deletions
diff --git a/demos/declarative/calculator/CalcButton.qml b/demos/declarative/calculator/CalcButton.qml index 03ede9c..08851d0 100644 --- a/demos/declarative/calculator/CalcButton.qml +++ b/demos/declarative/calculator/CalcButton.qml @@ -9,8 +9,8 @@ Rectangle { id: button; width: 50; height: 30 border.color: palette.mid; radius: 6 gradient: Gradient { - GradientStop { id: G1; position: 0.0; color: Qt.lighter(palette.button) } - GradientStop { id: G2; position: 1.0; color: palette.button } + GradientStop { id: gradientStop1; position: 0.0; color: Qt.lighter(palette.button) } + GradientStop { id: gradientStop2; position: 1.0; color: palette.button } } Text { id: label; anchors.centerIn: parent; color: palette.buttonText } @@ -29,13 +29,13 @@ Rectangle { states: [ State { name: "Pressed"; when: clickRegion.pressed == true - PropertyChanges { target: G1; color: palette.dark } - PropertyChanges { target: G2; color: palette.button } + PropertyChanges { target: gradientStop1; color: palette.dark } + PropertyChanges { target: gradientStop2; color: palette.button } }, State { name: "Toggled"; when: button.toggled == true - PropertyChanges { target: G1; color: palette.dark } - PropertyChanges { target: G2; color: palette.button } + PropertyChanges { target: gradientStop1; color: palette.dark } + PropertyChanges { target: gradientStop2; color: palette.button } } ] } diff --git a/demos/declarative/flickr/flickr-desktop.qml b/demos/declarative/flickr/flickr-desktop.qml index 10babeb..4e3b6cb 100644 --- a/demos/declarative/flickr/flickr-desktop.qml +++ b/demos/declarative/flickr/flickr-desktop.qml @@ -57,7 +57,7 @@ Item { id: shadows Image { source: "common/pics/shadow-right.png"; x: whiteRect.width; height: whiteRect.height } Image { source: "common/pics/shadow-bottom.png"; y: whiteRect.height; width: whiteRect.width } - Image { id: Corner; source: "common/pics/shadow-corner.png"; x: whiteRect.width; y: whiteRect.height } + Image { id: corner; source: "common/pics/shadow-corner.png"; x: whiteRect.width; y: whiteRect.height } } } diff --git a/demos/declarative/twitter/content/FatDelegate.qml b/demos/declarative/twitter/content/FatDelegate.qml index 23b4838..2b9288b 100644 --- a/demos/declarative/twitter/content/FatDelegate.qml +++ b/demos/declarative/twitter/content/FatDelegate.qml @@ -1,7 +1,7 @@ import Qt 4.6 Component { - id: ListDelegate + id: listDelegate Item { id: wrapper; width: wrapper.ListView.view.width; height: if(txt.height > 58){txt.height+8}else{58}//50+4+4 Script { diff --git a/doc/src/declarative/anchor-layout.qdoc b/doc/src/declarative/anchor-layout.qdoc index 4766236..2bd0ec5 100644 --- a/doc/src/declarative/anchor-layout.qdoc +++ b/doc/src/declarative/anchor-layout.qdoc @@ -87,8 +87,8 @@ By specifying multiple horizontal or vertical anchors you can control the size o \code Rectangle { id: rect1; x: 0; ... } -Rectangle { id: rect2; anchors.left: rect1.right; anchors.right: Rect3.left; ... } -Rectangle { id: Rect3; x: 150; ... } +Rectangle { id: rect2; anchors.left: rect1.right; anchors.right: rect3.left; ... } +Rectangle { id: rect3; x: 150; ... } \endcode \image edge4.png @@ -99,11 +99,11 @@ For performance reasons, you can only anchor an item to its siblings and direct \badcode Item { - id: Group1 + id: group1 Rectangle { id: rect1; ... } } Item { - id: Group2 + id: group2 Rectangle { id: rect2; anchors.left: rect1.right; ... } // invalid anchor! } \endcode diff --git a/doc/src/declarative/qmlintro.qdoc b/doc/src/declarative/qmlintro.qdoc index 8141c90..3891515 100644 --- a/doc/src/declarative/qmlintro.qdoc +++ b/doc/src/declarative/qmlintro.qdoc @@ -192,22 +192,29 @@ Item { \section3 The \c id property -The \c id property is a special property of type \e id. Assigning an id to an object allows you -to refer to it elsewhere. +Each object can be given a special unique property called an \e id. Assigning an id enables the object +to be referred to by other objects and scripts. + +The first Rectangle element below has an \e id, "myRect". The second Rectange element defines its +own width by referring to \tt myRect.width, which means it will have the same \tt width +value as the first Rectangle element. \code Item { - Text { - id: myName - text: "..." + Rectangle { + id: myRect + width: 100 + height: 100 } - Text { - text: myName.text + Rectangle { + width: myRect.width + height: 200 } } \endcode -\c Ids must begin with a lowercase letter. +Note that an \e id must begin with a lower-case letter or an underscore, and cannot contain characters other than letters, numbers and underscores. + \section2 List properties diff --git a/doc/src/snippets/declarative/listview/dummydata/ContactModel.qml b/doc/src/snippets/declarative/listview/dummydata/ContactModel.qml index 31e02ea..6832308 100644 --- a/doc/src/snippets/declarative/listview/dummydata/ContactModel.qml +++ b/doc/src/snippets/declarative/listview/dummydata/ContactModel.qml @@ -1,7 +1,7 @@ import Qt 4.6 ListModel { - id: ContactModel + id: contactModel ListElement { name: "Bill Smith" number: "555 3264" diff --git a/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml b/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml index 20b3b7d..1334cf4 100644 --- a/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml +++ b/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml @@ -1,7 +1,7 @@ import Qt 4.6 ListModel { - id: MenuModel + id: menuModel ListElement { name: "Bill Jones" icon: "pics/qtlogo-64.png" diff --git a/examples/declarative/listview/dummydata/MyPetsModel.qml b/examples/declarative/listview/dummydata/MyPetsModel.qml index 074fc13..1ac37bb 100644 --- a/examples/declarative/listview/dummydata/MyPetsModel.qml +++ b/examples/declarative/listview/dummydata/MyPetsModel.qml @@ -1,9 +1,9 @@ import Qt 4.6 // ListModel allows free form list models to be defined and populated. -// Be sure to name the file the same as the id. + ListModel { - id: MyListElementsModel + id: petsModel ListElement { name: "Polly" type: "Parrot" diff --git a/examples/declarative/listview/dummydata/Recipes.qml b/examples/declarative/listview/dummydata/Recipes.qml index 533730f..68e94ac 100644 --- a/examples/declarative/listview/dummydata/Recipes.qml +++ b/examples/declarative/listview/dummydata/Recipes.qml @@ -1,7 +1,7 @@ import Qt 4.6 ListModel { - id: Recipes + id: recipesModel ListElement { title: "Pancakes" picture: "content/pics/pancakes.jpg" diff --git a/examples/declarative/listview/sections.qml b/examples/declarative/listview/sections.qml index 6e72ce7..877026b 100644 --- a/examples/declarative/listview/sections.qml +++ b/examples/declarative/listview/sections.qml @@ -42,7 +42,7 @@ Rectangle { } // The list ListView { - id: List + id: myList width: 200 height: parent.height model: MyPetsModel diff --git a/examples/declarative/tutorials/samegame/samegame1/Button.qml b/examples/declarative/tutorials/samegame/samegame1/Button.qml index 9792a22..85e6777 100644 --- a/examples/declarative/tutorials/samegame/samegame1/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame1/Button.qml @@ -2,7 +2,7 @@ import Qt 4.6 Rectangle { - id: Container + id: container signal clicked property string text: "Button" @@ -18,10 +18,10 @@ Rectangle { GradientStop { position: 1.0; color: activePalette.button } } - MouseRegion { id: mr; anchors.fill: parent; onClicked: Container.clicked() } + MouseRegion { id: mr; anchors.fill: parent; onClicked: container.clicked() } Text { - id: txtItem; text: Container.text; anchors.centerIn: Container; color: activePalette.buttonText + id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText } } //![0] diff --git a/examples/declarative/tutorials/samegame/samegame1/samegame.qml b/examples/declarative/tutorials/samegame/samegame1/samegame.qml index fad2175..c2d3939 100644 --- a/examples/declarative/tutorials/samegame/samegame1/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame1/samegame.qml @@ -2,13 +2,13 @@ import Qt 4.6 Rectangle { - id: Screen + id: screen width: 490; height: 720 SystemPalette { id: activePalette } Item { - width: parent.width; anchors.top: parent.top; anchors.bottom: ToolBar.top + width: parent.width; anchors.top: parent.top; anchors.bottom: toolbar.top Image { id: background @@ -18,10 +18,10 @@ Rectangle { } Rectangle { - id: ToolBar + id: toolbar color: activePalette.window height: 32; width: parent.width - anchors.bottom: Screen.bottom + anchors.bottom: screen.bottom Button { id: btnA; text: "New Game"; onClicked: console.log("Implement me!"); @@ -30,7 +30,7 @@ Rectangle { } Text { - id: Score + id: score text: "Score: Who knows?"; font.bold: true anchors.right: parent.right; anchors.rightMargin: 3 anchors.verticalCenter: parent.verticalCenter diff --git a/examples/declarative/tutorials/samegame/samegame2/Button.qml b/examples/declarative/tutorials/samegame/samegame2/Button.qml index 9e515e0..63cd555 100644 --- a/examples/declarative/tutorials/samegame/samegame2/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame2/Button.qml @@ -1,7 +1,7 @@ import Qt 4.6 Rectangle { - id: Container + id: container signal clicked property string text: "Button" @@ -17,9 +17,9 @@ Rectangle { GradientStop { position: 1.0; color: activePalette.button } } - MouseRegion { id: mr; anchors.fill: parent; onClicked: Container.clicked() } + MouseRegion { id: mr; anchors.fill: parent; onClicked: container.clicked() } Text { - id: txtItem; text: Container.text; anchors.centerIn: Container; color: activePalette.buttonText + id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText } } diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.qml b/examples/declarative/tutorials/samegame/samegame2/samegame.qml index e0e467a..8d837da 100644 --- a/examples/declarative/tutorials/samegame/samegame2/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame2/samegame.qml @@ -1,7 +1,7 @@ import Qt 4.6 Rectangle { - id: Screen + id: screen width: 490; height: 720 SystemPalette { id: activePalette } @@ -10,7 +10,7 @@ Rectangle { //![2] Item { - width: parent.width; anchors.top: parent.top; anchors.bottom: ToolBar.top + width: parent.width; anchors.top: parent.top; anchors.bottom: toolbar.top Image { id: background @@ -20,10 +20,10 @@ Rectangle { } Rectangle { - id: ToolBar + id: toolbar color: activePalette.window height: 32; width: parent.width - anchors.bottom: Screen.bottom + anchors.bottom: screen.bottom //![1] Button { @@ -34,7 +34,7 @@ Rectangle { //![1] Text { - id: Score + id: score text: "Score: Who knows?"; font.bold: true anchors.right: parent.right; anchors.rightMargin: 3 anchors.verticalCenter: parent.verticalCenter diff --git a/examples/declarative/tutorials/samegame/samegame3/Button.qml b/examples/declarative/tutorials/samegame/samegame3/Button.qml index 9e515e0..63cd555 100644 --- a/examples/declarative/tutorials/samegame/samegame3/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame3/Button.qml @@ -1,7 +1,7 @@ import Qt 4.6 Rectangle { - id: Container + id: container signal clicked property string text: "Button" @@ -17,9 +17,9 @@ Rectangle { GradientStop { position: 1.0; color: activePalette.button } } - MouseRegion { id: mr; anchors.fill: parent; onClicked: Container.clicked() } + MouseRegion { id: mr; anchors.fill: parent; onClicked: container.clicked() } Text { - id: txtItem; text: Container.text; anchors.centerIn: Container; color: activePalette.buttonText + id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText } } diff --git a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml index 5fe6aa0..96dc246 100644 --- a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml +++ b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml @@ -8,16 +8,16 @@ Rectangle { page.opacity = 0; } function show(txt) { - MyText.text = txt; + myText.text = txt; page.opacity = 1; } signal closed(); - color: "white"; border.width: 1; width: MyText.width + 20; height: 60; + color: "white"; border.width: 1; width: myText.width + 20; height: 60; opacity: 0 opacity: Behavior { NumberAnimation { duration: 1000 } } - Text { id: MyText; anchors.centerIn: parent; text: "Hello World!" } + Text { id: myText; anchors.centerIn: parent; text: "Hello World!" } MouseRegion { id: mr; anchors.fill: parent; onClicked: forceClose(); } } //![0] diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.qml b/examples/declarative/tutorials/samegame/samegame3/samegame.qml index e1eb542..8bdb428 100644 --- a/examples/declarative/tutorials/samegame/samegame3/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame3/samegame.qml @@ -2,14 +2,14 @@ import Qt 4.6 Rectangle { - id: Screen + id: screen width: 490; height: 720 SystemPalette { id: activePalette } Script { source: "samegame.js" } Item { - width: parent.width; anchors.top: parent.top; anchors.bottom: ToolBar.top + width: parent.width; anchors.top: parent.top; anchors.bottom: toolbar.top Image { id: background @@ -40,10 +40,10 @@ Rectangle { //![2] Rectangle { - id: ToolBar + id: toolbar color: activePalette.window height: 32; width: parent.width - anchors.bottom: Screen.bottom + anchors.bottom: screen.bottom Button { id: btnA; text: "New Game"; onClicked: initBoard(); @@ -52,7 +52,7 @@ Rectangle { } Text { - id: Score + id: score text: "Score: " + gameCanvas.score; font.bold: true anchors.right: parent.right; anchors.rightMargin: 3 anchors.verticalCenter: parent.verticalCenter diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml index 9e515e0..63cd555 100644 --- a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml @@ -1,7 +1,7 @@ import Qt 4.6 Rectangle { - id: Container + id: container signal clicked property string text: "Button" @@ -17,9 +17,9 @@ Rectangle { GradientStop { position: 1.0; color: activePalette.button } } - MouseRegion { id: mr; anchors.fill: parent; onClicked: Container.clicked() } + MouseRegion { id: mr; anchors.fill: parent; onClicked: container.clicked() } Text { - id: txtItem; text: Container.text; anchors.centerIn: Container; color: activePalette.buttonText + id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText } } diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml index 401d211..3371d53 100644 --- a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml +++ b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml @@ -7,15 +7,15 @@ Rectangle { page.opacity = 0; } function show(txt) { - MyText.text = txt; + myText.text = txt; page.opacity = 1; } signal closed(); - color: "white"; border.width: 1; width: MyText.width + 20; height: 60; + color: "white"; border.width: 1; width: myText.width + 20; height: 60; opacity: 0 opacity: Behavior { NumberAnimation { duration: 1000 } } - Text { id: MyText; anchors.centerIn: parent; text: "Hello World!" } + Text { id: myText; anchors.centerIn: parent; text: "Hello World!" } MouseRegion { id: mr; anchors.fill: parent; onClicked: forceClose(); } } diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp index bb7abf3..c6a5d82 100644 --- a/src/declarative/qml/qmlcompiler.cpp +++ b/src/declarative/qml/qmlcompiler.cpp @@ -115,7 +115,7 @@ QList<QmlError> QmlCompiler::errors() const /*! Returns true if \a val is a legal object id, false otherwise. - Legal ids must start with a letter or underscore, and contain only + Legal ids must start with a lower-case letter or underscore, and contain only letters, numbers and underscores. */ bool QmlCompiler::isValidId(const QString &val) @@ -123,6 +123,9 @@ bool QmlCompiler::isValidId(const QString &val) if (val.isEmpty()) return false; + if (val.at(0).isLetter() && !val.at(0).isLower()) + return false; + QChar u(QLatin1Char('_')); for (int ii = 0; ii < val.count(); ++ii) if (val.at(ii) != u && diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp index 8c70539..0b19574 100644 --- a/src/declarative/util/qmllistmodel.cpp +++ b/src/declarative/util/qmllistmodel.cpp @@ -161,10 +161,10 @@ static void dump(ModelNode *node, int ind); id: fruitDelegate Item { width: 200; height: 50 - Text { id: Name; text: name } + Text { id: name; text: name } Text { text: '$'+cost; anchors.right: parent.right } Row { - anchors.top: Name.bottom + anchors.top: name.bottom spacing: 5 Text { text: "Attributes:" } Repeater { diff --git a/tests/auto/declarative/animations/data/badproperty1.qml b/tests/auto/declarative/animations/data/badproperty1.qml index fda322c..d31cae9 100644 --- a/tests/auto/declarative/animations/data/badproperty1.qml +++ b/tests/auto/declarative/animations/data/badproperty1.qml @@ -1,21 +1,21 @@ import Qt 4.6 Rectangle { - id: Wrapper + id: wrapper width: 240 height: 320 Rectangle { - id: MyRect + id: myRect color: "red" width: 50; height: 50 x: 100; y: 100 } states: State { name: "state1" - PropertyChanges { target: MyRect; border.color: "blue" } + PropertyChanges { target: myRect; border.color: "blue" } } transitions: Transition { - ColorAnimation { target: MyRect; to: "red"; property: "border.colr"; duration: 1000 } + ColorAnimation { target: myRect; to: "red"; property: "border.colr"; duration: 1000 } } - Component.onCompleted: if (Wrapper.state == "state1") Wrapper.state = ""; else Wrapper.state = "state1"; + Component.onCompleted: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1"; } diff --git a/tests/auto/declarative/animations/data/badproperty2.qml b/tests/auto/declarative/animations/data/badproperty2.qml index 0e8366a..3b8b111 100644 --- a/tests/auto/declarative/animations/data/badproperty2.qml +++ b/tests/auto/declarative/animations/data/badproperty2.qml @@ -1,21 +1,21 @@ import Qt 4.6 Rectangle { - id: Wrapper + id: wrapper width: 240 height: 320 Rectangle { - id: MyRect + id: myRect color: "red" width: 50; height: 50 x: 100; y: 100 } states: State { name: "state1" - PropertyChanges { target: MyRect; border.color: "blue" } + PropertyChanges { target: myRect; border.color: "blue" } } transitions: Transition { - ColorAnimation { target: MyRect; to: "red"; property: "border"; duration: 1000 } + ColorAnimation { target: myRect; to: "red"; property: "border"; duration: 1000 } } - Component.onCompleted: if (Wrapper.state == "state1") Wrapper.state = ""; else Wrapper.state = "state1"; + Component.onCompleted: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1"; } diff --git a/tests/auto/declarative/animations/data/badtype4.qml b/tests/auto/declarative/animations/data/badtype4.qml index 347e581..b5096f4 100644 --- a/tests/auto/declarative/animations/data/badtype4.qml +++ b/tests/auto/declarative/animations/data/badtype4.qml @@ -1,23 +1,23 @@ import Qt 4.6 Rectangle { - id: Wrapper + id: wrapper width: 240 height: 320 Rectangle { - id: MyRect - objectName: "MyRect" + id: myRect + objectName: "myRect" color: "red" width: 50; height: 50 x: 100; y: 100 MouseRegion { anchors.fill: parent - onClicked: if (Wrapper.state == "state1") Wrapper.state = ""; else Wrapper.state = "state1"; + onClicked: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1"; } } states: State { name: "state1" - PropertyChanges { target: MyRect; x: 200; color: "blue" } + PropertyChanges { target: myRect; x: 200; color: "blue" } } transitions: Transition { //comment out each in turn to make sure each only animates the relevant property diff --git a/tests/auto/declarative/animations/data/dotproperty.qml b/tests/auto/declarative/animations/data/dotproperty.qml index 3ddb002..369491f 100644 --- a/tests/auto/declarative/animations/data/dotproperty.qml +++ b/tests/auto/declarative/animations/data/dotproperty.qml @@ -1,22 +1,22 @@ import Qt 4.6 Rectangle { - id: Wrapper + id: wrapper width: 240 height: 320 Rectangle { - id: MyRect + id: myRect color: "red" width: 50; height: 50 x: 100; y: 100 MouseRegion { anchors.fill: parent - onClicked: if (Wrapper.state == "state1") Wrapper.state = ""; else Wrapper.state = "state1"; + onClicked: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1"; } } states: State { name: "state1" - PropertyChanges { target: MyRect; border.color: "blue" } + PropertyChanges { target: myRect; border.color: "blue" } } transitions: Transition { ColorAnimation { matchProperties: "border.color"; duration: 1000 } diff --git a/tests/auto/declarative/animations/data/mixedtype1.qml b/tests/auto/declarative/animations/data/mixedtype1.qml index a91c6d3..a9eed24 100644 --- a/tests/auto/declarative/animations/data/mixedtype1.qml +++ b/tests/auto/declarative/animations/data/mixedtype1.qml @@ -1,23 +1,23 @@ import Qt 4.6 Rectangle { - id: Wrapper + id: wrapper width: 240 height: 320 Rectangle { - id: MyRect - objectName: "MyRect" + id: myRect + objectName: "myRect" color: "red" width: 50; height: 50 x: 100; y: 100 MouseRegion { anchors.fill: parent - onClicked: if (Wrapper.state == "state1") Wrapper.state = ""; else Wrapper.state = "state1"; + onClicked: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1"; } } states: State { name: "state1" - PropertyChanges { target: MyRect; x: 200; border.width: 10 } + PropertyChanges { target: myRect; x: 200; border.width: 10 } } transitions: Transition { PropertyAnimation { matchProperties: "x,border.width"; duration: 1000 } //x is real, border.width is int diff --git a/tests/auto/declarative/animations/data/mixedtype2.qml b/tests/auto/declarative/animations/data/mixedtype2.qml index d12e913..8acb825 100644 --- a/tests/auto/declarative/animations/data/mixedtype2.qml +++ b/tests/auto/declarative/animations/data/mixedtype2.qml @@ -1,23 +1,23 @@ import Qt 4.6 Rectangle { - id: Wrapper + id: wrapper width: 240 height: 320 Rectangle { - id: MyRect - objectName: "MyRect" + id: myRect + objectName: "myRect" color: "red" width: 50; height: 50 x: 100; y: 100 MouseRegion { anchors.fill: parent - onClicked: if (Wrapper.state == "state1") Wrapper.state = ""; else Wrapper.state = "state1"; + onClicked: if (wrapper.state == "state1") wrapper.state = ""; else wrapper.state = "state1"; } } states: State { name: "state1" - PropertyChanges { target: MyRect; x: 200; color: "blue" } + PropertyChanges { target: myRect; x: 200; color: "blue" } } transitions: Transition { PropertyAnimation { matchProperties: "x,color"; duration: 1000 } //x is real, color is color diff --git a/tests/auto/declarative/pathview/data/pathview.qml b/tests/auto/declarative/pathview/data/pathview.qml index be5673c..8fa8d59 100644 --- a/tests/auto/declarative/pathview/data/pathview.qml +++ b/tests/auto/declarative/pathview/data/pathview.qml @@ -6,7 +6,7 @@ Rectangle { color: "#ffffff" resources: [ Component { - id: Delegate + id: delegate Rectangle { id: wrapper objectName: "wrapper" @@ -38,7 +38,7 @@ Rectangle { width: 240 height: 320 model: testModel - delegate: Delegate + delegate: delegate snapPosition: 0.01 path: Path { startY: 120 diff --git a/tests/auto/declarative/qmlecmascript/data/aliasPropertyAndBinding.qml b/tests/auto/declarative/qmlecmascript/data/aliasPropertyAndBinding.qml index 7fdd8ca..5c3ea1f 100644 --- a/tests/auto/declarative/qmlecmascript/data/aliasPropertyAndBinding.qml +++ b/tests/auto/declarative/qmlecmascript/data/aliasPropertyAndBinding.qml @@ -2,11 +2,11 @@ import Qt 4.6 import Qt.test 1.0 MyQmlObject { - property alias c1: MyObject.c1 + property alias c1: myObject.c1 property int c2: 3 property int c3: c2 objectProperty: QtObject { - id: MyObject + id: myObject property int c1 } } diff --git a/tests/auto/declarative/qmlecmascript/data/attachedProperty.qml b/tests/auto/declarative/qmlecmascript/data/attachedProperty.qml index c5088e3..061eda0 100644 --- a/tests/auto/declarative/qmlecmascript/data/attachedProperty.qml +++ b/tests/auto/declarative/qmlecmascript/data/attachedProperty.qml @@ -2,10 +2,10 @@ import Qt.test 1.0 import Qt.test 1.0 as Namespace MyQmlObject { - id: Me + id: me property int a: MyQmlObject.value property int b: Namespace.MyQmlObject.value - property int c: Me.Namespace.MyQmlObject.value - property int d: Me.Namespace.MyQmlObject.value + property int c: me.Namespace.MyQmlObject.value + property int d: me.Namespace.MyQmlObject.value } diff --git a/tests/auto/declarative/qmlecmascript/data/bindingLoop.qml b/tests/auto/declarative/qmlecmascript/data/bindingLoop.qml index 8b22dd1..80545cf 100644 --- a/tests/auto/declarative/qmlecmascript/data/bindingLoop.qml +++ b/tests/auto/declarative/qmlecmascript/data/bindingLoop.qml @@ -3,12 +3,12 @@ import Qt.test 1.0 MyQmlContainer { children : [ MyQmlObject { - id: Object1 - stringProperty: "hello" + Object2.stringProperty + id: object1 + stringProperty: "hello" + object2.stringProperty }, MyQmlObject { - id: Object2 - stringProperty: "hello" + Object1.stringProperty + id: object2 + stringProperty: "hello" + object1.stringProperty } ] } diff --git a/tests/auto/declarative/qmlecmascript/data/constantsOverrideBindings.2.qml b/tests/auto/declarative/qmlecmascript/data/constantsOverrideBindings.2.qml index d205526..207a06b 100644 --- a/tests/auto/declarative/qmlecmascript/data/constantsOverrideBindings.2.qml +++ b/tests/auto/declarative/qmlecmascript/data/constantsOverrideBindings.2.qml @@ -1,11 +1,11 @@ import Qt.test 1.0 MyQmlObject { - property alias c1: MyConstants.c1 - property alias c2: MyConstants.c2 + property alias c1: myConstants.c1 + property alias c2: myConstants.c2 objectProperty: ConstantsOverrideBindings { - id: MyConstants + id: myConstants c2: 10 } } diff --git a/tests/auto/declarative/qmlecmascript/data/dynamicCreation.helper.qml b/tests/auto/declarative/qmlecmascript/data/dynamicCreation.helper.qml deleted file mode 100644 index b26d6e1..0000000 --- a/tests/auto/declarative/qmlecmascript/data/dynamicCreation.helper.qml +++ /dev/null @@ -1,5 +0,0 @@ -import Qt.test 1.0 - -MyQmlObject{ - objectName: "objectTwo" -} diff --git a/tests/auto/declarative/qmlecmascript/data/extendedObjectPropertyLookup.qml b/tests/auto/declarative/qmlecmascript/data/extendedObjectPropertyLookup.qml index ab379c1..9a82ad1 100644 --- a/tests/auto/declarative/qmlecmascript/data/extendedObjectPropertyLookup.qml +++ b/tests/auto/declarative/qmlecmascript/data/extendedObjectPropertyLookup.qml @@ -3,6 +3,6 @@ import Qt 4.6 QtObject { property MyExtendedObject a; - a: MyExtendedObject { id: Root } - property int b: Math.max(Root.extendedProperty, 0) + a: MyExtendedObject { id: root } + property int b: Math.max(root.extendedProperty, 0) } diff --git a/tests/auto/declarative/qmlecmascript/data/idShortcutInvalidates.1.qml b/tests/auto/declarative/qmlecmascript/data/idShortcutInvalidates.1.qml index b377b94..2db0fc6 100644 --- a/tests/auto/declarative/qmlecmascript/data/idShortcutInvalidates.1.qml +++ b/tests/auto/declarative/qmlecmascript/data/idShortcutInvalidates.1.qml @@ -2,12 +2,12 @@ import Qt.test 1.0 import Qt 4.6 MyQmlObject { - objectProperty: if(1) OtherObject + objectProperty: if(1) otherObject property var obj obj: QtObject { - id: OtherObject + id: otherObject } } diff --git a/tests/auto/declarative/qmlecmascript/data/idShortcutInvalidates.qml b/tests/auto/declarative/qmlecmascript/data/idShortcutInvalidates.qml index 40cacf6..f66428d 100644 --- a/tests/auto/declarative/qmlecmascript/data/idShortcutInvalidates.qml +++ b/tests/auto/declarative/qmlecmascript/data/idShortcutInvalidates.qml @@ -2,11 +2,11 @@ import Qt.test 1.0 import Qt 4.6 MyQmlObject { - objectProperty: OtherObject + objectProperty: otherObject property var obj obj: QtObject { - id: OtherObject + id: otherObject } } diff --git a/tests/auto/declarative/qmlecmascript/data/methods.1.qml b/tests/auto/declarative/qmlecmascript/data/methods.1.qml index 42ed9a5..0bbee16 100644 --- a/tests/auto/declarative/qmlecmascript/data/methods.1.qml +++ b/tests/auto/declarative/qmlecmascript/data/methods.1.qml @@ -1,6 +1,6 @@ import Qt.test 1.0 MyQmlObject { - id: MyObject - onBasicSignal: MyObject.methodNoArgs() + id: myObject + onBasicSignal: myObject.methodNoArgs() } diff --git a/tests/auto/declarative/qmlecmascript/data/methods.2.qml b/tests/auto/declarative/qmlecmascript/data/methods.2.qml index 70911f7..9f0c6b1 100644 --- a/tests/auto/declarative/qmlecmascript/data/methods.2.qml +++ b/tests/auto/declarative/qmlecmascript/data/methods.2.qml @@ -1,6 +1,6 @@ import Qt.test 1.0 MyQmlObject { - id: MyObject - onBasicSignal: MyObject.method(163) + id: myObject + onBasicSignal: myObject.method(163) } diff --git a/tests/auto/declarative/qmlecmascript/data/objectsCompareAsEqual.qml b/tests/auto/declarative/qmlecmascript/data/objectsCompareAsEqual.qml index 2526576..18e488a 100644 --- a/tests/auto/declarative/qmlecmascript/data/objectsCompareAsEqual.qml +++ b/tests/auto/declarative/qmlecmascript/data/objectsCompareAsEqual.qml @@ -1,15 +1,15 @@ import Qt 4.6 Item { - id: Root + id: root - property var item: Child - Item { id: Child } + property var item: child + Item { id: child } - property bool test1: Child == Child - property bool test2: Child.parent == Root - property bool test3: Root != Child - property bool test4: item == Child - property bool test5: item != Root + property bool test1: child == child + property bool test2: child.parent == root + property bool test3: root != child + property bool test4: item == child + property bool test5: item != root } diff --git a/tests/auto/declarative/qmlecmascript/data/outerBindingOverridesInnerBinding.qml b/tests/auto/declarative/qmlecmascript/data/outerBindingOverridesInnerBinding.qml index 49ada1f..0a933e8 100644 --- a/tests/auto/declarative/qmlecmascript/data/outerBindingOverridesInnerBinding.qml +++ b/tests/auto/declarative/qmlecmascript/data/outerBindingOverridesInnerBinding.qml @@ -1,12 +1,12 @@ import Qt.test 1.0 MyQmlObject { - property alias c1: MyConstants.c1 - property alias c2: MyConstants.c2 + property alias c1: myConstants.c1 + property alias c2: myConstants.c2 property int c3: 0 objectProperty: ConstantsOverrideBindings { - id: MyConstants + id: myConstants c2: c3 } diff --git a/tests/auto/declarative/qmlecmascript/data/scope.qml b/tests/auto/declarative/qmlecmascript/data/scope.qml index 80222c8..cccd3d3 100644 --- a/tests/auto/declarative/qmlecmascript/data/scope.qml +++ b/tests/auto/declarative/qmlecmascript/data/scope.qml @@ -1,7 +1,7 @@ import Qt 4.6 Item { - id: Root + id: root property int a: 1 property int binding: a @@ -16,7 +16,7 @@ Item { } Item { - id: NestedObject + id: nestedObject Script { function myNestedFunction() { @@ -32,17 +32,17 @@ Item { } ScopeObject { - id: CompObject + id: compObject } - property alias test1: Root.binding - property alias test2: NestedObject.binding - property alias test3: Root.binding2 - property alias test4: NestedObject.binding2 - property alias test5: Root.binding3 - property alias test6: NestedObject.binding3 - property alias test7: Root.binding4 - property alias test8: NestedObject.binding4 - property alias test9: CompObject.binding - property alias test10: CompObject.binding2 + property alias test1: root.binding + property alias test2: nestedObject.binding + property alias test3: root.binding2 + property alias test4: nestedObject.binding2 + property alias test5: root.binding3 + property alias test6: nestedObject.binding3 + property alias test7: root.binding4 + property alias test8: nestedObject.binding4 + property alias test9: compObject.binding + property alias test10: compObject.binding2 } diff --git a/tests/auto/declarative/qmlecmascript/data/signalParameterTypes.qml b/tests/auto/declarative/qmlecmascript/data/signalParameterTypes.qml index 42d26a1..6fc8b02 100644 --- a/tests/auto/declarative/qmlecmascript/data/signalParameterTypes.qml +++ b/tests/auto/declarative/qmlecmascript/data/signalParameterTypes.qml @@ -2,7 +2,7 @@ import Qt.test 1.0 MyQmlObject { - id: Root + id: root property int intProperty property real realProperty property color colorProperty @@ -12,5 +12,5 @@ MyQmlObject onMySignal: { intProperty = a; realProperty = b; colorProperty = c; variantProperty = d; } - onBasicSignal: Root.mySignal(10, 19.2, Qt.rgba(1, 1, 0, 1), Qt.rgba(1, 0, 1, 1)) + onBasicSignal: root.mySignal(10, 19.2, Qt.rgba(1, 1, 0, 1), Qt.rgba(1, 0, 1, 1)) } diff --git a/tests/auto/declarative/qmlgraphicstextedit/data/navigation.qml b/tests/auto/declarative/qmlgraphicstextedit/data/navigation.qml index 5b8613f..dc4aee9 100644 --- a/tests/auto/declarative/qmlgraphicstextedit/data/navigation.qml +++ b/tests/auto/declarative/qmlgraphicstextedit/data/navigation.qml @@ -1,23 +1,23 @@ import Qt 4.6 Rectangle { - property var myInput: Input + property var myinput: input width: 800; height: 600; color: "blue" Item { - id: FirstItem; - KeyNavigation.right: Input + id: firstItem; + KeyNavigation.right: input } - TextEdit { id: Input; focus: true - KeyNavigation.left: FirstItem - KeyNavigation.right: LastItem - KeyNavigation.up: FirstItem - KeyNavigation.down: LastItem + TextEdit { id: input; focus: true + KeyNavigation.left: firstItem + KeyNavigation.right: lastItem + KeyNavigation.up: firstItem + KeyNavigation.down: lastItem } Item { - id: LastItem - KeyNavigation.left: Input + id: lastItem + KeyNavigation.left: input } } diff --git a/tests/auto/declarative/qmlgraphicstextedit/data/readOnly.qml b/tests/auto/declarative/qmlgraphicstextedit/data/readOnly.qml index d2a8ce2..06b57ea 100644 --- a/tests/auto/declarative/qmlgraphicstextedit/data/readOnly.qml +++ b/tests/auto/declarative/qmlgraphicstextedit/data/readOnly.qml @@ -1,11 +1,11 @@ import Qt 4.6 Rectangle { - property var myInput: Input + property var myinput: input width: 800; height: 600; color: "blue" - TextEdit { id: Input; focus: true + TextEdit { id: input; focus: true readOnly: true text: "I am the very model of a modern major general.\n" } diff --git a/tests/auto/declarative/qmlgraphicstextinput/data/navigation.qml b/tests/auto/declarative/qmlgraphicstextinput/data/navigation.qml index 282c52c..637de3a 100644 --- a/tests/auto/declarative/qmlgraphicstextinput/data/navigation.qml +++ b/tests/auto/declarative/qmlgraphicstextinput/data/navigation.qml @@ -1,23 +1,23 @@ import Qt 4.6 Rectangle { - property var myInput: Input + property var myinput: input width: 800; height: 600; color: "blue" Item { - id: FirstItem; - KeyNavigation.right: Input + id: firstItem; + KeyNavigation.right: input } - TextInput { id: Input; focus: true - KeyNavigation.left: FirstItem - KeyNavigation.right: LastItem - KeyNavigation.up: FirstItem - KeyNavigation.down: LastItem + Textinput { id: input; focus: true + KeyNavigation.left: firstItem + KeyNavigation.right: lastItem + KeyNavigation.up: firstItem + KeyNavigation.down: lastItem } Item { - id: LastItem - KeyNavigation.left: Input + id: lastItem + KeyNavigation.left: input } } diff --git a/tests/auto/declarative/qmlgraphicstextinput/data/readOnly.qml b/tests/auto/declarative/qmlgraphicstextinput/data/readOnly.qml index 1389d86..886da0c 100644 --- a/tests/auto/declarative/qmlgraphicstextinput/data/readOnly.qml +++ b/tests/auto/declarative/qmlgraphicstextinput/data/readOnly.qml @@ -1,11 +1,11 @@ import Qt 4.6 Rectangle { - property var myInput: Input + property var myinput: input width: 800; height: 600; color: "blue" - TextInput { id: Input; focus: true + Textinput { id: input; focus: true readOnly: true text: "I am the very model of a modern major general.\n" } diff --git a/tests/auto/declarative/qmllanguage/data/Alias.qml b/tests/auto/declarative/qmllanguage/data/Alias.qml index af6187a..55aa231 100644 --- a/tests/auto/declarative/qmllanguage/data/Alias.qml +++ b/tests/auto/declarative/qmllanguage/data/Alias.qml @@ -1,8 +1,8 @@ import Qt 4.6 QtObject { - id: Root + id: root property int value: 1892 - property alias aliasValue: Root.value + property alias aliasValue: root.value } diff --git a/tests/auto/declarative/qmllanguage/data/alias.1.qml b/tests/auto/declarative/qmllanguage/data/alias.1.qml index 3ad8f38..500b0f6 100644 --- a/tests/auto/declarative/qmllanguage/data/alias.1.qml +++ b/tests/auto/declarative/qmllanguage/data/alias.1.qml @@ -2,7 +2,7 @@ import Test 1.0 import Qt 4.6 QtObject { - id: Root + id: root property int value: 10 - property alias valueAlias: Root.value + property alias valueAlias: root.value } diff --git a/tests/auto/declarative/qmllanguage/data/alias.2.qml b/tests/auto/declarative/qmllanguage/data/alias.2.qml index aa4d103..5c92270 100644 --- a/tests/auto/declarative/qmllanguage/data/alias.2.qml +++ b/tests/auto/declarative/qmllanguage/data/alias.2.qml @@ -1,8 +1,8 @@ import Test 1.0 MyQmlObject { - id: Root - property alias aliasObject: Root.qmlobjectProperty + id: root + property alias aliasObject: root.qmlobjectProperty qmlobjectProperty: MyQmlObject { value : 10 } } diff --git a/tests/auto/declarative/qmllanguage/data/alias.3.qml b/tests/auto/declarative/qmllanguage/data/alias.3.qml index fa8a253..e059937 100644 --- a/tests/auto/declarative/qmllanguage/data/alias.3.qml +++ b/tests/auto/declarative/qmllanguage/data/alias.3.qml @@ -2,9 +2,9 @@ import Qt 4.6 QtObject { property var other - other: Alias { id: MyAliasObject } + other: Alias { id: myAliasObject } - property alias value: MyAliasObject.aliasValue - property alias value2: MyAliasObject.value + property alias value: myAliasObject.aliasValue + property alias value2: myAliasObject.value } diff --git a/tests/auto/declarative/qmllanguage/data/alias.8.qml b/tests/auto/declarative/qmllanguage/data/alias.8.qml index 38dc10f..2b9ad85 100644 --- a/tests/auto/declarative/qmllanguage/data/alias.8.qml +++ b/tests/auto/declarative/qmllanguage/data/alias.8.qml @@ -2,8 +2,8 @@ import Qt 4.6 QtObject { property var other - other: Alias3 { id: MyAliasObject } + other: Alias3 { id: myAliasObject } - property int value: MyAliasObject.obj.myValue + property int value: myAliasObject.obj.myValue } diff --git a/tests/auto/declarative/qmllanguage/data/alias.9.qml b/tests/auto/declarative/qmllanguage/data/alias.9.qml index 8061f99..a2a41a1 100644 --- a/tests/auto/declarative/qmllanguage/data/alias.9.qml +++ b/tests/auto/declarative/qmllanguage/data/alias.9.qml @@ -2,8 +2,8 @@ import Qt 4.6 QtObject { property var other - other: Alias4 { id: MyAliasObject } + other: Alias4 { id: myAliasObject } - property int value: MyAliasObject.obj.myValue + property int value: myAliasObject.obj.myValue } diff --git a/tests/auto/declarative/qmllanguage/data/customParserIdNotAllowed.qml b/tests/auto/declarative/qmllanguage/data/customParserIdNotAllowed.qml index e607768..00cc0c4 100644 --- a/tests/auto/declarative/qmllanguage/data/customParserIdNotAllowed.qml +++ b/tests/auto/declarative/qmllanguage/data/customParserIdNotAllowed.qml @@ -1,5 +1,5 @@ import Qt 4.6 ListModel { ListElement { a: 10 } - ListElement { id: Foo; a: 12 } + ListElement { id: foo; a: 12 } } diff --git a/tests/auto/declarative/qmllanguage/data/duplicateIDs.qml b/tests/auto/declarative/qmllanguage/data/duplicateIDs.qml index 9605b5b..a993abd 100644 --- a/tests/auto/declarative/qmllanguage/data/duplicateIDs.qml +++ b/tests/auto/declarative/qmllanguage/data/duplicateIDs.qml @@ -1,6 +1,6 @@ import Test 1.0 MyContainer { - MyQmlObject { id: MyID } - MyQmlObject { id: MyID } + MyQmlObject { id: myID } + MyQmlObject { id: myID } } diff --git a/tests/auto/declarative/qmllanguage/data/idProperty.qml b/tests/auto/declarative/qmllanguage/data/idProperty.qml index a413c0b..90c1483 100644 --- a/tests/auto/declarative/qmllanguage/data/idProperty.qml +++ b/tests/auto/declarative/qmllanguage/data/idProperty.qml @@ -1,8 +1,8 @@ import Test 1.0 MyContainer { - property var object : MyObjectId + property var object : myObjectId MyTypeObject { - id: "MyObjectId" + id: "myObjectId" } } diff --git a/tests/auto/declarative/qmllanguage/data/inlineQmlComponents.qml b/tests/auto/declarative/qmllanguage/data/inlineQmlComponents.qml index 79ceda6..478f06a 100644 --- a/tests/auto/declarative/qmllanguage/data/inlineQmlComponents.qml +++ b/tests/auto/declarative/qmllanguage/data/inlineQmlComponents.qml @@ -2,7 +2,7 @@ import Test 1.0 import Qt 4.6 MyContainer { Component { - id: MyComponent + id: myComponent MyQmlObject { value: 11 } diff --git a/tests/auto/declarative/qmllanguage/data/invalidID.4.qml b/tests/auto/declarative/qmllanguage/data/invalidID.4.qml index 1f15fce..86010bf 100644 --- a/tests/auto/declarative/qmllanguage/data/invalidID.4.qml +++ b/tests/auto/declarative/qmllanguage/data/invalidID.4.qml @@ -1,6 +1,6 @@ import Test 1.0 MyQmlObject { - id: Hello - id: World + id: hello + id: world } diff --git a/tests/auto/declarative/qmllanguage/data/invalidID.5.qml b/tests/auto/declarative/qmllanguage/data/invalidID.5.qml index 0545b0d..5b92a1a 100644 --- a/tests/auto/declarative/qmllanguage/data/invalidID.5.qml +++ b/tests/auto/declarative/qmllanguage/data/invalidID.5.qml @@ -1,6 +1,6 @@ import Test 1.0 -import Test 1.0 as Hello +import Test 1.0 as hello MyQmlObject { - id: Hello + id: hello } diff --git a/tests/auto/declarative/qmllanguage/data/invalidID.6.errors.txt b/tests/auto/declarative/qmllanguage/data/invalidID.6.errors.txt index 861e3d7..160e8b5 100644 --- a/tests/auto/declarative/qmllanguage/data/invalidID.6.errors.txt +++ b/tests/auto/declarative/qmllanguage/data/invalidID.6.errors.txt @@ -1 +1 @@ -3:9:id conflicts with type name +3:5:"StartsWithUpperCase" is not a valid object id diff --git a/tests/auto/declarative/qmllanguage/data/invalidID.6.qml b/tests/auto/declarative/qmllanguage/data/invalidID.6.qml index ea34007..62187d9 100644 --- a/tests/auto/declarative/qmllanguage/data/invalidID.6.qml +++ b/tests/auto/declarative/qmllanguage/data/invalidID.6.qml @@ -1,5 +1,5 @@ import Test 1.0 MyQmlObject { - id: MyQmlObject + id: StartsWithUpperCase } diff --git a/tests/auto/declarative/qmllanguage/data/listItemDeleteSelf.qml b/tests/auto/declarative/qmllanguage/data/listItemDeleteSelf.qml index fa2e831..779c6d4 100644 --- a/tests/auto/declarative/qmllanguage/data/listItemDeleteSelf.qml +++ b/tests/auto/declarative/qmllanguage/data/listItemDeleteSelf.qml @@ -2,7 +2,7 @@ import Qt 4.6 Item { ListModel { - id: FruitModel + id: fruitModel ListElement { name: "Apple" cost: 2.45 @@ -18,21 +18,21 @@ Item { } Component { - id: FruitDelegate + id: fruitDelegate Item { width: 200; height: 50 Text { text: name } Text { text: '$'+cost; anchors.right: parent.right } MouseRegion { anchors.fill: parent - onClicked: FruitModel.remove(index) + onClicked: fruitModel.remove(index) } } } ListView { - model: FruitModel - delegate: FruitDelegate + model: fruitModel + delegate: fruitDelegate anchors.fill: parent } } diff --git a/tests/auto/declarative/qmllanguage/data/simpleBindings.qml b/tests/auto/declarative/qmllanguage/data/simpleBindings.qml index 74867b3..2fcd1a5 100644 --- a/tests/auto/declarative/qmllanguage/data/simpleBindings.qml +++ b/tests/auto/declarative/qmllanguage/data/simpleBindings.qml @@ -1,6 +1,6 @@ import Test 1.0 MyTypeObject { - id: Me + id: me property int v1: 10 property int v2: 11 @@ -10,9 +10,9 @@ MyTypeObject { property int value4 value1: v1 - value2: Me.v1 + value2: me.v1 value3: v1 + v2 value4: Math.min(v1, v2) - objectProperty: Me + objectProperty: me } diff --git a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp index 0a636db..d37c7b4 100644 --- a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp +++ b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp @@ -528,7 +528,7 @@ void tst_qmllanguage::idProperty() MyTypeObject *child = qobject_cast<MyTypeObject *>(object->children()->at(0)); QVERIFY(child != 0); - QCOMPARE(child->id(), QString("MyObjectId")); + QCOMPARE(child->id(), QString("myObjectId")); QCOMPARE(object->property("object"), QVariant::fromValue((QObject *)child)); } diff --git a/tests/auto/declarative/states/data/anchorChanges.qml b/tests/auto/declarative/states/data/anchorChanges.qml index 3d94f36..7dce889 100644 --- a/tests/auto/declarative/states/data/anchorChanges.qml +++ b/tests/auto/declarative/states/data/anchorChanges.qml @@ -1,7 +1,7 @@ import Qt 4.6 Rectangle { - id: Container + id: container width: 200; height: 200 Rectangle { id: myRect @@ -14,10 +14,10 @@ Rectangle { states: State { name: "right" AnchorChanges { - id: AncCh + id: ancCh target: myRect; reset: "left" - right: Container.right + right: container.right } } } diff --git a/tests/auto/declarative/states/data/anchorChanges2.qml b/tests/auto/declarative/states/data/anchorChanges2.qml index 2e13628..516ed58 100644 --- a/tests/auto/declarative/states/data/anchorChanges2.qml +++ b/tests/auto/declarative/states/data/anchorChanges2.qml @@ -3,8 +3,8 @@ import Qt 4.6 Rectangle { width: 200; height: 200 Rectangle { - id: MyRect - objectName: "MyRect" + id: myRect + objectName: "myRect" width: 50; height: 50 color: "green"; anchors.left: parent.left @@ -13,7 +13,7 @@ Rectangle { states: State { name: "right" AnchorChanges { - target: MyRect; + target: myRect; reset: "left" right: parent.right } diff --git a/tests/auto/declarative/states/data/anchorChanges3.qml b/tests/auto/declarative/states/data/anchorChanges3.qml index cf85472..e19bd9a 100644 --- a/tests/auto/declarative/states/data/anchorChanges3.qml +++ b/tests/auto/declarative/states/data/anchorChanges3.qml @@ -1,29 +1,29 @@ import Qt 4.6 Rectangle { - id: Container + id: container width: 200; height: 200 Rectangle { - id: MyRect - objectName: "MyRect" + id: myRect + objectName: "myRect" color: "green"; anchors.left: parent.left - anchors.right: RightGuideline.left - anchors.top: TopGuideline.top - anchors.bottom: Container.bottom + anchors.right: rightGuideline.left + anchors.top: topGuideline.top + anchors.bottom: container.bottom } - Item { objectName: "LeftGuideline"; id: LeftGuideline; x: 10 } - Item { id: RightGuideline; x: 150 } - Item { id: TopGuideline; y: 10 } - Item { objectName: "BottomGuideline"; id: BottomGuideline; y: 150 } + Item { objectName: "leftGuideline"; id: leftGuideline; x: 10 } + Item { id: rightGuideline; x: 150 } + Item { id: topGuideline; y: 10 } + Item { objectName: "bottomGuideline"; id: bottomGuideline; y: 150 } states: State { name: "reanchored" AnchorChanges { - target: MyRect; - left: LeftGuideline.left - right: Container.right - top: Container.top - bottom: BottomGuideline.bottom + target: myRect; + left: leftGuideline.left + right: container.right + top: container.top + bottom: bottomGuideline.bottom } } } diff --git a/tests/auto/declarative/states/data/anchorChanges4.qml b/tests/auto/declarative/states/data/anchorChanges4.qml index 717f506..b766c71 100644 --- a/tests/auto/declarative/states/data/anchorChanges4.qml +++ b/tests/auto/declarative/states/data/anchorChanges4.qml @@ -3,20 +3,20 @@ import Qt 4.6 Rectangle { width: 200; height: 200 Rectangle { - id: MyRect - objectName: "MyRect" + id: myRect + objectName: "myRect" color: "green"; anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } - Item { objectName: "LeftGuideline"; id: LeftGuideline; x: 10 } - Item { objectName: "BottomGuideline"; id: BottomGuideline; y: 150 } + Item { objectName: "leftGuideline"; id: leftGuideline; x: 10 } + Item { objectName: "bottomGuideline"; id: bottomGuideline; y: 150 } states: State { name: "reanchored" AnchorChanges { - target: MyRect; - horizontalCenter: BottomGuideline.horizontalCenter - verticalCenter: LeftGuideline.verticalCenter + target: myRect; + horizontalCenter: bottomGuideline.horizontalCenter + verticalCenter: leftGuideline.verticalCenter } } } diff --git a/tests/auto/declarative/states/data/anchorChanges5.qml b/tests/auto/declarative/states/data/anchorChanges5.qml index ef5f041..2d4b3c0 100644 --- a/tests/auto/declarative/states/data/anchorChanges5.qml +++ b/tests/auto/declarative/states/data/anchorChanges5.qml @@ -3,20 +3,20 @@ import Qt 4.6 Rectangle { width: 200; height: 200 Rectangle { - id: MyRect - objectName: "MyRect" + id: myRect + objectName: "myRect" color: "green"; anchors.horizontalCenter: parent.horizontalCenter anchors.baseline: parent.baseline } - Item { objectName: "LeftGuideline"; id: LeftGuideline; x: 10 } - Item { objectName: "BottomGuideline"; id: BottomGuideline; y: 150 } + Item { objectName: "leftGuideline"; id: leftGuideline; x: 10 } + Item { objectName: "bottomGuideline"; id: bottomGuideline; y: 150 } states: State { name: "reanchored" AnchorChanges { - target: MyRect; - horizontalCenter: BottomGuideline.horizontalCenter - baseline: LeftGuideline.baseline + target: myRect; + horizontalCenter: bottomGuideline.horizontalCenter + baseline: leftGuideline.baseline } } } diff --git a/tests/auto/declarative/states/data/basicBinding.qml b/tests/auto/declarative/states/data/basicBinding.qml index 930a6b2..6528113 100644 --- a/tests/auto/declarative/states/data/basicBinding.qml +++ b/tests/auto/declarative/states/data/basicBinding.qml @@ -1,12 +1,12 @@ import Qt 4.6 Rectangle { - id: MyRectangle + id: myRectangle property color sourceColor: "blue" width: 100; height: 100 color: "red" states: State { name: "blue" - PropertyChanges { target: MyRectangle; color: sourceColor } + PropertyChanges { target: myRectangle; color: sourceColor } } } diff --git a/tests/auto/declarative/states/data/basicBinding2.qml b/tests/auto/declarative/states/data/basicBinding2.qml index 6bfaf5a..2e7b4cf 100644 --- a/tests/auto/declarative/states/data/basicBinding2.qml +++ b/tests/auto/declarative/states/data/basicBinding2.qml @@ -1,12 +1,12 @@ import Qt 4.6 Rectangle { - id: MyRectangle + id: myRectangle property color sourceColor: "red" width: 100; height: 100 color: sourceColor states: State { name: "blue" - PropertyChanges { target: MyRectangle; color: "blue" } + PropertyChanges { target: myRectangle; color: "blue" } } -}
\ No newline at end of file +} diff --git a/tests/auto/declarative/states/data/basicBinding3.qml b/tests/auto/declarative/states/data/basicBinding3.qml index 344bfae..a3c47d9 100644 --- a/tests/auto/declarative/states/data/basicBinding3.qml +++ b/tests/auto/declarative/states/data/basicBinding3.qml @@ -1,6 +1,6 @@ import Qt 4.6 Rectangle { - id: MyRectangle + id: myRectangle property color sourceColor: "red" property color sourceColor2: "blue" @@ -8,6 +8,6 @@ Rectangle { color: sourceColor states: State { name: "blue" - PropertyChanges { target: MyRectangle; color: sourceColor2 } + PropertyChanges { target: myRectangle; color: sourceColor2 } } -}
\ No newline at end of file +} diff --git a/tests/auto/declarative/states/data/basicBinding4.qml b/tests/auto/declarative/states/data/basicBinding4.qml index f0b72bd..1f52d0e 100644 --- a/tests/auto/declarative/states/data/basicBinding4.qml +++ b/tests/auto/declarative/states/data/basicBinding4.qml @@ -1,6 +1,6 @@ import Qt 4.6 Rectangle { - id: MyRectangle + id: myRectangle property color sourceColor: "blue" width: 100; height: 100 @@ -8,10 +8,10 @@ Rectangle { states: [ State { name: "blue" - PropertyChanges { target: MyRectangle; color: sourceColor } + PropertyChanges { target: myRectangle; color: sourceColor } }, State { name: "green" - PropertyChanges { target: MyRectangle; color: "green" } + PropertyChanges { target: myRectangle; color: "green" } }] } diff --git a/tests/auto/declarative/states/data/basicChanges.qml b/tests/auto/declarative/states/data/basicChanges.qml index 8d560c6..88ea256 100644 --- a/tests/auto/declarative/states/data/basicChanges.qml +++ b/tests/auto/declarative/states/data/basicChanges.qml @@ -1,10 +1,10 @@ import Qt 4.6 Rectangle { - id: MyRectangle + id: myRectangle width: 100; height: 100 color: "red" states: State { name: "blue" - PropertyChanges { target: MyRectangle; color: "blue" } + PropertyChanges { target: myRectangle; color: "blue" } } -}
\ No newline at end of file +} diff --git a/tests/auto/declarative/states/data/basicChanges2.qml b/tests/auto/declarative/states/data/basicChanges2.qml index 0f8783a..4dd293f 100644 --- a/tests/auto/declarative/states/data/basicChanges2.qml +++ b/tests/auto/declarative/states/data/basicChanges2.qml @@ -1,15 +1,15 @@ import Qt 4.6 Rectangle { - id: MyRectangle + id: myRectangle width: 100; height: 100 color: "red" states: [ State { name: "blue" - PropertyChanges { target: MyRectangle; color: "blue" } + PropertyChanges { target: myRectangle; color: "blue" } }, State { name: "green" - PropertyChanges { target: MyRectangle; color: "green" } + PropertyChanges { target: myRectangle; color: "green" } }] -}
\ No newline at end of file +} diff --git a/tests/auto/declarative/states/data/basicChanges3.qml b/tests/auto/declarative/states/data/basicChanges3.qml index 2a5ca5d..62ab1d5 100644 --- a/tests/auto/declarative/states/data/basicChanges3.qml +++ b/tests/auto/declarative/states/data/basicChanges3.qml @@ -1,15 +1,15 @@ import Qt 4.6 Rectangle { - id: MyRectangle + id: myRectangle width: 100; height: 100 color: "red" states: [ State { name: "blue" - PropertyChanges { target: MyRectangle; color: "blue" } + PropertyChanges { target: myRectangle; color: "blue" } }, State { name: "bordered" - PropertyChanges { target: MyRectangle; border.width: 2 } + PropertyChanges { target: myRectangle; border.width: 2 } }] } diff --git a/tests/auto/declarative/states/data/basicExtension.qml b/tests/auto/declarative/states/data/basicExtension.qml index 230e00b..1836f8a 100644 --- a/tests/auto/declarative/states/data/basicExtension.qml +++ b/tests/auto/declarative/states/data/basicExtension.qml @@ -1,16 +1,16 @@ import Qt 4.6 Rectangle { - id: MyRectangle + id: myRectangle width: 100; height: 100 color: "red" states: [ State { name: "blue" - PropertyChanges { target: MyRectangle; color: "blue" } + PropertyChanges { target: myRectangle; color: "blue" } }, State { name: "bordered" extend: "blue" - PropertyChanges { target: MyRectangle; border.width: 2 } + PropertyChanges { target: myRectangle; border.width: 2 } }] -}
\ No newline at end of file +} diff --git a/tests/auto/declarative/states/data/deleting.qml b/tests/auto/declarative/states/data/deleting.qml index 0c512dd..3da0b12 100644 --- a/tests/auto/declarative/states/data/deleting.qml +++ b/tests/auto/declarative/states/data/deleting.qml @@ -1,11 +1,11 @@ import Qt 4.6 Rectangle { - id: MyRectangle + id: myRectangle width: 100; height: 100 color: "red" states: State { name: "blue" - PropertyChanges { target: MyRectangle; color: "blue"; objectName: "pc1" } - PropertyChanges { target: MyRectangle; radius: 5; objectName: "pc2" } + PropertyChanges { target: myRectangle; color: "blue"; objectName: "pc1" } + PropertyChanges { target: myRectangle; radius: 5; objectName: "pc2" } } } diff --git a/tests/auto/declarative/states/data/deletingState.qml b/tests/auto/declarative/states/data/deletingState.qml index 9dc46a6..a5e8ed3 100644 --- a/tests/auto/declarative/states/data/deletingState.qml +++ b/tests/auto/declarative/states/data/deletingState.qml @@ -1,13 +1,13 @@ import Qt 4.6 Rectangle { - id: MyRectangle + id: myRectangle width: 100; height: 100 color: "red" StateGroup { id: stateGroup states: State { name: "blue" - PropertyChanges { target: MyRectangle; color: "blue" } + PropertyChanges { target: myRectangle; color: "blue" } } } } diff --git a/tests/auto/declarative/states/data/explicit.qml b/tests/auto/declarative/states/data/explicit.qml index ca7e274..7543f84 100644 --- a/tests/auto/declarative/states/data/explicit.qml +++ b/tests/auto/declarative/states/data/explicit.qml @@ -1,6 +1,6 @@ import Qt 4.6 Rectangle { - id: MyRectangle + id: myRectangle property color sourceColor: "blue" width: 100; height: 100 color: "red" @@ -8,7 +8,7 @@ Rectangle { name: "blue" PropertyChanges { objectName: "changes" - target: MyRectangle; explicit: true + target: myRectangle; explicit: true color: sourceColor } } diff --git a/tests/auto/declarative/states/data/fakeExtension.qml b/tests/auto/declarative/states/data/fakeExtension.qml index 3d85c4f..c7975e1 100644 --- a/tests/auto/declarative/states/data/fakeExtension.qml +++ b/tests/auto/declarative/states/data/fakeExtension.qml @@ -1,16 +1,16 @@ import Qt 4.6 Rectangle { - id: MyRectangle + id: myRectangle width: 100; height: 100 color: "red" states: [ State { name: "blue" - PropertyChanges { target: MyRectangle; color: "blue" } + PropertyChanges { target: myRectangle; color: "blue" } }, State { name: "green" extend: "blue" - PropertyChanges { target: MyRectangle; color: "green" } + PropertyChanges { target: myRectangle; color: "green" } }] -}
\ No newline at end of file +} diff --git a/tests/auto/declarative/states/data/nonExistantProp.qml b/tests/auto/declarative/states/data/nonExistantProp.qml index 582029d..a5dd86a 100644 --- a/tests/auto/declarative/states/data/nonExistantProp.qml +++ b/tests/auto/declarative/states/data/nonExistantProp.qml @@ -1,11 +1,11 @@ import Qt 4.6 Rectangle { - id: MyRectangle + id: myRectangle width: 100; height: 100 color: "red" states: State { name: "blue" - PropertyChanges { target: MyRectangle; colr: "blue" } + PropertyChanges { target: myRectangle; colr: "blue" } } } diff --git a/tests/auto/declarative/states/data/parentChange.qml b/tests/auto/declarative/states/data/parentChange.qml index 29596a8..087da6b 100644 --- a/tests/auto/declarative/states/data/parentChange.qml +++ b/tests/auto/declarative/states/data/parentChange.qml @@ -13,7 +13,7 @@ Rectangle { } } MouseRegion { - id: Clickable + id: clickable anchors.fill: parent } @@ -28,7 +28,7 @@ Rectangle { states: State { name: "reparented" - when: Clickable.pressed + when: clickable.pressed ParentChange { target: myRect parent: newParent diff --git a/tests/auto/declarative/states/data/parentChange2.qml b/tests/auto/declarative/states/data/parentChange2.qml index d1c6d6a..f0b00f5 100644 --- a/tests/auto/declarative/states/data/parentChange2.qml +++ b/tests/auto/declarative/states/data/parentChange2.qml @@ -16,13 +16,13 @@ Rectangle { } } MouseRegion { - id: Clickable + id: clickable anchors.fill: parent } states: State { name: "reparented" - when: Clickable.pressed + when: clickable.pressed ParentChange { target: myRect parent: newParent diff --git a/tests/auto/declarative/states/data/parentChange3.qml b/tests/auto/declarative/states/data/parentChange3.qml index c7b7bee..2aa507c 100644 --- a/tests/auto/declarative/states/data/parentChange3.qml +++ b/tests/auto/declarative/states/data/parentChange3.qml @@ -17,7 +17,7 @@ Rectangle { } } MouseRegion { - id: Clickable + id: clickable anchors.fill: parent } @@ -33,7 +33,7 @@ Rectangle { states: State { name: "reparented" - when: Clickable.pressed + when: clickable.pressed ParentChange { target: myRect parent: newParent diff --git a/tests/auto/declarative/states/data/parentChange4.qml b/tests/auto/declarative/states/data/parentChange4.qml index ee75176..d00274b 100644 --- a/tests/auto/declarative/states/data/parentChange4.qml +++ b/tests/auto/declarative/states/data/parentChange4.qml @@ -10,7 +10,7 @@ Rectangle { color: "red" } MouseRegion { - id: Clickable + id: clickable anchors.fill: parent } @@ -21,7 +21,7 @@ Rectangle { states: State { name: "reparented" - when: Clickable.pressed + when: clickable.pressed ParentChange { target: myRect parent: newParent diff --git a/tests/auto/declarative/states/data/parentChange5.qml b/tests/auto/declarative/states/data/parentChange5.qml index 47b733b..f75e2a3 100644 --- a/tests/auto/declarative/states/data/parentChange5.qml +++ b/tests/auto/declarative/states/data/parentChange5.qml @@ -10,7 +10,7 @@ Rectangle { color: "red" } MouseRegion { - id: Clickable + id: clickable anchors.fill: parent } @@ -21,7 +21,7 @@ Rectangle { states: State { name: "reparented" - when: Clickable.pressed + when: clickable.pressed ParentChange { target: myRect parent: newParent diff --git a/tests/auto/declarative/states/data/propertyErrors.qml b/tests/auto/declarative/states/data/propertyErrors.qml index 270462e..080e833 100644 --- a/tests/auto/declarative/states/data/propertyErrors.qml +++ b/tests/auto/declarative/states/data/propertyErrors.qml @@ -1,10 +1,10 @@ import Qt 4.6 Rectangle { - id: MyRectangle + id: myRectangle width: 100; height: 100 color: "red" states: State { name: "blue" - PropertyChanges { target: MyRectangle; colr: "blue"; wantsFocus: true } + PropertyChanges { target: myRectangle; colr: "blue"; wantsFocus: true } } } diff --git a/tests/auto/declarative/states/data/restoreEntryValues.qml b/tests/auto/declarative/states/data/restoreEntryValues.qml index d86f033..088c608 100644 --- a/tests/auto/declarative/states/data/restoreEntryValues.qml +++ b/tests/auto/declarative/states/data/restoreEntryValues.qml @@ -1,12 +1,12 @@ import Qt 4.6 Rectangle { - id: MyRectangle + id: myRectangle width: 100; height: 100 color: "red" states: State { name: "blue" PropertyChanges { - target: MyRectangle + target: myRectangle restoreEntryValues: false color: "blue" } diff --git a/tests/auto/declarative/states/data/script.qml b/tests/auto/declarative/states/data/script.qml index 6983419..3c5f33e 100644 --- a/tests/auto/declarative/states/data/script.qml +++ b/tests/auto/declarative/states/data/script.qml @@ -1,10 +1,10 @@ import Qt 4.6 Rectangle { - id: MyRectangle + id: myRectangle width: 100; height: 100 color: "red" states: State { name: "blue" - StateChangeScript { script: MyRectangle.color = "blue"; } + StateChangeScript { script: myRectangle.color = "blue"; } } } diff --git a/tests/auto/declarative/visual/ListView/basic1.qml b/tests/auto/declarative/visual/ListView/basic1.qml index 85934dc..3c371a6 100644 --- a/tests/auto/declarative/visual/ListView/basic1.qml +++ b/tests/auto/declarative/visual/ListView/basic1.qml @@ -4,7 +4,7 @@ Rectangle { color: "blue" width: 200 height: 300 - id: Page + id: page ListView { anchors.fill: parent delegate: Rectangle { diff --git a/tests/auto/declarative/visual/ListView/basic2.qml b/tests/auto/declarative/visual/ListView/basic2.qml index 4fe63ac..bdba65e 100644 --- a/tests/auto/declarative/visual/ListView/basic2.qml +++ b/tests/auto/declarative/visual/ListView/basic2.qml @@ -4,9 +4,9 @@ Rectangle { color: "blue" width: 200 height: 300 - id: Page + id: page Component { - id: Delegate + id: delegate Rectangle { color: "red" width: 100 @@ -18,7 +18,7 @@ Rectangle { } ListView { anchors.fill: parent - delegate: Delegate + delegate: delegate model: ListModel { ListElement { name: "January" diff --git a/tests/auto/declarative/visual/ListView/basic3.qml b/tests/auto/declarative/visual/ListView/basic3.qml index c0705e9..05ac358 100644 --- a/tests/auto/declarative/visual/ListView/basic3.qml +++ b/tests/auto/declarative/visual/ListView/basic3.qml @@ -4,9 +4,9 @@ Rectangle { color: "blue" width: 200 height: 300 - id: Page - ListModel { - id: Model + id: page + Listmodel { + id: model ListElement { name: "January" } @@ -16,7 +16,7 @@ Rectangle { } ListView { anchors.fill: parent - model: Model + model: model delegate: Rectangle { color: "red" width: 100 diff --git a/tests/auto/declarative/visual/ListView/basic4.qml b/tests/auto/declarative/visual/ListView/basic4.qml index c8e1bcc..3628bd3 100644 --- a/tests/auto/declarative/visual/ListView/basic4.qml +++ b/tests/auto/declarative/visual/ListView/basic4.qml @@ -4,9 +4,9 @@ Rectangle { color: "blue" width: 200 height: 300 - id: Page - ListModel { - id: Model + id: page + Listmodel { + id: model ListElement { name: "January" } @@ -15,7 +15,7 @@ Rectangle { } } Component { - id: Delegate + id: delegate Rectangle { color: "red" width: 100 @@ -27,7 +27,7 @@ Rectangle { } ListView { anchors.fill: parent - model: Model - delegate: Delegate + model: model + delegate: delegate } } diff --git a/tests/auto/declarative/visual/Package_Views/packageviews.qml b/tests/auto/declarative/visual/Package_Views/packageviews.qml index ece6b88..c8016b6 100644 --- a/tests/auto/declarative/visual/Package_Views/packageviews.qml +++ b/tests/auto/declarative/visual/Package_Views/packageviews.qml @@ -6,9 +6,9 @@ Rectangle { height: 200 color: "black" - VisualDataModel { - id: Model - model: ListModel { + VisualDatamodel { + id: model + model: Listmodel { ListElement { itemColor: "red" } ListElement { itemColor: "green" } ListElement { itemColor: "blue" } @@ -75,7 +75,7 @@ Rectangle { ListView { width: parent.width/2 height: parent.height - model: Model.parts.list + model: model.parts.list } GridView { @@ -84,6 +84,6 @@ Rectangle { cellWidth: 50 cellHeight: 50 height: parent.height - model: Model.parts.grid + model: model.parts.grid } } diff --git a/tests/auto/declarative/visual/animation/bindinganimation/bindinganimation.qml b/tests/auto/declarative/visual/animation/bindinganimation/bindinganimation.qml index 1afd4cd..732eb59 100644 --- a/tests/auto/declarative/visual/animation/bindinganimation/bindinganimation.qml +++ b/tests/auto/declarative/visual/animation/bindinganimation/bindinganimation.qml @@ -4,9 +4,9 @@ Rectangle { color: "blue" width: 320 height: 240 - id: Page + id: page Rectangle { - id: MyRectangle + id: myRectangle width: 100 height: 100 color: "red" @@ -16,12 +16,12 @@ Rectangle { State { name: "hello" PropertyChanges { - target: MyRectangle + target: myRectangle x: 50 + 50 } PropertyChanges { - target: MyMouseRegion - onClicked: Page.state = '' + target: myMouseRegion + onClicked: page.state = '' } } ] @@ -33,8 +33,8 @@ Rectangle { } ] MouseRegion { - id: MyMouseRegion + id: myMouseRegion anchors.fill: parent - onClicked: { Page.state= 'hello' } + onClicked: { page.state= 'hello' } } } diff --git a/tests/auto/declarative/visual/animation/parentAction/parentAction.qml b/tests/auto/declarative/visual/animation/parentAction/parentAction.qml index e69d234..1e3f402 100644 --- a/tests/auto/declarative/visual/animation/parentAction/parentAction.qml +++ b/tests/auto/declarative/visual/animation/parentAction/parentAction.qml @@ -8,7 +8,7 @@ Rectangle { transformOrigin: "Center" x: 10; y: 10 Rectangle { - id: MyRect + id: myRect x: 5 width: 100; height: 100 transformOrigin: "BottomLeft" @@ -16,7 +16,7 @@ Rectangle { } } MouseRegion { - id: Clickable + id: clickable anchors.fill: parent } @@ -32,13 +32,13 @@ Rectangle { states: State { name: "moved" - when: Clickable.pressed + when: clickable.pressed ParentChange { - target: MyRect + target: myRect parent: newParent } PropertyChanges { - target: MyRect + target: myRect rotation: -52 scale: 1 color: "blue" diff --git a/tests/auto/declarative/visual/animation/propertyAction/propertyAction.qml b/tests/auto/declarative/visual/animation/propertyAction/propertyAction.qml index a9d3c74..b670166 100644 --- a/tests/auto/declarative/visual/animation/propertyAction/propertyAction.qml +++ b/tests/auto/declarative/visual/animation/propertyAction/propertyAction.qml @@ -3,20 +3,20 @@ import Qt 4.6 Rectangle { width: 400; height: 400 Rectangle { - id: MyRect + id: myRect width: 100; height: 100 color: "red" } MouseRegion { - id: Clickable + id: clickable anchors.fill: parent } states: State { name: "state1" - when: Clickable.pressed + when: clickable.pressed PropertyChanges { - target: MyRect + target: myRect x: 50; y: 50 color: "blue" } diff --git a/tests/auto/declarative/visual/focusscope/test.qml b/tests/auto/declarative/visual/focusscope/test.qml index dd6d726..401c7dc 100644 --- a/tests/auto/declarative/visual/focusscope/test.qml +++ b/tests/auto/declarative/visual/focusscope/test.qml @@ -8,7 +8,7 @@ Rectangle { Keys.onDigit9Pressed: console.log("Error - Root") FocusScope { - id: MyScope + id: myScope focus: true Keys.onDigit9Pressed: console.log("Error - FocusScope") @@ -19,16 +19,16 @@ Rectangle { color: "transparent" border.width: 5 - border.color: MyScope.wantsFocus?"blue":"black" + border.color: myScope.wantsFocus?"blue":"black" Rectangle { - id: Item1 + id: item1 x: 10; y: 10 width: 100; height: 100; color: "green" border.width: 5 border.color: wantsFocus?"blue":"black" Keys.onDigit9Pressed: console.log("Top Left"); - KeyNavigation.right: Item2 + KeyNavigation.right: item2 focus: true Rectangle { @@ -38,12 +38,12 @@ Rectangle { } Rectangle { - id: Item2 + id: item2 x: 310; y: 10 width: 100; height: 100; color: "green" border.width: 5 border.color: wantsFocus?"blue":"black" - KeyNavigation.left: Item1 + KeyNavigation.left: item1 Keys.onDigit9Pressed: console.log("Top Right"); Rectangle { @@ -52,20 +52,20 @@ Rectangle { } } } - KeyNavigation.down: Item3 + KeyNavigation.down: item3 } Text { x:100; y:170; text: "Blue border indicates scoped focus\nBlack border indicates NOT scoped focus\nRed box indicates active focus\nUse arrow keys to navigate\nPress \"9\" to print currently focused item" } Rectangle { - id: Item3 + id: item3 x: 10; y: 300 width: 100; height: 100; color: "green" border.width: 5 border.color: wantsFocus?"blue":"black" Keys.onDigit9Pressed: console.log("Bottom Left"); - KeyNavigation.up: MyScope + KeyNavigation.up: myScope Rectangle { width: 50; height: 50; anchors.centerIn: parent diff --git a/tests/auto/declarative/visual/focusscope/test3.qml b/tests/auto/declarative/visual/focusscope/test3.qml index 4be9dc7..855bdc5 100644 --- a/tests/auto/declarative/visual/focusscope/test3.qml +++ b/tests/auto/declarative/visual/focusscope/test3.qml @@ -5,8 +5,8 @@ Rectangle { width: 800 height: 600 - ListModel { - id: Model + Listmodel { + id: model ListElement { name: "1" } ListElement { name: "2" } ListElement { name: "3" } @@ -19,16 +19,16 @@ Rectangle { } Component { - id: VerticalDelegate + id: verticalDelegate FocusScope { - id: Root + id: root width: 50; height: 50; Keys.onDigit9Pressed: console.log("Error - " + name) Rectangle { focus: true Keys.onDigit9Pressed: console.log(name) width: 50; height: 50; - color: Root.ListView.isCurrentItem?"red":"green" + color: root.ListView.isCurrentItem?"red":"green" Text { text: name; anchors.centerIn: parent } } } @@ -37,8 +37,8 @@ Rectangle { ListView { width: 800; height: 50; orientation: "Horizontal" focus: true - model: Model - delegate: VerticalDelegate + model: model + delegate: verticalDelegate preferredHighlightBegin: 100 preferredHighlightEnd: 101 highlightRangeMode: ListView.StrictlyEnforceRange diff --git a/tests/auto/declarative/visual/qmlgraphicsflickable/flickable-vertical.qml b/tests/auto/declarative/visual/qmlgraphicsflickable/flickable-vertical.qml index e9aae61..cc15755 100644 --- a/tests/auto/declarative/visual/qmlgraphicsflickable/flickable-vertical.qml +++ b/tests/auto/declarative/visual/qmlgraphicsflickable/flickable-vertical.qml @@ -15,8 +15,8 @@ Rectangle { ListElement { dayColor: "orange" } } - Flickable { - id: Flick + flickable { + id: flick height: parent.height-50 width: parent.width; viewportHeight: column.height @@ -37,10 +37,10 @@ Rectangle { } Rectangle { radius: 3 - x: Flick.width-8 + x: flick.width-8 width: 8 - y: Flick.visibleArea.yPosition * Flick.height - height: Flick.visibleArea.heightRatio * Flick.height + y: flick.visibleArea.yPosition * flick.height + height: flick.visibleArea.heightRatio * flick.height } // click to toggle interactive flag @@ -51,7 +51,7 @@ Rectangle { color: "red" MouseRegion { anchors.fill: parent - onClicked: Flick.interactive = Flick.interactive ? false : true + onClicked: flick.interactive = flick.interactive ? false : true } } @@ -64,7 +64,7 @@ Rectangle { color: "green" MouseRegion { anchors.fill: parent - onClicked: Flick.pressDelay = Flick.pressDelay > 0 ? 0 : 500 + onClicked: flick.pressDelay = flick.pressDelay > 0 ? 0 : 500 } } @@ -77,12 +77,12 @@ Rectangle { color: "yellow" MouseRegion { anchors.fill: parent - onClicked: Flick.overShoot = Flick.overShoot > 0 ? 0 : 30 + onClicked: flick.overShoot = flick.overShoot > 0 ? 0 : 30 } } Rectangle { - width: Math.abs(Flick.verticalVelocity)/100 + width: Math.abs(flick.verticalVelocity)/100 height: 50 x: 200 y: parent.height - 50 diff --git a/tests/auto/declarative/visual/qmlgraphicstextedit/qt-669.qml b/tests/auto/declarative/visual/qmlgraphicstextedit/qt-669.qml index e37f1b2..b01ddf8 100644 --- a/tests/auto/declarative/visual/qmlgraphicstextedit/qt-669.qml +++ b/tests/auto/declarative/visual/qmlgraphicstextedit/qt-669.qml @@ -1,7 +1,7 @@ import Qt 4.6 Rectangle { - Component { id: TestableCursor + Component { id: testableCursor //Doesn't blink Rectangle { color:"black" @@ -13,7 +13,7 @@ Rectangle { height:40; TextEdit { focus: true; - cursorDelegate: TestableCursor + cursorDelegate: testableCursor text: "Jackdaws love my big sphinx of Quartz" } } diff --git a/tools/qmldebugger/standalone/engines.qml b/tools/qmldebugger/standalone/engines.qml index 1e9335b..0b2b7ac 100644 --- a/tools/qmldebugger/standalone/engines.qml +++ b/tools/qmldebugger/standalone/engines.qml @@ -2,7 +2,7 @@ import Qt 4.6 Item { height: 100 - id: Root + id: root signal engineClicked(int id) signal refreshEngines() @@ -13,18 +13,18 @@ Item { Item { width: 100; height: 100; Image { - id: EngineIcon; + id: engineIcon; source: "qrc:/engine.png" anchors.horizontalCenter: parent.horizontalCenter } Text { - anchors.top: EngineIcon.bottom; + anchors.top: engineIcon.bottom; text: modelData.name + "(" + modelData.engineId + ")" anchors.horizontalCenter: parent.horizontalCenter } MouseRegion { anchors.fill: parent - onClicked: Root.engineClicked(modelData.engineId); + onClicked: root.engineClicked(modelData.engineId); } } } @@ -40,7 +40,7 @@ Item { anchors.right: parent.right MouseRegion { anchors.fill: parent - onClicked: Root.refreshEngines() + onClicked: root.refreshEngines() } } } |