summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/declarative/codingconventions
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2011-01-26 13:17:08 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2011-01-26 13:17:08 (GMT)
commitb0390e68893dd04076434695be5e676b87bc067c (patch)
tree60543fd8cf8c72f530a8865fa8fc2306bb52b9ba /doc/src/snippets/declarative/codingconventions
parent537312d5dea24bd404666789119a5ad1bab04396 (diff)
parent57a4353c8e082dfc0f536a1e642e4a8df0e5b9c9 (diff)
downloadQt-b0390e68893dd04076434695be5e676b87bc067c.zip
Qt-b0390e68893dd04076434695be5e676b87bc067c.tar.gz
Qt-b0390e68893dd04076434695be5e676b87bc067c.tar.bz2
Merge branch 'master' into lighthouse-master
Diffstat (limited to 'doc/src/snippets/declarative/codingconventions')
-rw-r--r--doc/src/snippets/declarative/codingconventions/dotproperties.qml2
-rw-r--r--doc/src/snippets/declarative/codingconventions/javascript-imports.qml2
-rw-r--r--doc/src/snippets/declarative/codingconventions/javascript.qml2
-rw-r--r--doc/src/snippets/declarative/codingconventions/lists.qml2
-rw-r--r--doc/src/snippets/declarative/codingconventions/photo.qml16
-rw-r--r--doc/src/snippets/declarative/codingconventions/private.qml2
6 files changed, 17 insertions, 9 deletions
diff --git a/doc/src/snippets/declarative/codingconventions/dotproperties.qml b/doc/src/snippets/declarative/codingconventions/dotproperties.qml
index 98cb09c..7243ec2 100644
--- a/doc/src/snippets/declarative/codingconventions/dotproperties.qml
+++ b/doc/src/snippets/declarative/codingconventions/dotproperties.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/declarative/codingconventions/javascript-imports.qml b/doc/src/snippets/declarative/codingconventions/javascript-imports.qml
index 931349f..ba22967 100644
--- a/doc/src/snippets/declarative/codingconventions/javascript-imports.qml
+++ b/doc/src/snippets/declarative/codingconventions/javascript-imports.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/declarative/codingconventions/javascript.qml b/doc/src/snippets/declarative/codingconventions/javascript.qml
index 6c94626..8ca289f 100644
--- a/doc/src/snippets/declarative/codingconventions/javascript.qml
+++ b/doc/src/snippets/declarative/codingconventions/javascript.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/declarative/codingconventions/lists.qml b/doc/src/snippets/declarative/codingconventions/lists.qml
index a7f3c8f..4b63b55 100644
--- a/doc/src/snippets/declarative/codingconventions/lists.qml
+++ b/doc/src/snippets/declarative/codingconventions/lists.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/doc/src/snippets/declarative/codingconventions/photo.qml b/doc/src/snippets/declarative/codingconventions/photo.qml
index 2eba035..78c5068 100644
--- a/doc/src/snippets/declarative/codingconventions/photo.qml
+++ b/doc/src/snippets/declarative/codingconventions/photo.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -49,12 +49,20 @@ Rectangle {
signal clicked // signal declarations
- function doSomething(x) { // javascript functions
+ function doSomething(x) // javascript functions
+ {
return x + photoImage.width
}
- x: 20; y: 20; width: 200; height: 150 // object properties
- color: "gray" // try to group related properties together
+ color: "gray" // object properties
+ x: 20; y: 20; height: 150 // try to group related properties together
+ width: { // large bindings
+ if(photoImage.width > 200){
+ photoImage.width;
+ }else{
+ 200;
+ }
+ }
Rectangle { // child objects
id: border
diff --git a/doc/src/snippets/declarative/codingconventions/private.qml b/doc/src/snippets/declarative/codingconventions/private.qml
index 1d3dda8..909f5fa 100644
--- a/doc/src/snippets/declarative/codingconventions/private.qml
+++ b/doc/src/snippets/declarative/codingconventions/private.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**