aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
-rw-r--r--src/particles/qquickcustomparticle.cpp5
-rw-r--r--src/particles/qquickimageparticle.cpp5
-rw-r--r--src/plugins/accessible/quick/qaccessiblequickitem.cpp5
-rw-r--r--src/plugins/accessible/quick/qaccessiblequickitem.h1
-rw-r--r--src/plugins/accessible/quick/qaccessiblequickview.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp4
-rw-r--r--src/qml/doc/src/modules/identifiedmodules.qdoc4
-rw-r--r--src/qml/doc/src/syntax/imports.qdoc6
-rw-r--r--src/qml/qml/qqmlcomponent.cpp7
-rw-r--r--src/qml/qml/qqmlengine.cpp8
-rw-r--r--src/qml/qml/qqmlimport.cpp6
-rw-r--r--src/qml/qml/qqmlmetatype.cpp4
-rw-r--r--src/qml/qml/qqmlpropertycache.cpp5
-rw-r--r--src/qml/qml/qqmlpropertycache_p.h1
-rw-r--r--src/qml/qml/v8/qv8engine_p.h2
-rw-r--r--src/qmltest/quicktest.cpp4
-rw-r--r--src/quick/doc/src/appdevguide/porting.qdoc2
-rw-r--r--src/quick/doc/src/appdevguide/qtquicktest.qdoc3
-rw-r--r--src/quick/items/qquickflickable.cpp19
-rw-r--r--src/quick/items/qquickflickable_p_p.h2
-rw-r--r--src/quick/items/qquickitem.h2
-rw-r--r--src/quick/items/qquicktextinput.cpp3
-rw-r--r--src/quick/items/qquickthreadedwindowmanager.cpp12
-rw-r--r--src/quick/items/qquickthreadedwindowmanager_p.h1
-rw-r--r--src/quick/items/qquickview.cpp25
-rw-r--r--src/quick/items/qquickview.h2
-rw-r--r--src/quick/items/qquickwindow.cpp46
-rw-r--r--src/quick/items/qquickwindowmanager.cpp7
-rw-r--r--src/quick/util/qquickapplication.cpp7
-rw-r--r--src/quick/util/qquickapplication_p.h2
-rw-r--r--tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp8
-rw-r--r--tests/auto/qml/debugger/qqmlinspector/data/window.qml7
-rw-r--r--tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp38
-rw-r--r--tests/auto/qml/debugger/shared/debugutil.cpp2
-rw-r--r--tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp2
-rw-r--r--tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp2
-rw-r--r--tests/auto/quick/qquickapplication/tst_qquickapplication.cpp2
-rw-r--r--tests/auto/quick/qquickflickable/tst_qquickflickable.cpp22
-rw-r--r--tests/auto/quick/qquickfocusscope/tst_qquickfocusscope.cpp24
-rw-r--r--tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp2
-rw-r--r--tests/auto/quick/qquickgridview/qquickgridview.pro2
-rw-r--r--tests/auto/quick/qquickgridview/tst_qquickgridview.cpp4
-rw-r--r--tests/auto/quick/qquickimage/tst_qquickimage.cpp4
-rw-r--r--tests/auto/quick/qquickitem/tst_qquickitem.cpp2
-rw-r--r--tests/auto/quick/qquickitem2/tst_qquickitem.cpp18
-rw-r--r--tests/auto/quick/qquicklistview/tst_qquicklistview.cpp4
-rw-r--r--tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp44
-rw-r--r--tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp2
-rw-r--r--tests/auto/quick/qquickpathview/tst_qquickpathview.cpp16
-rw-r--r--tests/auto/quick/qquickpincharea/tst_qquickpincharea.cpp10
-rw-r--r--tests/auto/quick/qquickstates/tst_qquickstates.cpp2
-rw-r--r--tests/auto/quick/qquicktext/tst_qquicktext.cpp14
-rw-r--r--tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp60
-rw-r--r--tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp82
-rw-r--r--tests/auto/quick/qquickwindow/tst_qquickwindow.cpp22
-rw-r--r--tests/auto/quick/touchmouse/touchmouse.pro2
-rw-r--r--tests/auto/quick/touchmouse/tst_touchmouse.cpp20
-rw-r--r--tools/easingcurveeditor/mainwindow.cpp4
-rw-r--r--tools/qmlscene/main.cpp89
114 files changed, 833 insertions, 462 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")
+ }
+}
diff --git a/src/particles/qquickcustomparticle.cpp b/src/particles/qquickcustomparticle.cpp
index 83eb8c0853..80e2118bde 100644
--- a/src/particles/qquickcustomparticle.cpp
+++ b/src/particles/qquickcustomparticle.cpp
@@ -60,7 +60,12 @@ static const char qt_particles_template_vertex_code[] =
" highp float size = qt_ParticleData.z;\n"
" highp float endSize = qt_ParticleData.w;\n"
" highp float t = (qt_Timestamp - qt_ParticleData.x) / qt_ParticleData.y;\n"
+#if !defined(Q_OS_BLACKBERRY)
" highp float currentSize = mix(size, endSize, t * t);\n"
+#else
+ " highp float mixWorkaround = (endSize - size) * t * t;\n"
+ " highp float currentSize = mixWorkaround + size;\n"
+#endif
" if (t < 0. || t > 1.)\n"
" currentSize = 0.;\n"
" highp vec2 pos = qt_ParticlePos\n"
diff --git a/src/particles/qquickimageparticle.cpp b/src/particles/qquickimageparticle.cpp
index 4f8c5a091c..1ba9192273 100644
--- a/src/particles/qquickimageparticle.cpp
+++ b/src/particles/qquickimageparticle.cpp
@@ -127,7 +127,12 @@ static const char vertexShaderCode[] =
"#elif defined(DEFORM)\n"
" fTex = vPosTex.zw;\n"
"#endif\n"
+#if !defined(Q_OS_BLACKBERRY)
" highp float currentSize = mix(vData.z, vData.w, t * t);\n"
+#else
+ " highp float mixWorkaround = (vData.w - vData.z) * t * t;\n"
+ " highp float currentSize = mixWorkaround + vData.z;\n"
+#endif
" lowp float fade = 1.;\n"
" highp float fadeIn = min(t * 10., 1.);\n"
" highp float fadeOut = 1. - clamp((t - 0.75) * 4.,0., 1.);\n"
diff --git a/src/plugins/accessible/quick/qaccessiblequickitem.cpp b/src/plugins/accessible/quick/qaccessiblequickitem.cpp
index 4c226e829b..2d41379940 100644
--- a/src/plugins/accessible/quick/qaccessiblequickitem.cpp
+++ b/src/plugins/accessible/quick/qaccessiblequickitem.cpp
@@ -268,6 +268,11 @@ QVariant QAccessibleQuickItemValueInterface::minimumValue() const
return item()->property("minimumValue");
}
+QVariant QAccessibleQuickItemValueInterface::minimumStepSize() const
+{
+ return item()->property("stepSize");
+}
+
/*!
\internal
Shared between QAccessibleQuickItem and QAccessibleQuickView
diff --git a/src/plugins/accessible/quick/qaccessiblequickitem.h b/src/plugins/accessible/quick/qaccessiblequickitem.h
index ae863e3faa..0d31749ee0 100644
--- a/src/plugins/accessible/quick/qaccessiblequickitem.h
+++ b/src/plugins/accessible/quick/qaccessiblequickitem.h
@@ -91,6 +91,7 @@ public:
void setCurrentValue(const QVariant &value);
QVariant maximumValue() const;
QVariant minimumValue() const;
+ QVariant minimumStepSize() const;
};
#endif // QT_NO_ACCESSIBILITY
diff --git a/src/plugins/accessible/quick/qaccessiblequickview.cpp b/src/plugins/accessible/quick/qaccessiblequickview.cpp
index 764db834d2..0106a3d68b 100644
--- a/src/plugins/accessible/quick/qaccessiblequickview.cpp
+++ b/src/plugins/accessible/quick/qaccessiblequickview.cpp
@@ -107,7 +107,7 @@ QString QAccessibleQuickView::text(QAccessible::Text text) const
#else
Q_UNUSED(text)
#endif
- return view()->windowTitle();
+ return view()->title();
}
diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp
index 4f6ee51c5d..12550168f0 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp
@@ -171,13 +171,13 @@ QWindow *getMasterWindow(QWindow *w)
Qt::WindowFlags QQuickViewInspector::windowFlags() const
{
- return getMasterWindow(m_view)->windowFlags();
+ return getMasterWindow(m_view)->flags();
}
void QQuickViewInspector::setWindowFlags(Qt::WindowFlags flags)
{
QWindow *w = getMasterWindow(m_view);
- w->setWindowFlags(flags);
+ w->setFlags(flags);
// make flags are applied
w->setVisible(false);
w->setVisible(true);
diff --git a/src/qml/doc/src/modules/identifiedmodules.qdoc b/src/qml/doc/src/modules/identifiedmodules.qdoc
index 87d4c42d6d..4972e038d7 100644
--- a/src/qml/doc/src/modules/identifiedmodules.qdoc
+++ b/src/qml/doc/src/modules/identifiedmodules.qdoc
@@ -175,13 +175,13 @@ An identified module has several restrictions upon it:
\endlist
For example, if an identified module is installed into
-\c{$QML_IMPORT_PATH/ExampleModule}, the module identifier directive must be:
+\c{$QML2_IMPORT_PATH/ExampleModule}, the module identifier directive must be:
\code
module ExampleModule
\endcode
If the strict module is installed into
-\c{$QML_IMPORT_PATH/com/example/CustomUi}, the module identifier directive
+\c{$QML2_IMPORT_PATH/com/example/CustomUi}, the module identifier directive
must be:
\code
module com.example.CustomUi
diff --git a/src/qml/doc/src/syntax/imports.qdoc b/src/qml/doc/src/syntax/imports.qdoc
index e449f3b61a..db934f39a6 100644
--- a/src/qml/doc/src/syntax/imports.qdoc
+++ b/src/qml/doc/src/syntax/imports.qdoc
@@ -289,12 +289,12 @@ default locations to be searched by the engine. By default, this list contains:
\list
\li The directory of the current file
-\li The location specified by QLibraryInfo::ImportsPath
-\li Paths specified by the \c QML_IMPORT_PATH environment variable
+\li The location specified by QLibraryInfo::Qml2ImportsPath
+\li Paths specified by the \c QML2_IMPORT_PATH environment variable
\endlist
Additional import paths can be added through QQmlEngine::addImportPath() or the
-\c QML_IMPORT_PATH environment variable. When running the
+\c QML2_IMPORT_PATH environment variable. When running the
\l{Prototyping with qmlscene}{qmlscene} tool, you can also use the \c -I option
to add an import path.
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index 679e54c122..bc9669c987 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -783,7 +783,7 @@ QObject *QQmlComponent::create(QQmlContext *context)
}
/*!
- This method provides more advanced control over component instance creation.
+ This method provides advanced control over component instance creation.
In general, programmers should use QQmlComponent::create() to create a
component.
@@ -932,11 +932,12 @@ void QQmlComponentPrivate::complete(QQmlEnginePrivate *enginePriv, ConstructionS
}
/*!
- This method provides more advanced control over component instance creation.
+ This method provides advanced control over component instance creation.
In general, programmers should use QQmlComponent::create() to create a
component.
- Complete a component creation begin with QQmlComponent::beginCreate().
+ This function completes the component creation begun with QQmlComponent::beginCreate()
+ and must be called afterwards.
\sa beginCreate()
*/
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index b4962a6b1d..f0bf6e4e20 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -1670,8 +1670,8 @@ void QQmlEngine::addImportPath(const QString& path)
type version mapping and possibly QML extensions plugins.
By default, the list contains the directory of the application executable,
- paths specified in the \c QML_IMPORT_PATH environment variable,
- and the builtin \c ImportsPath from QLibraryInfo.
+ paths specified in the \c QML2_IMPORT_PATH environment variable,
+ and the builtin \c Qml2ImportsPath from QLibraryInfo.
\sa addImportPath(), setImportPathList()
*/
@@ -1686,8 +1686,8 @@ QStringList QQmlEngine::importPathList() const
installed modules in a URL-based directory structure.
By default, the list contains the directory of the application executable,
- paths specified in the \c QML_IMPORT_PATH environment variable,
- and the builtin \c ImportsPath from QLibraryInfo.
+ paths specified in the \c QML2_IMPORT_PATH environment variable,
+ and the builtin \c Qml2ImportsPath from QLibraryInfo.
\sa importPathList(), addImportPath()
*/
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
index 0b07705cec..7a2f4eaf34 100644
--- a/src/qml/qml/qqmlimport.cpp
+++ b/src/qml/qml/qqmlimport.cpp
@@ -1320,13 +1320,13 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
{
filePluginPath << QLatin1String(".");
- // Search order is applicationDirPath(), $QML_IMPORT_PATH, QLibraryInfo::ImportsPath
+ // Search order is applicationDirPath(), $QML2_IMPORT_PATH, QLibraryInfo::Qml2ImportsPath
- QString installImportsPath = QLibraryInfo::location(QLibraryInfo::ImportsPath);
+ QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
addImportPath(installImportsPath);
// env import paths
- QByteArray envImportPath = qgetenv("QML_IMPORT_PATH");
+ QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH");
if (!envImportPath.isEmpty()) {
#if defined(Q_OS_WIN)
QLatin1Char pathSep(';');
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp
index 1fdc1b95f1..595f9e8de0 100644
--- a/src/qml/qml/qqmlmetatype.cpp
+++ b/src/qml/qml/qqmlmetatype.cpp
@@ -139,6 +139,10 @@ QQmlMetaTypeData::~QQmlMetaTypeData()
{
for (int i = 0; i < types.count(); ++i)
delete types.at(i);
+
+ TypeModules::const_iterator i = uriToModule.constBegin();
+ for (; i != uriToModule.constEnd(); ++i)
+ delete *i;
}
class QQmlTypePrivate
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp
index c1c4a6c03d..8b023855ab 100644
--- a/src/qml/qml/qqmlpropertycache.cpp
+++ b/src/qml/qml/qqmlpropertycache.cpp
@@ -549,6 +549,11 @@ QQmlPropertyCache *QQmlPropertyCache::parent() const
return _parent;
}
+void QQmlPropertyCache::setParent(QQmlPropertyCache *newParent)
+{
+ _parent = newParent;
+}
+
// Returns the first C++ type's QMetaObject - that is, the first QMetaObject not created by
// QML
const QMetaObject *QQmlPropertyCache::firstCppMetaObject() const
diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h
index 14be99045f..2804f66dbe 100644
--- a/src/qml/qml/qqmlpropertycache_p.h
+++ b/src/qml/qml/qqmlpropertycache_p.h
@@ -294,6 +294,7 @@ public:
QString defaultPropertyName() const;
QQmlPropertyData *defaultProperty() const;
QQmlPropertyCache *parent() const;
+ void setParent(QQmlPropertyCache *newParent);
inline QQmlPropertyData *overrideData(QQmlPropertyData *) const;
inline bool isAllowedInRevision(QQmlPropertyData *) const;
diff --git a/src/qml/qml/v8/qv8engine_p.h b/src/qml/qml/v8/qv8engine_p.h
index 1c107bd9bf..8320a89706 100644
--- a/src/qml/qml/v8/qv8engine_p.h
+++ b/src/qml/qml/v8/qv8engine_p.h
@@ -86,7 +86,7 @@
namespace v8 {
// Needed for V8ObjectSet
-inline uint qHash(const v8::Handle<v8::Object> &object, uint seed)
+inline uint qHash(const v8::Handle<v8::Object> &object, uint seed = 0)
{
return (object->GetIdentityHash() ^ seed);
}
diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp
index d622ac9497..614dde3f6c 100644
--- a/src/qmltest/quicktest.cpp
+++ b/src/qmltest/quicktest.cpp
@@ -269,7 +269,7 @@ int quick_test_main(int argc, char **argv, const char *name, const char *sourceD
// Scan through all of the "tst_*.qml" files and run each of them
// in turn with a QQuickView.
QQuickView *view = new QQuickView;
- view->setWindowFlags(Qt::Window | Qt::WindowSystemMenuHint
+ view->setFlags(Qt::Window | Qt::WindowSystemMenuHint
| Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint
| Qt::WindowCloseButtonHint);
QTestRootObject rootobj;
@@ -288,7 +288,7 @@ int quick_test_main(int argc, char **argv, const char *name, const char *sourceD
continue;
view->setObjectName(fi.baseName());
- view->setWindowTitle(view->objectName());
+ view->setTitle(view->objectName());
rootobj.setHasTestCase(false);
rootobj.setWindowShown(false);
rootobj.hasQuit = false;
diff --git a/src/quick/doc/src/appdevguide/porting.qdoc b/src/quick/doc/src/appdevguide/porting.qdoc
index 3ac13cd255..6bb2a75074 100644
--- a/src/quick/doc/src/appdevguide/porting.qdoc
+++ b/src/quick/doc/src/appdevguide/porting.qdoc
@@ -190,7 +190,7 @@ new applications.)
\section3 QDeclarativeItem and QDeclarativeView
When porting to QQuickItem, note that QDeclarativeItem inherited from QGraphicsItem; in contrast,
-QQuickItem inherits directly from QObject, and any QGraphicsItem-specific functionality is longer
+QQuickItem inherits directly from QObject, and any QGraphicsItem-specific functionality is no longer
available. In particular, QQuickItem does not have a \c paint() method for performing custom
rendering through the QPainter API. Instead, in Qt 5, custom rendering should be performed through
the new \c QSG* classes to take full advantage of the scene graph. See the \l {Qt Quick Scene Graph}
diff --git a/src/quick/doc/src/appdevguide/qtquicktest.qdoc b/src/quick/doc/src/appdevguide/qtquicktest.qdoc
index 4db6f4ba58..c577a90be1 100644
--- a/src/quick/doc/src/appdevguide/qtquicktest.qdoc
+++ b/src/quick/doc/src/appdevguide/qtquicktest.qdoc
@@ -95,9 +95,6 @@
tst_example -input /mnt/SDCard/qmltests
\endcode
- See \c{tests/qmlauto} in the source tree for an example of creating a
- test harness that uses the \c{QUICK_TEST_SOURCE_DIR} macro.
-
If your test case needs QML imports, then you can add them as
\c{-import} options to the the test program command-line by adding
the following line to your .pro file:
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index a15f77d3ce..a0bd1fab8e 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -974,10 +974,10 @@ void QQuickFlickablePrivate::handleMousePressEvent(QMouseEvent *event)
hData.reset();
vData.reset();
- hData.dragMinBound = q->minXExtent();
- vData.dragMinBound = q->minYExtent();
- hData.dragMaxBound = q->maxXExtent();
- vData.dragMaxBound = q->maxYExtent();
+ hData.dragMinBound = q->minXExtent() - hData.startMargin;
+ vData.dragMinBound = q->minYExtent() - vData.startMargin;
+ hData.dragMaxBound = q->maxXExtent() + hData.endMargin;
+ vData.dragMaxBound = q->maxYExtent() + vData.endMargin;
fixupMode = Normal;
lastPos = QPointF();
pressPos = event->localPos();
@@ -1021,8 +1021,11 @@ void QQuickFlickablePrivate::handleMouseMoveEvent(QMouseEvent *event)
if (!vMoved)
vData.dragStartOffset = dy;
qreal newY = dy + vData.pressPos - vData.dragStartOffset;
- const qreal minY = vData.dragMinBound;
- const qreal maxY = vData.dragMaxBound;
+ // Recalculate bounds in case margins have changed, but use the content
+ // size estimate taken at the start of the drag in case the drag causes
+ // the estimate to be altered
+ const qreal minY = vData.dragMinBound + vData.startMargin;
+ const qreal maxY = vData.dragMaxBound - vData.endMargin;
if (newY > minY)
newY = minY + (newY - minY) / 2;
if (newY < maxY && maxY - minY <= 0)
@@ -1055,8 +1058,8 @@ void QQuickFlickablePrivate::handleMouseMoveEvent(QMouseEvent *event)
if (!hMoved)
hData.dragStartOffset = dx;
qreal newX = dx + hData.pressPos - hData.dragStartOffset;
- const qreal minX = hData.dragMinBound;
- const qreal maxX = hData.dragMaxBound;
+ const qreal minX = hData.dragMinBound + hData.startMargin;
+ const qreal maxX = hData.dragMaxBound - hData.endMargin;
if (newX > minX)
newX = minX + (newX - minX) / 2;
if (newX < maxX && maxX - minX <= 0)
diff --git a/src/quick/items/qquickflickable_p_p.h b/src/quick/items/qquickflickable_p_p.h
index ab5f03f34d..ac1ecdb3cb 100644
--- a/src/quick/items/qquickflickable_p_p.h
+++ b/src/quick/items/qquickflickable_p_p.h
@@ -104,7 +104,7 @@ public:
, viewSize(-1), startMargin(0), endMargin(0)
, origin(0)
, transitionTo(0)
- , continuousFlickVelocity(0), vTime(0)
+ , continuousFlickVelocity(0), velocityTime(), vTime(0)
, smoothVelocity(fp), atEnd(false), atBeginning(true)
, transitionToSet(false)
, fixingUp(false), inOvershoot(false), moving(false), flicking(false)
diff --git a/src/quick/items/qquickitem.h b/src/quick/items/qquickitem.h
index fa6aa62907..af79a08b1c 100644
--- a/src/quick/items/qquickitem.h
+++ b/src/quick/items/qquickitem.h
@@ -139,7 +139,7 @@ class Q_QUICK_EXPORT QQuickItem : public QObject, public QQmlParserStatus
Q_PROPERTY(qreal rotation READ rotation WRITE setRotation NOTIFY rotationChanged)
Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged)
Q_PROPERTY(TransformOrigin transformOrigin READ transformOrigin WRITE setTransformOrigin NOTIFY transformOriginChanged)
- Q_PROPERTY(QPointF transformOriginPoint READ transformOriginPoint) // XXX todo - notify?
+ Q_PROPERTY(QPointF transformOriginPoint READ transformOriginPoint) // deprecated - see QTBUG-26423
Q_PROPERTY(QQmlListProperty<QQuickTransform> transform READ transform DESIGNABLE false FINAL)
Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged)
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp
index 22551c9d4c..88e6d750eb 100644
--- a/src/quick/items/qquicktextinput.cpp
+++ b/src/quick/items/qquicktextinput.cpp
@@ -2698,6 +2698,9 @@ void QQuickTextInputPrivate::updateLayout()
option.setTextDirection(layoutDirection());
option.setWrapMode(QTextOption::WrapMode(wrapMode));
option.setAlignment(Qt::Alignment(q->effectiveHAlign()));
+ if (!qmlDisableDistanceField())
+ option.setUseDesignMetrics(renderType != QQuickTextInput::NativeRendering);
+
m_textLayout.setTextOption(option);
m_textLayout.setFont(font);
diff --git a/src/quick/items/qquickthreadedwindowmanager.cpp b/src/quick/items/qquickthreadedwindowmanager.cpp
index fac4fb034f..4c38686298 100644
--- a/src/quick/items/qquickthreadedwindowmanager.cpp
+++ b/src/quick/items/qquickthreadedwindowmanager.cpp
@@ -184,6 +184,7 @@ void QQuickRenderThreadSingleContextWindowManager::handleAddedWindow(QQuickWindo
data->sizeWasChanged = false;
data->windowSize = window->size();
data->isVisible = window->isVisible();
+ data->isRenderable = QQuickWindowPrivate::get(window)->isRenderable();
m_rendered_windows[window] = data;
isExternalUpdatePending = true;
@@ -397,7 +398,9 @@ void QQuickRenderThreadSingleContextWindowManager::run()
WindowData *windowData = it.value();
QQuickWindowPrivate *windowPrivate = QQuickWindowPrivate::get(window);
- if (windowPrivate->isRenderable()) {
+ windowData->isRenderable = windowPrivate->isRenderable();
+
+ if (windowData->isRenderable) {
gl->makeCurrent(window);
if (windowData->viewportSize != windowData->windowSize) {
@@ -410,10 +413,6 @@ void QQuickRenderThreadSingleContextWindowManager::run()
}
windowPrivate->syncSceneGraph();
- } else {
- qWarning().nospace()
- << "Non-renderable window " << window
- << " (" << window->geometry() << ").";
}
}
inSync = false;
@@ -435,6 +434,9 @@ void QQuickRenderThreadSingleContextWindowManager::run()
WindowData *windowData = it.value();
QQuickWindowPrivate *windowPrivate = QQuickWindowPrivate::get(window);
+ if (!windowData->isRenderable)
+ continue;
+
#ifdef THREAD_DEBUG
printf(" RenderThread: Rendering window %p\n", window);
#endif
diff --git a/src/quick/items/qquickthreadedwindowmanager_p.h b/src/quick/items/qquickthreadedwindowmanager_p.h
index 9e28d87eef..b71620f933 100644
--- a/src/quick/items/qquickthreadedwindowmanager_p.h
+++ b/src/quick/items/qquickthreadedwindowmanager_p.h
@@ -159,6 +159,7 @@ private:
uint sizeWasChanged : 1;
uint isVisible : 1;
+ uint isRenderable : 1;
};
QHash<QQuickWindow *, WindowData *> m_rendered_windows;
diff --git a/src/quick/items/qquickview.cpp b/src/quick/items/qquickview.cpp
index 7182e74c0c..befba37515 100644
--- a/src/quick/items/qquickview.cpp
+++ b/src/quick/items/qquickview.cpp
@@ -236,6 +236,31 @@ void QQuickView::setSource(const QUrl& url)
}
/*!
+ \internal
+
+ Set the source \a url, \a component and content \a item (root of the QML object hierarchy) directly.
+ */
+void QQuickView::setContent(const QUrl& url, QQmlComponent *component, QObject* item)
+{
+ Q_D(QQuickView);
+ d->source = url;
+ d->component = component;
+
+ if (d->component && d->component->isError()) {
+ QList<QQmlError> errorList = d->component->errors();
+ foreach (const QQmlError &error, errorList) {
+ QMessageLogger(error.url().toString().toLatin1().constData(), error.line(), 0).warning()
+ << error;
+ }
+ emit statusChanged(status());
+ return;
+ }
+
+ d->setRootObject(item);
+ emit statusChanged(status());
+}
+
+/*!
Returns the source URL, if set.
\sa setSource()
diff --git a/src/quick/items/qquickview.h b/src/quick/items/qquickview.h
index 756890e7ec..4a885bc993 100644
--- a/src/quick/items/qquickview.h
+++ b/src/quick/items/qquickview.h
@@ -54,6 +54,7 @@ class QQmlEngine;
class QQmlContext;
class QQmlError;
class QQuickItem;
+class QQmlComponent;
class QQuickViewPrivate;
class Q_QUICK_EXPORT QQuickView : public QQuickWindow
@@ -90,6 +91,7 @@ public:
public Q_SLOTS:
void setSource(const QUrl&);
+ void setContent(const QUrl& url, QQmlComponent *component, QObject *item);
Q_SIGNALS:
void statusChanged(QQuickView::Status);
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index f03a2c9a64..4ea31a0d6f 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -1093,14 +1093,6 @@ QQuickItem *QQuickWindow::mouseGrabberItem() const
}
-/*!
- \qmlproperty color QtQuick.Window2::Window::color
-
- The background color for the window.
-
- Setting this property is more efficient than using a separate Rectangle.
-*/
-
bool QQuickWindowPrivate::clearHover()
{
Q_Q(QQuickWindow);
@@ -2004,7 +1996,11 @@ bool QQuickWindowPrivate::isRenderable() const
{
if (geometry.width() <= 0 || geometry.height() <= 0)
return false;
- return visible || (renderWithoutShowing && platformWindow);
+ // Change to be applied after the visibility property is integrated in qtbase:
+// return visibility != QWindow::Hidden || (renderWithoutShowing && platformWindow);
+ // Temporary version which is implementation-agnostic but slightly less efficient:
+ const QQuickWindow *q = q_func();
+ return q->isVisible() || (renderWithoutShowing && platformWindow);
}
/*!
@@ -2474,7 +2470,7 @@ QOpenGLContext *QQuickWindow::openglContext() const
void QQuickWindow::setRenderTarget(QOpenGLFramebufferObject *fbo)
{
Q_D(QQuickWindow);
- if (d->context && d->context && QThread::currentThread() != d->context->thread()) {
+ if (d->context && QThread::currentThread() != d->context->thread()) {
qWarning("QQuickWindow::setRenderThread: Cannot set render target from outside the rendering thread");
return;
}
@@ -2506,7 +2502,7 @@ void QQuickWindow::setRenderTarget(QOpenGLFramebufferObject *fbo)
void QQuickWindow::setRenderTarget(uint fboId, const QSize &size)
{
Q_D(QQuickWindow);
- if (d->context && d->context && QThread::currentThread() != d->context->thread()) {
+ if (d->context && QThread::currentThread() != d->context->thread()) {
qWarning("QQuickWindow::setRenderThread: Cannot set render target from outside the rendering thread");
return;
}
@@ -2759,6 +2755,14 @@ QSGTexture *QQuickWindow::createTextureFromId(uint id, const QSize &size, Create
}
/*!
+ \qmlproperty color QtQuick.Window2::Window::color
+
+ The background color for the window.
+
+ Setting this property is more efficient than using a separate Rectangle.
+*/
+
+/*!
\property QQuickWindow::color
\brief The color used to clear the OpenGL context.
@@ -2776,6 +2780,7 @@ void QQuickWindow::setColor(const QColor &color)
d->clearColor = color;
emit colorChanged(color);
+ d->dirtyItem(contentItem());
}
QColor QQuickWindow::color() const
@@ -2783,7 +2788,26 @@ QColor QQuickWindow::color() const
return d_func()->clearColor;
}
+/*!
+ \qmlproperty string QtQuick.Window2::Window::title
+
+ The window's title in the windowing system.
+ The window title might appear in the title area of the window decorations,
+ depending on the windowing system and the window flags. It might also
+ be used by the windowing system to identify the window in other contexts,
+ such as in the task switcher.
+ */
+
+/*!
+ \qmlproperty string QtQuick.Window2::Window::modality
+
+ The modality of the window.
+
+ A modal window prevents other windows from receiving input events.
+ Possible values are Qt.NonModal (the default), Qt.WindowModal,
+ and Qt.ApplicationModal.
+ */
#include "moc_qquickwindow.cpp"
diff --git a/src/quick/items/qquickwindowmanager.cpp b/src/quick/items/qquickwindowmanager.cpp
index 50887e8e99..5da904ace2 100644
--- a/src/quick/items/qquickwindowmanager.cpp
+++ b/src/quick/items/qquickwindowmanager.cpp
@@ -131,8 +131,11 @@ QQuickWindowManager *QQuickWindowManager::instance()
s_instance = QSGContext::createWindowManager();
bool bufferQueuing = QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::BufferQueueingOpenGL);
- bool fancy = bufferQueuing
- && QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL);
+#ifdef Q_OS_WIN
+ bool fancy = false; // QTBUG-28037
+#else
+ bool fancy = QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL);
+#endif
if (qmlNoThreadedRenderer())
fancy = false;
else if (qmlForceThreadedRenderer())
diff --git a/src/quick/util/qquickapplication.cpp b/src/quick/util/qquickapplication.cpp
index 27ee2f0be1..962fb52d05 100644
--- a/src/quick/util/qquickapplication.cpp
+++ b/src/quick/util/qquickapplication.cpp
@@ -42,6 +42,8 @@
#include "qquickapplication_p.h"
#include <private/qobject_p.h>
+#include <private/qguiapplication_p.h>
+#include <qpa/qplatformintegration.h>
#include <QtGui/QGuiApplication>
#include <QtCore/QDebug>
@@ -91,6 +93,11 @@ Qt::LayoutDirection QQuickApplication::layoutDirection() const
return d->direction;
}
+bool QQuickApplication::supportsMultipleWindows() const
+{
+ return QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::MultipleWindows);
+}
+
bool QQuickApplication::eventFilter(QObject *, QEvent *event)
{
Q_D(QQuickApplication);
diff --git a/src/quick/util/qquickapplication_p.h b/src/quick/util/qquickapplication_p.h
index 5cf31efe5c..5519f22243 100644
--- a/src/quick/util/qquickapplication_p.h
+++ b/src/quick/util/qquickapplication_p.h
@@ -57,12 +57,14 @@ class Q_AUTOTEST_EXPORT QQuickApplication : public QObject
Q_OBJECT
Q_PROPERTY(bool active READ active NOTIFY activeChanged)
Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection NOTIFY layoutDirectionChanged)
+ Q_PROPERTY(bool supportsMultipleWindows READ supportsMultipleWindows CONSTANT)
public:
explicit QQuickApplication(QObject *parent = 0);
virtual ~QQuickApplication();
bool active() const;
Qt::LayoutDirection layoutDirection() const;
+ bool supportsMultipleWindows() const;
Q_SIGNALS:
void activeChanged();
diff --git a/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp b/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp
index b958a27af5..0429643e32 100644
--- a/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp
+++ b/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp
@@ -173,7 +173,7 @@ private slots:
void connect();
void interrupt();
void getVersion();
- void getVersionWhenAttaching();
+// void getVersionWhenAttaching();
void applyV8Flags();
@@ -193,7 +193,7 @@ private slots:
void setBreakpointInScriptWithCondition();
//void setBreakpointInFunction(); //NOT SUPPORTED
void setBreakpointOnEvent();
- void setBreakpointWhenAttaching();
+// void setBreakpointWhenAttaching();
void changeBreakpoint();
void changeBreakpointOnCondition();
@@ -1082,6 +1082,7 @@ void tst_QQmlDebugJS::getVersion()
QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result())));
}
+/* TODO fails because of a race condition when starting up the engine before the view
void tst_QQmlDebugJS::getVersionWhenAttaching()
{
//void version()
@@ -1092,6 +1093,7 @@ void tst_QQmlDebugJS::getVersionWhenAttaching()
client->version();
QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(result())));
}
+*/
void tst_QQmlDebugJS::applyV8Flags()
{
@@ -1330,6 +1332,7 @@ void tst_QQmlDebugJS::setBreakpointInScriptWithCondition()
QVERIFY(body.value("value").toInt() > out);
}
+/* TODO fails because of a race condition when starting up the engine before the view
void tst_QQmlDebugJS::setBreakpointWhenAttaching()
{
int sourceLine = 49;
@@ -1339,6 +1342,7 @@ void tst_QQmlDebugJS::setBreakpointWhenAttaching()
client->setBreakpoint(QLatin1String(SCRIPTREGEXP), QLatin1String(TIMER_QMLFILE), sourceLine);
QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped())));
}
+*/
//void tst_QQmlDebugJS::setBreakpointInFunction()
//{
diff --git a/tests/auto/qml/debugger/qqmlinspector/data/window.qml b/tests/auto/qml/debugger/qqmlinspector/data/window.qml
new file mode 100644
index 0000000000..29eaced121
--- /dev/null
+++ b/tests/auto/qml/debugger/qqmlinspector/data/window.qml
@@ -0,0 +1,7 @@
+import QtQuick 2.0
+import QtQuick.Window 2.0
+
+Window {
+ height: 100
+ width: 100
+}
diff --git a/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
index f1a6c23a3f..5848b42028 100644
--- a/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
+++ b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
@@ -67,6 +67,8 @@ public:
{
}
+private:
+ void startQmlsceneProcess(const char *qmlFile);
private:
QQmlDebugProcess *m_process;
@@ -80,9 +82,10 @@ private slots:
void connect();
void showAppOnTop();
void reloadQml();
+ void reloadQmlWindow();
};
-void tst_QQmlInspector::init()
+void tst_QQmlInspector::startQmlsceneProcess(const char *qmlFile)
{
const QString argument = "-qmljsdebugger=port:" STR_PORT ",block";
@@ -97,6 +100,10 @@ void tst_QQmlInspector::init()
m_connection->connectToHost(QLatin1String("127.0.0.1"), PORT);
}
+void tst_QQmlInspector::init()
+{
+}
+
void tst_QQmlInspector::cleanup()
{
if (QTest::currentTestFailed()) {
@@ -110,11 +117,13 @@ void tst_QQmlInspector::cleanup()
void tst_QQmlInspector::connect()
{
+ startQmlsceneProcess("qtquick2.qml");
QTRY_COMPARE(m_client->state(), QQmlDebugClient::Enabled);
}
void tst_QQmlInspector::showAppOnTop()
{
+ startQmlsceneProcess("qtquick2.qml");
QTRY_COMPARE(m_client->state(), QQmlDebugClient::Enabled);
m_client->setShowAppOnTop(true);
@@ -128,6 +137,7 @@ void tst_QQmlInspector::showAppOnTop()
void tst_QQmlInspector::reloadQml()
{
+ startQmlsceneProcess("qtquick2.qml");
QTRY_COMPARE(m_client->state(), QQmlDebugClient::Enabled);
QByteArray fileContents;
@@ -150,6 +160,32 @@ void tst_QQmlInspector::reloadQml()
QCOMPARE(m_client->m_reloadRequestId, m_client->m_responseId);
}
+void tst_QQmlInspector::reloadQmlWindow()
+{
+ startQmlsceneProcess("window.qml");
+ QTRY_COMPARE(m_client->state(), QQmlDebugClient::Enabled);
+
+ QByteArray fileContents;
+
+ QFile file(testFile("changes.txt"));
+ if (file.open(QFile::ReadOnly))
+ fileContents = file.readAll();
+ file.close();
+
+ QHash<QString, QByteArray> changesHash;
+ changesHash.insert("window.qml", fileContents);
+
+ m_client->reloadQml(changesHash);
+ QVERIFY(QQmlDebugTest::waitForSignal(m_client, SIGNAL(responseReceived())));
+
+ QEXPECT_FAIL("", "cannot debug with a QML file containing a top-level Window", Abort);
+ QTRY_COMPARE(m_process->output().contains(
+ QString("version 2.0")), true);
+
+ QCOMPARE(m_client->m_requestResult, true);
+ QCOMPARE(m_client->m_reloadRequestId, m_client->m_responseId);
+}
+
QTEST_MAIN(tst_QQmlInspector)
#include "tst_qqmlinspector.moc"
diff --git a/tests/auto/qml/debugger/shared/debugutil.cpp b/tests/auto/qml/debugger/shared/debugutil.cpp
index df8042ca11..213888ecee 100644
--- a/tests/auto/qml/debugger/shared/debugutil.cpp
+++ b/tests/auto/qml/debugger/shared/debugutil.cpp
@@ -52,6 +52,8 @@ bool QQmlDebugTest::waitForSignal(QObject *receiver, const char *member, int tim
QObject::connect(receiver, member, &loop, SLOT(quit()));
timer.start(timeout);
loop.exec();
+ if (!timer.isActive())
+ qWarning("waitForSignal %s timed out after %d ms", member, timeout);
return timer.isActive();
}
diff --git a/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp b/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp
index 63dbfecf01..1f8297d2c7 100644
--- a/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp
+++ b/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp
@@ -152,7 +152,7 @@ void tst_qquickanimatedimage::mirror_running()
QQuickView window;
window.setSource(testFileUrl("hearts.qml"));
- window.requestActivateWindow();
+ window.requestActivate();
window.show();
QTest::qWaitForWindowActive(&window);
diff --git a/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp b/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp
index 5ad2b6e30f..3139547312 100644
--- a/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp
+++ b/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp
@@ -93,7 +93,7 @@ void tst_qquickanimatedsprite::test_frameChangedSignal()
window->setSource(testFileUrl("frameChange.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QVERIFY(window->rootObject());
diff --git a/tests/auto/quick/qquickapplication/tst_qquickapplication.cpp b/tests/auto/quick/qquickapplication/tst_qquickapplication.cpp
index 7c07a16d51..6fc68101e5 100644
--- a/tests/auto/quick/qquickapplication/tst_qquickapplication.cpp
+++ b/tests/auto/quick/qquickapplication/tst_qquickapplication.cpp
@@ -89,7 +89,7 @@ void tst_qquickapplication::active()
// active
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(QGuiApplication::focusWindow() == &window);
QVERIFY(item->property("active").toBool());
diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
index 7f5802a94d..703e2918e6 100644
--- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
+++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
@@ -207,7 +207,7 @@ void tst_qquickflickable::rebound()
QQuickView *window = new QQuickView;
window->setSource(testFileUrl("rebound.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickFlickable *flickable = qobject_cast<QQuickFlickable*>(window->rootObject());
@@ -369,7 +369,7 @@ void tst_qquickflickable::nestedPressDelay()
QQuickView *window = new QQuickView;
window->setSource(testFileUrl("nestedPressDelay.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickFlickable *outer = qobject_cast<QQuickFlickable*>(window->rootObject());
@@ -497,7 +497,7 @@ void tst_qquickflickable::wheel()
QQuickView *window = new QQuickView;
window->setSource(testFileUrl("wheel.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickFlickable *flick = window->rootObject()->findChild<QQuickFlickable*>("flick");
@@ -565,7 +565,7 @@ void tst_qquickflickable::movingAndFlicking()
QQuickView *window = new QQuickView;
window->setSource(testFileUrl("flickable03.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QTest::qWaitForWindowActive(window);
QVERIFY(window->rootObject() != 0);
@@ -725,7 +725,7 @@ void tst_qquickflickable::movingAndDragging()
QQuickView *window = new QQuickView;
window->setSource(testFileUrl("flickable03.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowExposed(window));
QVERIFY(window->rootObject() != 0);
@@ -892,7 +892,7 @@ void tst_qquickflickable::flickOnRelease()
QQuickView *window = new QQuickView;
window->setSource(testFileUrl("flickable03.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowExposed(window));
QVERIFY(window->rootObject() != 0);
@@ -929,7 +929,7 @@ void tst_qquickflickable::pressWhileFlicking()
QQuickView *window = new QQuickView;
window->setSource(testFileUrl("flickable03.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowExposed(window));
QVERIFY(window->rootObject() != 0);
@@ -982,7 +982,7 @@ void tst_qquickflickable::disabled()
QQuickView *window = new QQuickView;
window->setSource(testFileUrl("disabled.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickFlickable *flick = window->rootObject()->findChild<QQuickFlickable*>("flickable");
@@ -1012,7 +1012,7 @@ void tst_qquickflickable::flickVelocity()
QQuickView *window = new QQuickView;
window->setSource(testFileUrl("flickable03.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickFlickable *flickable = qobject_cast<QQuickFlickable*>(window->rootObject());
@@ -1115,7 +1115,7 @@ void tst_qquickflickable::cancelOnMouseGrab()
QQuickView *window = new QQuickView;
window->setSource(testFileUrl("cancel.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickFlickable *flickable = qobject_cast<QQuickFlickable*>(window->rootObject());
@@ -1151,7 +1151,7 @@ void tst_qquickflickable::clickAndDragWhenTransformed()
QQuickView *view = new QQuickView;
view->setSource(testFileUrl("transformedFlickable.qml"));
view->show();
- view->requestActivateWindow();
+ view->requestActivate();
QVERIFY(QTest::qWaitForWindowExposed(view));
QVERIFY(view->rootObject() != 0);
diff --git a/tests/auto/quick/qquickfocusscope/tst_qquickfocusscope.cpp b/tests/auto/quick/qquickfocusscope/tst_qquickfocusscope.cpp
index a614bbbe42..3f839b4fc0 100644
--- a/tests/auto/quick/qquickfocusscope/tst_qquickfocusscope.cpp
+++ b/tests/auto/quick/qquickfocusscope/tst_qquickfocusscope.cpp
@@ -86,7 +86,7 @@ void tst_qquickfocusscope::basic()
QVERIFY(item3 != 0);
view->show();
- view->requestActivateWindow();
+ view->requestActivate();
QTest::qWaitForWindowActive(view);
QTRY_VERIFY(view == qGuiApp->focusWindow());
@@ -131,7 +131,7 @@ void tst_qquickfocusscope::nested()
QVERIFY(item5 != 0);
view->show();
- view->requestActivateWindow();
+ view->requestActivate();
QTest::qWaitForWindowActive(view);
QTRY_VERIFY(view == qGuiApp->focusWindow());
@@ -159,7 +159,7 @@ void tst_qquickfocusscope::noFocus()
QVERIFY(item3 != 0);
view->show();
- view->requestActivateWindow();
+ view->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(view));
QVERIFY(view == qGuiApp->focusWindow());
@@ -198,7 +198,7 @@ void tst_qquickfocusscope::textEdit()
QVERIFY(item3 != 0);
view->show();
- view->requestActivateWindow();
+ view->requestActivate();
QTest::qWaitForWindowActive(view);
@@ -252,7 +252,7 @@ void tst_qquickfocusscope::forceFocus()
QVERIFY(item5 != 0);
view->show();
- view->requestActivateWindow();
+ view->requestActivate();
QTest::qWaitForWindowActive(view);
QTRY_VERIFY(view == qGuiApp->focusWindow());
@@ -289,7 +289,7 @@ void tst_qquickfocusscope::noParentFocus()
QVERIFY(view->rootObject());
view->show();
- view->requestActivateWindow();
+ view->requestActivate();
QTest::qWaitForWindowActive(view);
QTRY_VERIFY(view == qGuiApp->focusWindow());
@@ -317,7 +317,7 @@ void tst_qquickfocusscope::signalEmission()
QVERIFY(item4 != 0);
view->show();
- view->requestActivateWindow();
+ view->requestActivate();
QTest::qWaitForWindowActive(view);
QTRY_VERIFY(view == qGuiApp->focusWindow());
@@ -365,7 +365,7 @@ void tst_qquickfocusscope::qtBug13380()
view->show();
QVERIFY(view->rootObject());
- view->requestActivateWindow();
+ view->requestActivate();
qApp->processEvents();
QVERIFY(QTest::qWaitForWindowExposed(view));
@@ -385,7 +385,7 @@ void tst_qquickfocusscope::forceActiveFocus()
view->setSource(testFileUrl("forceActiveFocus.qml"));
view->show();
- view->requestActivateWindow();
+ view->requestActivate();
QVERIFY(QTest::qWaitForWindowExposed(view));
QTRY_VERIFY(view == qGuiApp->focusWindow());
@@ -538,7 +538,7 @@ void tst_qquickfocusscope::canvasFocus()
QCOMPARE(item2->hasActiveFocus(), false);
view->show();
- view->requestActivateWindow();
+ view->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(view));
QVERIFY(view == qGuiApp->focusWindow());
@@ -565,7 +565,7 @@ void tst_qquickfocusscope::canvasFocus()
// view->hide(); // seemingly doesn't remove focus, so have an another view steal it.
alternateView.show();
- alternateView.requestActivateWindow();
+ alternateView.requestActivate();
QVERIFY(QTest::qWaitForWindowActive(&alternateView));
QVERIFY(QGuiApplication::focusWindow() == &alternateView);
@@ -611,7 +611,7 @@ void tst_qquickfocusscope::canvasFocus()
// give the window focus, and item2 will get active focus
view->show();
- view->requestActivateWindow();
+ view->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(view));
QVERIFY(QGuiApplication::focusWindow() == view);
diff --git a/tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp b/tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp
index d822f8e26c..5246b8cc46 100644
--- a/tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp
+++ b/tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp
@@ -229,7 +229,7 @@ void tst_qquickfontloader::changeFontSourceViaState()
{
QQuickView window(testFileUrl("qtbug-20268.qml"));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QVERIFY(QTest::qWaitForWindowActive(&window));
QCOMPARE(&window, qGuiApp->focusWindow());
diff --git a/tests/auto/quick/qquickgridview/qquickgridview.pro b/tests/auto/quick/qquickgridview/qquickgridview.pro
index 0e679387cc..dd69cda49e 100644
--- a/tests/auto/quick/qquickgridview/qquickgridview.pro
+++ b/tests/auto/quick/qquickgridview/qquickgridview.pro
@@ -12,3 +12,5 @@ TESTDATA = data/*
QT += core-private gui-private v8-private qml-private quick-private testlib
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+
+mac:CONFIG+=insignificant_test # QTBUG-27890
diff --git a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
index 72c3f7171a..cdb17b3453 100644
--- a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
+++ b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
@@ -1965,7 +1965,7 @@ void tst_QQuickGridView::keyNavigation()
gridview->setVerticalLayoutDirection(verticalLayoutDirection);
QTRY_COMPARE(QQuickItemPrivate::get(gridview)->polishScheduled, false);
- window->requestActivateWindow();
+ window->requestActivate();
QTest::qWaitForWindowActive(window);
QTRY_VERIFY(qGuiApp->focusWindow() == window);
QCOMPARE(gridview->currentIndex(), 0);
@@ -4035,7 +4035,7 @@ void tst_QQuickGridView::columnCount()
QQuickView window;
window.setSource(testFileUrl("gridview4.qml"));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QVERIFY(QTest::qWaitForWindowActive(&window));
QQuickGridView *view = qobject_cast<QQuickGridView*>(window.rootObject());
diff --git a/tests/auto/quick/qquickimage/tst_qquickimage.cpp b/tests/auto/quick/qquickimage/tst_qquickimage.cpp
index 0e1b192802..38c9bb3d8a 100644
--- a/tests/auto/quick/qquickimage/tst_qquickimage.cpp
+++ b/tests/auto/quick/qquickimage/tst_qquickimage.cpp
@@ -313,7 +313,7 @@ void tst_qquickimage::mirror()
obj->setFillMode(fillMode);
obj->setProperty("mirror", true);
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QImage screenshot = window->grabWindow();
@@ -498,7 +498,7 @@ void tst_qquickimage::tiling_QTBUG_6716()
QQuickView view(testFileUrl(source));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QVERIFY(QTest::qWaitForWindowActive(&view));
QQuickImage *tiling = findItem<QQuickImage>(view.rootObject(), "tiling");
diff --git a/tests/auto/quick/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp
index 1050308afd..0cdf95cd69 100644
--- a/tests/auto/quick/qquickitem/tst_qquickitem.cpp
+++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp
@@ -176,7 +176,7 @@ private:
void ensureFocus(QWindow *w) {
w->show();
- w->requestActivateWindow();
+ w->requestActivate();
QTest::qWaitForWindowActive(w);
}
};
diff --git a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
index 8b445e38b9..e605bb4cbc 100644
--- a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
+++ b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
@@ -286,7 +286,7 @@ void tst_QQuickItem::keys()
window->setSource(testFileUrl("keystest.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QVERIFY(QGuiApplication::focusWindow() == window);
@@ -414,7 +414,7 @@ void tst_QQuickItem::keysProcessingOrder()
window->setSource(testFileUrl("keyspriority.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QVERIFY(QGuiApplication::focusWindow() == window);
@@ -472,7 +472,7 @@ void tst_QQuickItem::keysim()
window->setSource(testFileUrl("keysim.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QVERIFY(QGuiApplication::focusWindow() == window);
@@ -657,7 +657,7 @@ void tst_QQuickItem::keyNavigation()
window->setSource(testFileUrl("keynavigationtest.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QVERIFY(QGuiApplication::focusWindow() == window);
@@ -734,7 +734,7 @@ void tst_QQuickItem::keyNavigation_RightToLeft()
window->setSource(testFileUrl("keynavigationtest.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QVERIFY(QGuiApplication::focusWindow() == window);
@@ -789,7 +789,7 @@ void tst_QQuickItem::keyNavigation_skipNotVisible()
window->setSource(testFileUrl("keynavigationtest.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QVERIFY(QGuiApplication::focusWindow() == window);
@@ -864,7 +864,7 @@ void tst_QQuickItem::keyNavigation_implicitSetting()
window->setSource(testFileUrl("keynavigationtest_implicit.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QVERIFY(QGuiApplication::focusWindow() == window);
@@ -1259,7 +1259,7 @@ void tst_QQuickItem::propertyChanges()
window->setBaseSize(QSize(300, 300));
window->setSource(testFileUrl("propertychanges.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QVERIFY(QGuiApplication::focusWindow() == window);
@@ -1671,7 +1671,7 @@ void tst_QQuickItem::contains()
window->setBaseSize(QSize(400, 400));
window->setSource(testFileUrl("hollowTestItem.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QVERIFY(QGuiApplication::focusWindow() == window);
diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
index 6f4c251a61..3bb4998347 100644
--- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
+++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
@@ -2179,7 +2179,7 @@ void tst_QQuickListView::sectionsDelegate_headerVisibility()
window->rootContext()->setContextProperty("testModel", &model);
window->setSource(testFileUrl("listview-sections_delegate.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QTest::qWaitForWindowActive(window);
QQuickListView *listview = findItem<QQuickListView>(window->rootObject(), "list");
@@ -2669,7 +2669,7 @@ void tst_QQuickListView::keyNavigation()
listview->setVerticalLayoutDirection(verticalLayoutDirection);
QTRY_COMPARE(QQuickItemPrivate::get(listview)->polishScheduled, false);
- window->requestActivateWindow();
+ window->requestActivate();
QTest::qWaitForWindowActive(window);
QTRY_VERIFY(qGuiApp->focusWindow() == window);
diff --git a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
index 12bd6c1e5e..a4e93d5794 100644
--- a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
+++ b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
@@ -129,7 +129,7 @@ void tst_QQuickMouseArea::dragProperties()
window->setSource(testFileUrl("dragproperties.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickMouseArea *mouseRegion = window->rootObject()->findChild<QQuickMouseArea*>("mouseregion");
@@ -215,7 +215,7 @@ void tst_QQuickMouseArea::resetDrag()
window->rootContext()->setContextProperty("haveTarget", QVariant(true));
window->setSource(testFileUrl("dragreset.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickMouseArea *mouseRegion = window->rootObject()->findChild<QQuickMouseArea*>("mouseregion");
@@ -247,7 +247,7 @@ void tst_QQuickMouseArea::dragging()
window->setSource(testFileUrl("dragging.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QTest::qWait(20);
QVERIFY(window->rootObject() != 0);
@@ -302,7 +302,7 @@ void tst_QQuickMouseArea::invalidDrag()
window->setSource(testFileUrl("dragging.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QTest::qWait(20);
QVERIFY(window->rootObject() != 0);
@@ -354,7 +354,7 @@ void tst_QQuickMouseArea::setDragOnPressed()
window->setSource(testFileUrl("setDragOnPressed.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QTest::qWait(20);
QVERIFY(window->rootObject() != 0);
@@ -409,7 +409,7 @@ void tst_QQuickMouseArea::updateMouseAreaPosOnClick()
QQuickView *window = createView();
window->setSource(testFileUrl("updateMousePosOnClick.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickMouseArea *mouseRegion = window->rootObject()->findChild<QQuickMouseArea*>("mouseregion");
@@ -438,7 +438,7 @@ void tst_QQuickMouseArea::updateMouseAreaPosOnResize()
QQuickView *window = createView();
window->setSource(testFileUrl("updateMousePosOnResize.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickMouseArea *mouseRegion = window->rootObject()->findChild<QQuickMouseArea*>("mouseregion");
@@ -475,7 +475,7 @@ void tst_QQuickMouseArea::noOnClickedWithPressAndHold()
QQuickView *window = createView();
window->setSource(testFileUrl("clickandhold.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QMouseEvent pressEvent(QEvent::MouseButtonPress, QPoint(100, 100), Qt::LeftButton, Qt::LeftButton, 0);
@@ -500,7 +500,7 @@ void tst_QQuickMouseArea::noOnClickedWithPressAndHold()
QQuickView *window = createView();
window->setSource(testFileUrl("noclickandhold.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QMouseEvent pressEvent(QEvent::MouseButtonPress, QPoint(100, 100), Qt::LeftButton, Qt::LeftButton, 0);
@@ -524,7 +524,7 @@ void tst_QQuickMouseArea::onMousePressRejected()
QQuickView *window = createView();
window->setSource(testFileUrl("rejectEvent.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QVERIFY(window->rootObject()->property("enabled").toBool());
@@ -561,7 +561,7 @@ void tst_QQuickMouseArea::pressedCanceledOnWindowDeactivate()
QQuickView *window = createView();
window->setSource(testFileUrl("pressedCanceled.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QVERIFY(!window->rootObject()->property("pressed").toBool());
QVERIFY(!window->rootObject()->property("canceled").toBool());
@@ -610,7 +610,7 @@ void tst_QQuickMouseArea::doubleClick()
QQuickView *window = createView();
window->setSource(testFileUrl("doubleclick.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickMouseArea *mouseArea = window->rootObject()->findChild<QQuickMouseArea *>("mousearea");
@@ -648,7 +648,7 @@ void tst_QQuickMouseArea::clickTwice()
QQuickView *window = createView();
window->setSource(testFileUrl("clicktwice.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickMouseArea *mouseArea = window->rootObject()->findChild<QQuickMouseArea *>("mousearea");
@@ -685,7 +685,7 @@ void tst_QQuickMouseArea::invalidClick()
QQuickView *window = createView();
window->setSource(testFileUrl("doubleclick.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickMouseArea *mouseArea = window->rootObject()->findChild<QQuickMouseArea *>("mousearea");
@@ -719,7 +719,7 @@ void tst_QQuickMouseArea::pressedOrdering()
QQuickView *window = createView();
window->setSource(testFileUrl("pressedOrdering.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QCOMPARE(window->rootObject()->property("value").toString(), QLatin1String("base"));
@@ -747,7 +747,7 @@ void tst_QQuickMouseArea::preventStealing()
window->setSource(testFileUrl("preventstealing.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickFlickable *flickable = qobject_cast<QQuickFlickable*>(window->rootObject());
@@ -811,7 +811,7 @@ void tst_QQuickMouseArea::clickThrough()
QQuickView *window = createView();
window->setSource(testFileUrl("clickThrough.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QTest::mousePress(window, Qt::LeftButton, 0, QPoint(100,100));
@@ -846,7 +846,7 @@ void tst_QQuickMouseArea::clickThrough()
window = createView();
window->setSource(testFileUrl("clickThrough2.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QTest::mousePress(window, Qt::LeftButton, 0, QPoint(100,100));
@@ -1005,7 +1005,7 @@ void tst_QQuickMouseArea::disableAfterPress()
QQuickView *window = createView();
window->setSource(testFileUrl("dragging.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QTest::qWait(20);
QVERIFY(window->rootObject() != 0);
@@ -1155,7 +1155,7 @@ void tst_QQuickMouseArea::transformedMouseArea()
QQuickView *window = createView();
window->setSource(testFileUrl("transformedMouseArea.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickMouseArea *mouseArea = window->rootObject()->findChild<QQuickMouseArea *>("mouseArea");
@@ -1273,7 +1273,7 @@ void tst_QQuickMouseArea::pressedMultipleButtons()
QQuickView *view = createView();
view->setSource(testFileUrl("simple.qml"));
view->show();
- view->requestActivateWindow();
+ view->requestActivate();
QVERIFY(view->rootObject() != 0);
QQuickMouseArea *mouseArea = view->rootObject()->findChild<QQuickMouseArea *>("mousearea");
@@ -1313,7 +1313,7 @@ void tst_QQuickMouseArea::changeAxis()
view->setSource(testFileUrl("changeAxis.qml"));
view->show();
- view->requestActivateWindow();
+ view->requestActivate();
QTRY_VERIFY(view->rootObject() != 0);
QQuickMouseArea *mouseRegion = view->rootObject()->findChild<QQuickMouseArea*>("mouseregion");
diff --git a/tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp b/tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp
index 29c0e59fe6..5a39698b6f 100644
--- a/tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp
+++ b/tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp
@@ -851,7 +851,7 @@ QQuickView *tst_QQuickMultiPointTouchArea::createAndShowView(const QString &file
QQuickView *window = new QQuickView(0);
window->setSource(testFileUrl(file));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QTest::qWaitForWindowActive(window);
return window;
diff --git a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
index 9695af6f77..f36849abd9 100644
--- a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
+++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
@@ -1335,7 +1335,7 @@ void tst_QQuickPathView::package()
QVERIFY(window);
window->setSource(testFileUrl("pathview_package.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QQuickPathView *pathView = window->rootObject()->findChild<QQuickPathView*>("photoPathView");
@@ -1452,7 +1452,7 @@ void tst_QQuickPathView::mouseDrag()
QQuickView *window = createView();
window->setSource(testFileUrl("dragpath.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QCOMPARE(window, qGuiApp->focusWindow());
@@ -1547,7 +1547,7 @@ void tst_QQuickPathView::changePreferredHighlight()
window->setGeometry(0,0,400,200);
window->setSource(testFileUrl("dragpath.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QCOMPARE(window, qGuiApp->focusWindow());
@@ -1741,7 +1741,7 @@ void tst_QQuickPathView::cancelDrag()
QQuickView *window = createView();
window->setSource(testFileUrl("dragpath.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QCOMPARE(window, qGuiApp->focusWindow());
@@ -1787,7 +1787,7 @@ void tst_QQuickPathView::maximumFlickVelocity()
QQuickView *window = createView();
window->setSource(testFileUrl("dragpath.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QCOMPARE(window, qGuiApp->focusWindow());
@@ -1873,7 +1873,7 @@ void tst_QQuickPathView::snapOneItem()
QQuickView *window = createView();
window->setSource(testFileUrl("panels.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QCOMPARE(window, qGuiApp->focusWindow());
@@ -1927,7 +1927,7 @@ void tst_QQuickPathView::positionViewAtIndex()
QQuickView *window = createView();
window->setSource(testFileUrl("pathview3.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QCOMPARE(window, qGuiApp->focusWindow());
@@ -1991,7 +1991,7 @@ void tst_QQuickPathView::indexAt_itemAt()
QQuickView *window = createView();
window->setSource(testFileUrl("pathview3.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QCOMPARE(window, qGuiApp->focusWindow());
diff --git a/tests/auto/quick/qquickpincharea/tst_qquickpincharea.cpp b/tests/auto/quick/qquickpincharea/tst_qquickpincharea.cpp
index 29c65e0acb..b3147067b0 100644
--- a/tests/auto/quick/qquickpincharea/tst_qquickpincharea.cpp
+++ b/tests/auto/quick/qquickpincharea/tst_qquickpincharea.cpp
@@ -87,7 +87,7 @@ void tst_QQuickPinchArea::pinchProperties()
QQuickView *window = createView();
window->setSource(testFileUrl("pinchproperties.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickPinchArea *pinchArea = window->rootObject()->findChild<QQuickPinchArea*>("pincharea");
@@ -213,7 +213,7 @@ void tst_QQuickPinchArea::scale()
QQuickView *window = createView();
window->setSource(testFileUrl("pinchproperties.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QVERIFY(window->rootObject() != 0);
qApp->processEvents();
@@ -276,7 +276,7 @@ void tst_QQuickPinchArea::pan()
QQuickView *window = createView();
window->setSource(testFileUrl("pinchproperties.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QVERIFY(window->rootObject() != 0);
qApp->processEvents();
@@ -337,7 +337,7 @@ void tst_QQuickPinchArea::retouch()
QQuickView *window = createView();
window->setSource(testFileUrl("pinchproperties.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QVERIFY(window->rootObject() != 0);
qApp->processEvents();
@@ -451,7 +451,7 @@ void tst_QQuickPinchArea::transformedPinchArea()
QQuickView *view = createView();
view->setSource(testFileUrl("transformedPinchArea.qml"));
view->show();
- view->requestActivateWindow();
+ view->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(view));
QVERIFY(view->rootObject() != 0);
qApp->processEvents();
diff --git a/tests/auto/quick/qquickstates/tst_qquickstates.cpp b/tests/auto/quick/qquickstates/tst_qquickstates.cpp
index ce3906589f..4df6576f75 100644
--- a/tests/auto/quick/qquickstates/tst_qquickstates.cpp
+++ b/tests/auto/quick/qquickstates/tst_qquickstates.cpp
@@ -1009,7 +1009,7 @@ void tst_qquickstates::anchorRewindBug()
view->setSource(testFileUrl("anchorRewindBug.qml"));
view->show();
- view->requestActivateWindow();
+ view->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(view));
diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
index 718a581ed5..c5ffe7d7d7 100644
--- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp
+++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
@@ -856,7 +856,7 @@ void tst_qquicktext::hAlignImplicitWidth()
{
QQuickView view(testFileUrl("hAlignImplicitWidth.qml"));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QVERIFY(QTest::qWaitForWindowActive(&view));
QQuickText *text = view.rootObject()->findChild<QQuickText*>("textItem");
@@ -1309,7 +1309,7 @@ void tst_qquicktext::underline()
{
QQuickView view(testFileUrl("underline.qml"));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QVERIFY(QTest::qWaitForWindowActive(&view));
QQuickText *textObject = view.rootObject()->findChild<QQuickText*>("myText");
QVERIFY(textObject != 0);
@@ -1322,7 +1322,7 @@ void tst_qquicktext::overline()
{
QQuickView view(testFileUrl("overline.qml"));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QVERIFY(QTest::qWaitForWindowActive(&view));
QQuickText *textObject = view.rootObject()->findChild<QQuickText*>("myText");
QVERIFY(textObject != 0);
@@ -1335,7 +1335,7 @@ void tst_qquicktext::strikeout()
{
QQuickView view(testFileUrl("strikeout.qml"));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QVERIFY(QTest::qWaitForWindowActive(&view));
QQuickText *textObject = view.rootObject()->findChild<QQuickText*>("myText");
QVERIFY(textObject != 0);
@@ -1894,7 +1894,7 @@ void tst_qquicktext::embeddedImages()
QQuickView *view = new QQuickView(qmlfile);
view->show();
- view->requestActivateWindow();
+ view->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(view));
QQuickText *textObject = qobject_cast<QQuickText*>(view->rootObject());
@@ -2506,7 +2506,7 @@ void tst_qquicktext::lineLaidOutRelayout()
QQuickView *window = createView(testFile("lineLayoutRelayout.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window));
QQuickText *myText = window->rootObject()->findChild<QQuickText*>("myText");
@@ -3611,7 +3611,7 @@ void tst_qquicktext::htmlLists()
textObject->setText(text);
view->show();
- view->requestActivateWindow();
+ view->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(view));
QCOMPARE(textPrivate->extra->doc->lineCount(), nbLines);
diff --git a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
index a5a5efb2d0..3966fff5ec 100644
--- a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
+++ b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
@@ -730,7 +730,7 @@ void tst_qquicktextedit::hAlign_RightToLeft()
QCOMPARE(textEdit->hAlign(), QQuickTextEdit::AlignLeft);
QVERIFY(textEdit->positionToRectangle(0).x() < window.width()/2);
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(textEdit->hasActiveFocus());
@@ -1124,7 +1124,7 @@ void tst_qquicktextedit::persistentSelection()
{
QQuickView window(testFileUrl("persistentSelection.qml"));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QQuickTextEdit *edit = qobject_cast<QQuickTextEdit *>(window.rootObject());
@@ -1193,7 +1193,7 @@ void tst_qquicktextedit::focusOnPress()
window.resize(100, 50);
textEditObject->setParentItem(window.contentItem());
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QCOMPARE(textEditObject->hasFocus(), false);
@@ -1393,7 +1393,7 @@ void tst_qquicktextedit::keySelection()
{
QQuickView window(testFileUrl("navigation.qml"));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(window.rootObject() != 0);
@@ -1850,7 +1850,7 @@ void tst_qquicktextedit::mouseSelection()
QQuickView window(QUrl::fromLocalFile(qmlfile));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(window.rootObject() != 0);
@@ -1892,7 +1892,7 @@ void tst_qquicktextedit::dragMouseSelection()
QQuickView window(QUrl::fromLocalFile(qmlfile));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(window.rootObject() != 0);
@@ -1945,7 +1945,7 @@ void tst_qquicktextedit::mouseSelectionMode()
QQuickView window(QUrl::fromLocalFile(qmlfile));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(window.rootObject() != 0);
@@ -2046,7 +2046,7 @@ void tst_qquicktextedit::inputMethodHints()
{
QQuickView window(testFileUrl("inputmethodhints.qml"));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QVERIFY(window.rootObject() != 0);
QQuickTextEdit *textEditObject = qobject_cast<QQuickTextEdit *>(window.rootObject());
@@ -2086,7 +2086,7 @@ void tst_qquicktextedit::positionAt()
QQuickView window(testFileUrl("positionAt.qml"));
QVERIFY(window.rootObject() != 0);
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QQuickTextEdit *texteditObject = qobject_cast<QQuickTextEdit *>(window.rootObject());
@@ -2175,7 +2175,7 @@ void tst_qquicktextedit::linkActivated()
QQuickView window(testFileUrl("linkActivated.qml"));
QVERIFY(window.rootObject() != 0);
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QQuickTextEdit *texteditObject = qobject_cast<QQuickTextEdit *>(window.rootObject());
@@ -2220,7 +2220,7 @@ void tst_qquicktextedit::cursorDelegate()
QFETCH(QUrl, source);
QQuickView view(source);
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QQuickTextEdit *textEditObject = view.rootObject()->findChild<QQuickTextEdit*>("textEditObject");
QVERIFY(textEditObject != 0);
// Delegate creation is deferred until focus in or cursor visibility is forced.
@@ -2335,7 +2335,7 @@ void tst_qquicktextedit::remoteCursorDelegate()
view.rootContext()->setContextProperty("contextDelegate", &component);
view.setSource(testFileUrl("cursorTestRemote.qml"));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QQuickTextEdit *textEditObject = view.rootObject()->findChild<QQuickTextEdit*>("textEditObject");
QVERIFY(textEditObject != 0);
@@ -2363,7 +2363,7 @@ void tst_qquicktextedit::cursorVisible()
QQuickView view(testFileUrl("cursorVisible.qml"));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QTest::qWaitForWindowActive(&view);
QCOMPARE(&view, qGuiApp->focusWindow());
@@ -2395,13 +2395,13 @@ void tst_qquicktextedit::cursorVisible()
QWindow alternateView;
alternateView.show();
- alternateView.requestActivateWindow();
+ alternateView.requestActivate();
QTest::qWaitForWindowActive(&alternateView);
QCOMPARE(edit.isCursorVisible(), false);
QCOMPARE(spy.count(), 6);
- view.requestActivateWindow();
+ view.requestActivate();
QTest::qWaitForWindowActive(&view);
QCOMPARE(edit.isCursorVisible(), true);
QCOMPARE(spy.count(), 7);
@@ -2471,7 +2471,7 @@ void tst_qquicktextedit::delegateLoading()
QQuickView view(QUrl(QLatin1String(SERVER_ADDR "/") + qmlfile));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
if (!error.isEmpty()) {
QTest::ignoreMessage(QtWarningMsg, error.toUtf8());
@@ -2508,7 +2508,7 @@ void tst_qquicktextedit::navigation()
{
QQuickView window(testFileUrl("navigation.qml"));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QVERIFY(window.rootObject() != 0);
@@ -2660,7 +2660,7 @@ void tst_qquicktextedit::middleClickPaste()
QQuickView window(testFileUrl("mouseselection_true.qml"));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(window.rootObject() != 0);
@@ -2698,7 +2698,7 @@ void tst_qquicktextedit::readOnly()
{
QQuickView window(testFileUrl("readOnly.qml"));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QVERIFY(window.rootObject() != 0);
@@ -2734,7 +2734,7 @@ void tst_qquicktextedit::textInput()
{
QQuickView view(testFileUrl("inputMethodEvent.qml"));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QTest::qWaitForWindowActive(&view);
QQuickTextEdit *edit = qobject_cast<QQuickTextEdit *>(view.rootObject());
QVERIFY(edit);
@@ -2770,7 +2770,7 @@ void tst_qquicktextedit::inputMethodUpdate()
QQuickView view(testFileUrl("inputMethodEvent.qml"));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QTest::qWaitForWindowActive(&view);
QQuickTextEdit *edit = qobject_cast<QQuickTextEdit *>(view.rootObject());
QVERIFY(edit);
@@ -2860,7 +2860,7 @@ void tst_qquicktextedit::openInputPanel()
QQuickView view(testFileUrl("openInputPanel.qml"));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QTest::qWaitForWindowActive(&view);
QQuickTextEdit *edit = qobject_cast<QQuickTextEdit *>(view.rootObject());
@@ -3199,7 +3199,7 @@ void tst_qquicktextedit::preeditCursorRectangle()
QQuickView view(testFileUrl("inputMethodEvent.qml"));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QTest::qWaitForWindowActive(&view);
QQuickTextEdit *edit = qobject_cast<QQuickTextEdit *>(view.rootObject());
@@ -3282,7 +3282,7 @@ void tst_qquicktextedit::inputMethodComposing()
QQuickView view(testFileUrl("inputContext.qml"));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QTest::qWaitForWindowActive(&view);
QQuickTextEdit *edit = qobject_cast<QQuickTextEdit *>(view.rootObject());
@@ -3397,7 +3397,7 @@ void tst_qquicktextedit::cursorRectangleSize()
QVERIFY(textEdit != 0);
textEdit->setFocus(true);
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QTest::qWaitForWindowActive(window);
QInputMethodQueryEvent event(Qt::ImCursorRectangle);
@@ -4255,7 +4255,7 @@ void tst_qquicktextedit::keySequence()
QQuickWindow window;
textEdit->setParentItem(window.contentItem());
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(textEdit->hasActiveFocus());
@@ -4418,7 +4418,7 @@ void tst_qquicktextedit::undo()
QQuickWindow window;
textEdit->setParentItem(window.contentItem());
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(textEdit->hasActiveFocus());
@@ -4504,7 +4504,7 @@ void tst_qquicktextedit::redo()
QQuickWindow window;
textEdit->setParentItem(window.contentItem());
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(textEdit->hasActiveFocus());
@@ -4728,7 +4728,7 @@ void tst_qquicktextedit::undo_keypressevents()
QQuickWindow window;
textEdit->setParentItem(window.contentItem());
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(textEdit->hasActiveFocus());
@@ -4817,7 +4817,7 @@ void tst_qquicktextedit::emptytags_QTBUG_22058()
QVERIFY(window.rootObject() != 0);
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QQuickTextEdit *input = qobject_cast<QQuickTextEdit *>(qvariant_cast<QObject *>(window.rootObject()->property("inputField")));
QVERIFY(input->hasActiveFocus());
diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
index 249755b813..49e72e40fd 100644
--- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
+++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
@@ -741,7 +741,7 @@ void tst_qquicktextinput::persistentSelection()
{
QQuickView window(testFileUrl("persistentSelection.qml"));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QQuickTextInput *input = qobject_cast<QQuickTextInput *>(window.rootObject());
@@ -1253,7 +1253,7 @@ void tst_qquicktextinput::dragMouseSelection()
QQuickView window(QUrl::fromLocalFile(qmlfile));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(window.rootObject() != 0);
@@ -1316,7 +1316,7 @@ void tst_qquicktextinput::mouseSelectionMode()
QQuickView window(QUrl::fromLocalFile(qmlfile));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(window.rootObject() != 0);
@@ -1497,7 +1497,7 @@ void tst_qquicktextinput::horizontalAlignment_RightToLeft()
QCOMPARE(textInput->hAlign(), QQuickTextInput::AlignLeft);
QCOMPARE(textInput->boundingRect().left(), qreal(0));
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(textInput->hasActiveFocus());
@@ -1760,7 +1760,7 @@ void tst_qquicktextinput::positionAt()
QQuickView window(testFileUrl("positionAt.qml"));
QVERIFY(window.rootObject() != 0);
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QQuickTextInput *textinputObject = qobject_cast<QQuickTextInput *>(window.rootObject());
@@ -1850,7 +1850,7 @@ void tst_qquicktextinput::maxLength()
QQuickView window(testFileUrl("maxLength.qml"));
QVERIFY(window.rootObject() != 0);
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QQuickTextInput *textinputObject = qobject_cast<QQuickTextInput *>(window.rootObject());
@@ -1880,7 +1880,7 @@ void tst_qquicktextinput::masks()
//QString componentStr = "import QtQuick 2.0\nTextInput { inputMask: 'HHHHhhhh'; }";
QQuickView window(testFileUrl("masks.qml"));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QVERIFY(window.rootObject() != 0);
QQuickTextInput *textinputObject = qobject_cast<QQuickTextInput *>(window.rootObject());
QVERIFY(textinputObject != 0);
@@ -1911,7 +1911,7 @@ void tst_qquicktextinput::validators()
QQuickView window(testFileUrl("validators.qml"));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(window.rootObject() != 0);
@@ -2238,7 +2238,7 @@ void tst_qquicktextinput::inputMethods()
{
QQuickView window(testFileUrl("inputmethods.qml"));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
// test input method hints
@@ -2310,7 +2310,7 @@ void tst_qquicktextinput::navigation()
{
QQuickView window(testFileUrl("navigation.qml"));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QVERIFY(window.rootObject() != 0);
@@ -2359,7 +2359,7 @@ void tst_qquicktextinput::navigation_RTL()
{
QQuickView window(testFileUrl("navigation.qml"));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QVERIFY(window.rootObject() != 0);
@@ -2505,7 +2505,7 @@ void tst_qquicktextinput::copyAndPasteKeySequence()
QQuickWindow window;
textInput->setParentItem(window.contentItem());
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
// copy and paste
@@ -2599,7 +2599,7 @@ void tst_qquicktextinput::middleClickPaste()
QQuickView window(testFileUrl("mouseselection_true.qml"));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(window.rootObject() != 0);
@@ -2664,7 +2664,7 @@ void tst_qquicktextinput::cursorDelegate()
QFETCH(QUrl, source);
QQuickView view(source);
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QQuickTextInput *textInputObject = view.rootObject()->findChild<QQuickTextInput*>("textInputObject");
QVERIFY(textInputObject != 0);
// Delegate is created on demand, and so won't be available immediately. Focus in or
@@ -2783,7 +2783,7 @@ void tst_qquicktextinput::remoteCursorDelegate()
view.rootContext()->setContextProperty("contextDelegate", &component);
view.setSource(testFileUrl("cursorTestRemote.qml"));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QQuickTextInput *textInputObject = view.rootObject()->findChild<QQuickTextInput*>("textInputObject");
QVERIFY(textInputObject != 0);
@@ -2811,7 +2811,7 @@ void tst_qquicktextinput::cursorVisible()
QQuickView view(testFileUrl("cursorVisible.qml"));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QTest::qWaitForWindowActive(&view);
QCOMPARE(input.isCursorVisible(), false);
@@ -2842,13 +2842,13 @@ void tst_qquicktextinput::cursorVisible()
QQuickView alternateView;
alternateView.show();
- alternateView.requestActivateWindow();
+ alternateView.requestActivate();
QTest::qWaitForWindowActive(&alternateView);
QCOMPARE(input.isCursorVisible(), false);
QCOMPARE(spy.count(), 6);
- view.requestActivateWindow();
+ view.requestActivate();
QTest::qWaitForWindowActive(&view);
QCOMPARE(input.isCursorVisible(), true);
QCOMPARE(spy.count(), 7);
@@ -3093,7 +3093,7 @@ void tst_qquicktextinput::readOnly()
{
QQuickView window(testFileUrl("readOnly.qml"));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QVERIFY(window.rootObject() != 0);
@@ -3120,7 +3120,7 @@ void tst_qquicktextinput::echoMode()
{
QQuickView window(testFileUrl("echoMode.qml"));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(window.rootObject() != 0);
@@ -3194,7 +3194,7 @@ void tst_qquicktextinput::passwordEchoDelay()
QSKIP("No mask delay in use");
QQuickView window(testFileUrl("echoMode.qml"));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(window.rootObject() != 0);
@@ -3300,7 +3300,7 @@ void tst_qquicktextinput::focusOnPress()
window.resize(100, 50);
textInputObject->setParentItem(window.contentItem());
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QCOMPARE(textInputObject->hasFocus(), false);
@@ -3363,7 +3363,7 @@ void tst_qquicktextinput::openInputPanel()
QQuickView view(testFileUrl("openInputPanel.qml"));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QTest::qWaitForWindowActive(&view);
QQuickTextInput *input = qobject_cast<QQuickTextInput *>(view.rootObject());
@@ -3452,7 +3452,7 @@ void tst_qquicktextinput::setHAlignClearCache()
input.setText("Hello world");
input.setParentItem(view.contentItem());
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QTest::qWaitForWindowActive(&view);
#ifdef Q_OS_MAC
QEXPECT_FAIL("", "QTBUG-23485", Abort);
@@ -3475,7 +3475,7 @@ void tst_qquicktextinput::focusOutClearSelection()
input.componentComplete();
input2.componentComplete();
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QTest::qWaitForWindowActive(&view);
QVERIFY(input.hasActiveFocus());
input.select(2,5);
@@ -3545,7 +3545,7 @@ void tst_qquicktextinput::preeditAutoScroll()
QQuickView view(testFileUrl("preeditAutoScroll.qml"));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QTest::qWaitForWindowActive(&view);
QQuickTextInput *input = qobject_cast<QQuickTextInput *>(view.rootObject());
QVERIFY(input);
@@ -3631,7 +3631,7 @@ void tst_qquicktextinput::preeditCursorRectangle()
QQuickView view(testFileUrl("inputMethodEvent.qml"));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QTest::qWaitForWindowActive(&view);
QQuickTextInput *input = qobject_cast<QQuickTextInput *>(view.rootObject());
QVERIFY(input);
@@ -3714,7 +3714,7 @@ void tst_qquicktextinput::inputContextMouseHandler()
input->setText("");
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QTest::qWaitForWindowActive(&view);
QTextLayout layout(text);
@@ -3750,7 +3750,7 @@ void tst_qquicktextinput::inputMethodComposing()
QQuickView view(testFileUrl("inputContext.qml"));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QTest::qWaitForWindowActive(&view);
QQuickTextInput *input = qobject_cast<QQuickTextInput *>(view.rootObject());
QVERIFY(input);
@@ -3856,7 +3856,7 @@ void tst_qquicktextinput::inputMethodUpdate()
QQuickView view(testFileUrl("inputContext.qml"));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QTest::qWaitForWindowActive(&view);
QQuickTextInput *input = qobject_cast<QQuickTextInput *>(view.rootObject());
QVERIFY(input);
@@ -3946,7 +3946,7 @@ void tst_qquicktextinput::cursorRectangleSize()
QVERIFY(textInput != 0);
textInput->setFocus(true);
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QTest::qWaitForWindowActive(window);
QVERIFY(textInput->hasActiveFocus());
@@ -3978,7 +3978,7 @@ void tst_qquicktextinput::tripleClickSelectsAll()
QString qmlfile = testFile("positionAt.qml");
QQuickView view(QUrl::fromLocalFile(qmlfile));
view.show();
- view.requestActivateWindow();
+ view.requestActivate();
QTest::qWaitForWindowActive(&view);
QQuickTextInput* input = qobject_cast<QQuickTextInput*>(view.rootObject());
@@ -4970,7 +4970,7 @@ void tst_qquicktextinput::keySequence()
QQuickWindow window;
textInput->setParentItem(window.contentItem());
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(textInput->hasActiveFocus());
@@ -5131,7 +5131,7 @@ void tst_qquicktextinput::undo()
QQuickWindow window;
textInput->setParentItem(window.contentItem());
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(textInput->hasActiveFocus());
@@ -5217,7 +5217,7 @@ void tst_qquicktextinput::redo()
QQuickWindow window;
textInput->setParentItem(window.contentItem());
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(textInput->hasActiveFocus());
@@ -5549,7 +5549,7 @@ void tst_qquicktextinput::undo_keypressevents()
QQuickWindow window;
textInput->setParentItem(window.contentItem());
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(textInput->hasActiveFocus());
@@ -5579,7 +5579,7 @@ void tst_qquicktextinput::backspaceSurrogatePairs()
QQuickWindow window;
textInput->setParentItem(window.contentItem());
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QVERIFY(QTest::qWaitForWindowActive(&window));
QCOMPARE(QGuiApplication::focusWindow(), &window);
@@ -5605,7 +5605,7 @@ void tst_qquicktextinput::QTBUG_19956()
QQuickView window(testFileUrl(url));
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(window.rootObject() != 0);
QQuickTextInput *input = qobject_cast<QQuickTextInput*>(window.rootObject());
@@ -5644,7 +5644,7 @@ void tst_qquicktextinput::QTBUG_19956_regexp()
QQuickView window(url);
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(window.rootObject() != 0);
QQuickTextInput *input = qobject_cast<QQuickTextInput*>(window.rootObject());
@@ -5956,7 +5956,7 @@ void tst_qquicktextinput::setInputMask()
QQuickWindow window;
textInput->setParentItem(window.contentItem());
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(textInput->hasActiveFocus());
@@ -6086,7 +6086,7 @@ void tst_qquicktextinput::keypress_inputMask()
QQuickWindow window;
textInput->setParentItem(window.contentItem());
window.show();
- window.requestActivateWindow();
+ window.requestActivate();
QTest::qWaitForWindowActive(&window);
QVERIFY(textInput->hasActiveFocus());
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
index c108ac4562..5cede36f7f 100644
--- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
+++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
@@ -339,7 +339,7 @@ void tst_qquickwindow::touchEvent_basic()
QScopedPointer<QQuickWindow> cleanup(window);
window->resize(250, 250);
- window->setPos(100, 100);
+ window->setPosition(100, 100);
window->show();
QVERIFY(QTest::qWaitForWindowExposed(window));
@@ -367,7 +367,7 @@ void tst_qquickwindow::touchEvent_basic()
QVERIFY(middleItem->lastEvent.touchPoints.isEmpty());
QVERIFY(bottomItem->lastEvent.touchPoints.isEmpty());
- // At one point this was failing with kwin (KDE window manager) because window->setPos(100, 100)
+ // At one point this was failing with kwin (KDE window manager) because window->setPosition(100, 100)
// would put the decorated window at that position rather than the window itself.
COMPARE_TOUCH_DATA(topItem->lastEvent, makeTouchData(QEvent::TouchBegin, window, Qt::TouchPointPressed, makeTouchPoint(topItem, pos)));
topItem->reset();
@@ -468,7 +468,7 @@ void tst_qquickwindow::touchEvent_propagation()
QScopedPointer<QQuickWindow> cleanup(window);
window->resize(250, 250);
- window->setPos(100, 100);
+ window->setPosition(100, 100);
window->show();
QVERIFY(QTest::qWaitForWindowExposed(window));
@@ -601,7 +601,7 @@ void tst_qquickwindow::touchEvent_cancel()
QScopedPointer<QQuickWindow> cleanup(window);
window->resize(250, 250);
- window->setPos(100, 100);
+ window->setPosition(100, 100);
window->show();
QVERIFY(QTest::qWaitForWindowExposed(window));
@@ -634,7 +634,7 @@ void tst_qquickwindow::touchEvent_reentrant()
QScopedPointer<QQuickWindow> cleanup(window);
window->resize(250, 250);
- window->setPos(100, 100);
+ window->setPosition(100, 100);
window->show();
QVERIFY(QTest::qWaitForWindowExposed(window));
@@ -671,7 +671,7 @@ void tst_qquickwindow::touchEvent_velocity()
QQuickWindow *window = new QQuickWindow;
QScopedPointer<QQuickWindow> cleanup(window);
window->resize(250, 250);
- window->setPos(100, 100);
+ window->setPosition(100, 100);
window->show();
QVERIFY(QTest::qWaitForWindowExposed(window));
QTest::qWait(10);
@@ -727,7 +727,7 @@ void tst_qquickwindow::mouseFromTouch_basic()
QQuickWindow *window = new QQuickWindow;
QScopedPointer<QQuickWindow> cleanup(window);
window->resize(250, 250);
- window->setPos(100, 100);
+ window->setPosition(100, 100);
window->show();
QVERIFY(QTest::qWaitForWindowExposed(window));
QTest::qWait(10);
@@ -806,7 +806,7 @@ void tst_qquickwindow::mouseFiltering()
QQuickWindow *window = new QQuickWindow;
QScopedPointer<QQuickWindow> cleanup(window);
window->resize(250, 250);
- window->setPos(100, 100);
+ window->setPosition(100, 100);
window->show();
QVERIFY(QTest::qWaitForWindowExposed(window));
@@ -862,7 +862,7 @@ void tst_qquickwindow::clearColor()
QQuickWindow *window = new QQuickWindow;
QScopedPointer<QQuickWindow> cleanup(window);
window->resize(250, 250);
- window->setPos(100, 100);
+ window->setPosition(100, 100);
window->setColor(Qt::blue);
window->show();
QVERIFY(QTest::qWaitForWindowExposed(window));
@@ -894,7 +894,7 @@ void tst_qquickwindow::multipleWindows()
QQuickWindow *c = new QQuickWindow();
c->setColor(Qt::GlobalColor(Qt::red + i));
c->resize(300, 200);
- c->setPos(100 + i * 30, 100 + i * 20);
+ c->setPosition(100 + i * 30, 100 + i * 20);
c->show();
windows << c;
cleanup[i].reset(c);
@@ -904,7 +904,7 @@ void tst_qquickwindow::multipleWindows()
// move them
for (int i=0; i<windows.size(); ++i) {
QQuickWindow *c = windows.at(i);
- c->setPos(100 + i * 30, 100 + i * 20 + 100);
+ c->setPosition(100 + i * 30, 100 + i * 20 + 100);
}
// resize them
diff --git a/tests/auto/quick/touchmouse/touchmouse.pro b/tests/auto/quick/touchmouse/touchmouse.pro
index 7000600ae2..bba0abdc17 100644
--- a/tests/auto/quick/touchmouse/touchmouse.pro
+++ b/tests/auto/quick/touchmouse/touchmouse.pro
@@ -16,3 +16,5 @@ TESTDATA = data/*
CONFIG += parallel_test
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+
+mac:CONFIG+=insignificant_test # QTBUG-27890
diff --git a/tests/auto/quick/touchmouse/tst_touchmouse.cpp b/tests/auto/quick/touchmouse/tst_touchmouse.cpp
index 3293890557..4a681e270e 100644
--- a/tests/auto/quick/touchmouse/tst_touchmouse.cpp
+++ b/tests/auto/quick/touchmouse/tst_touchmouse.cpp
@@ -193,7 +193,7 @@ void tst_TouchMouse::simpleTouchEvent()
window->setSource(testFileUrl("singleitem.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(QTest::qWaitForWindowExposed(window));
QVERIFY(window->rootObject() != 0);
@@ -308,7 +308,7 @@ void tst_TouchMouse::eventFilter()
// window->setSource(testFileUrl("singleitem.qml"));
// window->show();
-// window->requestActivateWindow();
+// window->requestActivate();
// QVERIFY(window->rootObject() != 0);
// EventItem *eventItem1 = window->rootObject()->findChild<EventItem*>("eventItem1");
@@ -342,7 +342,7 @@ void tst_TouchMouse::mouse()
window->setSource(testFileUrl("twoitems.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
EventItem *eventItem1 = window->rootObject()->findChild<EventItem*>("eventItem1");
@@ -374,7 +374,7 @@ void tst_TouchMouse::touchOverMouse()
window->setSource(testFileUrl("twoitems.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
EventItem *eventItem1 = window->rootObject()->findChild<EventItem*>("eventItem1");
@@ -415,7 +415,7 @@ void tst_TouchMouse::mouseOverTouch()
window->setSource(testFileUrl("twoitems.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
EventItem *eventItem1 = window->rootObject()->findChild<EventItem*>("eventItem1");
@@ -459,7 +459,7 @@ void tst_TouchMouse::buttonOnFlickable()
window->setSource(testFileUrl("buttononflickable.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickFlickable *flickable = window->rootObject()->findChild<QQuickFlickable*>("flickable");
@@ -567,7 +567,7 @@ void tst_TouchMouse::buttonOnTouch()
QQuickView *window = createView();
window->setSource(testFileUrl("buttonontouch.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickPinchArea *pinchArea = window->rootObject()->findChild<QQuickPinchArea*>("pincharea");
@@ -689,7 +689,7 @@ void tst_TouchMouse::pinchOnFlickable()
QQuickView *window = createView();
window->setSource(testFileUrl("pinchonflickable.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickPinchArea *pinchArea = window->rootObject()->findChild<QQuickPinchArea*>("pincharea");
@@ -756,7 +756,7 @@ void tst_TouchMouse::flickableOnPinch()
QQuickView *window = createView();
window->setSource(testFileUrl("flickableonpinch.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickPinchArea *pinchArea = window->rootObject()->findChild<QQuickPinchArea*>("pincharea");
@@ -822,7 +822,7 @@ void tst_TouchMouse::mouseOnFlickableOnPinch()
QQuickView *window = createView();
window->setSource(testFileUrl("mouseonflickableonpinch.qml"));
window->show();
- window->requestActivateWindow();
+ window->requestActivate();
QVERIFY(window->rootObject() != 0);
QQuickPinchArea *pinchArea = window->rootObject()->findChild<QQuickPinchArea*>("pincharea");
diff --git a/tools/easingcurveeditor/mainwindow.cpp b/tools/easingcurveeditor/mainwindow.cpp
index c0e04e645a..7f7b2d96af 100644
--- a/tools/easingcurveeditor/mainwindow.cpp
+++ b/tools/easingcurveeditor/mainwindow.cpp
@@ -105,7 +105,7 @@ MainWindow::MainWindow(QWidget *parent) :
void MainWindow::showQuickView()
{
const int margin = 16;
- quickView.setPos(pos() + QPoint(0, frameGeometry().height() + margin));
+ quickView.setPosition(pos() + QPoint(0, frameGeometry().height() + margin));
quickView.raise();
quickView.show();
@@ -130,7 +130,7 @@ void MainWindow::resizeEvent(QResizeEvent *event)
void MainWindow::initQml()
{
- quickView.setWindowFlags(Qt::FramelessWindowHint);
+ quickView.setFlags(Qt::FramelessWindowHint);
quickView.rootContext()->setContextProperty(QLatin1String("editor"), m_splineEditor);
quickView.setSource(QUrl("qrc:/preview.qml"));
quickView.show();
diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp
index 6aced0ba10..d41ade4a98 100644
--- a/tools/qmlscene/main.cpp
+++ b/tools/qmlscene/main.cpp
@@ -442,59 +442,88 @@ int main(int argc, char ** argv)
displayFileDialog(&options);
#endif
- QQmlEngine *engine = 0;
-
int exitCode = 0;
if (!options.file.isEmpty()) {
if (!options.versionDetection || checkVersion(options.file)) {
QTranslator translator;
- QQuickView qxView;
- engine = qxView.engine();
+
+ // TODO: as soon as the engine construction completes, the debug service is
+ // listening for connections. But actually we aren't ready to debug anything.
+ QQmlEngine engine;
+ QQmlComponent *component = new QQmlComponent(&engine);
for (int i = 0; i < imports.size(); ++i)
- engine->addImportPath(imports.at(i));
+ engine.addImportPath(imports.at(i));
for (int i = 0; i < bundles.size(); ++i)
- engine->addNamedBundle(bundles.at(i).first, bundles.at(i).second);
+ engine.addNamedBundle(bundles.at(i).first, bundles.at(i).second);
if (options.file.isLocalFile()) {
QFileInfo fi(options.file.toLocalFile());
loadTranslationFile(translator, fi.path());
- loadDummyDataFiles(*engine, fi.path());
+ loadDummyDataFiles(engine, fi.path());
}
- qxView.setSource(options.file);
-
- QObject::connect(engine, SIGNAL(quit()), QCoreApplication::instance(), SLOT(quit()));
-
- if (options.resizeViewToRootItem)
- qxView.setResizeMode(QQuickView::SizeViewToRootObject);
- else
- qxView.setResizeMode(QQuickView::SizeRootObjectToView);
-
- if (options.transparent) {
- QSurfaceFormat surfaceFormat;
- surfaceFormat.setAlphaBufferSize(8);
- qxView.setFormat(surfaceFormat);
- qxView.setClearBeforeRendering(true);
- qxView.setColor(QColor(Qt::transparent));
- qxView.setWindowFlags(Qt::FramelessWindowHint);
+ QObject::connect(&engine, SIGNAL(quit()), QCoreApplication::instance(), SLOT(quit()));
+ component->loadUrl(options.file);
+ if ( !component->isReady() ) {
+ qFatal(qPrintable(component->errorString()));
+ return -1;
}
- qxView.setWindowFlags(Qt::Window | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint);
+ QObject *topLevel = component->create();
+ QQuickWindow *window = qobject_cast<QQuickWindow *>(topLevel);
+ QQuickView* qxView = 0;
+ if (!window) {
+ QQuickItem *contentItem = qobject_cast<QQuickItem *>(topLevel);
+ if (contentItem) {
+ qxView = new QQuickView(&engine, NULL);
+ window = qxView;
+ // Set window default properties; the qml can still override them
+ QString oname = contentItem->objectName();
+ window->setTitle(oname.isEmpty() ? QString::fromLatin1("qmlscene") : QString::fromLatin1("qmlscene: ") + oname);
+ window->setFlags(Qt::Window | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint);
+ if (options.resizeViewToRootItem)
+ qxView->setResizeMode(QQuickView::SizeViewToRootObject);
+ else
+ qxView->setResizeMode(QQuickView::SizeRootObjectToView);
+ qxView->setContent(options.file, component, contentItem);
+ }
+ }
- if (options.fullscreen)
- qxView.showFullScreen();
- else if (options.maximized)
- qxView.showMaximized();
- else
- qxView.show();
+ if (window) {
+ if (options.transparent) {
+ QSurfaceFormat surfaceFormat;
+ surfaceFormat.setAlphaBufferSize(8);
+ window->setFormat(surfaceFormat);
+ window->setClearBeforeRendering(true);
+ window->setColor(QColor(Qt::transparent));
+ window->setWindowFlags(Qt::FramelessWindowHint);
+ }
+
+ if (options.fullscreen)
+ window->showFullScreen();
+ else if (options.maximized)
+ window->showMaximized();
+ else
+ window->show();
+ }
if (options.quitImmediately)
QMetaObject::invokeMethod(QCoreApplication::instance(), "quit", Qt::QueuedConnection);
+ // Now would be a good time to inform the debug service to start listening.
+
exitCode = app.exec();
#ifdef QML_RUNTIME_TESTING
RenderStatistics::printTotalStats();
#endif
+ // Ready to exit. If we created qxView, it owns the component;
+ // otherwise, the ownership is still right here. Nobody deletes the engine
+ // (which is odd since the container constructor takes the engine pointer),
+ // but it's stack-allocated anyway.
+ if (qxView)
+ delete qxView;
+ else
+ delete component;
}
}