aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/demos/calqlatr/calqlatr.pro4
-rw-r--r--examples/demos/maroon/maroon.pro4
-rw-r--r--examples/demos/samegame/samegame.pro4
-rw-r--r--examples/demos/stocqt/content/StockModel.qml4
-rw-r--r--examples/demos/stocqt/stocqt.pro4
-rw-r--r--examples/demos/tweetsearch/tweetsearch.pro4
-rw-r--r--examples/localstorage/localstorage/localstorage.pro4
-rw-r--r--examples/particles/affectors/affectors.pro4
-rw-r--r--examples/particles/customparticle/customparticle.pro4
-rw-r--r--examples/particles/emitters/emitters.pro4
-rw-r--r--examples/particles/imageparticle/imageparticle.pro4
-rw-r--r--examples/particles/particles.pro2
-rw-r--r--examples/particles/system/system.pro4
-rw-r--r--examples/qml/imageprovider/imageprovider.pro6
-rw-r--r--examples/qml/plugins/plugins.pro6
-rw-r--r--examples/qml/referenceexamples/adding/adding.pro4
-rw-r--r--examples/qml/referenceexamples/attached/attached.pro4
-rw-r--r--examples/qml/referenceexamples/binding/binding.pro4
-rw-r--r--examples/qml/referenceexamples/coercion/coercion.pro4
-rw-r--r--examples/qml/referenceexamples/default/default.pro4
-rw-r--r--examples/qml/referenceexamples/extended/extended.pro4
-rw-r--r--examples/qml/referenceexamples/grouped/grouped.pro4
-rw-r--r--examples/qml/referenceexamples/methods/methods.pro4
-rw-r--r--examples/qml/referenceexamples/properties/properties.pro4
-rw-r--r--examples/qml/referenceexamples/signal/signal.pro4
-rw-r--r--examples/qml/referenceexamples/valuesource/valuesource.pro4
-rw-r--r--examples/qml/xmlhttprequest/xmlhttprequest.pro4
-rw-r--r--examples/qmltest/qmltest/qmltest.pro3
-rw-r--r--examples/quick/accessibility/accessibility.pro4
-rw-r--r--examples/quick/animation/animation.pro4
-rw-r--r--examples/quick/canvas/canvas.pro4
-rw-r--r--examples/quick/customitems/maskedmousearea/maskedmousearea.pro4
-rw-r--r--examples/quick/customitems/painteditem/painteditem.pro6
-rw-r--r--examples/quick/draganddrop/draganddrop.pro4
-rw-r--r--examples/quick/imageelements/imageelements.pro4
-rw-r--r--examples/quick/keyinteraction/keyinteraction.pro4
-rw-r--r--examples/quick/modelviews/modelviews.pro4
-rw-r--r--examples/quick/mousearea/mousearea.pro4
-rw-r--r--examples/quick/positioners/positioners.pro4
-rw-r--r--examples/quick/righttoleft/righttoleft.pro4
-rw-r--r--examples/quick/shadereffects/shadereffects.pro4
-rw-r--r--examples/quick/text/text.pro4
-rw-r--r--examples/quick/threading/threading.pro4
-rw-r--r--examples/quick/touchinteraction/touchinteraction.pro4
-rw-r--r--examples/shared/shared.h2
-rw-r--r--examples/shared/shared.pro2
-rw-r--r--examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h7
-rw-r--r--examples/tutorials/gettingStartedQml/filedialog/directory.cpp50
-rw-r--r--examples/tutorials/gettingStartedQml/filedialog/directory.h76
-rw-r--r--examples/tutorials/gettingStartedQml/filedialog/file.cpp8
-rw-r--r--examples/tutorials/gettingStartedQml/filedialog/file.h25
-rw-r--r--examples/window/window/Window.qml4
-rw-r--r--examples/window/window/nogui.qml50
-rw-r--r--examples/window/window/standalone.qml91
-rw-r--r--examples/window/window/twowindows.qml89
55 files changed, 388 insertions, 195 deletions
diff --git a/examples/demos/calqlatr/calqlatr.pro b/examples/demos/calqlatr/calqlatr.pro
index 0aa39f9278..024d6efa23 100644
--- a/examples/demos/calqlatr/calqlatr.pro
+++ b/examples/demos/calqlatr/calqlatr.pro
@@ -3,7 +3,7 @@ TEMPLATE = app
QT += qml quick
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/demos/calqlatr
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/calqlatr
qml.files = calqlatr.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/demos/calqlatr
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/calqlatr
INSTALLS += target qml
diff --git a/examples/demos/maroon/maroon.pro b/examples/demos/maroon/maroon.pro
index 32d1e43d4a..cbe0c8ed0d 100644
--- a/examples/demos/maroon/maroon.pro
+++ b/examples/demos/maroon/maroon.pro
@@ -3,7 +3,7 @@ TEMPLATE = app
QT += qml quick
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/demos/maroon
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/maroon
qml.files = maroon.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/demos/maroon
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/maroon
INSTALLS += target qml
diff --git a/examples/demos/samegame/samegame.pro b/examples/demos/samegame/samegame.pro
index e9b9f4bf16..4aa3a3324e 100644
--- a/examples/demos/samegame/samegame.pro
+++ b/examples/demos/samegame/samegame.pro
@@ -3,7 +3,7 @@ TEMPLATE = app
QT += qml quick
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/demos/samegame
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/samegame
qml.files = samegame.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/demos/samegame
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/samegame
INSTALLS += target qml
diff --git a/examples/demos/stocqt/content/StockModel.qml b/examples/demos/stocqt/content/StockModel.qml
index ee58e044c2..b5a78548e4 100644
--- a/examples/demos/stocqt/content/StockModel.qml
+++ b/examples/demos/stocqt/content/StockModel.qml
@@ -96,10 +96,10 @@ ListModel {
request += "s=" + stockId;
request += "&a=" + startDate.getDate();
request += "&b=" + startDate.getMonth();
- request += "&c=" + startDate.getYear();
+ request += "&c=" + startDate.getFullYear();
request += "&d=" + endDate.getDate();
request += "&e=" + endDate.getMonth();
- request += "&f=" + endDate.getYear();
+ request += "&f=" + endDate.getFullYear();
request += "&g=" + stockDataCycle;
request += "&ignore=.csv";
return request;
diff --git a/examples/demos/stocqt/stocqt.pro b/examples/demos/stocqt/stocqt.pro
index 74d27559d8..aa2f1cfbea 100644
--- a/examples/demos/stocqt/stocqt.pro
+++ b/examples/demos/stocqt/stocqt.pro
@@ -3,7 +3,7 @@ TEMPLATE = app
QT += qml quick
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/demos/stocqt
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/stocqt
qml.files = stocqt.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/demos/stocqt
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/stocqt
INSTALLS += target qml
diff --git a/examples/demos/tweetsearch/tweetsearch.pro b/examples/demos/tweetsearch/tweetsearch.pro
index 12a09dfc59..691bd6d293 100644
--- a/examples/demos/tweetsearch/tweetsearch.pro
+++ b/examples/demos/tweetsearch/tweetsearch.pro
@@ -3,7 +3,7 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/demos/tweetsearch
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/tweetsearch
qml.files = tweetsearch.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/demos/tweetsearch
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/tweetsearch
INSTALLS += target qml
diff --git a/examples/localstorage/localstorage/localstorage.pro b/examples/localstorage/localstorage/localstorage.pro
index 311dc4ac8b..4cce7eda4f 100644
--- a/examples/localstorage/localstorage/localstorage.pro
+++ b/examples/localstorage/localstorage/localstorage.pro
@@ -3,7 +3,7 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/localstorage
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/localstorage
qml.files = localstorage.qml hello.qml
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/localstorage
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/localstorage
INSTALLS += target qml
diff --git a/examples/particles/affectors/affectors.pro b/examples/particles/affectors/affectors.pro
index 52eb0ddb55..9f91ae110b 100644
--- a/examples/particles/affectors/affectors.pro
+++ b/examples/particles/affectors/affectors.pro
@@ -3,8 +3,8 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/particles/affectors
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/affectors
qml.files = affectors.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/particles/affectors
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/affectors
INSTALLS += target qml
diff --git a/examples/particles/customparticle/customparticle.pro b/examples/particles/customparticle/customparticle.pro
index d26778f730..1f087d4d57 100644
--- a/examples/particles/customparticle/customparticle.pro
+++ b/examples/particles/customparticle/customparticle.pro
@@ -3,8 +3,8 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/particles/customparticle
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/customparticle
qml.files = customparticle.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/particles/customparticle
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/customparticle
INSTALLS += target qml
diff --git a/examples/particles/emitters/emitters.pro b/examples/particles/emitters/emitters.pro
index 7147d716ad..890726ebcc 100644
--- a/examples/particles/emitters/emitters.pro
+++ b/examples/particles/emitters/emitters.pro
@@ -3,8 +3,8 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/particles/emitters
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/emitters
qml.files = emitters.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/particles/emitters
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/emitters
INSTALLS += target qml
diff --git a/examples/particles/imageparticle/imageparticle.pro b/examples/particles/imageparticle/imageparticle.pro
index 8d5b06cc89..2898bec628 100644
--- a/examples/particles/imageparticle/imageparticle.pro
+++ b/examples/particles/imageparticle/imageparticle.pro
@@ -3,8 +3,8 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/particles/imageparticle
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/imageparticle
qml.files = imageparticle.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/particles/imageparticle
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/imageparticle
INSTALLS += target qml
diff --git a/examples/particles/particles.pro b/examples/particles/particles.pro
index 385da36a08..a4edaa9ccb 100644
--- a/examples/particles/particles.pro
+++ b/examples/particles/particles.pro
@@ -7,5 +7,5 @@ SUBDIRS += affectors \
#Install shared images too
qml.files = images
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/particles
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles
INSTALLS = qml
diff --git a/examples/particles/system/system.pro b/examples/particles/system/system.pro
index 613abface4..9623bb5acb 100644
--- a/examples/particles/system/system.pro
+++ b/examples/particles/system/system.pro
@@ -3,8 +3,8 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/particles/system
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/system
qml.files = system.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/particles/system
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/system
INSTALLS += target qml
diff --git a/examples/qml/imageprovider/imageprovider.pro b/examples/qml/imageprovider/imageprovider.pro
index e85bad9866..09bbef495d 100644
--- a/examples/qml/imageprovider/imageprovider.pro
+++ b/examples/qml/imageprovider/imageprovider.pro
@@ -10,13 +10,13 @@ SOURCES += imageprovider.cpp
OTHER_FILES += imageprovider.json
sources.files = $$SOURCES imageprovider.qml imageprovider.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/imageprovider
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/imageprovider
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/imageprovider/ImageProviderCore
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/imageprovider/ImageProviderCore
ImageProviderCore_sources.files = \
ImageProviderCore/qmldir
-ImageProviderCore_sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/imageprovider/ImageProviderCore
+ImageProviderCore_sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/imageprovider/ImageProviderCore
INSTALLS = sources ImageProviderCore_sources target
diff --git a/examples/qml/plugins/plugins.pro b/examples/qml/plugins/plugins.pro
index 2c748f7952..66af7d3c07 100644
--- a/examples/qml/plugins/plugins.pro
+++ b/examples/qml/plugins/plugins.pro
@@ -15,11 +15,11 @@ qdeclarativesources.files += \
imports/TimeExample/hour.png \
imports/TimeExample/minute.png
-qdeclarativesources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/plugins/imports/TimeExample
+qdeclarativesources.path += $$[QT_INSTALL_EXAMPLES]/qtquick/qml/plugins/imports/TimeExample
sources.files += plugins.pro plugin.cpp plugins.qml
-sources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/plugins
-target.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/plugins/imports/TimeExample
+sources.path += $$[QT_INSTALL_EXAMPLES]/qtquick/qml/plugins
+target.path += $$[QT_INSTALL_EXAMPLES]/qtquick/qml/plugins/imports/TimeExample
INSTALLS += qdeclarativesources sources target
diff --git a/examples/qml/referenceexamples/adding/adding.pro b/examples/qml/referenceexamples/adding/adding.pro
index 706322e9ff..a1aec4da91 100644
--- a/examples/qml/referenceexamples/adding/adding.pro
+++ b/examples/qml/referenceexamples/adding/adding.pro
@@ -5,7 +5,7 @@ SOURCES += main.cpp \
HEADERS += person.h
RESOURCES += adding.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/adding
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/adding
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS adding.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/adding
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/adding
INSTALLS += target sources
diff --git a/examples/qml/referenceexamples/attached/attached.pro b/examples/qml/referenceexamples/attached/attached.pro
index f4385e1a30..20956f9be6 100644
--- a/examples/qml/referenceexamples/attached/attached.pro
+++ b/examples/qml/referenceexamples/attached/attached.pro
@@ -7,7 +7,7 @@ HEADERS += person.h \
birthdayparty.h
RESOURCES += attached.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/attached
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/attached
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS attached.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/attached
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/attached
INSTALLS += target sources
diff --git a/examples/qml/referenceexamples/binding/binding.pro b/examples/qml/referenceexamples/binding/binding.pro
index 0379f93ea7..2cd619a085 100644
--- a/examples/qml/referenceexamples/binding/binding.pro
+++ b/examples/qml/referenceexamples/binding/binding.pro
@@ -9,7 +9,7 @@ HEADERS += person.h \
happybirthdaysong.h
RESOURCES += binding.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/binding
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/binding
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS binding.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/binding
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/binding
INSTALLS += target sources
diff --git a/examples/qml/referenceexamples/coercion/coercion.pro b/examples/qml/referenceexamples/coercion/coercion.pro
index 60e8532bab..ff3e264776 100644
--- a/examples/qml/referenceexamples/coercion/coercion.pro
+++ b/examples/qml/referenceexamples/coercion/coercion.pro
@@ -7,7 +7,7 @@ HEADERS += person.h \
birthdayparty.h
RESOURCES += coercion.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/coercion
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/coercion
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS coercion.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/coercion
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/coercion
INSTALLS += target sources
diff --git a/examples/qml/referenceexamples/default/default.pro b/examples/qml/referenceexamples/default/default.pro
index 36ef39fc55..130e45bb47 100644
--- a/examples/qml/referenceexamples/default/default.pro
+++ b/examples/qml/referenceexamples/default/default.pro
@@ -7,7 +7,7 @@ HEADERS += person.h \
birthdayparty.h
RESOURCES += default.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/default
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/default
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS default.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/default
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/default
INSTALLS += target sources
diff --git a/examples/qml/referenceexamples/extended/extended.pro b/examples/qml/referenceexamples/extended/extended.pro
index 206ea19c61..73f755aa87 100644
--- a/examples/qml/referenceexamples/extended/extended.pro
+++ b/examples/qml/referenceexamples/extended/extended.pro
@@ -5,7 +5,7 @@ SOURCES += main.cpp \
HEADERS += lineedit.h
RESOURCES += extended.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/extended
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/extended
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS extended.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/extended
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/extended
INSTALLS += target sources
diff --git a/examples/qml/referenceexamples/grouped/grouped.pro b/examples/qml/referenceexamples/grouped/grouped.pro
index d32a98f79b..fa49f1cc78 100644
--- a/examples/qml/referenceexamples/grouped/grouped.pro
+++ b/examples/qml/referenceexamples/grouped/grouped.pro
@@ -7,7 +7,7 @@ HEADERS += person.h \
birthdayparty.h
RESOURCES += grouped.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/grouped
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/grouped
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS grouped.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/grouped
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/grouped
INSTALLS += target sources
diff --git a/examples/qml/referenceexamples/methods/methods.pro b/examples/qml/referenceexamples/methods/methods.pro
index f4c63bfa29..459ef080aa 100644
--- a/examples/qml/referenceexamples/methods/methods.pro
+++ b/examples/qml/referenceexamples/methods/methods.pro
@@ -7,7 +7,7 @@ HEADERS += person.h \
birthdayparty.h
RESOURCES += methods.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/methods
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/methods
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS methods.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/methods
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/methods
INSTALLS += target sources
diff --git a/examples/qml/referenceexamples/properties/properties.pro b/examples/qml/referenceexamples/properties/properties.pro
index e079b1f79e..678cfb9ca4 100644
--- a/examples/qml/referenceexamples/properties/properties.pro
+++ b/examples/qml/referenceexamples/properties/properties.pro
@@ -7,7 +7,7 @@ HEADERS += person.h \
birthdayparty.h
RESOURCES += properties.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/properties
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/properties
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS properties.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/properties
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/properties
INSTALLS += target sources
diff --git a/examples/qml/referenceexamples/signal/signal.pro b/examples/qml/referenceexamples/signal/signal.pro
index d426e398a5..b0f37ebe94 100644
--- a/examples/qml/referenceexamples/signal/signal.pro
+++ b/examples/qml/referenceexamples/signal/signal.pro
@@ -7,7 +7,7 @@ HEADERS += person.h \
birthdayparty.h
RESOURCES += signal.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/signal
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/signal
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS signal.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/signal
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/signal
INSTALLS += target sources
diff --git a/examples/qml/referenceexamples/valuesource/valuesource.pro b/examples/qml/referenceexamples/valuesource/valuesource.pro
index afc1784d71..3a5d26b0ec 100644
--- a/examples/qml/referenceexamples/valuesource/valuesource.pro
+++ b/examples/qml/referenceexamples/valuesource/valuesource.pro
@@ -9,7 +9,7 @@ HEADERS += person.h \
happybirthdaysong.h
RESOURCES += valuesource.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/valuesource
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/valuesource
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS valuesource.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/extending/valuesource
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/extending/valuesource
INSTALLS += target sources
diff --git a/examples/qml/xmlhttprequest/xmlhttprequest.pro b/examples/qml/xmlhttprequest/xmlhttprequest.pro
index e58ada7540..bb7fae66bf 100644
--- a/examples/qml/xmlhttprequest/xmlhttprequest.pro
+++ b/examples/qml/xmlhttprequest/xmlhttprequest.pro
@@ -3,7 +3,7 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/xmlhttprequest
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/xmlhttprequest
qml.files = xmlhttprequest.qml get.qml
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/xmlhttprequest
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/xmlhttprequest
INSTALLS += target qml
diff --git a/examples/qmltest/qmltest/qmltest.pro b/examples/qmltest/qmltest/qmltest.pro
index 40d964c20a..033a90ba82 100644
--- a/examples/qmltest/qmltest/qmltest.pro
+++ b/examples/qmltest/qmltest/qmltest.pro
@@ -2,3 +2,6 @@ TEMPLATE=app
TARGET=tst_qmltestexample
CONFIG += qmltestcase
SOURCES += tst_qmltest.cpp
+
+# Don't install by default
+CONFIG += no_testcase_installs
diff --git a/examples/quick/accessibility/accessibility.pro b/examples/quick/accessibility/accessibility.pro
index 51877b2c95..3f2109eac2 100644
--- a/examples/quick/accessibility/accessibility.pro
+++ b/examples/quick/accessibility/accessibility.pro
@@ -3,8 +3,8 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/accessibility
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/accessibility
qml.files = accessibility.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/accessibility
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/accessibility
INSTALLS += target qml
diff --git a/examples/quick/animation/animation.pro b/examples/quick/animation/animation.pro
index 26cefba202..c840bdf720 100644
--- a/examples/quick/animation/animation.pro
+++ b/examples/quick/animation/animation.pro
@@ -3,8 +3,8 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/animation
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/animation
qml.files = animation.qml basics behaviors easing pathanimation pathinterpolator states
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/animation
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/animation
INSTALLS += target qml
diff --git a/examples/quick/canvas/canvas.pro b/examples/quick/canvas/canvas.pro
index 92b5b4b08e..fe7ce9a37a 100644
--- a/examples/quick/canvas/canvas.pro
+++ b/examples/quick/canvas/canvas.pro
@@ -3,7 +3,7 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/canvas
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/canvas
qml.files = canvas.qml bezierCurve clip quadraticCurveTo roundedrect smile squircle tiger contents
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/canvas
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/canvas
INSTALLS += target qml \ No newline at end of file
diff --git a/examples/quick/customitems/maskedmousearea/maskedmousearea.pro b/examples/quick/customitems/maskedmousearea/maskedmousearea.pro
index 1623f7919b..654c3ceeb5 100644
--- a/examples/quick/customitems/maskedmousearea/maskedmousearea.pro
+++ b/examples/quick/customitems/maskedmousearea/maskedmousearea.pro
@@ -7,8 +7,8 @@ HEADERS += maskedmousearea.h
SOURCES += main.cpp \
maskedmousearea.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/maskedmousearea
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/maskedmousearea
qml.files = maskedmousearea.qml images
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/maskedmousearea
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/maskedmousearea
INSTALLS += target qml
diff --git a/examples/quick/customitems/painteditem/painteditem.pro b/examples/quick/customitems/painteditem/painteditem.pro
index 9526817146..59b0702547 100644
--- a/examples/quick/customitems/painteditem/painteditem.pro
+++ b/examples/quick/customitems/painteditem/painteditem.pro
@@ -16,10 +16,10 @@ DESTDIR = TextBalloonPlugin
qdeclarativesources.files += \
TextBalloonPlugin/qmldir
-qdeclarativesources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/painteditem/TextBalloonPlugin
+qdeclarativesources.path += $$[QT_INSTALL_EXAMPLES]/qtquick/qml/painteditem/TextBalloonPlugin
sources.files = textballoons.qml
-sources.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/painteditem
-target.path += $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qml/painteditem/TextBalloonPlugin
+sources.path += $$[QT_INSTALL_EXAMPLES]/qtquick/qml/painteditem
+target.path += $$[QT_INSTALL_EXAMPLES]/qtquick/qml/painteditem/TextBalloonPlugin
INSTALLS = qdeclarativesources sources target
diff --git a/examples/quick/draganddrop/draganddrop.pro b/examples/quick/draganddrop/draganddrop.pro
index e4556da4a1..3db32e0dd4 100644
--- a/examples/quick/draganddrop/draganddrop.pro
+++ b/examples/quick/draganddrop/draganddrop.pro
@@ -3,8 +3,8 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/draganddrop
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/draganddrop
qml.files = draganddrop.qml tiles views
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/draganddrop
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/draganddrop
INSTALLS += target qml
diff --git a/examples/quick/imageelements/imageelements.pro b/examples/quick/imageelements/imageelements.pro
index 9732475f1d..b395490858 100644
--- a/examples/quick/imageelements/imageelements.pro
+++ b/examples/quick/imageelements/imageelements.pro
@@ -3,8 +3,8 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/imageelements
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/imageelements
qml.files = *.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/imageelements
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/imageelements
INSTALLS += target qml
diff --git a/examples/quick/keyinteraction/keyinteraction.pro b/examples/quick/keyinteraction/keyinteraction.pro
index f2e19430a4..d98f218673 100644
--- a/examples/quick/keyinteraction/keyinteraction.pro
+++ b/examples/quick/keyinteraction/keyinteraction.pro
@@ -3,8 +3,8 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/keyinteraction
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/keyinteraction
qml.files = keyinteraction.qml focus
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/keyinteraction
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/keyinteraction
INSTALLS += target qml
diff --git a/examples/quick/modelviews/modelviews.pro b/examples/quick/modelviews/modelviews.pro
index 7e6226607f..7da02de774 100644
--- a/examples/quick/modelviews/modelviews.pro
+++ b/examples/quick/modelviews/modelviews.pro
@@ -3,7 +3,7 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/modelviews
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/modelviews
qml.files = \
modelviews.qml \
gridview \
@@ -13,6 +13,6 @@ qml.files = \
pathview \
visualdatamodel \
visualitemmodel
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/modelviews
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/modelviews
INSTALLS += target qml
diff --git a/examples/quick/mousearea/mousearea.pro b/examples/quick/mousearea/mousearea.pro
index c26d287cf7..bf08c745bb 100644
--- a/examples/quick/mousearea/mousearea.pro
+++ b/examples/quick/mousearea/mousearea.pro
@@ -3,8 +3,8 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/mousearea
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/mousearea
qml.files = mousearea.qml
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/mousearea
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/mousearea
INSTALLS += target qml
diff --git a/examples/quick/positioners/positioners.pro b/examples/quick/positioners/positioners.pro
index dddabfe19e..2f457e60ff 100644
--- a/examples/quick/positioners/positioners.pro
+++ b/examples/quick/positioners/positioners.pro
@@ -3,8 +3,8 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/positioners
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/positioners
qml.files = positioners.qml positioners-transitions.qml positioners-attachedproperties.qml
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/positioners
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/positioners
INSTALLS += target qml
diff --git a/examples/quick/righttoleft/righttoleft.pro b/examples/quick/righttoleft/righttoleft.pro
index cd5a48d7a4..74005b1b08 100644
--- a/examples/quick/righttoleft/righttoleft.pro
+++ b/examples/quick/righttoleft/righttoleft.pro
@@ -3,8 +3,8 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/righttoleft
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/righttoleft
qml.files = righttoleft.qml layoutdirection layoutmirroring textalignment
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/righttoleft
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/righttoleft
INSTALLS += target qml
diff --git a/examples/quick/shadereffects/shadereffects.pro b/examples/quick/shadereffects/shadereffects.pro
index 7801e415c0..d3b50632c7 100644
--- a/examples/quick/shadereffects/shadereffects.pro
+++ b/examples/quick/shadereffects/shadereffects.pro
@@ -3,8 +3,8 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/shadereffects
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/shadereffects
qml.files = shadereffects.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/shadereffects
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/shadereffects
INSTALLS += target qml
diff --git a/examples/quick/text/text.pro b/examples/quick/text/text.pro
index a9256a6a4a..afd7d1ba07 100644
--- a/examples/quick/text/text.pro
+++ b/examples/quick/text/text.pro
@@ -3,8 +3,8 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/text
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/text
qml.files = fonts imgtag styledtext-layout.qml text.qml textselection
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/text
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/text
INSTALLS += target qml
diff --git a/examples/quick/threading/threading.pro b/examples/quick/threading/threading.pro
index ba6d75433b..a0770c9332 100644
--- a/examples/quick/threading/threading.pro
+++ b/examples/quick/threading/threading.pro
@@ -3,8 +3,8 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/threading
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/threading
qml.files = threading.qml threadedlistmodel workerscript
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/threading
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/threading
INSTALLS += target qml
diff --git a/examples/quick/touchinteraction/touchinteraction.pro b/examples/quick/touchinteraction/touchinteraction.pro
index 8213d64928..6b52d46a25 100644
--- a/examples/quick/touchinteraction/touchinteraction.pro
+++ b/examples/quick/touchinteraction/touchinteraction.pro
@@ -3,8 +3,8 @@ TEMPLATE = app
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/touchinteraction
+target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/touchinteraction
qml.files = flickable multipointtouch pincharea touchinteraction.qml
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/quick/touchinteraction
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/touchinteraction
INSTALLS += target qml
diff --git a/examples/shared/shared.h b/examples/shared/shared.h
index bf3857f896..e725f8146b 100644
--- a/examples/shared/shared.h
+++ b/examples/shared/shared.h
@@ -54,7 +54,7 @@
qPrintable(QDir::toNativeSeparators(directory.absolutePath())));\
return -1;\
}\
- } else if (QGuiApplication::platformName() == QLatin1String("Cocoa")) {\
+ } else if (QGuiApplication::platformName() == QLatin1String("cocoa")) {\
if (directory.absolutePath().endsWith(#NAME".app/Contents/MacOS"))\
for (int i = 0; i < 3; ++i) {\
if (!directory.cdUp()) {\
diff --git a/examples/shared/shared.pro b/examples/shared/shared.pro
index d6ce120f41..3bc9bfebbe 100644
--- a/examples/shared/shared.pro
+++ b/examples/shared/shared.pro
@@ -5,5 +5,5 @@ qml.files = images \
LauncherList.qml \
SimpleLauncherDelegate.qml \
Button.qml
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/shared
+qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/shared
INSTALLS = qml
diff --git a/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h b/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h
index f5fcae0958..05e076839a 100644
--- a/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h
+++ b/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h
@@ -48,10 +48,9 @@ class DialogPlugin : public QQmlExtensionPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
- public:
- //registerTypes is inherited from QQmlExtensionPlugin
- void registerTypes(const char *uri);
-
+public:
+ // registerTypes is inherited from QQmlExtensionPlugin
+ void registerTypes(const char *uri);
};
#endif
diff --git a/examples/tutorials/gettingStartedQml/filedialog/directory.cpp b/examples/tutorials/gettingStartedQml/filedialog/directory.cpp
index a07ec6308f..38a47f0431 100644
--- a/examples/tutorials/gettingStartedQml/filedialog/directory.cpp
+++ b/examples/tutorials/gettingStartedQml/filedialog/directory.cpp
@@ -48,11 +48,11 @@ Initialize the saves directory and creates the file list
*/
Directory::Directory(QObject *parent) : QObject(parent)
{
- m_dir.cd( QDir::currentPath() );
+ m_dir.cd(QDir::currentPath());
- //go to the saved directory. if not found, create save directory
+ // go to the saved directory. if not found, create save directory
m_saveDir = "saves";
- if ( m_dir.cd(m_saveDir) == 0 ) {
+ if (m_dir.cd(m_saveDir) == 0) {
m_dir.mkdir(m_saveDir);
m_dir.cd(m_saveDir);
}
@@ -72,7 +72,7 @@ int Directory::filesCount() const
/*
Function called to append data onto list property
*/
-void appendFiles(QQmlListProperty<File> * property, File * file)
+void appendFiles(QQmlListProperty<File> *property, File *file)
{
Q_UNUSED(property);
Q_UNUSED(file);
@@ -82,7 +82,7 @@ void appendFiles(QQmlListProperty<File> * property, File * file)
/*
Function called to retrieve file in the list using an index
*/
-File* fileAt(QQmlListProperty<File> * property, int index)
+File *fileAt(QQmlListProperty<File> *property, int index)
{
return static_cast< QList<File *> *>(property->data)->at(index);
}
@@ -90,7 +90,7 @@ File* fileAt(QQmlListProperty<File> * property, int index)
/*
Returns the number of files in the list
*/
-int filesSize(QQmlListProperty<File> * property)
+int filesSize(QQmlListProperty<File> *property)
{
return static_cast< QList<File *> *>(property->data)->size();
}
@@ -109,7 +109,7 @@ Returns the list of files as a QQmlListProperty.
QQmlListProperty<File> Directory::files()
{
refresh();
- return QQmlListProperty<File>( this, &m_fileList, &appendFiles, &filesSize, &fileAt, &clearFilesPtr );
+ return QQmlListProperty<File>(this, &m_fileList, &appendFiles, &filesSize, &fileAt, &clearFilesPtr);
}
/*
@@ -133,7 +133,7 @@ Set the file name of the current file
*/
void Directory::setFilename(const QString &str)
{
- if( str != currentFile.name() ) {
+ if (str != currentFile.name()) {
currentFile.setName(str);
emit filenameChanged();
}
@@ -144,7 +144,7 @@ Set the content of the file as a string
*/
void Directory::setFileContent(const QString &str)
{
- if(str != m_fileContent){
+ if (str != m_fileContent) {
m_fileContent = str;
emit fileContentChanged();
}
@@ -156,16 +156,16 @@ Saving makes sure that the file has a .txt extension.
*/
void Directory::saveFile()
{
- if(currentFile.name().size() == 0){
+ if (currentFile.name().isEmpty()) {
qWarning()<< "Empty filename. no save";
return;
}
QString extendedName = currentFile.name();
- if(!currentFile.name().endsWith(".txt")){
+ if (!currentFile.name().endsWith(".txt")) {
extendedName.append(".txt");
}
- QFile file( m_dir.filePath(extendedName) );
- if ( file.open(QFile::WriteOnly | QFile::Truncate) ) {
+ QFile file(m_dir.filePath(extendedName));
+ if (file.open(QFile::WriteOnly | QFile::Truncate)) {
QTextStream outStream(&file);
outStream << m_fileContent;
}
@@ -182,19 +182,14 @@ void Directory::loadFile()
{
m_fileContent.clear();
QString extendedName = currentFile.name();
- if( !currentFile.name().endsWith(".txt") ) {
+ if (!currentFile.name().endsWith(".txt")) {
extendedName.append(".txt");
}
- QFile file( m_dir.filePath(extendedName) );
- if ( file.open(QFile::ReadOnly ) ) {
+ QFile file(m_dir.filePath(extendedName));
+ if (file.open(QFile::ReadOnly)) {
QTextStream inStream(&file);
-
- QString line;
- do {
- line = inStream.read(75);
- m_fileContent.append(line);
- } while ( !line.isNull() ) ;
+ m_fileContent = inStream.readAll();
}
file.close();
}
@@ -208,15 +203,14 @@ void Directory::refresh()
m_dirFiles = m_dir.entryList(m_filterList,QDir::Files,QDir::Name);
m_fileList.clear();
- File * file;
- for(int i = 0; i < m_dirFiles.size() ; i ++) {
+ File *file;
+ for (int i = 0; i < m_dirFiles.size(); ++i) {
file = new File();
- if( m_dirFiles.at(i).endsWith(".txt") ) {
+ if (m_dirFiles.at(i).endsWith(".txt")) {
QString name = m_dirFiles.at(i);
- file->setName( name.remove(".txt",Qt::CaseSensitive) );
- }
- else {
+ file->setName(name.remove(".txt",Qt::CaseSensitive));
+ } else {
file->setName(m_dirFiles.at(i));
}
m_fileList.append(file);
diff --git a/examples/tutorials/gettingStartedQml/filedialog/directory.h b/examples/tutorials/gettingStartedQml/filedialog/directory.h
index 7bb41efa98..90c427c1c5 100644
--- a/examples/tutorials/gettingStartedQml/filedialog/directory.h
+++ b/examples/tutorials/gettingStartedQml/filedialog/directory.h
@@ -44,64 +44,64 @@
#include "file.h"
#include <QDir>
+#include <QObject>
+#include <QQmlListProperty>
#include <QStringList>
#include <QTextStream>
-#include <QQmlListProperty>
-#include <QObject>
-
-class Directory : public QObject {
+class Directory : public QObject
+{
Q_OBJECT
- //number of files in the directory
+ // number of files in the directory
Q_PROPERTY(int filesCount READ filesCount)
- //list property containing file names as QString
- Q_PROPERTY(QQmlListProperty<File> files READ files CONSTANT )
+ // list property containing file names as QString
+ Q_PROPERTY(QQmlListProperty<File> files READ files CONSTANT)
- //file name of the text file to read/write
+ // file name of the text file to read/write
Q_PROPERTY(QString filename READ filename WRITE setFilename NOTIFY filenameChanged)
- //text content of the file
+ // text content of the file
Q_PROPERTY(QString fileContent READ fileContent WRITE setFileContent NOTIFY fileContentChanged)
- public:
- Directory(QObject *parent = 0);
+public:
+ Directory(QObject *parent = 0);
- //properties' read functions
- int filesCount() const;
- QString filename() const;
- QString fileContent() const;
- QQmlListProperty<File> files();
+ // properties' read functions
+ int filesCount() const;
+ QString filename() const;
+ QString fileContent() const;
+ QQmlListProperty<File> files();
- //properties' write functions
- void setFilename(const QString &str);
- void setFileContent(const QString &str);
+ // properties' write functions
+ void setFilename(const QString &str);
+ void setFileContent(const QString &str);
- //accessible from QML
- Q_INVOKABLE void saveFile();
- Q_INVOKABLE void loadFile();
+ // accessible from QML
+ Q_INVOKABLE void saveFile();
+ Q_INVOKABLE void loadFile();
- signals:
- void directoryChanged();
- void filenameChanged();
- void fileContentChanged();
+signals:
+ void directoryChanged();
+ void filenameChanged();
+ void fileContentChanged();
- private:
- QDir m_dir;
- QStringList m_dirFiles;
- File currentFile;
- QString m_saveDir;
- QStringList m_filterList;
+private:
+ QDir m_dir;
+ QStringList m_dirFiles;
+ File currentFile;
+ QString m_saveDir;
+ QStringList m_filterList;
- //contains the file data in QString format
- QString m_fileContent;
+ //contains the file data in QString format
+ QString m_fileContent;
- //Registered to QML in a plugin. Accessible from QML as a property of Directory
- QList<File *> m_fileList;
+ //Registered to QML in a plugin. Accessible from QML as a property of Directory
+ QList<File *> m_fileList;
- //refresh content of the directory
- void refresh();
+ //refresh content of the directory
+ void refresh();
};
#endif
diff --git a/examples/tutorials/gettingStartedQml/filedialog/file.cpp b/examples/tutorials/gettingStartedQml/filedialog/file.cpp
index dc91212e0c..b53c569d56 100644
--- a/examples/tutorials/gettingStartedQml/filedialog/file.cpp
+++ b/examples/tutorials/gettingStartedQml/filedialog/file.cpp
@@ -45,12 +45,14 @@ File::File(QObject *parent) : QObject(parent)
{
}
-QString File::name() const{
+QString File::name() const
+{
return m_name;
}
-void File::setName(const QString &str){
- if(str != m_name){
+void File::setName(const QString &str)
+{
+ if (str != m_name) {
m_name = str;
emit nameChanged();
}
diff --git a/examples/tutorials/gettingStartedQml/filedialog/file.h b/examples/tutorials/gettingStartedQml/filedialog/file.h
index cd12e6d39b..7a0da05b70 100644
--- a/examples/tutorials/gettingStartedQml/filedialog/file.h
+++ b/examples/tutorials/gettingStartedQml/filedialog/file.h
@@ -41,27 +41,26 @@
#ifndef FILE_H
#define FILE_H
-
-#include <QString>
#include <QObject>
+#include <QString>
-class File : public QObject{
-
+class File : public QObject
+{
Q_OBJECT
Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
- public:
- File(QObject *parent = 0);
+public:
+ File(QObject *parent = 0);
- QString name() const;
- void setName(const QString &str);
+ QString name() const;
+ void setName(const QString &str);
- signals:
- void nameChanged();
+signals:
+ void nameChanged();
- private:
- QString m_name;
+private:
+ QString m_name;
};
-#endif \ No newline at end of file
+#endif
diff --git a/examples/window/window/Window.qml b/examples/window/window/Window.qml
index a9c9ba27c5..b7fbf7206c 100644
--- a/examples/window/window/Window.qml
+++ b/examples/window/window/Window.qml
@@ -39,9 +39,9 @@
****************************************************************************/
import QtQuick 2.0
-import QtQuick.Window 2.0 as Window
+import QtQuick.Window 2.0
-Window.Window {
+Window {
width: 640
height: 480
visible: true //It's false by default
diff --git a/examples/window/window/nogui.qml b/examples/window/window/nogui.qml
new file mode 100644
index 0000000000..bed055679d
--- /dev/null
+++ b/examples/window/window/nogui.qml
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQml 2.0
+
+/*
+ This object's only functionality is to exist as a root object and
+ display nothing, proving that qmlscene can run without windows.
+ (A QtObject can't even have Component.onCompleted)
+*/
+QtObject {
+ property string philosophy: "hello bleak windowless world"
+}
diff --git a/examples/window/window/standalone.qml b/examples/window/window/standalone.qml
index 5d96c37142..a7a7ed2d7a 100644
--- a/examples/window/window/standalone.qml
+++ b/examples/window/window/standalone.qml
@@ -39,33 +39,90 @@
****************************************************************************/
import QtQuick 2.0
-import QtQuick.Window 2.0 as Window
+import QtQuick.Window 2.0
Item {
- width: 640
- height: 480
+ width: 320
+ height: 240
+ // It's not possible to set an Item's windowTitle. If you want to modify
+ // window properties, you need to explicitly create a Window.
Text {
+ id: text1
anchors.centerIn: parent
- text: "First Window"
+ text: "First Window\n" + (Qt.application.supportsMultipleWindows ?
+ "click the button to open a second window" : "only one window is allowed")
}
- MouseArea {
- anchors.fill: parent
- onClicked: Qt.quit()
+ Rectangle {
+ border.color: "black"
+ radius: 4
+ anchors.top: text1.bottom
+ anchors.horizontalCenter: text1.horizontalCenter
+ width: 100
+ height: 30
+ TextInput {
+ id: ti1
+ focus: true // but the modal popup will prevent input while it is open
+ anchors.centerIn: parent
+ }
}
- Window.Window {
- width: 640
- height: 480
- x: 640
- y: 480
- visible: true
- color: "green"
+ Rectangle {
+ border.color: "black"
+ color: childWindow.visible ? "goldenrod" : "beige"
+ radius: height / 4
+ anchors.bottom: parent.bottom
+ anchors.right: parent.right
+ anchors.margins: 10
+ width: text.implicitWidth + 20
+ height: text.implicitHeight + 20
+ visible: Qt.application.supportsMultipleWindows
Text {
+ id: text
+ text: "Pop up window"
anchors.centerIn: parent
- text: "Second Window"
}
- MouseArea{
+ MouseArea {
anchors.fill: parent
- onClicked: Qt.quit()
+ onClicked: childWindow.visible = !childWindow.visible
+ }
+ }
+
+ Window {
+ id: childWindow
+ width: 320
+ height: 240
+ x: 220
+ y: 120
+ color: "beige"
+ title: "Second Window"
+ modality: Qt.ApplicationModal
+ flags: Qt.WindowStaysOnTopHint | Qt.FramelessWindowHint
+ Text {
+ id: text2
+ anchors.centerIn: parent
+ text: "Modal Frameless Stay-on-Top Window"
+ }
+ Text {
+ anchors.top: parent.top
+ anchors.right: parent.right
+ anchors.margins: 10
+ text: "X"
+ MouseArea{
+ anchors.fill: parent
+ onClicked: childWindow.visible = false
+ }
+ }
+ Rectangle {
+ border.color: "black"
+ radius: 4
+ anchors.top: text2.bottom
+ anchors.horizontalCenter: text2.horizontalCenter
+ width: 100
+ height: 30
+ TextInput {
+ id: ti2
+ focus: true
+ anchors.centerIn: parent
+ }
}
}
}
diff --git a/examples/window/window/twowindows.qml b/examples/window/window/twowindows.qml
new file mode 100644
index 0000000000..345598cf12
--- /dev/null
+++ b/examples/window/window/twowindows.qml
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Window 2.0
+
+QtObject {
+ property var win1: Window {
+ width: 320
+ height: 240
+ x: 0
+ y: 0
+ visible: true
+ color: "#ccffff"
+ title: "First Window"
+ Text {
+ anchors.centerIn: parent
+ text: "First Window"
+ Text {
+ id: statusText
+ anchors.top: parent.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: win2.visible = !win2.visible
+ }
+ }
+ property var win2: Window {
+ width: 320
+ height: 240
+ x: 220
+ y: 120
+ visible: true
+ color: "green"
+ title: "Second Window: " + color
+ Rectangle {
+ anchors.fill: parent
+ anchors.margins: 10
+ Text {
+ anchors.centerIn: parent
+ text: "Second Window"
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: win2.color = "#ffffcc"
+ }
+ }
+ onVisibleChanged: statusText.text = "second window is " + (visible ? "visible" : "invisible")
+ }
+}