Merge branch 'newdocs'
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Tue, 20 Nov 2012 09:17:47 +0000 (10:17 +0100)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Tue, 20 Nov 2012 09:19:32 +0000 (10:19 +0100)
Change-Id: Idd7a9837e4f6a1358edf9accdcdc3c71822f4c25

114 files changed:
examples/demos/calqlatr/calqlatr.pro
examples/demos/maroon/maroon.pro
examples/demos/samegame/samegame.pro
examples/demos/stocqt/content/StockModel.qml
examples/demos/stocqt/stocqt.pro
examples/demos/tweetsearch/tweetsearch.pro
examples/localstorage/localstorage/localstorage.pro
examples/particles/affectors/affectors.pro
examples/particles/customparticle/customparticle.pro
examples/particles/emitters/emitters.pro
examples/particles/imageparticle/imageparticle.pro
examples/particles/particles.pro
examples/particles/system/system.pro
examples/qml/imageprovider/imageprovider.pro
examples/qml/plugins/plugins.pro
examples/qml/referenceexamples/adding/adding.pro
examples/qml/referenceexamples/attached/attached.pro
examples/qml/referenceexamples/binding/binding.pro
examples/qml/referenceexamples/coercion/coercion.pro
examples/qml/referenceexamples/default/default.pro
examples/qml/referenceexamples/extended/extended.pro
examples/qml/referenceexamples/grouped/grouped.pro
examples/qml/referenceexamples/methods/methods.pro
examples/qml/referenceexamples/properties/properties.pro
examples/qml/referenceexamples/signal/signal.pro
examples/qml/referenceexamples/valuesource/valuesource.pro
examples/qml/xmlhttprequest/xmlhttprequest.pro
examples/qmltest/qmltest/qmltest.pro
examples/quick/accessibility/accessibility.pro
examples/quick/animation/animation.pro
examples/quick/canvas/canvas.pro
examples/quick/customitems/maskedmousearea/maskedmousearea.pro
examples/quick/customitems/painteditem/painteditem.pro
examples/quick/draganddrop/draganddrop.pro
examples/quick/imageelements/imageelements.pro
examples/quick/keyinteraction/keyinteraction.pro
examples/quick/modelviews/modelviews.pro
examples/quick/mousearea/mousearea.pro
examples/quick/positioners/positioners.pro
examples/quick/righttoleft/righttoleft.pro
examples/quick/shadereffects/shadereffects.pro
examples/quick/text/text.pro
examples/quick/threading/threading.pro
examples/quick/touchinteraction/touchinteraction.pro
examples/shared/shared.h
examples/shared/shared.pro
examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h
examples/tutorials/gettingStartedQml/filedialog/directory.cpp
examples/tutorials/gettingStartedQml/filedialog/directory.h
examples/tutorials/gettingStartedQml/filedialog/file.cpp
examples/tutorials/gettingStartedQml/filedialog/file.h
examples/window/window/Window.qml
examples/window/window/nogui.qml [new file with mode: 0644]
examples/window/window/standalone.qml
examples/window/window/twowindows.qml [new file with mode: 0644]
src/particles/qquickcustomparticle.cpp
src/particles/qquickimageparticle.cpp
src/plugins/accessible/quick/qaccessiblequickitem.cpp
src/plugins/accessible/quick/qaccessiblequickitem.h
src/plugins/accessible/quick/qaccessiblequickview.cpp
src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp
src/qml/doc/src/modules/identifiedmodules.qdoc
src/qml/doc/src/syntax/imports.qdoc
src/qml/qml/qqmlcomponent.cpp
src/qml/qml/qqmlengine.cpp
src/qml/qml/qqmlimport.cpp
src/qml/qml/qqmlmetatype.cpp
src/qml/qml/qqmlpropertycache.cpp
src/qml/qml/qqmlpropertycache_p.h
src/qml/qml/v8/qv8engine_p.h
src/qmltest/quicktest.cpp
src/quick/doc/src/appdevguide/porting.qdoc
src/quick/doc/src/appdevguide/qtquicktest.qdoc
src/quick/items/qquickflickable.cpp
src/quick/items/qquickflickable_p_p.h
src/quick/items/qquickitem.h
src/quick/items/qquicktextinput.cpp
src/quick/items/qquickthreadedwindowmanager.cpp
src/quick/items/qquickthreadedwindowmanager_p.h
src/quick/items/qquickview.cpp
src/quick/items/qquickview.h
src/quick/items/qquickwindow.cpp
src/quick/items/qquickwindowmanager.cpp
src/quick/util/qquickapplication.cpp
src/quick/util/qquickapplication_p.h
tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp
tests/auto/qml/debugger/qqmlinspector/data/window.qml [new file with mode: 0644]
tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
tests/auto/qml/debugger/shared/debugutil.cpp
tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp
tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp
tests/auto/quick/qquickapplication/tst_qquickapplication.cpp
tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
tests/auto/quick/qquickfocusscope/tst_qquickfocusscope.cpp
tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp
tests/auto/quick/qquickgridview/qquickgridview.pro
tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
tests/auto/quick/qquickimage/tst_qquickimage.cpp
tests/auto/quick/qquickitem/tst_qquickitem.cpp
tests/auto/quick/qquickitem2/tst_qquickitem.cpp
tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp
tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
tests/auto/quick/qquickpincharea/tst_qquickpincharea.cpp
tests/auto/quick/qquickstates/tst_qquickstates.cpp
tests/auto/quick/qquicktext/tst_qquicktext.cpp
tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
tests/auto/quick/touchmouse/touchmouse.pro
tests/auto/quick/touchmouse/tst_touchmouse.cpp
tools/easingcurveeditor/mainwindow.cpp
tools/qmlscene/main.cpp

index 0aa39f9..024d6ef 100644 (file)
@@ -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
index 32d1e43..cbe0c8e 100644 (file)
@@ -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
index e9b9f4b..4aa3a33 100644 (file)
@@ -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
index ee58e04..b5a7854 100644 (file)
@@ -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;
index 74d2755..aa2f1cf 100644 (file)
@@ -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
index 12a09df..691bd6d 100644 (file)
@@ -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
index 311dc4a..4cce7ed 100644 (file)
@@ -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
index 52eb0dd..9f91ae1 100644 (file)
@@ -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
 
index d26778f..1f087d4 100644 (file)
@@ -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
 
index 7147d71..890726e 100644 (file)
@@ -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
 
index 8d5b06c..2898bec 100644 (file)
@@ -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
 
index 385da36..a4edaa9 100644 (file)
@@ -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
index 613abfa..9623bb5 100644 (file)
@@ -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
 
index e85bad9..09bbef4 100644 (file)
@@ -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
 
index 2c748f7..66af7d3 100644 (file)
@@ -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
 
index 706322e..a1aec4d 100644 (file)
@@ -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
index f4385e1..20956f9 100644 (file)
@@ -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
index 0379f93..2cd619a 100644 (file)
@@ -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
index 60e8532..ff3e264 100644 (file)
@@ -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
index 36ef39f..130e45b 100644 (file)
@@ -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
index 206ea19..73f755a 100644 (file)
@@ -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
index d32a98f..fa49f1c 100644 (file)
@@ -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
index f4c63bf..459ef08 100644 (file)
@@ -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
index e079b1f..678cfb9 100644 (file)
@@ -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
index d426e39..b0f37eb 100644 (file)
@@ -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
index afc1784..3a5d26b 100644 (file)
@@ -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
index e58ada7..bb7fae6 100644 (file)
@@ -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
index 40d964c..033a90b 100644 (file)
@@ -2,3 +2,6 @@ TEMPLATE=app
 TARGET=tst_qmltestexample
 CONFIG += qmltestcase
 SOURCES += tst_qmltest.cpp
+
+# Don't install by default
+CONFIG += no_testcase_installs
index 51877b2..3f2109e 100644 (file)
@@ -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
 
index 26cefba..c840bdf 100644 (file)
@@ -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
 
index 92b5b4b..fe7ce9a 100644 (file)
@@ -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
index 1623f79..654c3ce 100644 (file)
@@ -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
 
index 9526817..59b0702 100644 (file)
@@ -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
index e4556da..3db32e0 100644 (file)
@@ -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
 
index 9732475..b395490 100644 (file)
@@ -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
 
index f2e1943..d98f218 100644 (file)
@@ -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
 
index 7e62266..7da02de 100644 (file)
@@ -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
 
index c26d287..bf08c74 100644 (file)
@@ -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
 
index dddabfe..2f457e6 100644 (file)
@@ -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
 
index cd5a48d..74005b1 100644 (file)
@@ -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
 
index 7801e41..d3b5063 100644 (file)
@@ -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
 
index a9256a6..afd7d1b 100644 (file)
@@ -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
 
index ba6d754..a0770c9 100644 (file)
@@ -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
 
index 8213d64..6b52d46 100644 (file)
@@ -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
 
index bf3857f..e725f81 100644 (file)
@@ -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()) {\
index d6ce120..3bc9bfe 100644 (file)
@@ -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
index f5fcae0..05e0768 100644 (file)
@@ -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
index a07ec63..38a47f0 100644 (file)
@@ -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);
index 7bb41ef..90c427c 100644 (file)
 #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
index dc91212..b53c569 100644 (file)
@@ -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();
     }
index cd12e6d..7a0da05 100644 (file)
 #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
index a9c9ba2..b7fbf72 100644 (file)
@@ -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 (file)
index 0000000..bed0556
--- /dev/null
@@ -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"
+}
index 5d96c37..a7a7ed2 100644 (file)
 ****************************************************************************/
 
 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 (file)
index 0000000..345598c
--- /dev/null
@@ -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")
+    }
+}
index 83eb8c0..80e2118 100644 (file)
@@ -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"
index 4f8c5a0..1ba9192 100644 (file)
@@ -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"
index 4c226e8..2d41379 100644 (file)
@@ -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
index ae863e3..0d31749 100644 (file)
@@ -91,6 +91,7 @@ public:
     void setCurrentValue(const QVariant &value);
     QVariant maximumValue() const;
     QVariant minimumValue() const;
+    QVariant minimumStepSize() const;
 };
 
 #endif // QT_NO_ACCESSIBILITY
index 764db83..0106a3d 100644 (file)
@@ -107,7 +107,7 @@ QString QAccessibleQuickView::text(QAccessible::Text text) const
 #else
     Q_UNUSED(text)
 #endif
-    return view()->windowTitle();
+    return view()->title();
 }
 
 
index 4f6ee51..1255016 100644 (file)
@@ -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);
index 87d4c42..4972e03 100644 (file)
@@ -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
index e449f3b..db934f3 100644 (file)
@@ -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.
 
index 679e54c..bc9669c 100644 (file)
@@ -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()
 */
index b4962a6..f0bf6e4 100644 (file)
@@ -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()
   */
index 0b07705..7a2f4ea 100644 (file)
@@ -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(';');
index 1fdc1b9..595f9e8 100644 (file)
@@ -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
index c1c4a6c..8b02385 100644 (file)
@@ -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
index 14be990..2804f66 100644 (file)
@@ -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;
index 1c107bd..8320a89 100644 (file)
@@ -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);
 }
index d622ac9..614dde3 100644 (file)
@@ -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;
index 3ac13cd..6bb2a75 100644 (file)
@@ -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}
index 4db6f4b..c577a90 100644 (file)
@@ -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:
index a15f77d..a0bd1fa 100644 (file)
@@ -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)
index ab5f03f..ac1ecdb 100644 (file)
@@ -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)
index fa6aa62..af79a08 100644 (file)
@@ -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)
index 22551c9..88e6d75 100644 (file)
@@ -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);
 
index fac4fb0..4c38686 100644 (file)
@@ -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
index 9e28d87..b71620f 100644 (file)
@@ -159,6 +159,7 @@ private:
 
         uint sizeWasChanged : 1;
         uint isVisible : 1;
+        uint isRenderable : 1;
     };
 
     QHash<QQuickWindow *, WindowData *> m_rendered_windows;
index 7182e74..befba37 100644 (file)
@@ -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()
index 756890e..4a885bc 100644 (file)
@@ -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);
index f03a2c9..4ea31a0 100644 (file)
@@ -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"
 
index 50887e8..5da904a 100644 (file)
@@ -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())
index 27ee2f0..962fb52 100644 (file)
@@ -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);
index 5cf31ef..5519f22 100644 (file)
@@ -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();
index b958a27..0429643 100644 (file)
@@ -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 (file)
index 0000000..29eaced
--- /dev/null
@@ -0,0 +1,7 @@
+import QtQuick 2.0
+import QtQuick.Window 2.0
+
+Window {
+    height: 100
+    width: 100
+}
index f1a6c23..5848b42 100644 (file)
@@ -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"
index df8042c..213888e 100644 (file)
@@ -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();
 }
 
index 63dbfec..1f8297d 100644 (file)
@@ -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);
 
index 5ad2b6e..3139547 100644 (file)
@@ -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());
index 7c07a16..6fc6810 100644 (file)
@@ -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());
index 7f5802a..703e291 100644 (file)
@@ -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);
 
index a614bbb..3f839b4 100644 (file)
@@ -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);
 
index d822f8e..5246b8c 100644 (file)
@@ -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());
 
index 0e67938..dd69cda 100644 (file)
@@ -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
index 72c3f71..cdb17b3 100644 (file)
@@ -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());
index 0e1b192..38c9bb3 100644 (file)
@@ -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");
index 1050308..0cdf95c 100644 (file)
@@ -176,7 +176,7 @@ private:
 
     void ensureFocus(QWindow *w) {
         w->show();
-        w->requestActivateWindow();
+        w->requestActivate();
         QTest::qWaitForWindowActive(w);
     }
 };
index 8b445e3..e605bb4 100644 (file)
@@ -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);
 
index 6f4c251..3bb4998 100644 (file)
@@ -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);
 
index 12bd6c1..a4e93d5 100644 (file)
@@ -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");
index 29c0e59..5a39698 100644 (file)
@@ -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;
index 9695af6..f36849a 100644 (file)
@@ -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());
 
index 29c65e0..b314706 100644 (file)
@@ -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();
index ce39065..4df6576 100644 (file)
@@ -1009,7 +1009,7 @@ void tst_qquickstates::anchorRewindBug()
     view->setSource(testFileUrl("anchorRewindBug.qml"));
 
     view->show();
-    view->requestActivateWindow();
+    view->requestActivate();
 
     QVERIFY(QTest::qWaitForWindowActive(view));
 
index 718a581..c5ffe7d 100644 (file)
@@ -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);
index a5a5efb..3966fff 100644 (file)
@@ -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());
index 249755b..49e72e4 100644 (file)
@@ -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());
 
index c108ac4..5cede36 100644 (file)
@@ -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
index 7000600..bba0abd 100644 (file)
@@ -16,3 +16,5 @@ TESTDATA = data/*
 CONFIG += parallel_test
 
 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+
+mac:CONFIG+=insignificant_test # QTBUG-27890
index 3293890..4a681e2 100644 (file)
@@ -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");
index c0e04e6..7f7b2d9 100644 (file)
@@ -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();
index 6aced0b..d41ade4 100644 (file)
@@ -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;
         }
     }