aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/quick/quickwidgets/qquickviewcomparison/main.cpp8
-rw-r--r--examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp24
-rw-r--r--examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h5
-rw-r--r--[-rwxr-xr-x]examples/quick/tutorials/samegame/samegame4/content/samegame.js0
-rw-r--r--src/imports/folderlistmodel/fileinfothread_p.h11
-rw-r--r--src/imports/folderlistmodel/fileproperty_p.h11
-rw-r--r--src/imports/folderlistmodel/qquickfolderlistmodel.cpp2
-rw-r--r--src/imports/settings/qqmlsettings_p.h11
-rw-r--r--src/imports/xmllistmodel/qqmlxmllistmodel.cpp2
-rw-r--r--src/imports/xmllistmodel/qqmlxmllistmodel_p.h11
-rw-r--r--src/particles/qquickage_p.h11
-rw-r--r--src/particles/qquickangledirection_p.h11
-rw-r--r--src/particles/qquickcumulativedirection_p.h11
-rw-r--r--src/particles/qquickcustomaffector_p.h11
-rw-r--r--src/particles/qquickcustomparticle_p.h11
-rw-r--r--src/particles/qquickdirection_p.h11
-rw-r--r--src/particles/qquickellipseextruder_p.h11
-rw-r--r--src/particles/qquickfriction_p.h11
-rw-r--r--src/particles/qquickgravity_p.h11
-rw-r--r--src/particles/qquickgroupgoal_p.h11
-rw-r--r--src/particles/qquickimageparticle_p.h11
-rw-r--r--src/particles/qquickitemparticle_p.h11
-rw-r--r--src/particles/qquicklineextruder_p.h11
-rw-r--r--src/particles/qquickmaskextruder_p.h11
-rw-r--r--src/particles/qquickparticleaffector_p.h11
-rw-r--r--src/particles/qquickparticleemitter_p.h11
-rw-r--r--src/particles/qquickparticleextruder_p.h11
-rw-r--r--src/particles/qquickparticlegroup_p.h11
-rw-r--r--src/particles/qquickparticlepainter_p.h11
-rw-r--r--src/particles/qquickparticlesmodule_p.h11
-rw-r--r--src/particles/qquickparticlesystem_p.h11
-rw-r--r--src/particles/qquickpointattractor_p.h11
-rw-r--r--src/particles/qquickpointdirection_p.h11
-rw-r--r--src/particles/qquickrectangleextruder_p.h11
-rw-r--r--src/particles/qquickspritegoal_p.h11
-rw-r--r--src/particles/qquicktargetdirection_p.h11
-rw-r--r--src/particles/qquicktrailemitter_p.h11
-rw-r--r--src/particles/qquickturbulence_p.h11
-rw-r--r--src/particles/qquickv4particledata_p.h11
-rw-r--r--src/particles/qquickwander_p.h11
-rw-r--r--src/particles/qtquickparticlesglobal_p.h11
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp2
-rw-r--r--src/plugins/qmltooling/qmltooling.pro12
-rw-r--r--src/qml/animations/qabstractanimationjob_p.h11
-rw-r--r--src/qml/animations/qanimationgroupjob_p.h11
-rw-r--r--src/qml/animations/qanimationjobutil_p.h11
-rw-r--r--src/qml/animations/qcontinuinganimationgroupjob_p.h11
-rw-r--r--src/qml/animations/qparallelanimationgroupjob_p.h11
-rw-r--r--src/qml/animations/qpauseanimationjob_p.h11
-rw-r--r--src/qml/animations/qsequentialanimationgroupjob_p.h11
-rw-r--r--src/qml/compiler/qqmlirbuilder.cpp4
-rw-r--r--src/qml/compiler/qqmlirbuilder_p.h11
-rw-r--r--src/qml/compiler/qqmltypecompiler.cpp38
-rw-r--r--src/qml/compiler/qqmltypecompiler_p.h13
-rw-r--r--src/qml/compiler/qv4codegen_p.h11
-rw-r--r--src/qml/compiler/qv4compileddata_p.h11
-rw-r--r--src/qml/compiler/qv4compiler_p.h11
-rw-r--r--src/qml/compiler/qv4instr_moth_p.h11
-rw-r--r--src/qml/compiler/qv4isel_moth_p.h11
-rw-r--r--src/qml/compiler/qv4isel_p.h11
-rw-r--r--src/qml/compiler/qv4isel_util_p.h11
-rw-r--r--src/qml/compiler/qv4ssa.cpp1
-rw-r--r--src/qml/compiler/qv4ssa_p.h11
-rw-r--r--src/qml/doc/src/javascript/qmlglobalobject.qdoc6
-rw-r--r--src/qml/doc/src/qmllanguageref/syntax/basics.qdoc2
-rw-r--r--src/qml/doc/src/qmllanguageref/syntax/propertybinding.qdoc2
-rw-r--r--src/qml/doc/src/qmllanguageref/syntax/signals.qdoc4
-rw-r--r--src/qml/doc/src/qtqml.qdoc4
-rw-r--r--src/qml/jit/qv4assembler_p.h11
-rw-r--r--src/qml/jit/qv4binop_p.h11
-rw-r--r--src/qml/jit/qv4isel_masm.cpp4
-rw-r--r--src/qml/jit/qv4isel_masm_p.h11
-rw-r--r--src/qml/jit/qv4regalloc_p.h11
-rw-r--r--src/qml/jit/qv4registerinfo_p.h11
-rw-r--r--src/qml/jit/qv4targetplatform_p.h11
-rw-r--r--src/qml/jit/qv4unop_p.h11
-rw-r--r--src/qml/jsapi/qjsengine.cpp121
-rw-r--r--src/qml/jsapi/qjsengine.h16
-rw-r--r--src/qml/jsapi/qjsvalueiterator_p.h11
-rw-r--r--src/qml/jsruntime/qv4alloca_p.h11
-rw-r--r--src/qml/jsruntime/qv4argumentsobject_p.h11
-rw-r--r--src/qml/jsruntime/qv4arraybuffer_p.h11
-rw-r--r--src/qml/jsruntime/qv4arraydata_p.h11
-rw-r--r--src/qml/jsruntime/qv4arrayobject_p.h11
-rw-r--r--src/qml/jsruntime/qv4booleanobject_p.h11
-rw-r--r--src/qml/jsruntime/qv4context_p.h11
-rw-r--r--src/qml/jsruntime/qv4dataview_p.h11
-rw-r--r--src/qml/jsruntime/qv4dateobject_p.h11
-rw-r--r--src/qml/jsruntime/qv4debugging_p.h11
-rw-r--r--src/qml/jsruntime/qv4engine_p.h11
-rw-r--r--src/qml/jsruntime/qv4errorobject_p.h11
-rw-r--r--src/qml/jsruntime/qv4executableallocator_p.h11
-rw-r--r--src/qml/jsruntime/qv4function_p.h11
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4functionobject_p.h11
-rw-r--r--src/qml/jsruntime/qv4global_p.h11
-rw-r--r--src/qml/jsruntime/qv4globalobject_p.h11
-rw-r--r--src/qml/jsruntime/qv4identifier_p.h11
-rw-r--r--src/qml/jsruntime/qv4identifiertable_p.h11
-rw-r--r--src/qml/jsruntime/qv4internalclass_p.h11
-rw-r--r--src/qml/jsruntime/qv4jsonobject.cpp5
-rw-r--r--src/qml/jsruntime/qv4jsonobject_p.h11
-rw-r--r--src/qml/jsruntime/qv4lookup_p.h11
-rw-r--r--src/qml/jsruntime/qv4managed_p.h21
-rw-r--r--src/qml/jsruntime/qv4math_p.h11
-rw-r--r--src/qml/jsruntime/qv4mathobject_p.h11
-rw-r--r--src/qml/jsruntime/qv4memberdata_p.h11
-rw-r--r--src/qml/jsruntime/qv4numberobject_p.h11
-rw-r--r--src/qml/jsruntime/qv4object_p.h14
-rw-r--r--src/qml/jsruntime/qv4objectiterator_p.h11
-rw-r--r--src/qml/jsruntime/qv4objectproto_p.h11
-rw-r--r--src/qml/jsruntime/qv4persistent_p.h11
-rw-r--r--src/qml/jsruntime/qv4profiling_p.h11
-rw-r--r--src/qml/jsruntime/qv4property_p.h11
-rw-r--r--src/qml/jsruntime/qv4regexp_p.h11
-rw-r--r--src/qml/jsruntime/qv4regexpobject_p.h11
-rw-r--r--src/qml/jsruntime/qv4runtime_p.h11
-rw-r--r--src/qml/jsruntime/qv4scopedvalue_p.h11
-rw-r--r--src/qml/jsruntime/qv4script_p.h11
-rw-r--r--src/qml/jsruntime/qv4sparsearray_p.h11
-rw-r--r--src/qml/jsruntime/qv4string_p.h11
-rw-r--r--src/qml/jsruntime/qv4stringobject_p.h11
-rw-r--r--src/qml/jsruntime/qv4typedarray_p.h11
-rw-r--r--src/qml/jsruntime/qv4util_p.h11
-rw-r--r--src/qml/jsruntime/qv4value_p.h11
-rw-r--r--src/qml/jsruntime/qv4vme_moth_p.h11
-rw-r--r--src/qml/memory/qv4heap_p.h11
-rw-r--r--src/qml/memory/qv4mm_p.h11
-rw-r--r--src/qml/parser/qqmljsglobal_p.h11
-rw-r--r--src/qml/qml/qqmlaccessors_p.h11
-rw-r--r--src/qml/qml/qqmlcomponent.cpp4
-rw-r--r--src/qml/qml/qqmlcomponentattached_p.h11
-rw-r--r--src/qml/qml/qqmlengine.cpp11
-rw-r--r--src/qml/qml/qqmlglobal_p.h11
-rw-r--r--src/qml/qml/qqmlinfo.h4
-rw-r--r--src/qml/qml/qqmllocale_p.h11
-rw-r--r--src/qml/qml/qqmlmemoryprofiler_p.h11
-rw-r--r--src/qml/qml/qqmlmetatype.cpp62
-rw-r--r--src/qml/qml/qqmlmetatype_p.h11
-rw-r--r--src/qml/qml/qqmlnotifier_p.h11
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp7
-rw-r--r--src/qml/qml/qqmlobjectcreator_p.h11
-rw-r--r--src/qml/qml/qqmlopenmetaobject.cpp10
-rw-r--r--src/qml/qml/qqmlopenmetaobject_p.h13
-rw-r--r--src/qml/qml/qqmlplatform_p.h11
-rw-r--r--src/qml/qml/qqmlproperty.cpp10
-rw-r--r--src/qml/qml/qqmlpropertycache.cpp143
-rw-r--r--src/qml/qml/qqmlpropertycache_p.h13
-rw-r--r--src/qml/qml/qqmlproxymetaobject.cpp6
-rw-r--r--src/qml/qml/qqmlproxymetaobject_p.h2
-rw-r--r--src/qml/qml/qqmlscriptstring_p.h11
-rw-r--r--src/qml/qml/qqmltypenotavailable_p.h11
-rw-r--r--src/qml/qml/qqmltypewrapper.cpp5
-rw-r--r--src/qml/qml/qqmlvmemetaobject.cpp169
-rw-r--r--src/qml/qml/qqmlvmemetaobject_p.h17
-rw-r--r--src/qml/qml/qqmlxmlhttprequest.cpp4
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions.cpp64
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions_p.h3
-rw-r--r--src/qml/qml/v8/qv8engine.cpp5
-rw-r--r--src/qml/types/qqmlbind_p.h11
-rw-r--r--src/qml/types/qqmlconnections_p.h11
-rw-r--r--src/qml/types/qqmldelegatemodel_p.h11
-rw-r--r--src/qml/types/qqmlinstantiator_p.h11
-rw-r--r--src/qml/types/qqmlitemselectionmodel.qdoc2
-rw-r--r--src/qml/types/qqmllistmodel_p.h11
-rw-r--r--src/qml/types/qqmlmodelsmodule_p.h11
-rw-r--r--src/qml/types/qqmlobjectmodel_p.h11
-rw-r--r--src/qml/types/qqmltimer_p.h11
-rw-r--r--src/qml/types/qquickpackage_p.h11
-rw-r--r--src/qml/util/qqmladaptormodel.cpp5
-rw-r--r--src/qml/util/qqmladaptormodel_p.h11
-rw-r--r--src/qml/util/qqmllistaccessor_p.h11
-rw-r--r--src/qmltest/qtestoptions_p.h11
-rw-r--r--src/qmltest/quicktestevent_p.h11
-rw-r--r--src/qmltest/quicktestresult_p.h11
-rw-r--r--src/quick/accessible/qaccessiblequickitem_p.h11
-rw-r--r--src/quick/accessible/qaccessiblequickview_p.h11
-rw-r--r--src/quick/accessible/qquickaccessiblefactory_p.h11
-rw-r--r--src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc8
-rw-r--r--src/quick/doc/src/concepts/positioning/anchors.qdoc2
-rw-r--r--src/quick/doc/src/concepts/statesanimations/animations.qdoc6
-rw-r--r--src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc2
-rw-r--r--src/quick/doc/src/examples.qdoc2
-rw-r--r--src/quick/items/context2d/qquickcanvascontext_p.h11
-rw-r--r--src/quick/items/context2d/qquickcanvasitem.cpp23
-rw-r--r--src/quick/items/context2d/qquickcanvasitem_p.h11
-rw-r--r--src/quick/items/context2d/qquickcontext2d_p.h11
-rw-r--r--src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h11
-rw-r--r--src/quick/items/context2d/qquickcontext2dtexture_p.h11
-rw-r--r--src/quick/items/context2d/qquickcontext2dtile_p.h11
-rw-r--r--src/quick/items/qquickaccessibleattached_p.h11
-rw-r--r--src/quick/items/qquickanchors_p.h11
-rw-r--r--src/quick/items/qquickanimatedimage_p.h11
-rw-r--r--src/quick/items/qquickanimatedsprite_p.h11
-rw-r--r--src/quick/items/qquickborderimage_p.h11
-rw-r--r--src/quick/items/qquickclipnode_p.h11
-rw-r--r--src/quick/items/qquickdrag_p.h11
-rw-r--r--src/quick/items/qquickdroparea_p.h11
-rw-r--r--src/quick/items/qquickflickable.cpp14
-rw-r--r--src/quick/items/qquickflickable_p.h11
-rw-r--r--src/quick/items/qquickflickable_p_p.h1
-rw-r--r--src/quick/items/qquickflickablebehavior_p.h11
-rw-r--r--src/quick/items/qquickflipable_p.h11
-rw-r--r--src/quick/items/qquickfocusscope_p.h11
-rw-r--r--src/quick/items/qquickframebufferobject.cpp6
-rw-r--r--src/quick/items/qquickgridview_p.h11
-rw-r--r--src/quick/items/qquickimage.cpp7
-rw-r--r--src/quick/items/qquickimage_p.h11
-rw-r--r--src/quick/items/qquickimagebase.cpp2
-rw-r--r--src/quick/items/qquickimagebase_p.h11
-rw-r--r--src/quick/items/qquickimplicitsizeitem_p.h11
-rw-r--r--src/quick/items/qquickitem.cpp30
-rw-r--r--src/quick/items/qquickitem_p.h1
-rw-r--r--src/quick/items/qquickitemanimation_p.h11
-rw-r--r--src/quick/items/qquickitemchangelistener_p.h8
-rw-r--r--src/quick/items/qquickitemsmodule_p.h11
-rw-r--r--src/quick/items/qquickitemview_p.h11
-rw-r--r--src/quick/items/qquickitemview_p_p.h11
-rw-r--r--src/quick/items/qquickitemviewtransition.cpp6
-rw-r--r--src/quick/items/qquickitemviewtransition_p.h11
-rw-r--r--src/quick/items/qquicklistview_p.h11
-rw-r--r--src/quick/items/qquickloader_p.h11
-rw-r--r--src/quick/items/qquickmousearea_p.h11
-rw-r--r--src/quick/items/qquickmultipointtoucharea_p.h11
-rw-r--r--src/quick/items/qquickpainteditem_p.h11
-rw-r--r--src/quick/items/qquickpathview_p.h11
-rw-r--r--src/quick/items/qquickpincharea.cpp2
-rw-r--r--src/quick/items/qquickpincharea_p.h11
-rw-r--r--src/quick/items/qquickpositioners_p.h11
-rw-r--r--src/quick/items/qquickrectangle_p.h11
-rw-r--r--src/quick/items/qquickrepeater_p.h11
-rw-r--r--src/quick/items/qquickscalegrid_p_p.h11
-rw-r--r--src/quick/items/qquickscreen.cpp27
-rw-r--r--src/quick/items/qquickscreen_p.h13
-rw-r--r--src/quick/items/qquickshadereffect.cpp8
-rw-r--r--src/quick/items/qquickshadereffect_p.h11
-rw-r--r--src/quick/items/qquickshadereffectmesh_p.h11
-rw-r--r--src/quick/items/qquickshadereffectnode_p.h11
-rw-r--r--src/quick/items/qquickshadereffectsource_p.h11
-rw-r--r--src/quick/items/qquicksprite_p.h11
-rw-r--r--src/quick/items/qquickspriteengine_p.h11
-rw-r--r--src/quick/items/qquickspritesequence_p.h11
-rw-r--r--src/quick/items/qquickstateoperations_p.h11
-rw-r--r--src/quick/items/qquicktext_p.h11
-rw-r--r--src/quick/items/qquicktextedit.cpp19
-rw-r--r--src/quick/items/qquicktextedit_p.h11
-rw-r--r--src/quick/items/qquicktextedit_p_p.h5
-rw-r--r--src/quick/items/qquicktextinput.cpp19
-rw-r--r--src/quick/items/qquicktextinput_p.h11
-rw-r--r--src/quick/items/qquicktextinput_p_p.h5
-rw-r--r--src/quick/items/qquicktextnode_p.h11
-rw-r--r--src/quick/items/qquicktextnodeengine_p.h11
-rw-r--r--src/quick/items/qquicktranslate_p.h11
-rw-r--r--src/quick/items/qquickview_p.h11
-rw-r--r--src/quick/items/qquickwindow.cpp31
-rw-r--r--src/quick/items/qquickwindow_p.h2
-rw-r--r--src/quick/items/qquickwindowattached_p.h11
-rw-r--r--src/quick/items/qquickwindowmodule_p.h11
-rw-r--r--src/quick/qtquick2_p.h11
-rw-r--r--src/quick/scenegraph/coreapi/qsgabstractrenderer_p.h11
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp9
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h11
-rw-r--r--src/quick/scenegraph/coreapi/qsggeometry_p.h11
-rw-r--r--src/quick/scenegraph/coreapi/qsgmaterialshader_p.h11
-rw-r--r--src/quick/scenegraph/coreapi/qsgnode_p.h11
-rw-r--r--src/quick/scenegraph/coreapi/qsgnodeupdater_p.h11
-rw-r--r--src/quick/scenegraph/coreapi/qsgrenderer_p.h11
-rw-r--r--src/quick/scenegraph/qsgadaptationlayer_p.h11
-rw-r--r--src/quick/scenegraph/qsgcontext_p.h11
-rw-r--r--src/quick/scenegraph/qsgcontextplugin_p.h11
-rw-r--r--src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h11
-rw-r--r--src/quick/scenegraph/qsgdefaultglyphnode_p.h11
-rw-r--r--src/quick/scenegraph/qsgdefaultglyphnode_p_p.h11
-rw-r--r--src/quick/scenegraph/qsgdefaultimagenode_p.h11
-rw-r--r--src/quick/scenegraph/qsgdefaultlayer_p.h11
-rw-r--r--src/quick/scenegraph/qsgdefaultrectanglenode_p.h11
-rw-r--r--src/quick/scenegraph/qsgdistancefieldglyphnode_p.h11
-rw-r--r--src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h11
-rw-r--r--src/quick/scenegraph/qsgrenderloop_p.h11
-rw-r--r--src/quick/scenegraph/qsgthreadedrenderloop_p.h11
-rw-r--r--src/quick/scenegraph/qsgwindowsrenderloop_p.h11
-rw-r--r--src/quick/scenegraph/util/qsgareaallocator_p.h11
-rw-r--r--src/quick/scenegraph/util/qsgatlastexture_p.h11
-rw-r--r--src/quick/scenegraph/util/qsgdefaultpainternode_p.h11
-rw-r--r--src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h11
-rw-r--r--src/quick/scenegraph/util/qsgdistancefieldutil_p.h11
-rw-r--r--src/quick/scenegraph/util/qsgengine_p.h11
-rw-r--r--src/quick/scenegraph/util/qsgshadersourcebuilder.cpp2
-rw-r--r--src/quick/scenegraph/util/qsgshadersourcebuilder_p.h11
-rw-r--r--src/quick/scenegraph/util/qsgtexture_p.h11
-rw-r--r--src/quick/scenegraph/util/qsgtexturematerial_p.h11
-rw-r--r--src/quick/util/qquickanimation_p.h11
-rw-r--r--src/quick/util/qquickanimationcontroller_p.h11
-rw-r--r--src/quick/util/qquickanimator_p.h11
-rw-r--r--src/quick/util/qquickanimator_p_p.h11
-rw-r--r--src/quick/util/qquickanimatorcontroller_p.h11
-rw-r--r--src/quick/util/qquickanimatorjob_p.h11
-rw-r--r--src/quick/util/qquickapplication_p.h11
-rw-r--r--src/quick/util/qquickbehavior_p.h11
-rw-r--r--src/quick/util/qquickfontloader.cpp58
-rw-r--r--src/quick/util/qquickfontloader_p.h11
-rw-r--r--src/quick/util/qquickfontmetrics_p.h11
-rw-r--r--src/quick/util/qquickpath_p.h11
-rw-r--r--src/quick/util/qquickpathinterpolator_p.h11
-rw-r--r--src/quick/util/qquickpixmapcache_p.h11
-rw-r--r--src/quick/util/qquickpropertychanges_p.h11
-rw-r--r--src/quick/util/qquicksmoothedanimation_p.h11
-rw-r--r--src/quick/util/qquickspringanimation_p.h11
-rw-r--r--src/quick/util/qquickstate_p.h11
-rw-r--r--src/quick/util/qquickstatechangescript_p.h11
-rw-r--r--src/quick/util/qquickstategroup_p.h11
-rw-r--r--src/quick/util/qquickstyledtext_p.h11
-rw-r--r--src/quick/util/qquicksvgparser_p.h11
-rw-r--r--src/quick/util/qquicksystempalette_p.h11
-rw-r--r--src/quick/util/qquicktextmetrics_p.h11
-rw-r--r--src/quick/util/qquicktransition_p.h11
-rw-r--r--src/quick/util/qquicktransitionmanager_p_p.h2
-rw-r--r--src/quick/util/qquickutilmodule_p.h11
-rw-r--r--src/quick/util/qquickvalidator_p.h11
-rw-r--r--src/quick/util/qquickvaluetypes_p.h11
-rw-r--r--src/quickwidgets/qquickwidget.cpp18
-rw-r--r--src/quickwidgets/qquickwidget_p.h11
-rw-r--r--tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp2
-rw-r--r--tests/auto/qml/debugger/shared/debugutil_p.h11
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma/Date/15.9.1.13-1.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.3-2.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma/README0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_2/README0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_2/extensions/constructor-001.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_2/extensions/function-001.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-001.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-002.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-003-n.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-004-n.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-005-n.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-006.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.4.11-01.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.5.1-01.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-01.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-02.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-03.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-04.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Array/regress-387501.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Array/regress-421325.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Array/regress-430717.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.1.2-01.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.3.2-1.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.4.3.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.5-02.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.6.1-01.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/regress-448595-01.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-01.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-02.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-03.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.1-01.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.2-01.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.3-01.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Function/arguments-002.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Function/regress-313570.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/LexicalConventions/7.9.1.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Number/regress-442242-01.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Object/8.6.1-01.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Object/regress-361274.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Object/regress-385393-07.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Operators/11.13.1-002.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Operators/11.4.1-002.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Operators/order-01.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/README0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.2.12.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-285219.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-289669.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-307456.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-309840.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-311414.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-312351.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-330684.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-334158.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-346090.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-367888.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375642.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375711.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-01-n.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-02.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-03.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-04.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-385393-04.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-419152.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420087.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420610.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-441477-01.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Statements/12.6.3.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-302439.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-324650.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/String/regress-304376.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/String/regress-313567.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/String/regress-392378.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-01.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/browser.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/extensions/10.1.3-2.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/extensions/7.9.1.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-274152.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-320854.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-327170.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-368516.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-385393-03.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-429248.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-430740.js0
-rw-r--r--[-rwxr-xr-x]tests/auto/qml/parserstress/tests/ecma_3/template.js0
-rw-r--r--tests/auto/qml/qjsengine/tst_qjsengine.cpp119
-rw-r--r--tests/auto/qml/qjsonbinding/tst_qjsonbinding.cpp2
-rw-r--r--tests/auto/qml/qjsvalue/tst_qjsvalue.cpp2
-rw-r--r--tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp2
-rw-r--r--tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp9
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp8
-rw-r--r--tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp4
-rw-r--r--tests/auto/qml/qqmllanguage/data/CompositeTypeWithAttachedProperty.qml4
-rw-r--r--tests/auto/qml/qqmllanguage/data/registeredCompositeTypeWithAttachedProperty.qml6
-rw-r--r--tests/auto/qml/qqmllanguage/testtypes.h2
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp44
-rw-r--r--tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp2
-rw-r--r--tests/auto/qml/qqmllocale/tst_qqmllocale.cpp6
-rw-r--r--tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp15
-rw-r--r--tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp2
-rw-r--r--tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp4
-rw-r--r--tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp4
-rw-r--r--[-rwxr-xr-x]tests/auto/quick/qquickanimationcontroller/data/tst_coloranimation.qml0
-rw-r--r--[-rwxr-xr-x]tests/auto/quick/qquickanimationcontroller/data/tst_completion.qml0
-rw-r--r--tests/auto/quick/qquickflickable/data/nestedPressDelay.qml10
-rw-r--r--tests/auto/quick/qquickflickable/tst_qquickflickable.cpp78
-rw-r--r--tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp2
-rw-r--r--tests/auto/quick/qquickfontloader_static/data/font.ttfbin0 -> 51984 bytes
-rw-r--r--tests/auto/quick/qquickfontloader_static/qquickfontloader_static.pro12
-rw-r--r--tests/auto/quick/qquickfontloader_static/tst_qquickfontloader_static.cpp69
-rw-r--r--tests/auto/quick/qquickitem2/tst_qquickitem.cpp6
-rw-r--r--tests/auto/quick/qquickloader/tst_qquickloader.cpp21
-rw-r--r--tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp19
-rw-r--r--tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp7
-rw-r--r--tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp18
-rw-r--r--tests/auto/quick/quick.pro1
-rw-r--r--tests/auto/quick/shared/viewtestutil.cpp4
-rw-r--r--tests/auto/shared/testhttpserver.cpp79
-rw-r--r--tests/auto/shared/testhttpserver.h28
-rw-r--r--tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp2
-rw-r--r--tools/qmleasing/segmentproperties.cpp2
-rw-r--r--tools/qmleasing/splineeditor.cpp7
-rw-r--r--tools/qmlimportscanner/main.cpp6
-rw-r--r--tools/qmljs/qmljs.cpp4
-rw-r--r--tools/qmlmin/main.cpp20
-rw-r--r--tools/qmlplugindump/main.cpp27
-rw-r--r--tools/qmlprofiler/qmlprofilerapplication.cpp2
-rw-r--r--tools/qmlprofiler/qmlprofilerdata.cpp4
-rw-r--r--tools/qmlscene/main.cpp6
452 files changed, 3962 insertions, 646 deletions
diff --git a/examples/quick/quickwidgets/qquickviewcomparison/main.cpp b/examples/quick/quickwidgets/qquickviewcomparison/main.cpp
index bbe97a947f..7e45e42527 100644
--- a/examples/quick/quickwidgets/qquickviewcomparison/main.cpp
+++ b/examples/quick/quickwidgets/qquickviewcomparison/main.cpp
@@ -48,7 +48,13 @@ int main(int argc, char **argv)
QApplication app(argc, argv);
- MainWindow widgetWindow;
+ bool transparency = QCoreApplication::arguments().contains(QStringLiteral("--transparent"));
+ MainWindow widgetWindow(transparency);
+ if (transparency) {
+ widgetWindow.setAttribute(Qt::WA_TranslucentBackground);
+ widgetWindow.setAttribute(Qt::WA_NoSystemBackground, false);
+ }
+
widgetWindow.resize(1024, 768);
widgetWindow.show();
diff --git a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp
index dce89d6b18..078d8e7e03 100644
--- a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp
+++ b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.cpp
@@ -47,10 +47,10 @@
#include <QLabel>
#include <QQuickItem>
-MainWindow::MainWindow()
+MainWindow::MainWindow(bool transparency)
: m_currentView(0),
m_currentRootObject(0),
- m_transparent(false)
+ m_transparent(transparency)
{
QVBoxLayout *layout = new QVBoxLayout;
@@ -103,13 +103,6 @@ MainWindow::MainWindow()
connect(m_checkboxOverlayVisible, &QCheckBox::toggled, m_overlayLabel, &QWidget::setVisible);
layout->addWidget(m_checkboxOverlayVisible);
- m_checkboxTransparent = new QCheckBox(tr("Transparent background in QQuickWidget"));
- connect(m_radioWidget, &QCheckBox::toggled, m_checkboxTransparent, &QWidget::setEnabled);
-#ifdef Q_OS_LINUX
- connect(m_checkboxTransparent, &QCheckBox::toggled, this, &MainWindow::onTransparentChanged);
- layout->addWidget(m_checkboxTransparent);
-#endif
-
setLayout(layout);
updateView();
@@ -170,10 +163,8 @@ void MainWindow::updateView()
switchTo(QWidget::createWindowContainer(quickView));
} else if (m_state == UseWidget) {
QQuickWidget *quickWidget = new QQuickWidget;
- if (m_transparent) {
+ if (m_transparent)
quickWidget->setClearColor(Qt::transparent);
- quickWidget->setAttribute(Qt::WA_TranslucentBackground);
- }
quickWidget->setFormat(m_format);
quickWidget->setResizeMode(QQuickWidget::SizeRootObjectToView);
connect(quickWidget, &QQuickWidget::statusChanged, this, &MainWindow::onStatusChangedWidget);
@@ -186,7 +177,8 @@ void MainWindow::updateView()
if (m_currentRootObject) {
m_currentRootObject->setProperty("currentText", text);
m_currentRootObject->setProperty("multisample", m_checkboxMultiSample->isChecked());
- m_currentRootObject->setProperty("translucency", m_transparent);
+ if (!QCoreApplication::arguments().contains(QStringLiteral("--no_render_alpha")))
+ m_currentRootObject->setProperty("translucency", m_transparent);
}
m_overlayLabel->raise();
@@ -242,9 +234,3 @@ void MainWindow::onSceneGraphError(QQuickWindow::SceneGraphError error, const QS
{
m_labelStatus->setText(tr("Scenegraph error %1: %2").arg(error).arg(message));
}
-
-void MainWindow::onTransparentChanged(bool enabled)
-{
- m_transparent = enabled;
- updateView();
-}
diff --git a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h
index c58523f675..5b86c93f38 100644
--- a/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h
+++ b/examples/quick/quickwidgets/qquickviewcomparison/mainwindow.h
@@ -53,7 +53,7 @@ QT_FORWARD_DECLARE_CLASS(QLayout)
class MainWindow : public QWidget
{
public:
- MainWindow();
+ MainWindow(bool transparency);
protected:
void resizeEvent(QResizeEvent*);
@@ -63,7 +63,6 @@ private slots:
void onStatusChangedView(QQuickView::Status status);
void onStatusChangedWidget(QQuickWidget::Status status);
void onSceneGraphError(QQuickWindow::SceneGraphError error, const QString &message);
- void onTransparentChanged(bool enabled);
private:
void switchTo(QWidget *view);
@@ -86,8 +85,6 @@ private:
QSurfaceFormat m_format;
- QCheckBox *m_checkboxTransparent;
-
bool m_transparent;
};
diff --git a/examples/quick/tutorials/samegame/samegame4/content/samegame.js b/examples/quick/tutorials/samegame/samegame4/content/samegame.js
index 80b175d450..80b175d450 100755..100644
--- a/examples/quick/tutorials/samegame/samegame4/content/samegame.js
+++ b/examples/quick/tutorials/samegame/samegame4/content/samegame.js
diff --git a/src/imports/folderlistmodel/fileinfothread_p.h b/src/imports/folderlistmodel/fileinfothread_p.h
index 6a3e71b81c..5f62f39a20 100644
--- a/src/imports/folderlistmodel/fileinfothread_p.h
+++ b/src/imports/folderlistmodel/fileinfothread_p.h
@@ -34,6 +34,17 @@
#ifndef FILEINFOTHREAD_P_H
#define FILEINFOTHREAD_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QThread>
#include <QMutex>
#include <QWaitCondition>
diff --git a/src/imports/folderlistmodel/fileproperty_p.h b/src/imports/folderlistmodel/fileproperty_p.h
index d514ad55bc..3ec8cc0c00 100644
--- a/src/imports/folderlistmodel/fileproperty_p.h
+++ b/src/imports/folderlistmodel/fileproperty_p.h
@@ -34,6 +34,17 @@
#ifndef FILEPROPERTY_P_H
#define FILEPROPERTY_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QFileInfo>
#include <QDateTime>
diff --git a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
index 6c9b3eaf98..839e0f42c7 100644
--- a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
+++ b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp
@@ -198,7 +198,7 @@ QString QQuickFolderListModelPrivate::resolvePath(const QUrl &path)
QUrl localUrl = QUrl(localPath);
QString fullPath = localUrl.path();
if (localUrl.scheme().length())
- fullPath = localUrl.scheme() + ":" + fullPath;
+ fullPath = localUrl.scheme() + QLatin1Char(':') + fullPath;
return QDir::cleanPath(fullPath);
}
diff --git a/src/imports/settings/qqmlsettings_p.h b/src/imports/settings/qqmlsettings_p.h
index a1207eb81c..d3eeaafb62 100644
--- a/src/imports/settings/qqmlsettings_p.h
+++ b/src/imports/settings/qqmlsettings_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLSETTINGS_P_H
#define QQMLSETTINGS_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQml/qqml.h>
#include <QtCore/qobject.h>
#include <QtCore/qscopedpointer.h>
diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp
index 832f484c13..50aa061213 100644
--- a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp
+++ b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp
@@ -416,7 +416,7 @@ void QQuickXmlQueryEngine::getValuesOfKeyRoles(const XmlQueryJob& currentJob, QS
if (keysQueries.count() == 1)
keysQuery = currentJob.prefix + keysQueries[0];
else if (keysQueries.count() > 1)
- keysQuery = currentJob.prefix + QLatin1String("concat(") + keysQueries.join(QLatin1String(",")) + QLatin1String(")");
+ keysQuery = currentJob.prefix + QLatin1String("concat(") + keysQueries.join(QLatin1Char(',')) + QLatin1Char(')');
if (!keysQuery.isEmpty()) {
query->setQuery(keysQuery);
diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel_p.h b/src/imports/xmllistmodel/qqmlxmllistmodel_p.h
index 5b54d0aff6..ebb5f43975 100644
--- a/src/imports/xmllistmodel/qqmlxmllistmodel_p.h
+++ b/src/imports/xmllistmodel/qqmlxmllistmodel_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKXMLLISTMODEL_H
#define QQUICKXMLLISTMODEL_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include <qqmlinfo.h>
diff --git a/src/particles/qquickage_p.h b/src/particles/qquickage_p.h
index cf7d1d80cb..733385cb6f 100644
--- a/src/particles/qquickage_p.h
+++ b/src/particles/qquickage_p.h
@@ -33,6 +33,17 @@
#ifndef KILLAFFECTOR_H
#define KILLAFFECTOR_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include "qquickparticleaffector_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/particles/qquickangledirection_p.h b/src/particles/qquickangledirection_p.h
index eaae53ef0a..837afe83df 100644
--- a/src/particles/qquickangledirection_p.h
+++ b/src/particles/qquickangledirection_p.h
@@ -33,6 +33,17 @@
#ifndef QQuickANGLEDDIRECTION_H
#define QQuickANGLEDDIRECTION_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include "qquickdirection_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/particles/qquickcumulativedirection_p.h b/src/particles/qquickcumulativedirection_p.h
index d9e19542cf..9756c92d05 100644
--- a/src/particles/qquickcumulativedirection_p.h
+++ b/src/particles/qquickcumulativedirection_p.h
@@ -33,6 +33,17 @@
#ifndef QQuickCUMULATIVEDIRECTION_P_H
#define QQuickCUMULATIVEDIRECTION_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include "qquickdirection_p.h"
#include <QQmlListProperty>
QT_BEGIN_NAMESPACE
diff --git a/src/particles/qquickcustomaffector_p.h b/src/particles/qquickcustomaffector_p.h
index 931db97edf..a3388cc3e9 100644
--- a/src/particles/qquickcustomaffector_p.h
+++ b/src/particles/qquickcustomaffector_p.h
@@ -34,6 +34,17 @@
#ifndef CUSTOMAFFECTOR_H
#define CUSTOMAFFECTOR_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QObject>
#include "qquickparticlesystem_p.h"
#include "qquickparticleextruder_p.h"
diff --git a/src/particles/qquickcustomparticle_p.h b/src/particles/qquickcustomparticle_p.h
index 85e609a499..0e650534fb 100644
--- a/src/particles/qquickcustomparticle_p.h
+++ b/src/particles/qquickcustomparticle_p.h
@@ -33,6 +33,17 @@
#ifndef CUSTOM_PARTICLE_H
#define CUSTOM_PARTICLE_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include "qquickparticlepainter_p.h"
#include <private/qquickshadereffectnode_p.h>
#include <private/qquickshadereffect_p.h>
diff --git a/src/particles/qquickdirection_p.h b/src/particles/qquickdirection_p.h
index 9dacb6db0e..68b189fd1a 100644
--- a/src/particles/qquickdirection_p.h
+++ b/src/particles/qquickdirection_p.h
@@ -34,6 +34,17 @@
#ifndef VARYINGVECTOR_H
#define VARYINGVECTOR_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QObject>
#include <QPointF>
diff --git a/src/particles/qquickellipseextruder_p.h b/src/particles/qquickellipseextruder_p.h
index bb766ac8de..b6606daa86 100644
--- a/src/particles/qquickellipseextruder_p.h
+++ b/src/particles/qquickellipseextruder_p.h
@@ -33,6 +33,17 @@
#ifndef ELLIPSEEXTRUDER_H
#define ELLIPSEEXTRUDER_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include "qquickparticleextruder_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/particles/qquickfriction_p.h b/src/particles/qquickfriction_p.h
index 9f09e8ff97..b9b34e965c 100644
--- a/src/particles/qquickfriction_p.h
+++ b/src/particles/qquickfriction_p.h
@@ -33,6 +33,17 @@
#ifndef FRICTIONAFFECTOR_H
#define FRICTIONAFFECTOR_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include "qquickparticleaffector_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/particles/qquickgravity_p.h b/src/particles/qquickgravity_p.h
index b20de84607..03fa6f23fb 100644
--- a/src/particles/qquickgravity_p.h
+++ b/src/particles/qquickgravity_p.h
@@ -33,6 +33,17 @@
#ifndef GRAVITYAFFECTOR_H
#define GRAVITYAFFECTOR_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include "qquickparticleaffector_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/particles/qquickgroupgoal_p.h b/src/particles/qquickgroupgoal_p.h
index fe5d653ecc..3a61875411 100644
--- a/src/particles/qquickgroupgoal_p.h
+++ b/src/particles/qquickgroupgoal_p.h
@@ -33,6 +33,17 @@
#ifndef GROUPGOALAFFECTOR_H
#define GROUPGOALAFFECTOR_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include "qquickparticleaffector_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/particles/qquickimageparticle_p.h b/src/particles/qquickimageparticle_p.h
index 16832d76dc..a39253b28c 100644
--- a/src/particles/qquickimageparticle_p.h
+++ b/src/particles/qquickimageparticle_p.h
@@ -33,6 +33,17 @@
#ifndef ULTRAPARTICLE_H
#define ULTRAPARTICLE_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include "qquickparticlepainter_p.h"
#include "qquickdirection_p.h"
#include <private/qquickpixmapcache_p.h>
diff --git a/src/particles/qquickitemparticle_p.h b/src/particles/qquickitemparticle_p.h
index 4f804a232a..92a9f23b79 100644
--- a/src/particles/qquickitemparticle_p.h
+++ b/src/particles/qquickitemparticle_p.h
@@ -33,6 +33,17 @@
#ifndef ITEMPARTICLE_H
#define ITEMPARTICLE_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include "qquickparticlepainter_p.h"
#include <QPointer>
#include <QSet>
diff --git a/src/particles/qquicklineextruder_p.h b/src/particles/qquicklineextruder_p.h
index 77896e86e0..1e9db2ce52 100644
--- a/src/particles/qquicklineextruder_p.h
+++ b/src/particles/qquicklineextruder_p.h
@@ -33,6 +33,17 @@
#ifndef LINEEXTRUDER_H
#define LINEEXTRUDER_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include "qquickparticleextruder_p.h"
class QQuickLineExtruder : public QQuickParticleExtruder
diff --git a/src/particles/qquickmaskextruder_p.h b/src/particles/qquickmaskextruder_p.h
index 9fc84dd5aa..5f7fb1ea86 100644
--- a/src/particles/qquickmaskextruder_p.h
+++ b/src/particles/qquickmaskextruder_p.h
@@ -33,6 +33,17 @@
#ifndef MASKEXTRUDER_H
#define MASKEXTRUDER_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include "qquickparticleextruder_p.h"
#include <private/qquickpixmapcache_p.h>
#include <QUrl>
diff --git a/src/particles/qquickparticleaffector_p.h b/src/particles/qquickparticleaffector_p.h
index 8dfc98dde7..4646c839d9 100644
--- a/src/particles/qquickparticleaffector_p.h
+++ b/src/particles/qquickparticleaffector_p.h
@@ -34,6 +34,17 @@
#ifndef PARTICLEAFFECTOR_H
#define PARTICLEAFFECTOR_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QObject>
#include "qquickparticlesystem_p.h"
#include "qquickparticleextruder_p.h"
diff --git a/src/particles/qquickparticleemitter_p.h b/src/particles/qquickparticleemitter_p.h
index 68f01e3f6a..c938cedccc 100644
--- a/src/particles/qquickparticleemitter_p.h
+++ b/src/particles/qquickparticleemitter_p.h
@@ -34,6 +34,17 @@
#ifndef PARTICLEEMITTER_H
#define PARTICLEEMITTER_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuick/QQuickItem>
#include <QDebug>
#include "qquickparticlesystem_p.h"
diff --git a/src/particles/qquickparticleextruder_p.h b/src/particles/qquickparticleextruder_p.h
index 6367c44429..79e1114d4b 100644
--- a/src/particles/qquickparticleextruder_p.h
+++ b/src/particles/qquickparticleextruder_p.h
@@ -34,6 +34,17 @@
#ifndef PARTICLEEXTRUDER_H
#define PARTICLEEXTRUDER_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QObject>
#include <QRectF>
#include <QPointF>
diff --git a/src/particles/qquickparticlegroup_p.h b/src/particles/qquickparticlegroup_p.h
index cbc1932524..9929128915 100644
--- a/src/particles/qquickparticlegroup_p.h
+++ b/src/particles/qquickparticlegroup_p.h
@@ -32,6 +32,17 @@
****************************************************************************/
#ifndef QQuickPARTICLEGROUP
#define QQuickPARTICLEGROUP
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include <private/qquickspriteengine_p.h>
#include "qquickparticlesystem_p.h"
#include "qqmlparserstatus.h"
diff --git a/src/particles/qquickparticlepainter_p.h b/src/particles/qquickparticlepainter_p.h
index df6dc5c192..c15ebfc01c 100644
--- a/src/particles/qquickparticlepainter_p.h
+++ b/src/particles/qquickparticlepainter_p.h
@@ -34,6 +34,17 @@
#ifndef PARTICLE_H
#define PARTICLE_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QObject>
#include <QDebug>
#include <QPair>
diff --git a/src/particles/qquickparticlesmodule_p.h b/src/particles/qquickparticlesmodule_p.h
index 02168af8cd..2f43d63793 100644
--- a/src/particles/qquickparticlesmodule_p.h
+++ b/src/particles/qquickparticlesmodule_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKPARTICLESMODULE_H
#define QQUICKPARTICLESMODULE_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qtquickparticlesglobal_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/particles/qquickparticlesystem_p.h b/src/particles/qquickparticlesystem_p.h
index c8061916b5..96bd655793 100644
--- a/src/particles/qquickparticlesystem_p.h
+++ b/src/particles/qquickparticlesystem_p.h
@@ -34,6 +34,17 @@
#ifndef PARTICLESYSTEM_H
#define PARTICLESYSTEM_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuick/QQuickItem>
#include <QElapsedTimer>
#include <QVector>
diff --git a/src/particles/qquickpointattractor_p.h b/src/particles/qquickpointattractor_p.h
index 31038aeba4..a1f5750841 100644
--- a/src/particles/qquickpointattractor_p.h
+++ b/src/particles/qquickpointattractor_p.h
@@ -33,6 +33,17 @@
#ifndef ATTRACTORAFFECTOR_H
#define ATTRACTORAFFECTOR_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include "qquickparticleaffector_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/particles/qquickpointdirection_p.h b/src/particles/qquickpointdirection_p.h
index 3975389a6b..26a4d28126 100644
--- a/src/particles/qquickpointdirection_p.h
+++ b/src/particles/qquickpointdirection_p.h
@@ -33,6 +33,17 @@
#ifndef POINTVECTOR_H
#define POINTVECTOR_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include "qquickdirection_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/particles/qquickrectangleextruder_p.h b/src/particles/qquickrectangleextruder_p.h
index 8ed535eaea..c286b60b14 100644
--- a/src/particles/qquickrectangleextruder_p.h
+++ b/src/particles/qquickrectangleextruder_p.h
@@ -34,6 +34,17 @@
#ifndef RECTANGLEEXTRUDER_H
#define RECTANGLEEXTRUDER_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickparticleextruder_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/particles/qquickspritegoal_p.h b/src/particles/qquickspritegoal_p.h
index 1ddfe14ac3..18ab6af156 100644
--- a/src/particles/qquickspritegoal_p.h
+++ b/src/particles/qquickspritegoal_p.h
@@ -33,6 +33,17 @@
#ifndef SPRITEGOALAFFECTOR_H
#define SPRITEGOALAFFECTOR_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include "qquickparticleaffector_p.h"
#include <QtQml/qqmlinfo.h>
diff --git a/src/particles/qquicktargetdirection_p.h b/src/particles/qquicktargetdirection_p.h
index bde6144d7f..75a53eec90 100644
--- a/src/particles/qquicktargetdirection_p.h
+++ b/src/particles/qquicktargetdirection_p.h
@@ -33,6 +33,17 @@
#ifndef DIRECTEDVECTOR_H
#define DIRECTEDVECTOR_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include "qquickdirection_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/particles/qquicktrailemitter_p.h b/src/particles/qquicktrailemitter_p.h
index fd11a07056..9f03a1107e 100644
--- a/src/particles/qquicktrailemitter_p.h
+++ b/src/particles/qquicktrailemitter_p.h
@@ -33,6 +33,17 @@
#ifndef FOLLOWEMITTER_H
#define FOLLOWEMITTER_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include "qquickparticleemitter_p.h"
#include "qquickparticleaffector_p.h"
diff --git a/src/particles/qquickturbulence_p.h b/src/particles/qquickturbulence_p.h
index 3c32bb6063..44122e154f 100644
--- a/src/particles/qquickturbulence_p.h
+++ b/src/particles/qquickturbulence_p.h
@@ -33,6 +33,17 @@
#ifndef TURBULENCEAFFECTOR_H
#define TURBULENCEAFFECTOR_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include "qquickparticleaffector_p.h"
#include <QQmlListProperty>
diff --git a/src/particles/qquickv4particledata_p.h b/src/particles/qquickv4particledata_p.h
index c29c7e1134..5abeadf1fa 100644
--- a/src/particles/qquickv4particledata_p.h
+++ b/src/particles/qquickv4particledata_p.h
@@ -34,6 +34,17 @@
#ifndef QQuickV8PARTICLEDATA_H
#define QQuickV8PARTICLEDATA_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qv8engine_p.h>
#include <private/qv4value_p.h>
diff --git a/src/particles/qquickwander_p.h b/src/particles/qquickwander_p.h
index 93ad8516a7..67ebbebd96 100644
--- a/src/particles/qquickwander_p.h
+++ b/src/particles/qquickwander_p.h
@@ -33,6 +33,17 @@
#ifndef WANDERAFFECTOR_H
#define WANDERAFFECTOR_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include <QHash>
#include "qquickparticleaffector_p.h"
diff --git a/src/particles/qtquickparticlesglobal_p.h b/src/particles/qtquickparticlesglobal_p.h
index 783dd1895c..4c97247edd 100644
--- a/src/particles/qtquickparticlesglobal_p.h
+++ b/src/particles/qtquickparticlesglobal_p.h
@@ -34,6 +34,17 @@
#ifndef QTQUICKPARTICLESGLOBAL_P_H
#define QTQUICKPARTICLESGLOBAL_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qglobal.h>
// We only have private exports from this library
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp
index 92957f741c..bedabd0a63 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp
@@ -147,7 +147,7 @@ public:
{
QString msg = QStringLiteral("unimplemented command \"");
msg += req.value(QStringLiteral("command")).toString();
- msg += QStringLiteral("\"");
+ msg += QLatin1Char('"');
createErrorResponse(msg);
}
};
diff --git a/src/plugins/qmltooling/qmltooling.pro b/src/plugins/qmltooling/qmltooling.pro
index ae13826a4c..e00e75599b 100644
--- a/src/plugins/qmltooling/qmltooling.pro
+++ b/src/plugins/qmltooling/qmltooling.pro
@@ -1,10 +1,14 @@
TEMPLATE = subdirs
+# Connectors
SUBDIRS += \
- qmldbg_debugger \
- qmldbg_local \
- qmldbg_profiler \
qmldbg_server \
- qmldbg_tcp
+ qmldbg_local \
+ qmldbg_tcp
+
+# Services
+SUBDIRS += \
+ qmldbg_debugger \
+ qmldbg_profiler
qtHaveModule(quick): SUBDIRS += qmldbg_inspector
diff --git a/src/qml/animations/qabstractanimationjob_p.h b/src/qml/animations/qabstractanimationjob_p.h
index 5a3e9d2025..14dbf85a3d 100644
--- a/src/qml/animations/qabstractanimationjob_p.h
+++ b/src/qml/animations/qabstractanimationjob_p.h
@@ -34,6 +34,17 @@
#ifndef QABSTRACTANIMATIONJOB_P_H
#define QABSTRACTANIMATIONJOB_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qtqmlglobal_p.h>
#include <QtCore/QObject>
#include <QtCore/private/qabstractanimation_p.h>
diff --git a/src/qml/animations/qanimationgroupjob_p.h b/src/qml/animations/qanimationgroupjob_p.h
index fa8fc08bfe..c97a18f089 100644
--- a/src/qml/animations/qanimationgroupjob_p.h
+++ b/src/qml/animations/qanimationgroupjob_p.h
@@ -34,6 +34,17 @@
#ifndef QANIMATIONGROUPJOB_P_H
#define QANIMATIONGROUPJOB_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "private/qabstractanimationjob_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/qml/animations/qanimationjobutil_p.h b/src/qml/animations/qanimationjobutil_p.h
index 3c38fc1599..d2aceb72d0 100644
--- a/src/qml/animations/qanimationjobutil_p.h
+++ b/src/qml/animations/qanimationjobutil_p.h
@@ -34,6 +34,17 @@
#ifndef QANIMATIONJOBUTIL_P_H
#define QANIMATIONJOBUTIL_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#define RETURN_IF_DELETED(func) \
{ \
bool *prevWasDeleted = m_wasDeleted; \
diff --git a/src/qml/animations/qcontinuinganimationgroupjob_p.h b/src/qml/animations/qcontinuinganimationgroupjob_p.h
index 3df0e676a7..b9827ab936 100644
--- a/src/qml/animations/qcontinuinganimationgroupjob_p.h
+++ b/src/qml/animations/qcontinuinganimationgroupjob_p.h
@@ -34,6 +34,17 @@
#ifndef QCONTINUINGANIMATIONGROUPJOB_P_H
#define QCONTINUINGANIMATIONGROUPJOB_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "private/qanimationgroupjob_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/qml/animations/qparallelanimationgroupjob_p.h b/src/qml/animations/qparallelanimationgroupjob_p.h
index 1ac7709f21..83e5457cdd 100644
--- a/src/qml/animations/qparallelanimationgroupjob_p.h
+++ b/src/qml/animations/qparallelanimationgroupjob_p.h
@@ -34,6 +34,17 @@
#ifndef QPARALLELANIMATIONGROUPJOB_P_H
#define QPARALLELANIMATIONGROUPJOB_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "private/qanimationgroupjob_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/qml/animations/qpauseanimationjob_p.h b/src/qml/animations/qpauseanimationjob_p.h
index b909c71f49..725e9b62e9 100644
--- a/src/qml/animations/qpauseanimationjob_p.h
+++ b/src/qml/animations/qpauseanimationjob_p.h
@@ -34,6 +34,17 @@
#ifndef QPAUSEANIMATIONJOB_P_H
#define QPAUSEANIMATIONJOB_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qanimationgroupjob_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/qml/animations/qsequentialanimationgroupjob_p.h b/src/qml/animations/qsequentialanimationgroupjob_p.h
index 5286fda28a..dab086e851 100644
--- a/src/qml/animations/qsequentialanimationgroupjob_p.h
+++ b/src/qml/animations/qsequentialanimationgroupjob_p.h
@@ -34,6 +34,17 @@
#ifndef QSEQUENTIALANIMATIONGROUPJOB_P_H
#define QSEQUENTIALANIMATIONGROUPJOB_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qanimationgroupjob_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp
index 7b0d4240c4..6fef1ae372 100644
--- a/src/qml/compiler/qqmlirbuilder.cpp
+++ b/src/qml/compiler/qqmlirbuilder.cpp
@@ -1615,10 +1615,10 @@ static QV4::IR::Type resolveQmlType(QQmlEnginePrivate *qmlEngine, QV4::IR::Membe
member->kind = QV4::IR::Member::MemberOfSingletonObject;
return resolver->resolveMember(qmlEngine, resolver, member);
}
- } else if (const QMetaObject *attachedMeta = type->attachedPropertiesType()) {
+ } else if (const QMetaObject *attachedMeta = type->attachedPropertiesType(qmlEngine)) {
QQmlPropertyCache *cache = qmlEngine->cache(attachedMeta);
initMetaObjectResolver(resolver, cache);
- member->setAttachedPropertiesId(type->attachedPropertiesId());
+ member->setAttachedPropertiesId(type->attachedPropertiesId(qmlEngine));
return resolver->resolveMember(qmlEngine, resolver, member);
}
diff --git a/src/qml/compiler/qqmlirbuilder_p.h b/src/qml/compiler/qqmlirbuilder_p.h
index 5617912081..9a659f4d72 100644
--- a/src/qml/compiler/qqmlirbuilder_p.h
+++ b/src/qml/compiler/qqmlirbuilder_p.h
@@ -33,6 +33,17 @@
#ifndef QQMLIRBUILDER_P_H
#define QQMLIRBUILDER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qqmljsast_p.h>
#include <private/qqmljsengine_p.h>
#include <private/qv4compiler_p.h>
diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp
index e36ba76326..cde7a2acb4 100644
--- a/src/qml/compiler/qqmltypecompiler.cpp
+++ b/src/qml/compiler/qqmltypecompiler.cpp
@@ -520,7 +520,24 @@ bool QQmlPropertyCacheCreator::buildMetaObjectRecursively(int objectIndex, int r
} else if (instantiatingBinding && instantiatingBinding->isAttachedProperty()) {
QQmlCompiledData::TypeReference *typeRef = resolvedTypes->value(instantiatingBinding->propertyNameIndex);
Q_ASSERT(typeRef);
- const QMetaObject *attachedMo = typeRef->type ? typeRef->type->attachedPropertiesType() : 0;
+ QQmlType *qmltype = typeRef->type;
+ if (!qmltype) {
+ QString propertyName = stringAt(instantiatingBinding->propertyNameIndex);
+ if (imports->resolveType(propertyName, &qmltype, 0, 0, 0)) {
+ if (qmltype->isComposite()) {
+ QQmlTypeData *tdata = enginePrivate->typeLoader.getType(qmltype->sourceUrl());
+ Q_ASSERT(tdata);
+ Q_ASSERT(tdata->isComplete());
+
+ QQmlCompiledData *data = tdata->compiledData();
+ qmltype = QQmlMetaType::qmlType(data->metaTypeId);
+
+ tdata->release();
+ }
+ }
+ }
+
+ const QMetaObject *attachedMo = qmltype ? qmltype->attachedPropertiesType(enginePrivate) : 0;
if (!attachedMo) {
recordError(instantiatingBinding->location, tr("Non-existent attached object"));
return false;
@@ -880,7 +897,9 @@ bool QQmlPropertyCacheCreator::createMetaObject(int objectIndex, const QmlIR::Ob
SignalHandlerConverter::SignalHandlerConverter(QQmlTypeCompiler *typeCompiler)
: QQmlCompilePass(typeCompiler)
+ , enginePrivate(typeCompiler->enginePrivate())
, qmlObjects(*typeCompiler->qmlObjects())
+ , imports(typeCompiler->imports())
, customParsers(typeCompiler->customParserCache())
, resolvedTypes(*typeCompiler->resolvedTypes())
, illegalNames(QV8Engine::get(QQmlEnginePrivate::get(typeCompiler->enginePrivate()))->illegalNames())
@@ -918,7 +937,22 @@ bool SignalHandlerConverter::convertSignalHandlerExpressionsToFunctionDeclaratio
const QmlIR::Object *attachedObj = qmlObjects.at(binding->value.objectIndex);
QQmlCompiledData::TypeReference *typeRef = resolvedTypes.value(binding->propertyNameIndex);
QQmlType *type = typeRef ? typeRef->type : 0;
- const QMetaObject *attachedType = type ? type->attachedPropertiesType() : 0;
+ if (!type) {
+ if (imports->resolveType(propertyName, &type, 0, 0, 0)) {
+ if (type->isComposite()) {
+ QQmlTypeData *tdata = enginePrivate->typeLoader.getType(type->sourceUrl());
+ Q_ASSERT(tdata);
+ Q_ASSERT(tdata->isComplete());
+
+ QQmlCompiledData *data = tdata->compiledData();
+ type = QQmlMetaType::qmlType(data->metaTypeId);
+
+ tdata->release();
+ }
+ }
+ }
+
+ const QMetaObject *attachedType = type ? type->attachedPropertiesType(enginePrivate) : 0;
if (!attachedType)
COMPILE_EXCEPTION(binding, tr("Non-existent attached object"));
QQmlPropertyCache *cache = compiler->enginePrivate()->cache(attachedType);
diff --git a/src/qml/compiler/qqmltypecompiler_p.h b/src/qml/compiler/qqmltypecompiler_p.h
index 09ef7aad67..c5be92d256 100644
--- a/src/qml/compiler/qqmltypecompiler_p.h
+++ b/src/qml/compiler/qqmltypecompiler_p.h
@@ -33,6 +33,17 @@
#ifndef QQMLTYPECOMPILER_P_H
#define QQMLTYPECOMPILER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qglobal.h>
#include <qqmlerror.h>
#include <qhash.h>
@@ -158,7 +169,9 @@ public:
private:
bool convertSignalHandlerExpressionsToFunctionDeclarations(const QmlIR::Object *obj, const QString &typeName, QQmlPropertyCache *propertyCache);
+ QQmlEnginePrivate *enginePrivate;
const QList<QmlIR::Object*> &qmlObjects;
+ const QQmlImports *imports;
const QHash<int, QQmlCustomParser*> &customParsers;
const QHash<int, QQmlCompiledData::TypeReference*> &resolvedTypes;
const QSet<QString> &illegalNames;
diff --git a/src/qml/compiler/qv4codegen_p.h b/src/qml/compiler/qv4codegen_p.h
index aec51cc19c..a7b0b06fe2 100644
--- a/src/qml/compiler/qv4codegen_p.h
+++ b/src/qml/compiler/qv4codegen_p.h
@@ -33,6 +33,17 @@
#ifndef QV4CODEGEN_P_H
#define QV4CODEGEN_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "private/qv4global_p.h"
#include "qv4jsir_p.h"
#include <private/qqmljsastvisitor_p.h>
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h
index 48324fbbc4..0d6e4b15a7 100644
--- a/src/qml/compiler/qv4compileddata_p.h
+++ b/src/qml/compiler/qv4compileddata_p.h
@@ -33,6 +33,17 @@
#ifndef QV4COMPILEDDATA_P_H
#define QV4COMPILEDDATA_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qstring.h>
#include <QVector>
#include <QStringList>
diff --git a/src/qml/compiler/qv4compiler_p.h b/src/qml/compiler/qv4compiler_p.h
index 3cf80a9791..d999a93f4f 100644
--- a/src/qml/compiler/qv4compiler_p.h
+++ b/src/qml/compiler/qv4compiler_p.h
@@ -33,6 +33,17 @@
#ifndef QV4COMPILER_P_H
#define QV4COMPILER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qstring.h>
#include "qv4jsir_p.h"
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h
index 6839c7f609..1eebcbbe7f 100644
--- a/src/qml/compiler/qv4instr_moth_p.h
+++ b/src/qml/compiler/qv4instr_moth_p.h
@@ -34,6 +34,17 @@
#ifndef QV4INSTR_MOTH_P_H
#define QV4INSTR_MOTH_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qglobal.h>
#include <private/qv4value_p.h>
#include <private/qv4function_p.h>
diff --git a/src/qml/compiler/qv4isel_moth_p.h b/src/qml/compiler/qv4isel_moth_p.h
index ac1eaba740..947461f98e 100644
--- a/src/qml/compiler/qv4isel_moth_p.h
+++ b/src/qml/compiler/qv4isel_moth_p.h
@@ -34,6 +34,17 @@
#ifndef QV4ISEL_MOTH_P_H
#define QV4ISEL_MOTH_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qv4global_p.h>
#include <private/qv4isel_p.h>
#include <private/qv4isel_util_p.h>
diff --git a/src/qml/compiler/qv4isel_p.h b/src/qml/compiler/qv4isel_p.h
index 2b8aa7eb33..50ee955378 100644
--- a/src/qml/compiler/qv4isel_p.h
+++ b/src/qml/compiler/qv4isel_p.h
@@ -34,6 +34,17 @@
#ifndef QV4ISEL_P_H
#define QV4ISEL_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "private/qv4global_p.h"
#include "qv4jsir_p.h"
#include <private/qv4compileddata_p.h>
diff --git a/src/qml/compiler/qv4isel_util_p.h b/src/qml/compiler/qv4isel_util_p.h
index 521c345228..9c4ab63ba6 100644
--- a/src/qml/compiler/qv4isel_util_p.h
+++ b/src/qml/compiler/qv4isel_util_p.h
@@ -34,6 +34,17 @@
#ifndef QV4ISEL_UTIL_P_H
#define QV4ISEL_UTIL_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "private/qv4value_p.h"
#include "qv4jsir_p.h"
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp
index 32169f3352..bc4068085a 100644
--- a/src/qml/compiler/qv4ssa.cpp
+++ b/src/qml/compiler/qv4ssa.cpp
@@ -2038,6 +2038,7 @@ public:
EliminateDeadCode(DefUses &defUses, StatementWorklist &worklist)
: _defUses(defUses)
, _worklist(worklist)
+ , _sideEffect(false)
{
_collectedTemps.reserve(8);
}
diff --git a/src/qml/compiler/qv4ssa_p.h b/src/qml/compiler/qv4ssa_p.h
index 3cfacaee27..d06774e803 100644
--- a/src/qml/compiler/qv4ssa_p.h
+++ b/src/qml/compiler/qv4ssa_p.h
@@ -34,6 +34,17 @@
#ifndef QV4SSA_P_H
#define QV4SSA_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4jsir_p.h"
#include <QtCore/QSharedPointer>
diff --git a/src/qml/doc/src/javascript/qmlglobalobject.qdoc b/src/qml/doc/src/javascript/qmlglobalobject.qdoc
index e37b35451c..b3d8a2b2a5 100644
--- a/src/qml/doc/src/javascript/qmlglobalobject.qdoc
+++ b/src/qml/doc/src/javascript/qmlglobalobject.qdoc
@@ -45,9 +45,11 @@ additional imports:
\li \l{XMLHttpRequest}, DOMException: These objects implement a subset of the \l{http://www.w3.org/TR/XMLHttpRequest/}{W3C XMLHttpRequest specification}.
\endlist
+\note The \l {QJSEngine::}{globalObject()} function cannot be used to modify
+the global object of a \l QQmlEngine. For more information about this, see
+\l {JavaScript Environment Restrictions}.
-
-\keyword XMLHttpRequest
+\target XMLHttpRequest
\section1 XMLHttpRequest
The XMLHttpRequest object, which can be used to asynchronously obtain
diff --git a/src/qml/doc/src/qmllanguageref/syntax/basics.qdoc b/src/qml/doc/src/qmllanguageref/syntax/basics.qdoc
index ddb307cf75..50767bfc8f 100644
--- a/src/qml/doc/src/qmllanguageref/syntax/basics.qdoc
+++ b/src/qml/doc/src/qmllanguageref/syntax/basics.qdoc
@@ -73,7 +73,7 @@ Please see the \l{qtqml-syntax-imports.html}{QML Syntax - Import Statements}
documentation for in-depth information about QML imports.
-\keyword qml-object-declarations
+\target qml-object-declarations
\section1 Object Declarations
Syntactically, a block of QML code defines a tree of QML objects to be created. Objects are
diff --git a/src/qml/doc/src/qmllanguageref/syntax/propertybinding.qdoc b/src/qml/doc/src/qmllanguageref/syntax/propertybinding.qdoc
index 3aa228c8eb..f28ff5082a 100644
--- a/src/qml/doc/src/qmllanguageref/syntax/propertybinding.qdoc
+++ b/src/qml/doc/src/qmllanguageref/syntax/propertybinding.qdoc
@@ -130,7 +130,7 @@ and maintainability. It may be a good idea to redesign components that have
complex bindings, or at least factor the binding out into a separate function.
-\keyword qml-javascript-assignment
+\target qml-javascript-assignment
\section1 Creating Property Bindings from JavaScript
A property with a binding is automatically updated as necessary. However, if the
diff --git a/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc b/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc
index e7d75a89bc..602b202ed4 100644
--- a/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc
+++ b/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc
@@ -42,7 +42,7 @@ and the signal is responded to through a \e {signal handler}. When a signal
is emitted, the corresponding signal handler is invoked. Placing logic such as scripts or other
operations in the handler allows the component to respond to the event.
-\keyword qml-signals-and-handlers
+\target qml-signals-and-handlers
\section1 Receiving Signals with Signal Handlers
To receive a notification when a particular signal is emitted for a particular object, the object definition should declare a signal handler named \e on<Signal> where \e <Signal> is the name of the signal, with the first letter capitalized. The signal handler should contain the JavaScript code to be executed when the signal handler is invoked.
@@ -208,7 +208,7 @@ SquareButton {
See \l {Signal Attributes} for more details on writing signals for custom QML types.
-\keyword qml-connect-signals-to-method
+\target qml-connect-signals-to-method
\section1 Connecting Signals to Methods and Signals
Signal objects have a \c connect() method to a connect a signal either to a
diff --git a/src/qml/doc/src/qtqml.qdoc b/src/qml/doc/src/qtqml.qdoc
index 64d6bb9ac4..33bb0c0750 100644
--- a/src/qml/doc/src/qtqml.qdoc
+++ b/src/qml/doc/src/qtqml.qdoc
@@ -106,8 +106,8 @@ JavaScript expressions allow QML code to contain application logic. Qt QML
provides the framework for running JavaScript expressions in QML and from C++.
These sections are from \l{The QML Reference}.
-\l{qtqml-javascript-topic.html}{Integrating QML and JavaScript}
\list
+ \li \l{qtqml-javascript-topic.html}{Integrating QML and JavaScript}
\li \l{qtqml-javascript-expressions.html}{Using JavaScript Expressions with QML}
\li \l{qtqml-javascript-dynamicobjectcreation.html}{Dynamic QML Object Creation from JavaScript}
\li \l{qtqml-javascript-resources.html}{Defining JavaScript Resources In QML}
@@ -140,8 +140,6 @@ Further information for writing QML applications:
- essential information for application development with QML and Qt Quick
\li \l{Qt Quick} - a module which provides a set of QML types and C++ classes
for building user interfaces and applications with QML
-\li \l{Qt QML Release Notes} - list of changes and
- additions in the Qt QML module
\endlist
\section2 Reference
diff --git a/src/qml/jit/qv4assembler_p.h b/src/qml/jit/qv4assembler_p.h
index ab74211d23..effae64967 100644
--- a/src/qml/jit/qv4assembler_p.h
+++ b/src/qml/jit/qv4assembler_p.h
@@ -33,6 +33,17 @@
#ifndef QV4ASSEMBLER_P_H
#define QV4ASSEMBLER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "private/qv4global_p.h"
#include "private/qv4jsir_p.h"
#include "private/qv4isel_p.h"
diff --git a/src/qml/jit/qv4binop_p.h b/src/qml/jit/qv4binop_p.h
index 4fa2369312..96c8281d57 100644
--- a/src/qml/jit/qv4binop_p.h
+++ b/src/qml/jit/qv4binop_p.h
@@ -33,6 +33,17 @@
#ifndef QV4BINOP_P_H
#define QV4BINOP_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qv4jsir_p.h>
#include <qv4isel_masm_p.h>
#include <qv4assembler_p.h>
diff --git a/src/qml/jit/qv4isel_masm.cpp b/src/qml/jit/qv4isel_masm.cpp
index 5dfd891b80..782b0c8659 100644
--- a/src/qml/jit/qv4isel_masm.cpp
+++ b/src/qml/jit/qv4isel_masm.cpp
@@ -195,7 +195,7 @@ JSC::MacroAssemblerCodeRef Assembler::link(int *codeSize)
if (name.isEmpty()) {
name = QByteArray::number(quintptr(_function), 16);
name.prepend("IR::Function(0x");
- name.append(")");
+ name.append(')');
}
codeRef = linkBuffer.finalizeCodeWithDisassembly("%s", name.data());
@@ -236,7 +236,7 @@ JSC::MacroAssemblerCodeRef Assembler::link(int *codeSize)
if (name.isEmpty()) {
name = QByteArray::number(quintptr(_function), 16);
name.prepend("IR::Function(0x");
- name.append(")");
+ name.append(')');
}
}
diff --git a/src/qml/jit/qv4isel_masm_p.h b/src/qml/jit/qv4isel_masm_p.h
index 6e842f5fb4..29749f7492 100644
--- a/src/qml/jit/qv4isel_masm_p.h
+++ b/src/qml/jit/qv4isel_masm_p.h
@@ -33,6 +33,17 @@
#ifndef QV4ISEL_MASM_P_H
#define QV4ISEL_MASM_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "private/qv4global_p.h"
#include "private/qv4jsir_p.h"
#include "private/qv4isel_p.h"
diff --git a/src/qml/jit/qv4regalloc_p.h b/src/qml/jit/qv4regalloc_p.h
index f0d78cf0d3..1b6eb34e0b 100644
--- a/src/qml/jit/qv4regalloc_p.h
+++ b/src/qml/jit/qv4regalloc_p.h
@@ -33,6 +33,17 @@
#ifndef QV4REGALLOC_P_H
#define QV4REGALLOC_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4global_p.h"
#include "qv4isel_p.h"
#include "qv4ssa_p.h"
diff --git a/src/qml/jit/qv4registerinfo_p.h b/src/qml/jit/qv4registerinfo_p.h
index ebd8537a85..cfd7bcb071 100644
--- a/src/qml/jit/qv4registerinfo_p.h
+++ b/src/qml/jit/qv4registerinfo_p.h
@@ -34,6 +34,17 @@
#ifndef QV4REGISTERINFO_P_H
#define QV4REGISTERINFO_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/QString>
QT_BEGIN_NAMESPACE
diff --git a/src/qml/jit/qv4targetplatform_p.h b/src/qml/jit/qv4targetplatform_p.h
index 76c768e4f9..1e62b23fe4 100644
--- a/src/qml/jit/qv4targetplatform_p.h
+++ b/src/qml/jit/qv4targetplatform_p.h
@@ -34,6 +34,17 @@
#ifndef QV4TARGETPLATFORM_P_H
#define QV4TARGETPLATFORM_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <config.h>
#if ENABLE(ASSEMBLER)
diff --git a/src/qml/jit/qv4unop_p.h b/src/qml/jit/qv4unop_p.h
index f96898ce1b..69a70062b8 100644
--- a/src/qml/jit/qv4unop_p.h
+++ b/src/qml/jit/qv4unop_p.h
@@ -33,6 +33,17 @@
#ifndef QV4UNOP_P_H
#define QV4UNOP_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qv4jsir_p.h>
#include <qv4isel_masm_p.h>
diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp
index b217d3fb4c..5ccbccebad 100644
--- a/src/qml/jsapi/qjsengine.cpp
+++ b/src/qml/jsapi/qjsengine.cpp
@@ -160,8 +160,82 @@ Q_DECLARE_METATYPE(QList<int>)
\snippet code/src_script_qjsengine.cpp 5
- \sa QJSValue, {Making Applications Scriptable}
+ \section1 Extensions
+ QJSEngine provides a compliant ECMAScript implementation. By default,
+ familiar utilities like logging are not available, but they can can be
+ installed via the \l installExtensions() function.
+
+ \sa QJSValue, {Making Applications Scriptable},
+ {List of JavaScript Objects and Functions}
+
+*/
+
+/*!
+ \enum QJSEngine::Extension
+
+ This enum is used to specify extensions to be installed via
+ \l installExtensions().
+
+ \value TranslationExtension Indicates that translation functions (\c qsTr(),
+ for example) should be installed.
+
+ \value ConsoleExtension Indicates that console functions (\c console.log(),
+ for example) should be installed.
+
+ \value GarbageCollectionExtension Indicates that garbage collection
+ functions (\c gc(), for example) should be installed.
+
+ \value AllExtensions Indicates that all extension should be installed.
+
+ \b TranslationExtension
+
+ The relation between script translation functions and C++ translation
+ functions is described in the following table:
+
+ \table
+ \header \li Script Function \li Corresponding C++ Function
+ \row \li qsTr() \li QObject::tr()
+ \row \li QT_TR_NOOP() \li QT_TR_NOOP()
+ \row \li qsTranslate() \li QCoreApplication::translate()
+ \row \li QT_TRANSLATE_NOOP() \li QT_TRANSLATE_NOOP()
+ \row \li qsTrId() \li qtTrId()
+ \row \li QT_TRID_NOOP() \li QT_TRID_NOOP()
+ \endtable
+
+ This flag also adds an \c arg() function to the string prototype.
+
+ For more information, see the \l {Internationalization with Qt}
+ documentation.
+
+ \b ConsoleExtension
+
+ The \l {Console API}{console} object implements a subset of the
+ \l {https://developer.mozilla.org/en-US/docs/Web/API/Console}{Console API},
+ which provides familiar logging functions, such as \c console.log().
+
+ The list of functions added is as follows:
+
+ \list
+ \li \c console.assert()
+ \li \c console.debug()
+ \li \c console.exception()
+ \li \c console.info()
+ \li \c console.log() (equivalent to \c console.debug())
+ \li \c console.error()
+ \li \c console.time()
+ \li \c console.timeEnd()
+ \li \c console.trace()
+ \li \c console.count()
+ \li \c console.warn()
+ \li \c {print()} (equivalent to \c console.debug())
+ \endlist
+
+ For more information, see the \l {Console API} documentation.
+
+ \b GarbageCollectionExtension
+
+ The \c gc() function is equivalent to calling \l collectGarbage().
*/
QT_BEGIN_NAMESPACE
@@ -234,8 +308,11 @@ void QJSEngine::collectGarbage()
d->m_v4Engine->memoryManager->runGC();
}
+#if QT_DEPRECATED_SINCE(5, 6)
+
/*!
\since 5.4
+ \obsolete
Installs translator functions on the given \a object, or on the Global
Object if no object is specified.
@@ -259,11 +336,37 @@ void QJSEngine::collectGarbage()
*/
void QJSEngine::installTranslatorFunctions(const QJSValue &object)
{
+ installExtensions(TranslationExtension, object);
+}
+
+#endif // QT_DEPRECATED_SINCE(5, 6)
+
+
+/*!
+ \since 5.6
+
+ Installs JavaScript \a extensions to add functionality that is not
+ available in a standard ECMAScript implementation.
+
+ The extensions are installed on the given \a object, or on the
+ \l {globalObject()}{Global Object} if no object is specified.
+
+ Several extensions can be installed at once by \c {OR}-ing the enum values:
+
+ \code
+ installExtensions(QJSEngine::TranslationExtension | QJSEngine::ConsoleExtension);
+ \endcode
+
+ \sa Extension
+*/
+void QJSEngine::installExtensions(QJSEngine::Extensions extensions, const QJSValue &object)
+{
QV4::ExecutionEngine *otherEngine = QJSValuePrivate::engine(&object);
if (otherEngine && otherEngine != d->m_v4Engine) {
- qWarning("QJSEngine: Trying to install a translator function from a different engine");
+ qWarning("QJSEngine: Trying to install extensions from a different engine");
return;
}
+
QV4::Scope scope(d->m_v4Engine);
QV4::ScopedObject obj(scope);
QV4::Value *val = QJSValuePrivate::getValue(&object);
@@ -271,18 +374,8 @@ void QJSEngine::installTranslatorFunctions(const QJSValue &object)
obj = val;
if (!obj)
obj = scope.engine->globalObject;
-#ifndef QT_NO_TRANSLATION
- obj->defineDefaultProperty(QStringLiteral("qsTranslate"), QV4::GlobalExtensions::method_qsTranslate);
- obj->defineDefaultProperty(QStringLiteral("QT_TRANSLATE_NOOP"), QV4::GlobalExtensions::method_qsTranslateNoOp);
- obj->defineDefaultProperty(QStringLiteral("qsTr"), QV4::GlobalExtensions::method_qsTr);
- obj->defineDefaultProperty(QStringLiteral("QT_TR_NOOP"), QV4::GlobalExtensions::method_qsTrNoOp);
- obj->defineDefaultProperty(QStringLiteral("qsTrId"), QV4::GlobalExtensions::method_qsTrId);
- obj->defineDefaultProperty(QStringLiteral("QT_TRID_NOOP"), QV4::GlobalExtensions::method_qsTrIdNoOp);
-
- // string prototype extension
- scope.engine->stringPrototype()->defineDefaultProperty(QStringLiteral("arg"),
- QV4::GlobalExtensions::method_string_arg);
-#endif
+
+ QV4::GlobalExtensions::init(obj, extensions);
}
/*!
diff --git a/src/qml/jsapi/qjsengine.h b/src/qml/jsapi/qjsengine.h
index 123eb727df..40b0a60369 100644
--- a/src/qml/jsapi/qjsengine.h
+++ b/src/qml/jsapi/qjsengine.h
@@ -81,7 +81,19 @@ public:
void collectGarbage();
- void installTranslatorFunctions(const QJSValue &object = QJSValue());
+#if QT_DEPRECATED_SINCE(5, 6)
+ QT_DEPRECATED void installTranslatorFunctions(const QJSValue &object = QJSValue());
+#endif
+
+ enum Extension {
+ TranslationExtension = 0x1,
+ ConsoleExtension = 0x2,
+ GarbageCollectionExtension = 0x4,
+ AllExtensions = 0xffffffff
+ };
+ Q_DECLARE_FLAGS(Extensions, Extension)
+
+ void installExtensions(Extensions extensions, const QJSValue &object = QJSValue());
QV8Engine *handle() const { return d; }
@@ -102,6 +114,8 @@ private:
friend class QV8Engine;
};
+Q_DECLARE_OPERATORS_FOR_FLAGS(QJSEngine::Extensions)
+
inline bool qjsvalue_cast_helper(const QJSValue &value, int type, void *ptr)
{
return QJSEngine::convertV2(value, type, ptr);
diff --git a/src/qml/jsapi/qjsvalueiterator_p.h b/src/qml/jsapi/qjsvalueiterator_p.h
index b0d0b2efda..dfc5e18cd6 100644
--- a/src/qml/jsapi/qjsvalueiterator_p.h
+++ b/src/qml/jsapi/qjsvalueiterator_p.h
@@ -34,6 +34,17 @@
#ifndef QJSVALUEITERATOR_P_H
#define QJSVALUEITERATOR_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qjsvalue.h"
#include "private/qv4objectiterator_p.h"
diff --git a/src/qml/jsruntime/qv4alloca_p.h b/src/qml/jsruntime/qv4alloca_p.h
index a4537868e2..df40a018ba 100644
--- a/src/qml/jsruntime/qv4alloca_p.h
+++ b/src/qml/jsruntime/qv4alloca_p.h
@@ -34,6 +34,17 @@
#ifndef QV4_ALLOCA_H
#define QV4_ALLOCA_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qglobal.h>
#if defined(Q_OS_WIN)
diff --git a/src/qml/jsruntime/qv4argumentsobject_p.h b/src/qml/jsruntime/qv4argumentsobject_p.h
index 98a600fab6..7a9c4b1d51 100644
--- a/src/qml/jsruntime/qv4argumentsobject_p.h
+++ b/src/qml/jsruntime/qv4argumentsobject_p.h
@@ -33,6 +33,17 @@
#ifndef QV4ARGUMENTSOBJECTS_H
#define QV4ARGUMENTSOBJECTS_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4object_p.h"
#include "qv4functionobject_p.h"
diff --git a/src/qml/jsruntime/qv4arraybuffer_p.h b/src/qml/jsruntime/qv4arraybuffer_p.h
index 19fd74465c..56f45b5a72 100644
--- a/src/qml/jsruntime/qv4arraybuffer_p.h
+++ b/src/qml/jsruntime/qv4arraybuffer_p.h
@@ -33,6 +33,17 @@
#ifndef QV4ARRAYBUFFER_H
#define QV4ARRAYBUFFER_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4object_p.h"
#include "qv4functionobject_p.h"
diff --git a/src/qml/jsruntime/qv4arraydata_p.h b/src/qml/jsruntime/qv4arraydata_p.h
index cca5bf7f20..48d2b9dbbf 100644
--- a/src/qml/jsruntime/qv4arraydata_p.h
+++ b/src/qml/jsruntime/qv4arraydata_p.h
@@ -33,6 +33,17 @@
#ifndef QV4ARRAYDATA_H
#define QV4ARRAYDATA_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4global_p.h"
#include "qv4managed_p.h"
#include "qv4property_p.h"
diff --git a/src/qml/jsruntime/qv4arrayobject_p.h b/src/qml/jsruntime/qv4arrayobject_p.h
index 422a0de675..afd8080fa3 100644
--- a/src/qml/jsruntime/qv4arrayobject_p.h
+++ b/src/qml/jsruntime/qv4arrayobject_p.h
@@ -33,6 +33,17 @@
#ifndef QV4ARRAYOBJECT_H
#define QV4ARRAYOBJECT_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4object_p.h"
#include "qv4functionobject_p.h"
#include <QtCore/qnumeric.h>
diff --git a/src/qml/jsruntime/qv4booleanobject_p.h b/src/qml/jsruntime/qv4booleanobject_p.h
index 77b5a74fde..203c8ba4ea 100644
--- a/src/qml/jsruntime/qv4booleanobject_p.h
+++ b/src/qml/jsruntime/qv4booleanobject_p.h
@@ -33,6 +33,17 @@
#ifndef QV4BOOLEANOBJECT_H
#define QV4BOOLEANOBJECT_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4object_p.h"
#include "qv4functionobject_p.h"
#include <QtCore/qnumeric.h>
diff --git a/src/qml/jsruntime/qv4context_p.h b/src/qml/jsruntime/qv4context_p.h
index 2807d1e29c..6c360e7dda 100644
--- a/src/qml/jsruntime/qv4context_p.h
+++ b/src/qml/jsruntime/qv4context_p.h
@@ -33,6 +33,17 @@
#ifndef QMLJS_ENVIRONMENT_H
#define QMLJS_ENVIRONMENT_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4global_p.h"
#include "qv4managed_p.h"
diff --git a/src/qml/jsruntime/qv4dataview_p.h b/src/qml/jsruntime/qv4dataview_p.h
index 37a8363645..26347766d3 100644
--- a/src/qml/jsruntime/qv4dataview_p.h
+++ b/src/qml/jsruntime/qv4dataview_p.h
@@ -33,6 +33,17 @@
#ifndef QV4DATAVIEW_H
#define QV4DATAVIEW_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4object_p.h"
#include "qv4functionobject_p.h"
diff --git a/src/qml/jsruntime/qv4dateobject_p.h b/src/qml/jsruntime/qv4dateobject_p.h
index a324e216e4..2eaa837666 100644
--- a/src/qml/jsruntime/qv4dateobject_p.h
+++ b/src/qml/jsruntime/qv4dateobject_p.h
@@ -33,6 +33,17 @@
#ifndef QV4DATEOBJECT_P_H
#define QV4DATEOBJECT_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4object_p.h"
#include "qv4functionobject_p.h"
#include <QtCore/qnumeric.h>
diff --git a/src/qml/jsruntime/qv4debugging_p.h b/src/qml/jsruntime/qv4debugging_p.h
index 94f7d04725..14bff238cc 100644
--- a/src/qml/jsruntime/qv4debugging_p.h
+++ b/src/qml/jsruntime/qv4debugging_p.h
@@ -34,6 +34,17 @@
#ifndef DEBUGGING_H
#define DEBUGGING_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4global_p.h"
#include "qv4engine_p.h"
#include "qv4context_p.h"
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index ffcd904013..e94b417908 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -33,6 +33,17 @@
#ifndef QV4ENGINE_H
#define QV4ENGINE_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4global_p.h"
#include "private/qv4isel_p.h"
#include "qv4managed_p.h"
diff --git a/src/qml/jsruntime/qv4errorobject_p.h b/src/qml/jsruntime/qv4errorobject_p.h
index 7f3babaa79..336050ab2b 100644
--- a/src/qml/jsruntime/qv4errorobject_p.h
+++ b/src/qml/jsruntime/qv4errorobject_p.h
@@ -33,6 +33,17 @@
#ifndef QV4ERROROBJECT_H
#define QV4ERROROBJECT_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4object_p.h"
#include "qv4functionobject_p.h"
#include "qv4string_p.h"
diff --git a/src/qml/jsruntime/qv4executableallocator_p.h b/src/qml/jsruntime/qv4executableallocator_p.h
index 0d07e3c1bd..bb63d423a6 100644
--- a/src/qml/jsruntime/qv4executableallocator_p.h
+++ b/src/qml/jsruntime/qv4executableallocator_p.h
@@ -34,6 +34,17 @@
#ifndef QV4EXECUTABLEALLOCATOR_H
#define QV4EXECUTABLEALLOCATOR_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4global_p.h"
#include <QMultiMap>
diff --git a/src/qml/jsruntime/qv4function_p.h b/src/qml/jsruntime/qv4function_p.h
index 534aa1b750..0e1216a45b 100644
--- a/src/qml/jsruntime/qv4function_p.h
+++ b/src/qml/jsruntime/qv4function_p.h
@@ -33,6 +33,17 @@
#ifndef QV4FUNCTION_H
#define QV4FUNCTION_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4global_p.h"
#include <private/qv4compileddata_p.h>
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index a94c3f6db5..2944c7b421 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -263,7 +263,7 @@ ReturnedValue FunctionCtor::construct(const Managed *that, CallData *callData)
if (scope.engine->hasException)
return Encode::undefined();
- QString function = QLatin1String("function(") + arguments + QLatin1String("){") + body + QLatin1String("}");
+ QString function = QLatin1String("function(") + arguments + QLatin1String("){") + body + QLatin1Char('}');
QQmlJS::Engine ee, *engine = &ee;
QQmlJS::Lexer lexer(engine);
diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h
index 182f06f74e..896bd2a4d2 100644
--- a/src/qml/jsruntime/qv4functionobject_p.h
+++ b/src/qml/jsruntime/qv4functionobject_p.h
@@ -33,6 +33,17 @@
#ifndef QV4FUNCTIONOBJECT_H
#define QV4FUNCTIONOBJECT_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4object_p.h"
#include "qv4function_p.h"
#include "qv4context_p.h"
diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h
index 759c6795e2..01a21ea06d 100644
--- a/src/qml/jsruntime/qv4global_p.h
+++ b/src/qml/jsruntime/qv4global_p.h
@@ -34,6 +34,17 @@
#ifndef QV4GLOBAL_H
#define QV4GLOBAL_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB)
#define V4_BOOTSTRAP
#endif
diff --git a/src/qml/jsruntime/qv4globalobject_p.h b/src/qml/jsruntime/qv4globalobject_p.h
index ba1d5d2e0b..ced85621de 100644
--- a/src/qml/jsruntime/qv4globalobject_p.h
+++ b/src/qml/jsruntime/qv4globalobject_p.h
@@ -33,6 +33,17 @@
#ifndef QV4GLOBALOBJECT_H
#define QV4GLOBALOBJECT_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4global_p.h"
#include "qv4functionobject_p.h"
diff --git a/src/qml/jsruntime/qv4identifier_p.h b/src/qml/jsruntime/qv4identifier_p.h
index 7937391ff7..605b06c685 100644
--- a/src/qml/jsruntime/qv4identifier_p.h
+++ b/src/qml/jsruntime/qv4identifier_p.h
@@ -33,6 +33,17 @@
#ifndef QV4IDENTIFIER_H
#define QV4IDENTIFIER_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qstring.h>
QT_BEGIN_NAMESPACE
diff --git a/src/qml/jsruntime/qv4identifiertable_p.h b/src/qml/jsruntime/qv4identifiertable_p.h
index d91ce623c1..3af9db963e 100644
--- a/src/qml/jsruntime/qv4identifiertable_p.h
+++ b/src/qml/jsruntime/qv4identifiertable_p.h
@@ -33,6 +33,17 @@
#ifndef QV4IDENTIFIERTABLE_H
#define QV4IDENTIFIERTABLE_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4identifier_p.h"
#include "qv4string_p.h"
#include "qv4engine_p.h"
diff --git a/src/qml/jsruntime/qv4internalclass_p.h b/src/qml/jsruntime/qv4internalclass_p.h
index 342870fcd6..5b91925ede 100644
--- a/src/qml/jsruntime/qv4internalclass_p.h
+++ b/src/qml/jsruntime/qv4internalclass_p.h
@@ -33,6 +33,17 @@
#ifndef QV4INTERNALCLASS_H
#define QV4INTERNALCLASS_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4global_p.h"
#include <QHash>
diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp
index f4f87f3aea..2e5283c639 100644
--- a/src/qml/jsruntime/qv4jsonobject.cpp
+++ b/src/qml/jsruntime/qv4jsonobject.cpp
@@ -801,10 +801,11 @@ QString Stringify::JO(Object *o)
if (partial.isEmpty()) {
result = QStringLiteral("{}");
} else if (gap.isEmpty()) {
- result = QStringLiteral("{") + partial.join(QLatin1Char(',')) + QStringLiteral("}");
+ result = QStringLiteral("{") + partial.join(QLatin1Char(',')) + QLatin1Char('}');
} else {
QString separator = QStringLiteral(",\n") + indent;
- result = QStringLiteral("{\n") + indent + partial.join(separator) + QStringLiteral("\n") + stepback + QStringLiteral("}");
+ result = QStringLiteral("{\n") + indent + partial.join(separator) + QLatin1Char('\n')
+ + stepback + QLatin1Char('}');
}
indent = stepback;
diff --git a/src/qml/jsruntime/qv4jsonobject_p.h b/src/qml/jsruntime/qv4jsonobject_p.h
index 61d44f206e..6a6e863bf6 100644
--- a/src/qml/jsruntime/qv4jsonobject_p.h
+++ b/src/qml/jsruntime/qv4jsonobject_p.h
@@ -33,6 +33,17 @@
#ifndef QV4JSONOBJECT_H
#define QV4JSONOBJECT_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4object_p.h"
#include <qjsonarray.h>
#include <qjsonobject.h>
diff --git a/src/qml/jsruntime/qv4lookup_p.h b/src/qml/jsruntime/qv4lookup_p.h
index 232e909c48..77ad1a7b65 100644
--- a/src/qml/jsruntime/qv4lookup_p.h
+++ b/src/qml/jsruntime/qv4lookup_p.h
@@ -33,6 +33,17 @@
#ifndef QV4LOOKUP_H
#define QV4LOOKUP_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4global_p.h"
#include "qv4runtime_p.h"
#include "qv4engine_p.h"
diff --git a/src/qml/jsruntime/qv4managed_p.h b/src/qml/jsruntime/qv4managed_p.h
index 6f5564300f..94df30944b 100644
--- a/src/qml/jsruntime/qv4managed_p.h
+++ b/src/qml/jsruntime/qv4managed_p.h
@@ -33,6 +33,17 @@
#ifndef QMLJS_MANAGED_H
#define QMLJS_MANAGED_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4global_p.h"
#include "qv4value_p.h"
#include <private/qv4heap_p.h>
@@ -60,7 +71,7 @@ inline void qYouForgotTheQ_MANAGED_Macro(T1, T2) {}
#define V4_NEEDS_DESTROY static void destroy(QV4::Heap::Base *b) { static_cast<Data *>(b)->~Data(); }
-#define V4_MANAGED(DataClass, superClass) \
+#define V4_MANAGED_ITSELF(DataClass, superClass) \
public: \
Q_MANAGED_CHECK \
typedef QV4::Heap::DataClass Data; \
@@ -70,6 +81,12 @@ inline void qYouForgotTheQ_MANAGED_Macro(T1, T2) {}
V4_MANAGED_SIZE_TEST \
QV4::Heap::DataClass *d() const { return static_cast<QV4::Heap::DataClass *>(m()); }
+#define V4_MANAGED(DataClass, superClass) \
+ private: \
+ DataClass() Q_DECL_EQ_DELETE; \
+ Q_DISABLE_COPY(DataClass) \
+ V4_MANAGED_ITSELF(DataClass, superClass)
+
#define Q_MANAGED_TYPE(type) \
public: \
enum { MyType = Type_##type };
@@ -100,7 +117,7 @@ const QV4::VTable classname::static_vtbl = DEFINE_MANAGED_VTABLE_INT(classname,
struct Q_QML_PRIVATE_EXPORT Managed : Value
{
- V4_MANAGED(Base, Managed)
+ V4_MANAGED_ITSELF(Base, Managed)
enum {
IsExecutionContext = false,
IsString = false,
diff --git a/src/qml/jsruntime/qv4math_p.h b/src/qml/jsruntime/qv4math_p.h
index 4f550752aa..cf627bcc5d 100644
--- a/src/qml/jsruntime/qv4math_p.h
+++ b/src/qml/jsruntime/qv4math_p.h
@@ -33,6 +33,17 @@
#ifndef QMLJS_MATH_H
#define QMLJS_MATH_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qglobal.h>
#include <QtCore/qnumeric.h>
diff --git a/src/qml/jsruntime/qv4mathobject_p.h b/src/qml/jsruntime/qv4mathobject_p.h
index ff4fb12ee6..a233f74367 100644
--- a/src/qml/jsruntime/qv4mathobject_p.h
+++ b/src/qml/jsruntime/qv4mathobject_p.h
@@ -33,6 +33,17 @@
#ifndef QV4MATHOBJECT_H
#define QV4MATHOBJECT_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4object_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/qml/jsruntime/qv4memberdata_p.h b/src/qml/jsruntime/qv4memberdata_p.h
index 50b8ddb3d1..12f407e869 100644
--- a/src/qml/jsruntime/qv4memberdata_p.h
+++ b/src/qml/jsruntime/qv4memberdata_p.h
@@ -33,6 +33,17 @@
#ifndef QV4MEMBERDATA_H
#define QV4MEMBERDATA_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4global_p.h"
#include "qv4managed_p.h"
diff --git a/src/qml/jsruntime/qv4numberobject_p.h b/src/qml/jsruntime/qv4numberobject_p.h
index 04798d31fc..cc5033531e 100644
--- a/src/qml/jsruntime/qv4numberobject_p.h
+++ b/src/qml/jsruntime/qv4numberobject_p.h
@@ -33,6 +33,17 @@
#ifndef QV4NUMBEROBJECT_H
#define QV4NUMBEROBJECT_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4object_p.h"
#include "qv4functionobject_p.h"
#include <QtCore/qnumeric.h>
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h
index 58dab9691f..5c660f7e3f 100644
--- a/src/qml/jsruntime/qv4object_p.h
+++ b/src/qml/jsruntime/qv4object_p.h
@@ -33,6 +33,17 @@
#ifndef QV4_OBJECT_H
#define QV4_OBJECT_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4managed_p.h"
#include "qv4memberdata_p.h"
#include "qv4arraydata_p.h"
@@ -73,6 +84,9 @@ struct Object : Base {
Data *d() const { return static_cast<Data *>(m()); }
#define V4_OBJECT2(DataClass, superClass) \
+ private: \
+ DataClass() Q_DECL_EQ_DELETE; \
+ Q_DISABLE_COPY(DataClass) \
public: \
Q_MANAGED_CHECK \
typedef QV4::Heap::DataClass Data; \
diff --git a/src/qml/jsruntime/qv4objectiterator_p.h b/src/qml/jsruntime/qv4objectiterator_p.h
index e34b641be9..877b34c22d 100644
--- a/src/qml/jsruntime/qv4objectiterator_p.h
+++ b/src/qml/jsruntime/qv4objectiterator_p.h
@@ -33,6 +33,17 @@
#ifndef QV4OBJECTITERATOR_H
#define QV4OBJECTITERATOR_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4global_p.h"
#include "qv4object_p.h"
diff --git a/src/qml/jsruntime/qv4objectproto_p.h b/src/qml/jsruntime/qv4objectproto_p.h
index d571e50cd4..ec829e4bd2 100644
--- a/src/qml/jsruntime/qv4objectproto_p.h
+++ b/src/qml/jsruntime/qv4objectproto_p.h
@@ -33,6 +33,17 @@
#ifndef QV4ECMAOBJECTS_P_H
#define QV4ECMAOBJECTS_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4object_p.h"
#include "qv4functionobject_p.h"
#include <QtCore/qnumeric.h>
diff --git a/src/qml/jsruntime/qv4persistent_p.h b/src/qml/jsruntime/qv4persistent_p.h
index 67a76742d1..80b4ecdea8 100644
--- a/src/qml/jsruntime/qv4persistent_p.h
+++ b/src/qml/jsruntime/qv4persistent_p.h
@@ -33,6 +33,17 @@
#ifndef QV4PERSISTENT_H
#define QV4PERSISTENT_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4value_p.h"
#include "qv4managed_p.h"
diff --git a/src/qml/jsruntime/qv4profiling_p.h b/src/qml/jsruntime/qv4profiling_p.h
index 505d393a3d..6c54fc9bbd 100644
--- a/src/qml/jsruntime/qv4profiling_p.h
+++ b/src/qml/jsruntime/qv4profiling_p.h
@@ -34,6 +34,17 @@
#ifndef QV4PROFILING_H
#define QV4PROFILING_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4global_p.h"
#include "qv4engine_p.h"
#include "qv4function_p.h"
diff --git a/src/qml/jsruntime/qv4property_p.h b/src/qml/jsruntime/qv4property_p.h
index db8c6017e1..8ddb4cf6f7 100644
--- a/src/qml/jsruntime/qv4property_p.h
+++ b/src/qml/jsruntime/qv4property_p.h
@@ -33,6 +33,17 @@
#ifndef QV4PROPERTYDESCRIPTOR_H
#define QV4PROPERTYDESCRIPTOR_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4global_p.h"
#include "qv4value_p.h"
diff --git a/src/qml/jsruntime/qv4regexp_p.h b/src/qml/jsruntime/qv4regexp_p.h
index af6e346ea8..928362a995 100644
--- a/src/qml/jsruntime/qv4regexp_p.h
+++ b/src/qml/jsruntime/qv4regexp_p.h
@@ -33,6 +33,17 @@
#ifndef QV4REGEXP_H
#define QV4REGEXP_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QString>
#include <QVector>
diff --git a/src/qml/jsruntime/qv4regexpobject_p.h b/src/qml/jsruntime/qv4regexpobject_p.h
index 4f803df9c8..81ea9cf14b 100644
--- a/src/qml/jsruntime/qv4regexpobject_p.h
+++ b/src/qml/jsruntime/qv4regexpobject_p.h
@@ -33,6 +33,17 @@
#ifndef QV4REGEXPOBJECT_H
#define QV4REGEXPOBJECT_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4runtime_p.h"
#include "qv4engine_p.h"
#include "qv4context_p.h"
diff --git a/src/qml/jsruntime/qv4runtime_p.h b/src/qml/jsruntime/qv4runtime_p.h
index f597e4b2e3..571abac21e 100644
--- a/src/qml/jsruntime/qv4runtime_p.h
+++ b/src/qml/jsruntime/qv4runtime_p.h
@@ -33,6 +33,17 @@
#ifndef QMLJS_RUNTIME_H
#define QMLJS_RUNTIME_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4global_p.h"
#include "qv4value_p.h"
#include "qv4context_p.h"
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h
index 0c79897015..101d3dcb3c 100644
--- a/src/qml/jsruntime/qv4scopedvalue_p.h
+++ b/src/qml/jsruntime/qv4scopedvalue_p.h
@@ -33,6 +33,17 @@
#ifndef QV4SCOPEDVALUE_P_H
#define QV4SCOPEDVALUE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4engine_p.h"
#include "qv4value_p.h"
#include "qv4persistent_p.h"
diff --git a/src/qml/jsruntime/qv4script_p.h b/src/qml/jsruntime/qv4script_p.h
index 63e8239342..4fecf62082 100644
--- a/src/qml/jsruntime/qv4script_p.h
+++ b/src/qml/jsruntime/qv4script_p.h
@@ -33,6 +33,17 @@
#ifndef QV4SCRIPT_H
#define QV4SCRIPT_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4global_p.h"
#include "qv4engine_p.h"
#include "qv4functionobject_p.h"
diff --git a/src/qml/jsruntime/qv4sparsearray_p.h b/src/qml/jsruntime/qv4sparsearray_p.h
index 8496fc32e7..136f26a25c 100644
--- a/src/qml/jsruntime/qv4sparsearray_p.h
+++ b/src/qml/jsruntime/qv4sparsearray_p.h
@@ -34,6 +34,17 @@
#ifndef QV4SPARSEARRAY_H
#define QV4SPARSEARRAY_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4global_p.h"
#include <QtCore/qlist.h>
diff --git a/src/qml/jsruntime/qv4string_p.h b/src/qml/jsruntime/qv4string_p.h
index 93a25d7ed5..85433369fc 100644
--- a/src/qml/jsruntime/qv4string_p.h
+++ b/src/qml/jsruntime/qv4string_p.h
@@ -33,6 +33,17 @@
#ifndef QV4STRING_H
#define QV4STRING_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qstring.h>
#include "qv4managed_p.h"
diff --git a/src/qml/jsruntime/qv4stringobject_p.h b/src/qml/jsruntime/qv4stringobject_p.h
index 86d77c726a..7d4f78d3c5 100644
--- a/src/qml/jsruntime/qv4stringobject_p.h
+++ b/src/qml/jsruntime/qv4stringobject_p.h
@@ -33,6 +33,17 @@
#ifndef QV4STRINGOBJECT_P_H
#define QV4STRINGOBJECT_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4object_p.h"
#include "qv4functionobject_p.h"
#include <QtCore/qnumeric.h>
diff --git a/src/qml/jsruntime/qv4typedarray_p.h b/src/qml/jsruntime/qv4typedarray_p.h
index 74ee285da4..67e04c8ac0 100644
--- a/src/qml/jsruntime/qv4typedarray_p.h
+++ b/src/qml/jsruntime/qv4typedarray_p.h
@@ -33,6 +33,17 @@
#ifndef QV4TYPEDARRAY_H
#define QV4TYPEDARRAY_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4object_p.h"
#include "qv4functionobject_p.h"
#include "qv4arraybuffer_p.h"
diff --git a/src/qml/jsruntime/qv4util_p.h b/src/qml/jsruntime/qv4util_p.h
index f9ae37855e..329831f134 100644
--- a/src/qml/jsruntime/qv4util_p.h
+++ b/src/qml/jsruntime/qv4util_p.h
@@ -33,6 +33,17 @@
#ifndef QV4UTIL_H
#define QV4UTIL_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qv4global_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h
index 14094878d8..5e38873b49 100644
--- a/src/qml/jsruntime/qv4value_p.h
+++ b/src/qml/jsruntime/qv4value_p.h
@@ -33,6 +33,17 @@
#ifndef QV4VALUE_P_H
#define QV4VALUE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <limits.h>
#include <QtCore/QString>
diff --git a/src/qml/jsruntime/qv4vme_moth_p.h b/src/qml/jsruntime/qv4vme_moth_p.h
index 55cac75a66..c0421022d2 100644
--- a/src/qml/jsruntime/qv4vme_moth_p.h
+++ b/src/qml/jsruntime/qv4vme_moth_p.h
@@ -34,6 +34,17 @@
#ifndef QV4VME_MOTH_P_H
#define QV4VME_MOTH_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qv4runtime_p.h>
#include <private/qv4instr_moth_p.h>
diff --git a/src/qml/memory/qv4heap_p.h b/src/qml/memory/qv4heap_p.h
index a93e4191b0..a3db71fee1 100644
--- a/src/qml/memory/qv4heap_p.h
+++ b/src/qml/memory/qv4heap_p.h
@@ -33,6 +33,17 @@
#ifndef QV4HEAP_P_H
#define QV4HEAP_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/QString>
#include <private/qv4global_p.h>
diff --git a/src/qml/memory/qv4mm_p.h b/src/qml/memory/qv4mm_p.h
index c77d5e503d..3543da0907 100644
--- a/src/qml/memory/qv4mm_p.h
+++ b/src/qml/memory/qv4mm_p.h
@@ -34,6 +34,17 @@
#ifndef QV4GC_H
#define QV4GC_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qv4global_p.h>
#include <private/qv4value_p.h>
#include <private/qv4scopedvalue_p.h>
diff --git a/src/qml/parser/qqmljsglobal_p.h b/src/qml/parser/qqmljsglobal_p.h
index fe2cbe7d1d..48ba2b034b 100644
--- a/src/qml/parser/qqmljsglobal_p.h
+++ b/src/qml/parser/qqmljsglobal_p.h
@@ -33,6 +33,17 @@
#ifndef QQMLJSGLOBAL_P_H
#define QQMLJSGLOBAL_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qglobal.h>
#ifdef QT_CREATOR
diff --git a/src/qml/qml/qqmlaccessors_p.h b/src/qml/qml/qqmlaccessors_p.h
index 24cd0b60cb..8b0a587740 100644
--- a/src/qml/qml/qqmlaccessors_p.h
+++ b/src/qml/qml/qqmlaccessors_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLACCESSORS_P_H
#define QQMLACCESSORS_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qtqmlglobal_p.h>
#include <QtCore/qbytearray.h>
#include <QtCore/qvector.h>
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index be482b4639..040089db20 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -777,8 +777,8 @@ QObject *QQmlComponent::create(QQmlContext *context)
/*!
This method provides advanced control over component instance creation.
- In general, programmers should use QQmlComponent::create() to create a
- component.
+ In general, programmers should use QQmlComponent::create() to create object
+ instances.
Create an object instance from this component. Returns 0 if creation
failed. \a publicContext specifies the context within which to create the object
diff --git a/src/qml/qml/qqmlcomponentattached_p.h b/src/qml/qml/qqmlcomponentattached_p.h
index b6ad3dec00..fa103e7fce 100644
--- a/src/qml/qml/qqmlcomponentattached_p.h
+++ b/src/qml/qml/qqmlcomponentattached_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLCOMPONENTATTACHED_P_H
#define QQMLCOMPONENTATTACHED_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQml/qqml.h>
#include <private/qtqmlglobal_p.h>
#include <QtCore/QObject>
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 47cd36b8f6..56252ec1ab 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -913,7 +913,7 @@ QQuickWorkerScriptEngine *QQmlEnginePrivate::getWorkerScriptEngine()
Note that the \l {Qt Quick 1} version is called QDeclarativeEngine.
- \sa QQmlComponent, QQmlContext
+ \sa QQmlComponent, QQmlContext, {QML Global Object}
*/
/*!
@@ -1435,7 +1435,8 @@ QObject *qmlAttachedPropertiesObjectById(int id, const QObject *object, bool cre
if (rv || !create)
return rv;
- QQmlAttachedPropertiesFunc pf = QQmlMetaType::attachedPropertiesFuncById(id);
+ QQmlEnginePrivate *engine = QQmlEnginePrivate::get(data->context);
+ QQmlAttachedPropertiesFunc pf = QQmlMetaType::attachedPropertiesFuncById(engine, id);
if (!pf)
return 0;
@@ -1450,8 +1451,10 @@ QObject *qmlAttachedPropertiesObjectById(int id, const QObject *object, bool cre
QObject *qmlAttachedPropertiesObject(int *idCache, const QObject *object,
const QMetaObject *attachedMetaObject, bool create)
{
- if (*idCache == -1)
- *idCache = QQmlMetaType::attachedPropertiesFuncId(attachedMetaObject);
+ if (*idCache == -1) {
+ QQmlEngine *engine = object ? qmlEngine(object) : 0;
+ *idCache = QQmlMetaType::attachedPropertiesFuncId(engine ? QQmlEnginePrivate::get(engine) : 0, attachedMetaObject);
+ }
if (*idCache == -1 || !object)
return 0;
diff --git a/src/qml/qml/qqmlglobal_p.h b/src/qml/qml/qqmlglobal_p.h
index d09ae21f56..b7212648ab 100644
--- a/src/qml/qml/qqmlglobal_p.h
+++ b/src/qml/qml/qqmlglobal_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLGLOBAL_H
#define QQMLGLOBAL_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qtqmlglobal_p.h>
#include <QtCore/QObject>
#include <private/qqmlpropertycache_p.h>
diff --git a/src/qml/qml/qqmlinfo.h b/src/qml/qml/qqmlinfo.h
index b56f74198c..90ac1dd777 100644
--- a/src/qml/qml/qqmlinfo.h
+++ b/src/qml/qml/qqmlinfo.h
@@ -48,7 +48,11 @@ namespace QtQml {
Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me, const QQmlError &error);
Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me, const QList<QQmlError> &errors);
}
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_CLANG("-Wheader-hygiene")
+// This is necessary to allow for QtQuick1 and QtQuick2 scenes in a single application.
using namespace QtQml;
+QT_WARNING_POP
class QQmlInfoPrivate;
class Q_QML_EXPORT QQmlInfo : public QDebug
diff --git a/src/qml/qml/qqmllocale_p.h b/src/qml/qml/qqmllocale_p.h
index 3d2ed307d1..0c2fbbdb14 100644
--- a/src/qml/qml/qqmllocale_p.h
+++ b/src/qml/qml/qqmllocale_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLLOCALE_H
#define QQMLLOCALE_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include <QtCore/qlocale.h>
diff --git a/src/qml/qml/qqmlmemoryprofiler_p.h b/src/qml/qml/qqmlmemoryprofiler_p.h
index 98977f9db5..77008bd448 100644
--- a/src/qml/qml/qqmlmemoryprofiler_p.h
+++ b/src/qml/qml/qqmlmemoryprofiler_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLMEMORYPROFILER_H
#define QQMLMEMORYPROFILER_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qtqmlglobal_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp
index 04c001d305..26271e3f03 100644
--- a/src/qml/qml/qqmlmetatype.cpp
+++ b/src/qml/qml/qqmlmetatype.cpp
@@ -474,18 +474,24 @@ QQmlType *QQmlType::superType() const
return d->superType;
}
-int QQmlType::resolveCompositeEnumValue(QQmlEnginePrivate *engine, const QString &name, bool *ok) const
+QQmlType *QQmlType::resolveCompositeBaseType(QQmlEnginePrivate *engine) const
{
Q_ASSERT(isComposite());
- *ok = false;
if (!engine)
- return -1;
+ return 0;
QQmlTypeData *td = engine->typeLoader.getType(sourceUrl());
if (!td || !td->isComplete())
- return -1;
+ return 0;
QQmlCompiledData *cd = td->compiledData();
const QMetaObject *mo = cd->rootPropertyCache->firstCppMetaObject();
- QQmlType *type = QQmlMetaType::qmlType(mo);
+ return QQmlMetaType::qmlType(mo);
+}
+
+int QQmlType::resolveCompositeEnumValue(QQmlEnginePrivate *engine, const QString &name, bool *ok) const
+{
+ Q_ASSERT(isComposite());
+ *ok = false;
+ QQmlType *type = resolveCompositeBaseType(engine);
if (!type)
return -1;
return type->enumValue(engine, name, ok);
@@ -856,18 +862,26 @@ int QQmlType::metaObjectRevision() const
return d->revision;
}
-QQmlAttachedPropertiesFunc QQmlType::attachedPropertiesFunction() const
+QQmlAttachedPropertiesFunc QQmlType::attachedPropertiesFunction(QQmlEnginePrivate *engine) const
{
- if (d->regType != CppType)
- return 0;
- return d->extraData.cd->attachedPropertiesFunc;
+ if (d->regType == CppType)
+ return d->extraData.cd->attachedPropertiesFunc;
+
+ QQmlType *base = 0;
+ if (d->regType == CompositeType)
+ base = resolveCompositeBaseType(engine);
+ return base ? base->attachedPropertiesFunction(engine) : 0;
}
-const QMetaObject *QQmlType::attachedPropertiesType() const
+const QMetaObject *QQmlType::attachedPropertiesType(QQmlEnginePrivate *engine) const
{
- if (d->regType != CppType)
- return 0;
- return d->extraData.cd->attachedPropertiesType;
+ if (d->regType == CppType)
+ return d->extraData.cd->attachedPropertiesType;
+
+ QQmlType *base = 0;
+ if (d->regType == CompositeType)
+ base = resolveCompositeBaseType(engine);
+ return base ? base->attachedPropertiesType(engine) : 0;
}
/*
@@ -875,11 +889,15 @@ This is the id passed to qmlAttachedPropertiesById(). This is different from th
for the case that a single class is registered under two or more names (eg. Item in
Qt 4.7 and QtQuick 1.0).
*/
-int QQmlType::attachedPropertiesId() const
+int QQmlType::attachedPropertiesId(QQmlEnginePrivate *engine) const
{
- if (d->regType != CppType)
- return 0;
- return d->extraData.cd->attachedPropertiesId;
+ if (d->regType == CppType)
+ return d->extraData.cd->attachedPropertiesId;
+
+ QQmlType *base = 0;
+ if (d->regType == CompositeType)
+ base = resolveCompositeBaseType(engine);
+ return base ? base->attachedPropertiesId(engine) : 0;
}
int QQmlType::parserStatusCast() const
@@ -1560,25 +1578,25 @@ int QQmlMetaType::listType(int id)
return 0;
}
-int QQmlMetaType::attachedPropertiesFuncId(const QMetaObject *mo)
+int QQmlMetaType::attachedPropertiesFuncId(QQmlEnginePrivate *engine, const QMetaObject *mo)
{
QMutexLocker lock(metaTypeDataLock());
QQmlMetaTypeData *data = metaTypeData();
QQmlType *type = data->metaObjectToType.value(mo);
- if (type && type->attachedPropertiesFunction())
- return type->attachedPropertiesId();
+ if (type && type->attachedPropertiesFunction(engine))
+ return type->attachedPropertiesId(engine);
else
return -1;
}
-QQmlAttachedPropertiesFunc QQmlMetaType::attachedPropertiesFuncById(int id)
+QQmlAttachedPropertiesFunc QQmlMetaType::attachedPropertiesFuncById(QQmlEnginePrivate *engine, int id)
{
if (id < 0)
return 0;
QMutexLocker lock(metaTypeDataLock());
QQmlMetaTypeData *data = metaTypeData();
- return data->types.at(id)->attachedPropertiesFunction();
+ return data->types.at(id)->attachedPropertiesFunction(engine);
}
QMetaProperty QQmlMetaType::defaultProperty(const QMetaObject *metaObject)
diff --git a/src/qml/qml/qqmlmetatype_p.h b/src/qml/qml/qqmlmetatype_p.h
index 40765d461a..c120941a03 100644
--- a/src/qml/qml/qqmlmetatype_p.h
+++ b/src/qml/qml/qqmlmetatype_p.h
@@ -92,8 +92,8 @@ public:
static QObject *toQObject(const QVariant &, bool *ok = 0);
static int listType(int);
- static int attachedPropertiesFuncId(const QMetaObject *);
- static QQmlAttachedPropertiesFunc attachedPropertiesFuncById(int);
+ static int attachedPropertiesFuncId(QQmlEnginePrivate *engine, const QMetaObject *);
+ static QQmlAttachedPropertiesFunc attachedPropertiesFuncById(QQmlEnginePrivate *, int);
enum TypeCategory { Unknown, Object, List };
static TypeCategory typeCategory(int);
@@ -169,9 +169,9 @@ public:
int metaObjectRevision() const;
bool containsRevisionedAttributes() const;
- QQmlAttachedPropertiesFunc attachedPropertiesFunction() const;
- const QMetaObject *attachedPropertiesType() const;
- int attachedPropertiesId() const;
+ QQmlAttachedPropertiesFunc attachedPropertiesFunction(QQmlEnginePrivate *engine) const;
+ const QMetaObject *attachedPropertiesType(QQmlEnginePrivate *engine) const;
+ int attachedPropertiesId(QQmlEnginePrivate *engine) const;
int parserStatusCast() const;
const char *interfaceIId() const;
@@ -212,6 +212,7 @@ public:
int enumValue(QQmlEnginePrivate *engine, const QV4::String *, bool *ok) const;
private:
QQmlType *superType() const;
+ QQmlType *resolveCompositeBaseType(QQmlEnginePrivate *engine) const;
int resolveCompositeEnumValue(QQmlEnginePrivate *engine, const QString &name, bool *ok) const;
friend class QQmlTypePrivate;
friend struct QQmlMetaTypeData;
diff --git a/src/qml/qml/qqmlnotifier_p.h b/src/qml/qml/qqmlnotifier_p.h
index 90902c089d..ac0aab892f 100644
--- a/src/qml/qml/qqmlnotifier_p.h
+++ b/src/qml/qml/qqmlnotifier_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLNOTIFIER_P_H
#define QQMLNOTIFIER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qqmldata_p.h"
#include <QtCore/qmetaobject.h>
#include <private/qmetaobject_p.h>
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp
index 765437b423..f096dfeea9 100644
--- a/src/qml/qml/qqmlobjectcreator.cpp
+++ b/src/qml/qml/qqmlobjectcreator.cpp
@@ -706,7 +706,12 @@ bool QQmlObjectCreator::setPropertyBinding(const QQmlPropertyData *property, con
QQmlCompiledData::TypeReference *tr = resolvedTypes.value(binding->propertyNameIndex);
Q_ASSERT(tr);
QQmlType *attachedType = tr->type;
- const int id = attachedType->attachedPropertiesId();
+ if (!attachedType) {
+ QQmlTypeNameCache::Result res = context->imports->query(stringAt(binding->propertyNameIndex));
+ if (res.isValid())
+ attachedType = res.type;
+ }
+ const int id = attachedType->attachedPropertiesId(QQmlEnginePrivate::get(engine));
QObject *qmlObject = qmlAttachedPropertiesObjectById(id, _qobject);
if (!populateInstance(binding->value.objectIndex, qmlObject, qmlObject, /*value type property*/0))
return false;
diff --git a/src/qml/qml/qqmlobjectcreator_p.h b/src/qml/qml/qqmlobjectcreator_p.h
index 433bbf5bf2..620ae75f53 100644
--- a/src/qml/qml/qqmlobjectcreator_p.h
+++ b/src/qml/qml/qqmlobjectcreator_p.h
@@ -33,6 +33,17 @@
#ifndef QQMLOBJECTCREATOR_P_H
#define QQMLOBJECTCREATOR_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qqmlimport_p.h>
#include <private/qqmltypenamecache_p.h>
#include <private/qv4compileddata_p.h>
diff --git a/src/qml/qml/qqmlopenmetaobject.cpp b/src/qml/qml/qqmlopenmetaobject.cpp
index 16138508dd..9188ba6174 100644
--- a/src/qml/qml/qqmlopenmetaobject.cpp
+++ b/src/qml/qml/qqmlopenmetaobject.cpp
@@ -261,8 +261,10 @@ void QQmlOpenMetaObject::emitPropertyNotification(const QByteArray &propertyName
activate(d->object, *iter + d->type->d->signalOffset, 0);
}
-int QQmlOpenMetaObject::metaCall(QMetaObject::Call c, int id, void **a)
+int QQmlOpenMetaObject::metaCall(QObject *o, QMetaObject::Call c, int id, void **a)
{
+ Q_ASSERT(d->object == o);
+
if (( c == QMetaObject::ReadProperty || c == QMetaObject::WriteProperty)
&& id >= d->type->d->propertyOffset) {
int propId = id - d->type->d->propertyOffset;
@@ -276,15 +278,15 @@ int QQmlOpenMetaObject::metaCall(QMetaObject::Call c, int id, void **a)
prop.first = propertyWriteValue(propId, *reinterpret_cast<QVariant *>(a[0]));
prop.second = true;
propertyWritten(propId);
- activate(d->object, d->type->d->signalOffset + propId, 0);
+ activate(o, d->type->d->signalOffset + propId, 0);
}
}
return -1;
} else {
if (d->parent)
- return d->parent->metaCall(c, id, a);
+ return d->parent->metaCall(o, c, id, a);
else
- return d->object->qt_metacall(c, id, a);
+ return o->qt_metacall(c, id, a);
}
}
diff --git a/src/qml/qml/qqmlopenmetaobject_p.h b/src/qml/qml/qqmlopenmetaobject_p.h
index 75ce9addd6..9728220b5a 100644
--- a/src/qml/qml/qqmlopenmetaobject_p.h
+++ b/src/qml/qml/qqmlopenmetaobject_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLOPENMETAOBJECT_H
#define QQMLOPENMETAOBJECT_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/QMetaObject>
#include <QtCore/QObject>
@@ -105,7 +116,7 @@ public:
void emitPropertyNotification(const QByteArray &propertyName);
protected:
- virtual int metaCall(QMetaObject::Call _c, int _id, void **_a);
+ virtual int metaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a);
virtual int createProperty(const char *, const char *);
virtual void propertyRead(int);
diff --git a/src/qml/qml/qqmlplatform_p.h b/src/qml/qml/qqmlplatform_p.h
index 363341c89e..c1a481a439 100644
--- a/src/qml/qml/qqmlplatform_p.h
+++ b/src/qml/qml/qqmlplatform_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLPLATFORM_P_H
#define QQMLPLATFORM_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/QObject>
#include <qqml.h>
#include <private/qtqmlglobal_p.h>
diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp
index d3f7070528..1b78ada698 100644
--- a/src/qml/qml/qqmlproperty.cpp
+++ b/src/qml/qml/qqmlproperty.cpp
@@ -248,10 +248,11 @@ void QQmlPropertyPrivate::initProperty(QObject *obj, const QString &name)
QQmlTypeNameCache::Result r = typeNameCache->query(pathName);
if (r.isValid()) {
if (r.type) {
- QQmlAttachedPropertiesFunc func = r.type->attachedPropertiesFunction();
+ QQmlEnginePrivate *enginePrivate = QQmlEnginePrivate::get(engine);
+ QQmlAttachedPropertiesFunc func = r.type->attachedPropertiesFunction(enginePrivate);
if (!func) return; // Not an attachable type
- currentObject = qmlAttachedPropertiesObjectById(r.type->attachedPropertiesId(), currentObject);
+ currentObject = qmlAttachedPropertiesObjectById(r.type->attachedPropertiesId(enginePrivate), currentObject);
if (!currentObject) return; // Something is broken with the attachable type
} else if (r.importNamespace) {
if ((ii + 1) == path.count()) return; // No type following the namespace
@@ -259,10 +260,11 @@ void QQmlPropertyPrivate::initProperty(QObject *obj, const QString &name)
++ii; r = typeNameCache->query(path.at(ii), r.importNamespace);
if (!r.type) return; // Invalid type in namespace
- QQmlAttachedPropertiesFunc func = r.type->attachedPropertiesFunction();
+ QQmlEnginePrivate *enginePrivate = QQmlEnginePrivate::get(engine);
+ QQmlAttachedPropertiesFunc func = r.type->attachedPropertiesFunction(enginePrivate);
if (!func) return; // Not an attachable type
- currentObject = qmlAttachedPropertiesObjectById(r.type->attachedPropertiesId(), currentObject);
+ currentObject = qmlAttachedPropertiesObjectById(r.type->attachedPropertiesId(enginePrivate), currentObject);
if (!currentObject) return; // Something is broken with the attachable type
} else if (r.scriptIndex != -1) {
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp
index 9a935ed55f..e8c9989fdf 100644
--- a/src/qml/qml/qqmlpropertycache.cpp
+++ b/src/qml/qml/qqmlpropertycache.cpp
@@ -346,25 +346,6 @@ void QQmlPropertyCache::appendProperty(const QString &name,
setNamedProperty(name, index + propertyOffset(), propertyIndexCache.data() + index, (old != 0));
}
-void QQmlPropertyCache::appendProperty(const QHashedCStringRef &name,
- quint32 flags, int coreIndex, int propType, int notifyIndex)
-{
- QQmlPropertyData data;
- data.propType = propType;
- data.coreIndex = coreIndex;
- data.notifyIndex = notifyIndex;
- data.flags = flags;
-
- QQmlPropertyData *old = findNamedProperty(name);
- if (old)
- data.markAsOverrideOf(old);
-
- int index = propertyIndexCache.count();
- propertyIndexCache.append(data);
-
- setNamedProperty(name, index + propertyOffset(), propertyIndexCache.data() + index, (old != 0));
-}
-
void QQmlPropertyCache::appendSignal(const QString &name, quint32 flags, int coreIndex,
const int *types, const QList<QByteArray> &names)
{
@@ -402,43 +383,6 @@ void QQmlPropertyCache::appendSignal(const QString &name, quint32 flags, int cor
setNamedProperty(handlerName, signalHandlerIndex + signalOffset(), signalHandlerIndexCache.data() + signalHandlerIndex, (old != 0));
}
-void QQmlPropertyCache::appendSignal(const QHashedCStringRef &name, quint32 flags, int coreIndex,
- const int *types, const QList<QByteArray> &names)
-{
- QQmlPropertyData data;
- data.propType = QVariant::Invalid;
- data.coreIndex = coreIndex;
- data.flags = flags;
- data.arguments = 0;
-
- QQmlPropertyData handler = data;
- handler.flags |= QQmlPropertyData::IsSignalHandler;
-
- if (types) {
- int argumentCount = *types;
- QQmlPropertyCacheMethodArguments *args = createArgumentsObject(argumentCount, names);
- ::memcpy(args->arguments, types, (argumentCount + 1) * sizeof(int));
- args->argumentsValid = true;
- data.arguments = args;
- }
-
- QQmlPropertyData *old = findNamedProperty(name);
- if (old)
- data.markAsOverrideOf(old);
-
- int methodIndex = methodIndexCache.count();
- methodIndexCache.append(data);
-
- int signalHandlerIndex = signalHandlerIndexCache.count();
- signalHandlerIndexCache.append(handler);
-
- QString handlerName = QLatin1String("on") + name.toUtf16();
- handlerName[2] = handlerName[2].toUpper();
-
- setNamedProperty(name, methodIndex + methodOffset(), methodIndexCache.data() + methodIndex, (old != 0));
- setNamedProperty(handlerName, signalHandlerIndex + signalOffset(), signalHandlerIndexCache.data() + signalHandlerIndex, (old != 0));
-}
-
void QQmlPropertyCache::appendMethod(const QString &name, quint32 flags, int coreIndex,
const QList<QByteArray> &names)
{
@@ -466,33 +410,6 @@ void QQmlPropertyCache::appendMethod(const QString &name, quint32 flags, int cor
setNamedProperty(name, methodIndex + methodOffset(), methodIndexCache.data() + methodIndex, (old != 0));
}
-void QQmlPropertyCache::appendMethod(const QHashedCStringRef &name, quint32 flags, int coreIndex,
- const QList<QByteArray> &names)
-{
- int argumentCount = names.count();
-
- QQmlPropertyData data;
- data.propType = QMetaType::QVariant;
- data.coreIndex = coreIndex;
-
- QQmlPropertyCacheMethodArguments *args = createArgumentsObject(argumentCount, names);
- for (int ii = 0; ii < argumentCount; ++ii)
- args->arguments[ii + 1] = QMetaType::QVariant;
- args->argumentsValid = true;
- data.arguments = args;
-
- data.flags = flags;
-
- QQmlPropertyData *old = findNamedProperty(name);
- if (old)
- data.markAsOverrideOf(old);
-
- int methodIndex = methodIndexCache.count();
- methodIndexCache.append(data);
-
- setNamedProperty(name, methodIndex + methodOffset(), methodIndexCache.data() + methodIndex, (old != 0));
-}
-
// Returns this property cache's metaObject. May be null if it hasn't been created yet.
const QMetaObject *QQmlPropertyCache::metaObject() const
{
@@ -893,19 +810,17 @@ void QQmlPropertyCache::invalidate(const QMetaObject *metaObject)
This is different from QMetaMethod::methodIndex().
*/
QQmlPropertyData *
-QQmlPropertyCache::signal(int index, QQmlPropertyCache **c) const
+QQmlPropertyCache::signal(int index) const
{
if (index < 0 || index >= (signalHandlerIndexCacheStart + signalHandlerIndexCache.count()))
return 0;
if (index < signalHandlerIndexCacheStart)
- return _parent->signal(index, c);
+ return _parent->signal(index);
QQmlPropertyData *rv = const_cast<QQmlPropertyData *>(&methodIndexCache.at(index - signalHandlerIndexCacheStart));
- if (rv->notFullyResolved()) resolve(rv);
Q_ASSERT(rv->isSignal() || rv->coreIndex == -1);
- if (c) *c = const_cast<QQmlPropertyCache *>(this);
- return rv;
+ return ensureResolved(rv);
}
int QQmlPropertyCache::methodIndexToSignalIndex(int index) const
@@ -1101,52 +1016,6 @@ QQmlPropertyCacheMethodArguments *QQmlPropertyCache::createArgumentsObject(int a
return args;
}
-/*! \internal
- \a index MUST be in the signal index range (see QObjectPrivate::signalIndex()).
- This is different from QMetaMethod::methodIndex().
-*/
-QString QQmlPropertyCache::signalParameterStringForJS(int index, QString *errorString)
-{
- QQmlPropertyCache *c = 0;
- QQmlPropertyData *signalData = signal(index, &c);
- if (!signalData)
- return QString();
-
- typedef QQmlPropertyCacheMethodArguments A;
-
- if (signalData->arguments) {
- A *arguments = static_cast<A *>(signalData->arguments);
- if (arguments->signalParameterStringForJS) {
- if (arguments->parameterError) {
- if (errorString)
- *errorString = *arguments->signalParameterStringForJS;
- return QString();
- }
- return *arguments->signalParameterStringForJS;
- }
- }
-
- QList<QByteArray> parameterNameList = signalParameterNames(index);
-
- if (!signalData->arguments) {
- A *args = c->createArgumentsObject(parameterNameList.count(), parameterNameList);
- signalData->arguments = args;
- }
-
- QString error;
- QString parameters = signalParameterStringForJS(engine, parameterNameList, &error);
-
- A *arguments = static_cast<A *>(signalData->arguments);
- arguments->signalParameterStringForJS = new QString(!error.isEmpty() ? error : parameters);
- if (!error.isEmpty()) {
- arguments->parameterError = true;
- if (errorString)
- *errorString = *arguments->signalParameterStringForJS;
- return QString();
- }
- return *arguments->signalParameterStringForJS;
-}
-
QString QQmlPropertyCache::signalParameterStringForJS(QV4::ExecutionEngine *engine, const QList<QByteArray> &parameterNameList, QString *errorString)
{
bool unnamedParameter = false;
@@ -1405,19 +1274,19 @@ void QQmlPropertyCache::toMetaObjectBuilder(QMetaObjectBuilder &builder)
if (data->propType != 0)
returnType = QMetaType::typeName(data->propType);
- QByteArray signature = methods.at(ii).first.toUtf8() + "(";
+ QByteArray signature = methods.at(ii).first.toUtf8() + '(';
QQmlPropertyCacheMethodArguments *arguments = 0;
if (data->hasArguments()) {
arguments = (QQmlPropertyCacheMethodArguments *)data->arguments;
Q_ASSERT(arguments->argumentsValid);
for (int ii = 0; ii < arguments->arguments[0]; ++ii) {
- if (ii != 0) signature.append(",");
+ if (ii != 0) signature.append(',');
signature.append(QMetaType::typeName(arguments->arguments[1 + ii]));
}
}
- signature.append(")");
+ signature.append(')');
QMetaMethodBuilder method;
if (data->isSignal()) {
diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h
index 2ee399c496..610709ef7f 100644
--- a/src/qml/qml/qqmlpropertycache_p.h
+++ b/src/qml/qml/qqmlpropertycache_p.h
@@ -267,16 +267,10 @@ public:
int methodCount, int signalCount);
void appendProperty(const QString &,
quint32 flags, int coreIndex, int propType, int notifyIndex);
- void appendProperty(const QHashedCStringRef &,
- quint32 flags, int coreIndex, int propType, int notifyIndex);
void appendSignal(const QString &, quint32, int coreIndex, const int *types = 0,
const QList<QByteArray> &names = QList<QByteArray>());
- void appendSignal(const QHashedCStringRef &, quint32, int coreIndex, const int *types = 0,
- const QList<QByteArray> &names = QList<QByteArray>());
void appendMethod(const QString &, quint32 flags, int coreIndex,
const QList<QByteArray> &names = QList<QByteArray>());
- void appendMethod(const QHashedCStringRef &, quint32 flags, int coreIndex,
- const QList<QByteArray> &names = QList<QByteArray>());
const QMetaObject *metaObject() const;
const QMetaObject *createMetaObject();
@@ -290,7 +284,7 @@ public:
QQmlPropertyData *property(int) const;
QQmlPropertyData *method(int) const;
- QQmlPropertyData *signal(int index) const { return signal(index, 0); }
+ QQmlPropertyData *signal(int index) const;
int methodIndexToSignalIndex(int) const;
QStringList propertyNames() const;
@@ -313,7 +307,6 @@ public:
static int originalClone(QObject *, int index);
QList<QByteArray> signalParameterNames(int index) const;
- QString signalParameterStringForJS(int index, QString *errorString = 0);
static QString signalParameterStringForJS(QV4::ExecutionEngine *engine, const QList<QByteArray> &parameterNameList, QString *errorString = 0);
const char *className() const;
@@ -347,9 +340,7 @@ private:
QQmlPropertyData::Flag methodFlags = QQmlPropertyData::NoFlags,
QQmlPropertyData::Flag signalFlags = QQmlPropertyData::NoFlags);
- QQmlPropertyCacheMethodArguments *createArgumentsObject(int count,
- const QList<QByteArray> &names);
- QQmlPropertyData *signal(int, QQmlPropertyCache **) const;
+ QQmlPropertyCacheMethodArguments *createArgumentsObject(int count, const QList<QByteArray> &names);
typedef QVector<QQmlPropertyData> IndexCache;
typedef QStringMultiHash<QPair<int, QQmlPropertyData *> > StringCache;
diff --git a/src/qml/qml/qqmlproxymetaobject.cpp b/src/qml/qml/qqmlproxymetaobject.cpp
index bf735a9f0c..ba5215b831 100644
--- a/src/qml/qml/qqmlproxymetaobject.cpp
+++ b/src/qml/qml/qqmlproxymetaobject.cpp
@@ -59,8 +59,10 @@ QQmlProxyMetaObject::~QQmlProxyMetaObject()
proxies = 0;
}
-int QQmlProxyMetaObject::metaCall(QMetaObject::Call c, int id, void **a)
+int QQmlProxyMetaObject::metaCall(QObject *o, QMetaObject::Call c, int id, void **a)
{
+ Q_ASSERT(object == o);
+
if ((c == QMetaObject::ReadProperty ||
c == QMetaObject::WriteProperty) &&
id >= metaObjects->last().propertyOffset) {
@@ -108,7 +110,7 @@ int QQmlProxyMetaObject::metaCall(QMetaObject::Call c, int id, void **a)
}
if (parent)
- return parent->metaCall(c, id, a);
+ return parent->metaCall(o, c, id, a);
else
return object->qt_metacall(c, id, a);
}
diff --git a/src/qml/qml/qqmlproxymetaobject_p.h b/src/qml/qml/qqmlproxymetaobject_p.h
index 862b0fb7c2..6ae35fe11f 100644
--- a/src/qml/qml/qqmlproxymetaobject_p.h
+++ b/src/qml/qml/qqmlproxymetaobject_p.h
@@ -71,7 +71,7 @@ public:
virtual ~QQmlProxyMetaObject();
protected:
- virtual int metaCall(QMetaObject::Call _c, int _id, void **_a);
+ virtual int metaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a);
private:
QList<ProxyData> *metaObjects;
diff --git a/src/qml/qml/qqmlscriptstring_p.h b/src/qml/qml/qqmlscriptstring_p.h
index 24bfdcdd4e..aa0a1e5695 100644
--- a/src/qml/qml/qqmlscriptstring_p.h
+++ b/src/qml/qml/qqmlscriptstring_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLSCRIPTSTRING_P_H
#define QQMLSCRIPTSTRING_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qqmlscriptstring.h"
#include <QtQml/qqmlcontext.h>
diff --git a/src/qml/qml/qqmltypenotavailable_p.h b/src/qml/qml/qqmltypenotavailable_p.h
index f69a4f8732..324e07b80c 100644
--- a/src/qml/qml/qqmltypenotavailable_p.h
+++ b/src/qml/qml/qqmltypenotavailable_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLTYPENOTAVAILABLE_H
#define QQMLTYPENOTAVAILABLE_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
QT_BEGIN_NAMESPACE
diff --git a/src/qml/qml/qqmltypewrapper.cpp b/src/qml/qml/qqmltypewrapper.cpp
index d70a4019b2..6c29f2fbb5 100644
--- a/src/qml/qml/qqmltypewrapper.cpp
+++ b/src/qml/qml/qqmltypewrapper.cpp
@@ -185,7 +185,7 @@ ReturnedValue QmlTypeWrapper::get(const Managed *m, String *name, bool *hasPrope
// Fall through to base implementation
} else if (w->d()->object) {
- QObject *ao = qmlAttachedPropertiesObjectById(type->attachedPropertiesId(), object);
+ QObject *ao = qmlAttachedPropertiesObjectById(type->attachedPropertiesId(QQmlEnginePrivate::get(v4->qmlEngine())), object);
if (ao)
return QV4::QObjectWrapper::getQmlProperty(v4, context, ao, name, QV4::QObjectWrapper::IgnoreRevision, hasProperty);
@@ -241,7 +241,8 @@ void QmlTypeWrapper::put(Managed *m, String *name, const Value &value)
QQmlType *type = w->d()->type;
if (type && !type->isSingleton() && w->d()->object) {
QObject *object = w->d()->object;
- QObject *ao = qmlAttachedPropertiesObjectById(type->attachedPropertiesId(), object);
+ QQmlEngine *e = scope.engine->qmlEngine();
+ QObject *ao = qmlAttachedPropertiesObjectById(type->attachedPropertiesId(QQmlEnginePrivate::get(e)), object);
if (ao)
QV4::QObjectWrapper::setQmlProperty(v4, context, ao, name, QV4::QObjectWrapper::IgnoreRevision, value);
} else if (type && type->isSingleton()) {
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp
index 509bbf7039..b1f2549035 100644
--- a/src/qml/qml/qqmlvmemetaobject.cpp
+++ b/src/qml/qml/qqmlvmemetaobject.cpp
@@ -63,18 +63,19 @@ QQmlVMEVariantQObjectPtr::~QQmlVMEVariantQObjectPtr()
void QQmlVMEVariantQObjectPtr::objectDestroyed(QObject *)
{
- if (m_target && m_index >= 0) {
- if (m_target->propertiesInitialized && !m_target->properties.isUndefined()) {
- QV4::ExecutionEngine *v4 = m_target->cache->engine;
- if (v4) {
- QV4::Scope scope(v4);
- QV4::Scoped<QV4::MemberData> sp(scope, m_target->properties.value());
+ if (!m_target || QQmlData::wasDeleted(m_target->object))
+ return;
+
+ if (m_index >= 0) {
+ QV4::ExecutionEngine *v4 = m_target->properties.engine();
+ if (v4) {
+ QV4::Scope scope(v4);
+ QV4::Scoped<QV4::MemberData> sp(scope, m_target->properties.value());
+ if (sp)
*(sp->data() + m_index) = QV4::Primitive::nullValue();
- }
}
- if (!QQmlData::wasDeleted(m_target->object))
- m_target->activate(m_target->object, m_target->methodOffset() + m_index, 0);
+ m_target->activate(m_target->object, m_target->methodOffset() + m_index, 0);
}
}
@@ -147,12 +148,14 @@ QAbstractDynamicMetaObject *QQmlVMEMetaObject::toDynamicMetaObject(QObject *o)
QQmlVMEMetaObject::QQmlVMEMetaObject(QObject *obj,
QQmlPropertyCache *cache,
- const QQmlVMEMetaData *meta, QV4::ExecutionContext *qmlBindingContext, QQmlCompiledData *compiledData)
-: object(obj),
- ctxt(QQmlData::get(obj, true)->outerContext), cache(cache), metaData(meta),
- hasAssignedMetaObjectData(false), aliasEndpoints(0),
- propertiesInitialized(false), interceptors(0), methods(0)
+ const QQmlVMEMetaData *meta)
+ : object(obj),
+ ctxt(QQmlData::get(obj, true)->outerContext), cache(cache), metaData(meta),
+ hasAssignedMetaObjectData(false), aliasEndpoints(0),
+ interceptors(0), methods(0)
{
+ cache->addref();
+
QObjectPrivate *op = QObjectPrivate::get(obj);
if (op->metaObject) {
@@ -165,8 +168,6 @@ QQmlVMEMetaObject::QQmlVMEMetaObject(QObject *obj,
op->metaObject = this;
QQmlData::get(obj)->hasVMEMetaObject = true;
- aConnected.resize(metaData->aliasCount);
- int list_type = qMetaTypeId<QQmlListProperty<QObject> >();
int qobject_type = qMetaTypeId<QObject*>();
int variant_type = qMetaTypeId<QVariant>();
// Need JS wrapper to ensure properties are marked.
@@ -177,31 +178,14 @@ QQmlVMEMetaObject::QQmlVMEMetaObject(QObject *obj,
// ### Optimize
for (int ii = 0; ii < metaData->propertyCount; ++ii) {
int t = (metaData->propertyData() + ii)->propertyType;
- if (t == list_type) {
- listProperties.append(List(methodOffset() + ii, this));
- writeProperty(ii, listProperties.count() - 1);
- } else if (!needsJSWrapper && (t == qobject_type || t == variant_type)) {
+ if (t == qobject_type || t == variant_type) {
needsJSWrapper = true;
+ break;
}
}
if (needsJSWrapper)
ensureQObjectWrapper();
-
- if (qmlBindingContext && metaData->methodCount) {
- methods = new QV4::PersistentValue[metaData->methodCount];
-
- QV4::CompiledData::CompilationUnit *compilationUnit = compiledData->compilationUnit;
- QV4::Scope scope(cache->engine);
- QV4::ScopedObject o(scope);
- for (int index = 0; index < metaData->methodCount; ++index) {
- QQmlVMEMetaData::MethodData *data = metaData->methodData() + index;
-
- QV4::Function *runtimeFunction = compilationUnit->runtimeFunctions[data->runtimeFunctionIndex];
- o = QV4::FunctionObject::createScriptFunction(qmlBindingContext, runtimeFunction);
- methods[index].set(qmlBindingContext->engine(), o);
- }
- }
}
QQmlVMEMetaObject::~QQmlVMEMetaObject()
@@ -211,12 +195,21 @@ QQmlVMEMetaObject::~QQmlVMEMetaObject()
delete [] methods;
qDeleteAll(varObjectGuards);
+
+ cache->release();
}
QV4::MemberData *QQmlVMEMetaObject::propertiesAsMemberData()
{
- if (!ensurePropertiesAllocated())
- return 0;
+ if (properties.isUndefined()) {
+ if (properties.valueRef())
+ // in some situations, the QObject wrapper (and associated data,
+ // such as the varProperties array) will have been cleaned up, but the
+ // QObject ptr will not yet have been deleted (eg, waiting on deleteLater).
+ // In this situation, return 0.
+ return 0;
+ allocateProperties();
+ }
return static_cast<QV4::MemberData*>(properties.asManaged());
}
@@ -442,6 +435,22 @@ QObject* QQmlVMEMetaObject::readPropertyAsQObject(int id)
return wrapper->object();
}
+QList<QObject *> *QQmlVMEMetaObject::readPropertyAsList(int id)
+{
+ QV4::MemberData *md = propertiesAsMemberData();
+ if (!md)
+ return 0;
+
+ QV4::Scope scope(cache->engine);
+ QV4::Scoped<QV4::VariantObject> v(scope, *(md->data() + id));
+ if (!v || (int)v->d()->data.userType() != qMetaTypeId<QList<QObject *> >()) {
+ QVariant variant(qVariantFromValue(QList<QObject*>()));
+ v = cache->engine->newVariantObject(variant);
+ *(md->data() + id) = v;
+ }
+ return static_cast<QList<QObject *> *>(v->d()->data.data());
+}
+
QRectF QQmlVMEMetaObject::readPropertyAsRectF(int id)
{
QV4::MemberData *md = propertiesAsMemberData();
@@ -601,23 +610,25 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void *
break;
default:
{
- QV4::MemberData *md = propertiesAsMemberData();
- if (md) {
- QV4::VariantObject *v = (md->data() + id)->as<QV4::VariantObject>();
- if (v)
- QQml_valueTypeProvider()->readValueType(v->d()->data, a[0], t);
+ if (t == qMetaTypeId<QQmlListProperty<QObject> >()) {
+ QList<QObject *> *list = readPropertyAsList(id);
+ QQmlListProperty<QObject> *p = static_cast<QQmlListProperty<QObject> *>(a[0]);
+ *p = QQmlListProperty<QObject>(object, list,
+ list_append, list_count, list_at,
+ list_clear);
+ p->dummy1 = this;
+ p->dummy2 = reinterpret_cast<void *>(quintptr(methodOffset() + id));
+ } else {
+ QV4::MemberData *md = propertiesAsMemberData();
+ if (md) {
+ QV4::VariantObject *v = (md->data() + id)->as<QV4::VariantObject>();
+ if (v)
+ QQml_valueTypeProvider()->readValueType(v->d()->data, a[0], t);
+ }
}
break;
}
}
- if (t == qMetaTypeId<QQmlListProperty<QObject> >()) {
- const int listIndex = readPropertyAsInt(id);
- const List *list = &listProperties.at(listIndex);
- *reinterpret_cast<QQmlListProperty<QObject> *>(a[0]) =
- QQmlListProperty<QObject>(object, const_cast<List *>(list),
- list_append, list_count, list_at,
- list_clear);
- }
} else if (c == QMetaObject::WriteProperty) {
@@ -826,11 +837,11 @@ QV4::ReturnedValue QQmlVMEMetaObject::method(int index)
{
if (!ctxt || !ctxt->isValid()) {
qWarning("QQmlVMEMetaObject: Internal error - attempted to evaluate a function in an invalid context");
- return QV4::Primitive::undefinedValue().asReturnedValue();
+ return QV4::Encode::undefined();
}
if (!methods)
- methods = new QV4::PersistentValue[metaData->methodCount];
+ return QV4::Encode::undefined();
return methods[index].value();
}
@@ -959,26 +970,28 @@ void QQmlVMEMetaObject::listChanged(int id)
void QQmlVMEMetaObject::list_append(QQmlListProperty<QObject> *prop, QObject *o)
{
- List *list = static_cast<List *>(prop->data);
+ QList<QObject *> *list = static_cast<QList<QObject *> *>(prop->data);
list->append(o);
- list->mo->activate(prop->object, list->notifyIndex, 0);
+ static_cast<QQmlVMEMetaObject *>(prop->dummy1)->activate(prop->object, reinterpret_cast<quintptr>(prop->dummy2), 0);
}
int QQmlVMEMetaObject::list_count(QQmlListProperty<QObject> *prop)
{
- return static_cast<List *>(prop->data)->count();
+ QList<QObject *> *list = static_cast<QList<QObject *> *>(prop->data);
+ return list->count();
}
QObject *QQmlVMEMetaObject::list_at(QQmlListProperty<QObject> *prop, int index)
{
- return static_cast<List *>(prop->data)->at(index);
+ QList<QObject *> *list = static_cast<QList<QObject *> *>(prop->data);
+ return list->at(index);
}
void QQmlVMEMetaObject::list_clear(QQmlListProperty<QObject> *prop)
{
- List *list = static_cast<List *>(prop->data);
+ QList<QObject *> *list = static_cast<QList<QObject *> *>(prop->data);
list->clear();
- list->mo->activate(prop->object, list->notifyIndex, 0);
+ static_cast<QQmlVMEMetaObject *>(prop->dummy1)->activate(prop->object, reinterpret_cast<quintptr>(prop->dummy2), 0);
}
void QQmlVMEMetaObject::registerInterceptor(int index, int valueIndex, QQmlPropertyValueInterceptor *interceptor)
@@ -1052,19 +1065,6 @@ void QQmlVMEMetaObject::setVMEProperty(int index, const QV4::Value &v)
return writeVarProperty(index - propOffset(), v);
}
-bool QQmlVMEMetaObject::ensurePropertiesAllocated()
-{
- if (!propertiesInitialized)
- allocateProperties();
-
- // in some situations, the QObject's v8object (and associated v8 data,
- // such as the varProperties array) will have been cleaned up, but the
- // QObject ptr will not yet have been deleted (eg, waiting on deleteLater).
- // In this situation, the varProperties handle will be (and should remain)
- // empty.
- return !properties.isUndefined();
-}
-
void QQmlVMEMetaObject::ensureQObjectWrapper()
{
Q_ASSERT(cache && cache->engine);
@@ -1087,12 +1087,12 @@ void QQmlVMEMetaObject::mark(QV4::ExecutionEngine *e)
void QQmlVMEMetaObject::allocateProperties()
{
Q_ASSERT(cache && cache->engine);
+ Q_ASSERT(!properties.valueRef());
QV4::ExecutionEngine *v4 = cache->engine;
QV4::Heap::MemberData *data = QV4::MemberData::allocate(v4, metaData->propertyCount);
properties.set(v4, data);
for (uint i = 0; i < data->size; ++i)
data->data[i] = QV4::Encode::undefined();
- propertiesInitialized = true;
}
bool QQmlVMEMetaObject::aliasTarget(int index, QObject **target, int *coreIndex, int *valueTypeIndex) const
@@ -1127,22 +1127,21 @@ bool QQmlVMEMetaObject::aliasTarget(int index, QObject **target, int *coreIndex,
void QQmlVMEMetaObject::connectAlias(int aliasId)
{
- if (!aConnected.testBit(aliasId)) {
-
- if (!aliasEndpoints)
- aliasEndpoints = new QQmlVMEMetaObjectEndpoint[metaData->aliasCount];
+ if (!aliasEndpoints)
+ aliasEndpoints = new QQmlVMEMetaObjectEndpoint[metaData->aliasCount];
- aConnected.setBit(aliasId);
+ QQmlVMEMetaData::AliasData *d = metaData->aliasData() + aliasId;
- QQmlVMEMetaData::AliasData *d = metaData->aliasData() + aliasId;
-
- QQmlVMEMetaObjectEndpoint *endpoint = aliasEndpoints + aliasId;
- endpoint->metaObject = this;
-
- endpoint->connect(&ctxt->idValues[d->contextIdx].bindings);
-
- endpoint->tryConnect();
+ QQmlVMEMetaObjectEndpoint *endpoint = aliasEndpoints + aliasId;
+ if (endpoint->metaObject.data()) {
+ // already connected
+ Q_ASSERT(endpoint->metaObject.data() == this);
+ return;
}
+
+ endpoint->metaObject = this;
+ endpoint->connect(&ctxt->idValues[d->contextIdx].bindings);
+ endpoint->tryConnect();
}
void QQmlVMEMetaObject::connectAliasSignal(int index, bool indexInSignalRange)
diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h
index dcf95b0c69..413eca8a68 100644
--- a/src/qml/qml/qqmlvmemetaobject_p.h
+++ b/src/qml/qml/qqmlvmemetaobject_p.h
@@ -155,8 +155,7 @@ class QQmlVMEMetaObjectEndpoint;
class Q_QML_PRIVATE_EXPORT QQmlVMEMetaObject : public QAbstractDynamicMetaObject
{
public:
- QQmlVMEMetaObject(QObject *obj, QQmlPropertyCache *cache, const QQmlVMEMetaData *data,
- QV4::ExecutionContext *qmlBindingContext = 0, QQmlCompiledData *compiledData = 0);
+ QQmlVMEMetaObject(QObject *obj, QQmlPropertyCache *cache, const QQmlVMEMetaData *data);
~QQmlVMEMetaObject();
bool aliasTarget(int index, QObject **target, int *coreIndex, int *valueTypeIndex) const;
@@ -201,9 +200,7 @@ public:
QQmlVMEMetaObjectEndpoint *aliasEndpoints;
QV4::WeakValue properties;
- bool propertiesInitialized;
inline void allocateProperties();
- inline bool ensurePropertiesAllocated();
QV4::MemberData *propertiesAsMemberData();
int readPropertyAsInt(int id);
@@ -216,7 +213,8 @@ public:
QDate readPropertyAsDate(int id);
QDateTime readPropertyAsDateTime(int id);
QRectF readPropertyAsRectF(int id);
- QObject* readPropertyAsQObject(int id);
+ QObject *readPropertyAsQObject(int id);
+ QList<QObject *> *readPropertyAsList(int id);
void writeProperty(int id, int v);
void writeProperty(int id, bool v);
@@ -235,7 +233,6 @@ public:
void mark(QV4::ExecutionEngine *e);
void connectAlias(int aliasId);
- QBitArray aConnected;
QQmlPropertyValueInterceptor *interceptors;
@@ -252,14 +249,6 @@ public:
inline QQmlVMEMetaObject *parentVMEMetaObject() const;
void listChanged(int);
- class List : public QList<QObject*>
- {
- public:
- List(int lpi, QQmlVMEMetaObject *mo) : notifyIndex(lpi), mo(mo) {}
- int notifyIndex;
- QQmlVMEMetaObject *mo;
- };
- QList<List> listProperties;
static void list_append(QQmlListProperty<QObject> *, QObject *);
static int list_count(QQmlListProperty<QObject> *);
diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp
index 8666c0db01..043113bc31 100644
--- a/src/qml/qml/qqmlxmlhttprequest.cpp
+++ b/src/qml/qml/qqmlxmlhttprequest.cpp
@@ -314,10 +314,6 @@ struct Node : public Object
static ReturnedValue create(ExecutionEngine *v4, NodeImpl *);
bool isNull() const;
-
-private:
- Node &operator=(const Node &);
- Node(const Node &o);
};
Heap::Node::Node(NodeImpl *data)
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
index 5986fdbdfa..89088e5b3e 100644
--- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
+++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
@@ -1380,37 +1380,40 @@ static QV4::ReturnedValue writeToConsole(ConsoleLogTypes logType, CallContext *c
result.append(QLatin1Char(' '));
if (ctx->args()[i].as<ArrayObject>())
- result.append(QStringLiteral("[") + ctx->args()[i].toQStringNoThrow() + QStringLiteral("]"));
+ result.append(QLatin1Char('[') + ctx->args()[i].toQStringNoThrow() + QLatin1Char(']'));
else
result.append(ctx->args()[i].toQStringNoThrow());
}
if (printStack) {
- result.append(QLatin1String("\n"));
+ result.append(QLatin1Char('\n'));
result.append(jsStack(v4));
}
- static QLoggingCategory loggingCategory("qml");
+ static QLoggingCategory qmlLoggingCategory("qml");
+ static QLoggingCategory jsLoggingCategory("js");
+
+ QLoggingCategory *loggingCategory = v4->qmlEngine() ? &qmlLoggingCategory : &jsLoggingCategory;
QV4::StackFrame frame = v4->currentStackFrame();
const QByteArray baSource = frame.source.toUtf8();
const QByteArray baFunction = frame.function.toUtf8();
- QMessageLogger logger(baSource.constData(), frame.line, baFunction.constData(), loggingCategory.categoryName());
+ QMessageLogger logger(baSource.constData(), frame.line, baFunction.constData(), loggingCategory->categoryName());
switch (logType) {
case Log:
- if (loggingCategory.isDebugEnabled())
+ if (loggingCategory->isDebugEnabled())
logger.debug("%s", result.toUtf8().constData());
break;
case Info:
- if (loggingCategory.isInfoEnabled())
+ if (loggingCategory->isInfoEnabled())
logger.info("%s", result.toUtf8().constData());
break;
case Warn:
- if (loggingCategory.isWarningEnabled())
+ if (loggingCategory->isWarningEnabled())
logger.warning("%s", result.toUtf8().constData());
break;
case Error:
- if (loggingCategory.isCriticalEnabled())
+ if (loggingCategory->isCriticalEnabled())
logger.critical("%s", result.toUtf8().constData());
break;
default:
@@ -1442,6 +1445,9 @@ QV4::ReturnedValue ConsoleObject::method_profile(CallContext *ctx)
{
QV4::ExecutionEngine *v4 = ctx->d()->engine;
+ if (!v4->qmlEngine())
+ return QV4::Encode::undefined(); // Not yet implemented for JavaScript.
+
QV4::StackFrame frame = v4->currentStackFrame();
const QByteArray baSource = frame.source.toUtf8();
const QByteArray baFunction = frame.function.toUtf8();
@@ -1461,6 +1467,9 @@ QV4::ReturnedValue ConsoleObject::method_profileEnd(CallContext *ctx)
{
QV4::ExecutionEngine *v4 = ctx->d()->engine;
+ if (!v4->qmlEngine())
+ return QV4::Encode::undefined(); // Not yet implemented for JavaScript.
+
QV4::StackFrame frame = v4->currentStackFrame();
const QByteArray baSource = frame.source.toUtf8();
const QByteArray baFunction = frame.function.toUtf8();
@@ -1590,31 +1599,36 @@ QV4::ReturnedValue ConsoleObject::method_exception(CallContext *ctx)
-void QV4::GlobalExtensions::init(QQmlEngine *qmlEngine, Object *globalObject)
+void QV4::GlobalExtensions::init(Object *globalObject, QJSEngine::Extensions extensions)
{
ExecutionEngine *v4 = globalObject->engine();
Scope scope(v4);
-#ifndef QT_NO_TRANSLATION
- globalObject->defineDefaultProperty(QStringLiteral("qsTranslate"), method_qsTranslate);
- globalObject->defineDefaultProperty(QStringLiteral("QT_TRANSLATE_NOOP"), method_qsTranslateNoOp);
- globalObject->defineDefaultProperty(QStringLiteral("qsTr"), method_qsTr);
- globalObject->defineDefaultProperty(QStringLiteral("QT_TR_NOOP"), method_qsTrNoOp);
- globalObject->defineDefaultProperty(QStringLiteral("qsTrId"), method_qsTrId);
- globalObject->defineDefaultProperty(QStringLiteral("QT_TRID_NOOP"), method_qsTrIdNoOp);
-#endif
+ if (extensions.testFlag(QJSEngine::TranslationExtension)) {
+ #ifndef QT_NO_TRANSLATION
+ globalObject->defineDefaultProperty(QStringLiteral("qsTranslate"), QV4::GlobalExtensions::method_qsTranslate);
+ globalObject->defineDefaultProperty(QStringLiteral("QT_TRANSLATE_NOOP"), QV4::GlobalExtensions::method_qsTranslateNoOp);
+ globalObject->defineDefaultProperty(QStringLiteral("qsTr"), QV4::GlobalExtensions::method_qsTr);
+ globalObject->defineDefaultProperty(QStringLiteral("QT_TR_NOOP"), QV4::GlobalExtensions::method_qsTrNoOp);
+ globalObject->defineDefaultProperty(QStringLiteral("qsTrId"), QV4::GlobalExtensions::method_qsTrId);
+ globalObject->defineDefaultProperty(QStringLiteral("QT_TRID_NOOP"), QV4::GlobalExtensions::method_qsTrIdNoOp);
+
+ // string prototype extension
+ scope.engine->stringPrototype()->defineDefaultProperty(QStringLiteral("arg"), QV4::GlobalExtensions::method_string_arg);
+ #endif
+ }
- globalObject->defineDefaultProperty(QStringLiteral("print"), ConsoleObject::method_log);
- globalObject->defineDefaultProperty(QStringLiteral("gc"), method_gc);
+ if (extensions.testFlag(QJSEngine::ConsoleExtension)) {
+ globalObject->defineDefaultProperty(QStringLiteral("print"), QV4::ConsoleObject::method_log);
- ScopedObject console(scope, v4->memoryManager->allocObject<QV4::ConsoleObject>());
- globalObject->defineDefaultProperty(QStringLiteral("console"), console);
- ScopedObject qt(scope, v4->memoryManager->allocObject<QV4::QtObject>(qmlEngine));
- globalObject->defineDefaultProperty(QStringLiteral("Qt"), qt);
+ QV4::ScopedObject console(scope, globalObject->engine()->memoryManager->allocObject<QV4::ConsoleObject>());
+ globalObject->defineDefaultProperty(QStringLiteral("console"), console);
+ }
- // string prototype extension
- v4->stringPrototype()->defineDefaultProperty(QStringLiteral("arg"), method_string_arg);
+ if (extensions.testFlag(QJSEngine::GarbageCollectionExtension)) {
+ globalObject->defineDefaultProperty(QStringLiteral("gc"), QV4::GlobalExtensions::method_gc);
+ }
}
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions_p.h b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h
index bb05376fc0..d373fb6ee6 100644
--- a/src/qml/qml/v8/qqmlbuiltinfunctions_p.h
+++ b/src/qml/qml/v8/qqmlbuiltinfunctions_p.h
@@ -47,6 +47,7 @@
#include <private/qqmlglobal_p.h>
#include <private/qv4functionobject_p.h>
+#include <private/qjsengine_p.h>
QT_BEGIN_NAMESPACE
@@ -142,7 +143,7 @@ struct ConsoleObject : Object
};
struct GlobalExtensions {
- static void init(QQmlEngine *qmlEngine, Object *globalObject);
+ static void init(Object *globalObject, QJSEngine::Extensions extensions);
#ifndef QT_NO_TRANSLATION
static ReturnedValue method_qsTranslate(CallContext *ctx);
diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp
index effc37a0eb..dae932e705 100644
--- a/src/qml/qml/v8/qv8engine.cpp
+++ b/src/qml/qml/v8/qv8engine.cpp
@@ -174,7 +174,10 @@ const QSet<QString> &QV8Engine::illegalNames() const
void QV8Engine::initializeGlobal()
{
QV4::Scope scope(m_v4Engine);
- QV4::GlobalExtensions::init(m_engine, m_v4Engine->globalObject);
+ QV4::GlobalExtensions::init(m_v4Engine->globalObject, QJSEngine::AllExtensions);
+
+ QV4::ScopedObject qt(scope, m_v4Engine->memoryManager->allocObject<QV4::QtObject>(m_engine));
+ m_v4Engine->globalObject->defineDefaultProperty(QStringLiteral("Qt"), qt);
QQmlLocale::registerStringLocaleCompare(m_v4Engine);
QQmlDateExtension::registerExtension(m_v4Engine);
diff --git a/src/qml/types/qqmlbind_p.h b/src/qml/types/qqmlbind_p.h
index 6d7eea4014..ac1cb0f32f 100644
--- a/src/qml/types/qqmlbind_p.h
+++ b/src/qml/types/qqmlbind_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLBIND_H
#define QQMLBIND_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include <QtCore/qobject.h>
diff --git a/src/qml/types/qqmlconnections_p.h b/src/qml/types/qqmlconnections_p.h
index e9eb593c6b..d330b772cc 100644
--- a/src/qml/types/qqmlconnections_p.h
+++ b/src/qml/types/qqmlconnections_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLCONNECTIONS_H
#define QQMLCONNECTIONS_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include <private/qqmlcustomparser_p.h>
diff --git a/src/qml/types/qqmldelegatemodel_p.h b/src/qml/types/qqmldelegatemodel_p.h
index e222fadec2..6af052c1b4 100644
--- a/src/qml/types/qqmldelegatemodel_p.h
+++ b/src/qml/types/qqmldelegatemodel_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLDATAMODEL_P_H
#define QQMLDATAMODEL_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qtqmlglobal_p.h>
#include <private/qqmllistcompositor_p.h>
#include <private/qqmlobjectmodel_p.h>
diff --git a/src/qml/types/qqmlinstantiator_p.h b/src/qml/types/qqmlinstantiator_p.h
index aa098817cd..842a0b947b 100644
--- a/src/qml/types/qqmlinstantiator_p.h
+++ b/src/qml/types/qqmlinstantiator_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLINSTANTIATOR_P_H
#define QQMLINSTANTIATOR_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQml/qqmlcomponent.h>
#include <QtQml/qqmlparserstatus.h>
diff --git a/src/qml/types/qqmlitemselectionmodel.qdoc b/src/qml/types/qqmlitemselectionmodel.qdoc
index 441d219de8..b4da0c63f3 100644
--- a/src/qml/types/qqmlitemselectionmodel.qdoc
+++ b/src/qml/types/qqmlitemselectionmodel.qdoc
@@ -38,7 +38,7 @@
This page only enumerates the properties, methods, and signals available in QML.
See \l QItemSelectionModel for the actual documentation of this class.
- \sa ItemModels
+ \sa QItemSelectionModel, {Models and Views in Qt Quick}
*/
diff --git a/src/qml/types/qqmllistmodel_p.h b/src/qml/types/qqmllistmodel_p.h
index 21de392234..b3ae806c5e 100644
--- a/src/qml/types/qqmllistmodel_p.h
+++ b/src/qml/types/qqmllistmodel_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLLISTMODEL_H
#define QQMLLISTMODEL_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include <private/qqmlcustomparser_p.h>
diff --git a/src/qml/types/qqmlmodelsmodule_p.h b/src/qml/types/qqmlmodelsmodule_p.h
index 7fd02b600a..3471a16684 100644
--- a/src/qml/types/qqmlmodelsmodule_p.h
+++ b/src/qml/types/qqmlmodelsmodule_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLMODELSMODULE_H
#define QQMLMODELSMODULE_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qtqmlglobal_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/qml/types/qqmlobjectmodel_p.h b/src/qml/types/qqmlobjectmodel_p.h
index f6ab2a19e2..868f736147 100644
--- a/src/qml/types/qqmlobjectmodel_p.h
+++ b/src/qml/types/qqmlobjectmodel_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLINSTANCEMODEL_P_H
#define QQMLINSTANCEMODEL_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qtqmlglobal_p.h>
#include <QtQml/qqml.h>
#include <QtCore/qobject.h>
diff --git a/src/qml/types/qqmltimer_p.h b/src/qml/types/qqmltimer_p.h
index 0da81b481f..2dcf827926 100644
--- a/src/qml/types/qqmltimer_p.h
+++ b/src/qml/types/qqmltimer_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLTIMER_H
#define QQMLTIMER_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include <QtCore/qobject.h>
diff --git a/src/qml/types/qquickpackage_p.h b/src/qml/types/qquickpackage_p.h
index 6398e6a4fa..1c7f255eb4 100644
--- a/src/qml/types/qquickpackage_p.h
+++ b/src/qml/types/qquickpackage_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKPACKAGE_H
#define QQUICKPACKAGE_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
QT_BEGIN_NAMESPACE
diff --git a/src/qml/util/qqmladaptormodel.cpp b/src/qml/util/qqmladaptormodel.cpp
index 29398ff98c..c61144dd8f 100644
--- a/src/qml/util/qqmladaptormodel.cpp
+++ b/src/qml/util/qqmladaptormodel.cpp
@@ -788,8 +788,11 @@ public:
m_type->release();
}
- int metaCall(QMetaObject::Call call, int id, void **arguments)
+ int metaCall(QObject *o, QMetaObject::Call call, int id, void **arguments)
{
+ Q_ASSERT(o == m_data);
+ Q_UNUSED(o);
+
static const int objectPropertyOffset = QObject::staticMetaObject.propertyCount();
if (id >= m_type->propertyOffset
&& (call == QMetaObject::ReadProperty
diff --git a/src/qml/util/qqmladaptormodel_p.h b/src/qml/util/qqmladaptormodel_p.h
index b0f211a0f2..9da04462aa 100644
--- a/src/qml/util/qqmladaptormodel_p.h
+++ b/src/qml/util/qqmladaptormodel_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLADAPTORMODEL_P_H
#define QQMLADAPTORMODEL_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qabstractitemmodel.h>
#include "private/qqmllistaccessor_p.h"
diff --git a/src/qml/util/qqmllistaccessor_p.h b/src/qml/util/qqmllistaccessor_p.h
index cf0ec52be4..1d9069118a 100644
--- a/src/qml/util/qqmllistaccessor_p.h
+++ b/src/qml/util/qqmllistaccessor_p.h
@@ -34,6 +34,17 @@
#ifndef QQMLLISTACCESSOR_H
#define QQMLLISTACCESSOR_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/QVariant>
QT_BEGIN_NAMESPACE
diff --git a/src/qmltest/qtestoptions_p.h b/src/qmltest/qtestoptions_p.h
index af6764f98b..48d1c3f473 100644
--- a/src/qmltest/qtestoptions_p.h
+++ b/src/qmltest/qtestoptions_p.h
@@ -34,6 +34,17 @@
#ifndef QTESTOPTIONS_P_H
#define QTESTOPTIONS_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtTest/qtest_global.h>
#include <QtCore/qstring.h>
diff --git a/src/qmltest/quicktestevent_p.h b/src/qmltest/quicktestevent_p.h
index 338464c6b3..0cba644cba 100644
--- a/src/qmltest/quicktestevent_p.h
+++ b/src/qmltest/quicktestevent_p.h
@@ -34,6 +34,17 @@
#ifndef QUICKTESTEVENT_P_H
#define QUICKTESTEVENT_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuickTest/quicktestglobal.h>
#include <QtCore/qobject.h>
#include <QtGui/QWindow>
diff --git a/src/qmltest/quicktestresult_p.h b/src/qmltest/quicktestresult_p.h
index 45df83621f..ee38c07498 100644
--- a/src/qmltest/quicktestresult_p.h
+++ b/src/qmltest/quicktestresult_p.h
@@ -34,6 +34,17 @@
#ifndef QUICKTESTRESULT_P_H
#define QUICKTESTRESULT_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuickTest/quicktestglobal.h>
#include <QtCore/qobject.h>
#include <QtCore/qstring.h>
diff --git a/src/quick/accessible/qaccessiblequickitem_p.h b/src/quick/accessible/qaccessiblequickitem_p.h
index deefb10e60..1ec569731e 100644
--- a/src/quick/accessible/qaccessiblequickitem_p.h
+++ b/src/quick/accessible/qaccessiblequickitem_p.h
@@ -34,6 +34,17 @@
#ifndef QACCESSIBLEQUICKITEM_H
#define QACCESSIBLEQUICKITEM_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuick/QQuickItem>
#include <QtQuick/QQuickView>
#include <QtGui/qaccessibleobject.h>
diff --git a/src/quick/accessible/qaccessiblequickview_p.h b/src/quick/accessible/qaccessiblequickview_p.h
index f08b78528d..049fa385ba 100644
--- a/src/quick/accessible/qaccessiblequickview_p.h
+++ b/src/quick/accessible/qaccessiblequickview_p.h
@@ -34,6 +34,17 @@
#ifndef QAccessibleQuickView_H
#define QAccessibleQuickView_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtGui/qaccessibleobject.h>
#include <QtQuick/qquickwindow.h>
diff --git a/src/quick/accessible/qquickaccessiblefactory_p.h b/src/quick/accessible/qquickaccessiblefactory_p.h
index f7936b140e..98512f9fb4 100644
--- a/src/quick/accessible/qquickaccessiblefactory_p.h
+++ b/src/quick/accessible/qquickaccessiblefactory_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKACCESSIBLEFACTORY_H
#define QQUICKACCESSIBLEFACTORY_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtGui/qaccessible.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc b/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc
index e03b3a9bf8..e928adba9c 100644
--- a/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc
+++ b/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc
@@ -57,7 +57,7 @@ To visualize data, bind the view's \c model property to a model and the
Views are containers for collections of items. They are feature-rich and can be
customizable to meet style or behavior requirements.
- \keyword qtquick-views
+ \target qtquick-views
A set of standard views are provided in the basic set of Qt Quick
graphical types:
@@ -124,7 +124,7 @@ To visualize data, bind the view's \c model property to a model and the
\snippet qml/listview-sections.qml section
\image listview-section.png
-\keyword qml-view-delegate
+\target qml-view-delegate
\section1 View Delegates
Views need a \e delegate to visually represent an item in a list. A view will
@@ -154,7 +154,7 @@ To visualize data, bind the view's \c model property to a model and the
\snippet qml/models/views-models-delegates.qml rectangle
-\keyword qml-data-models
+\target qml-data-models
\section1 Models
Data is provided to the delegate via named data roles which the delegate may
@@ -320,7 +320,7 @@ To visualize data, bind the view's \c model property to a model and the
}
\endqml
- \keyword qml-c++-models
+ \target qml-c++-models
\section2 C++ Data Models
Models can be defined in C++ and then made available to QML. This mechanism
diff --git a/src/quick/doc/src/concepts/positioning/anchors.qdoc b/src/quick/doc/src/concepts/positioning/anchors.qdoc
index 71af38b587..259dcbe671 100644
--- a/src/quick/doc/src/concepts/positioning/anchors.qdoc
+++ b/src/quick/doc/src/concepts/positioning/anchors.qdoc
@@ -30,7 +30,7 @@
\title Positioning with Anchors
\brief placing items with anchor properties
-\target anchor-layout
+\keyword anchor-layout
In addition to the more traditional \l Grid, \l Row, and \l Column,
Qt Quick also provides a way to layout items using the concept of \e anchors.
Each item can be thought of as having a set of 7 invisible "anchor lines":
diff --git a/src/quick/doc/src/concepts/statesanimations/animations.qdoc b/src/quick/doc/src/concepts/statesanimations/animations.qdoc
index 4e336afa36..ee174d2dad 100644
--- a/src/quick/doc/src/concepts/statesanimations/animations.qdoc
+++ b/src/quick/doc/src/concepts/statesanimations/animations.qdoc
@@ -138,7 +138,7 @@ are also automatically applied to this property and do not need to specify
values.
-\keyword qml-transition-animations
+\target qml-transition-animations
\section2 Transitions during State Changes
\l{State}{Qt Quick States} are property configurations where a property may have different values to reflect different states. State changes introduce
@@ -210,7 +210,7 @@ The \l SequentialAnimation type is also useful for playing
\l{qml-transition-animations}{transition animations} because animations are
played in parallel inside transitions.
-\keyword qml-controlling-animations
+\target qml-controlling-animations
\section1 Controlling Animations
There are different methods to control animations.
@@ -222,7 +222,7 @@ essential properties and methods for animation types. Animation types have
\c{start()}, \c{stop()}, \c{resume()}, \c{pause()}, \c {restart()}, and
\c{complete()} -- all of these methods control the execution of animations.
-\keyword qml-easing-animation
+\target qml-easing-animation
\section2 Easing
Easing curves define how the animation will interpolate between the start value
diff --git a/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc b/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc
index 0a8fc2ab0a..187085a5d8 100644
--- a/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc
+++ b/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc
@@ -762,7 +762,7 @@ with multiple windows.
faster to process in the renderer and faster to draw on the GPU. For
instance, PNG files will often have an alpha channel, even though
each pixel is fully opaque. JPG files are always opaque. When
- providing images to an QQuickImageProvider or creating images with
+ providing images to a QQuickImageProvider or creating images with
QQuickWindow::createTextureFromImage(), let the image have
QImage::Format_RGB32, when possible.
diff --git a/src/quick/doc/src/examples.qdoc b/src/quick/doc/src/examples.qdoc
index dd21270673..e69c2f6551 100644
--- a/src/quick/doc/src/examples.qdoc
+++ b/src/quick/doc/src/examples.qdoc
@@ -32,7 +32,7 @@
\brief Building UIs with QML
\ingroup all-examples
\ingroup qtquick
-\target qtquick-samples
+\keyword qtquick-samples
Qt includes several examples to demonstrate a particular usage. The examples
run as applications or as non-GUI examples in Qt Creator. Qt tutorials show
diff --git a/src/quick/items/context2d/qquickcanvascontext_p.h b/src/quick/items/context2d/qquickcanvascontext_p.h
index b7a7f6db71..0010862044 100644
--- a/src/quick/items/context2d/qquickcanvascontext_p.h
+++ b/src/quick/items/context2d/qquickcanvascontext_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKCANVASCONTEXT_P_H
#define QQUICKCANVASCONTEXT_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuick/qquickitem.h>
#include <private/qv8engine_p.h>
diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp
index 9932747dd3..9abca59b1c 100644
--- a/src/quick/items/context2d/qquickcanvasitem.cpp
+++ b/src/quick/items/context2d/qquickcanvasitem.cpp
@@ -256,19 +256,6 @@ QQuickCanvasItemPrivate::~QQuickCanvasItemPrivate()
The default render target is Canvas.Image and the default renderStrategy is
Canvas.Immediate.
- \section1 Tiled Canvas
- The Canvas item supports tiled rendering by setting \l canvasSize, \l tileSize
- and \l canvasWindow properties.
-
- Tiling allows efficient display of a very large virtual canvas via a smaller
- canvas window. The actual memory consumption is in relation to the canvas
- window size. The painting code can draw within the virtual canvas without
- handling coordinate system transformations.
-
- The tiles overlapping with the canvas window may be cached eliminating the
- need to redraw, which can lead to significantly improved performance in
- some situations.
-
\section1 Pixel Operations
All HTML5 2D context pixel operations are supported. In order to ensure
improved pixel reading/writing performance the \a Canvas.Image render
@@ -431,6 +418,8 @@ void QQuickCanvasItem::setCanvasSize(const QSizeF & size)
By default the tileSize is the same as the canvasSize.
+ \obsolete This feature is incomplete. For details, see QTBUG-33129.
+
\sa canvasSize, canvasWindow
*/
QSize QQuickCanvasItem::tileSize() const
@@ -464,6 +453,8 @@ void QQuickCanvasItem::setTileSize(const QSize & size)
can display different visible areas by changing the canvas windowSize
and/or position.
+ \obsolete This feature is incomplete. For details, see QTBUG-33129
+
\sa canvasSize, tileSize
*/
QRectF QQuickCanvasItem::canvasWindow() const
@@ -783,6 +774,12 @@ bool QQuickCanvasItem::isTextureProvider() const
QSGTextureProvider *QQuickCanvasItem::textureProvider() const
{
+ // When Item::layer::enabled == true, QQuickItem will be a texture
+ // provider. In this case we should prefer to return the layer rather
+ // than the canvas itself.
+ if (QQuickItem::isTextureProvider())
+ return QQuickItem::textureProvider();
+
Q_D(const QQuickCanvasItem);
QQuickWindow *w = window();
if (!w || !w->openglContext() || QThread::currentThread() != w->openglContext()->thread()) {
diff --git a/src/quick/items/context2d/qquickcanvasitem_p.h b/src/quick/items/context2d/qquickcanvasitem_p.h
index 4a1a59d61e..a32ce5389d 100644
--- a/src/quick/items/context2d/qquickcanvasitem_p.h
+++ b/src/quick/items/context2d/qquickcanvasitem_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKCANVASITEM_P_H
#define QQUICKCANVASITEM_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuick/qquickitem.h>
#include <private/qv8engine_p.h>
#include <QtCore/QThread>
diff --git a/src/quick/items/context2d/qquickcontext2d_p.h b/src/quick/items/context2d/qquickcontext2d_p.h
index 78fa26d791..94762fe7a2 100644
--- a/src/quick/items/context2d/qquickcontext2d_p.h
+++ b/src/quick/items/context2d/qquickcontext2d_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKCONTEXT2D_P_H
#define QQUICKCONTEXT2D_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuick/qtquickglobal.h>
#include <QtQml/qqml.h>
#include <QtQml/qqmlcomponent.h>
diff --git a/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h b/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h
index 54bf209c79..48cf21ad71 100644
--- a/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h
+++ b/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKCONTEXT2DCOMMANDBUFFER_P_H
#define QQUICKCONTEXT2DCOMMANDBUFFER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qmutex.h>
#include "qquickcontext2d_p.h"
diff --git a/src/quick/items/context2d/qquickcontext2dtexture_p.h b/src/quick/items/context2d/qquickcontext2dtexture_p.h
index 88d7b6858f..50ce95e19b 100644
--- a/src/quick/items/context2d/qquickcontext2dtexture_p.h
+++ b/src/quick/items/context2d/qquickcontext2dtexture_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKCONTEXT2DTEXTURE_P_H
#define QQUICKCONTEXT2DTEXTURE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuick/qsgtexture.h>
#include "qquickcanvasitem_p.h"
#include "qquickcontext2d_p.h"
diff --git a/src/quick/items/context2d/qquickcontext2dtile_p.h b/src/quick/items/context2d/qquickcontext2dtile_p.h
index d923313a28..781261c8d2 100644
--- a/src/quick/items/context2d/qquickcontext2dtile_p.h
+++ b/src/quick/items/context2d/qquickcontext2dtile_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKCONTEXT2DTILE_P_H
#define QQUICKCONTEXT2DTILE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickcontext2d_p.h"
#include <QOpenGLFramebufferObject>
diff --git a/src/quick/items/qquickaccessibleattached_p.h b/src/quick/items/qquickaccessibleattached_p.h
index be78e74b19..617b5aa886 100644
--- a/src/quick/items/qquickaccessibleattached_p.h
+++ b/src/quick/items/qquickaccessibleattached_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKACCESSIBLEATTACHED_H
#define QQUICKACCESSIBLEATTACHED_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuick/qquickitem.h>
#include <QtCore/qobject.h>
diff --git a/src/quick/items/qquickanchors_p.h b/src/quick/items/qquickanchors_p.h
index a2328162e5..4157e4bf6d 100644
--- a/src/quick/items/qquickanchors_p.h
+++ b/src/quick/items/qquickanchors_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKANCHORS_P_H
#define QQUICKANCHORS_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include <QtCore/QObject>
diff --git a/src/quick/items/qquickanimatedimage_p.h b/src/quick/items/qquickanimatedimage_p.h
index 409933817f..42f2d4cb64 100644
--- a/src/quick/items/qquickanimatedimage_p.h
+++ b/src/quick/items/qquickanimatedimage_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKANIMATEDIMAGE_P_H
#define QQUICKANIMATEDIMAGE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickimage_p.h"
#ifndef QT_NO_MOVIE
diff --git a/src/quick/items/qquickanimatedsprite_p.h b/src/quick/items/qquickanimatedsprite_p.h
index a10ebb4b73..fa022af4ee 100644
--- a/src/quick/items/qquickanimatedsprite_p.h
+++ b/src/quick/items/qquickanimatedsprite_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKANIMATEDSPRITE_P_H
#define QQUICKANIMATEDSPRITE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuick/QQuickItem>
#include <private/qquicksprite_p.h>
#include <QTime>
diff --git a/src/quick/items/qquickborderimage_p.h b/src/quick/items/qquickborderimage_p.h
index 8a88e3d0d3..02e01dedd5 100644
--- a/src/quick/items/qquickborderimage_p.h
+++ b/src/quick/items/qquickborderimage_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKBORDERIMAGE_P_H
#define QQUICKBORDERIMAGE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickimagebase_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/quick/items/qquickclipnode_p.h b/src/quick/items/qquickclipnode_p.h
index 2e7fa1f495..70dbf149b2 100644
--- a/src/quick/items/qquickclipnode_p.h
+++ b/src/quick/items/qquickclipnode_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKCLIPNODE_P_H
#define QQUICKCLIPNODE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qtquickglobal_p.h>
#include <QtQuick/qsgnode.h>
diff --git a/src/quick/items/qquickdrag_p.h b/src/quick/items/qquickdrag_p.h
index 2b4b2a51d4..5599831b6f 100644
--- a/src/quick/items/qquickdrag_p.h
+++ b/src/quick/items/qquickdrag_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKDRAG_P_H
#define QQUICKDRAG_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuick/qquickitem.h>
#include <private/qv8engine_p.h>
diff --git a/src/quick/items/qquickdroparea_p.h b/src/quick/items/qquickdroparea_p.h
index 3223f4203b..127b3bd4a3 100644
--- a/src/quick/items/qquickdroparea_p.h
+++ b/src/quick/items/qquickdroparea_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKDROPAREA_P_H
#define QQUICKDROPAREA_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickitem.h"
#include <private/qqmlguard_p.h>
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index ea4398bc71..9d6c51f37a 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -218,7 +218,7 @@ QQuickFlickablePrivate::QQuickFlickablePrivate()
, hMoved(false), vMoved(false)
, stealMouse(false), pressed(false)
, scrollingPhase(false), interactive(true), calcVelocity(false)
- , pixelAligned(false), replayingPressEvent(false)
+ , pixelAligned(false)
, lastPosTime(-1)
, lastPressTime(0)
, deceleration(QML_FLICK_DEFAULTDECELERATION)
@@ -1640,10 +1640,8 @@ void QQuickFlickable::geometryChanged(const QRectF &newGeometry,
bool changed = false;
if (newGeometry.width() != oldGeometry.width()) {
changed = true; // we must update visualArea.widthRatio
- if (d->hData.viewSize < 0) {
+ if (d->hData.viewSize < 0)
d->contentItem->setWidth(width());
- emit contentWidthChanged();
- }
// Make sure that we're entirely in view.
if (!d->pressed && !d->hData.moving && !d->vData.moving) {
d->fixupMode = QQuickFlickablePrivate::Immediate;
@@ -1652,10 +1650,8 @@ void QQuickFlickable::geometryChanged(const QRectF &newGeometry,
}
if (newGeometry.height() != oldGeometry.height()) {
changed = true; // we must update visualArea.heightRatio
- if (d->vData.viewSize < 0) {
+ if (d->vData.viewSize < 0)
d->contentItem->setHeight(height());
- emit contentHeightChanged();
- }
// Make sure that we're entirely in view.
if (!d->pressed && !d->hData.moving && !d->vData.moving) {
d->fixupMode = QQuickFlickablePrivate::Immediate;
@@ -2206,10 +2202,6 @@ bool QQuickFlickable::sendMouseEvent(QQuickItem *item, QMouseEvent *event)
d->handleMouseMoveEvent(mouseEvent.data());
break;
case QEvent::MouseButtonPress:
- // Don't process a replayed event during replay
- if (d->replayingPressEvent)
- return false;
-
d->handleMousePressEvent(mouseEvent.data());
d->captureDelayedPress(item, event);
stealThisEvent = d->stealMouse; // Update stealThisEvent in case changed by function call above
diff --git a/src/quick/items/qquickflickable_p.h b/src/quick/items/qquickflickable_p.h
index c974da66d6..ac072f0e50 100644
--- a/src/quick/items/qquickflickable_p.h
+++ b/src/quick/items/qquickflickable_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKFLICKABLE_P_H
#define QQUICKFLICKABLE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickitem.h"
#include <private/qtquickglobal_p.h>
diff --git a/src/quick/items/qquickflickable_p_p.h b/src/quick/items/qquickflickable_p_p.h
index 65bb3e802d..9d75533c8a 100644
--- a/src/quick/items/qquickflickable_p_p.h
+++ b/src/quick/items/qquickflickable_p_p.h
@@ -211,7 +211,6 @@ public:
bool interactive : 1;
bool calcVelocity : 1;
bool pixelAligned : 1;
- bool replayingPressEvent : 1;
QElapsedTimer timer;
qint64 lastPosTime;
qint64 lastPressTime;
diff --git a/src/quick/items/qquickflickablebehavior_p.h b/src/quick/items/qquickflickablebehavior_p.h
index a79297894c..69fca4d0fb 100644
--- a/src/quick/items/qquickflickablebehavior_p.h
+++ b/src/quick/items/qquickflickablebehavior_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKFLICKABLEBEHAVIOR_H
#define QQUICKFLICKABLEBEHAVIOR_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
/* ### Platform specific flickable mechanics are defined either here, or in
mkspec files. Long-term (QtQuick 3) Flickable needs to allow such
mechanic details to be controlled via QML so that platforms can easily
diff --git a/src/quick/items/qquickflipable_p.h b/src/quick/items/qquickflipable_p.h
index 31bfe97923..93610031f6 100644
--- a/src/quick/items/qquickflipable_p.h
+++ b/src/quick/items/qquickflipable_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKFLIPABLE_P_H
#define QQUICKFLIPABLE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickitem.h"
#include <QtGui/qtransform.h>
diff --git a/src/quick/items/qquickfocusscope_p.h b/src/quick/items/qquickfocusscope_p.h
index b0e92cb312..eb42cf83b5 100644
--- a/src/quick/items/qquickfocusscope_p.h
+++ b/src/quick/items/qquickfocusscope_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKFOCUSSCOPE_P_H
#define QQUICKFOCUSSCOPE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickitem.h"
QT_BEGIN_NAMESPACE
diff --git a/src/quick/items/qquickframebufferobject.cpp b/src/quick/items/qquickframebufferobject.cpp
index 74abd8cf9f..5ce3ae57f7 100644
--- a/src/quick/items/qquickframebufferobject.cpp
+++ b/src/quick/items/qquickframebufferobject.cpp
@@ -342,6 +342,12 @@ bool QQuickFramebufferObject::isTextureProvider() const
*/
QSGTextureProvider *QQuickFramebufferObject::textureProvider() const
{
+ // When Item::layer::enabled == true, QQuickItem will be a texture
+ // provider. In this case we should prefer to return the layer rather
+ // than the fbo texture.
+ if (QQuickItem::isTextureProvider())
+ return QQuickItem::textureProvider();
+
Q_D(const QQuickFramebufferObject);
QQuickWindow *w = window();
if (!w || !w->openglContext() || QThread::currentThread() != w->openglContext()->thread()) {
diff --git a/src/quick/items/qquickgridview_p.h b/src/quick/items/qquickgridview_p.h
index 389ef27585..8c93f4ce97 100644
--- a/src/quick/items/qquickgridview_p.h
+++ b/src/quick/items/qquickgridview_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKGRIDVIEW_P_H
#define QQUICKGRIDVIEW_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickitemview_p.h"
diff --git a/src/quick/items/qquickimage.cpp b/src/quick/items/qquickimage.cpp
index 3ba09f9cea..483d86c97d 100644
--- a/src/quick/items/qquickimage.cpp
+++ b/src/quick/items/qquickimage.cpp
@@ -551,6 +551,13 @@ QSGTextureProvider *QQuickImage::textureProvider() const
{
Q_D(const QQuickImage);
+ // When Item::layer::enabled == true, QQuickItem will be a texture
+ // provider. In this case we should prefer to return the layer rather
+ // than the image itself. The layer will include any children and any
+ // the image's wrap and fill mode.
+ if (QQuickItem::isTextureProvider())
+ return QQuickItem::textureProvider();
+
if (!d->window || !d->sceneGraphRenderContext() || QThread::currentThread() != d->sceneGraphRenderContext()->thread()) {
qWarning("QQuickImage::textureProvider: can only be queried on the rendering thread of an exposed window");
return 0;
diff --git a/src/quick/items/qquickimage_p.h b/src/quick/items/qquickimage_p.h
index 421360bd35..82bd005463 100644
--- a/src/quick/items/qquickimage_p.h
+++ b/src/quick/items/qquickimage_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKIMAGE_P_H
#define QQUICKIMAGE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickimagebase_p.h"
#include <QtQuick/qsgtextureprovider.h>
diff --git a/src/quick/items/qquickimagebase.cpp b/src/quick/items/qquickimagebase.cpp
index 1ad37ef414..c37e6c942c 100644
--- a/src/quick/items/qquickimagebase.cpp
+++ b/src/quick/items/qquickimagebase.cpp
@@ -320,7 +320,7 @@ void QQuickImageBase::itemChange(ItemChange change, const ItemChangeData &value)
void QQuickImageBase::handleScreenChanged(QScreen* screen)
{
// Screen DPI might have changed, reload images on screen change.
- if (screen && isComponentComplete())
+ if (qmlEngine(this) && screen && isComponentComplete())
load();
}
diff --git a/src/quick/items/qquickimagebase_p.h b/src/quick/items/qquickimagebase_p.h
index 98943a235c..b6d592c826 100644
--- a/src/quick/items/qquickimagebase_p.h
+++ b/src/quick/items/qquickimagebase_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKIMAGEBASE_P_H
#define QQUICKIMAGEBASE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickimplicitsizeitem_p.h"
#include <private/qtquickglobal_p.h>
diff --git a/src/quick/items/qquickimplicitsizeitem_p.h b/src/quick/items/qquickimplicitsizeitem_p.h
index 3499cf22c5..1acbb7791d 100644
--- a/src/quick/items/qquickimplicitsizeitem_p.h
+++ b/src/quick/items/qquickimplicitsizeitem_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKIMPLICITSIZEITEM_H
#define QQUICKIMPLICITSIZEITEM_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickpainteditem.h"
#include <private/qtquickglobal_p.h>
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index 6b7d465b3b..b378398730 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -622,7 +622,7 @@ void QQuickKeyNavigationAttached::keyPressed(QKeyEvent *event, bool post)
mirror = QQuickItemPrivate::get(parentItem)->effectiveLayoutMirror;
QQuickItem* leftItem = mirror ? d->right : d->left;
if (leftItem) {
- setFocusNavigation(leftItem, mirror ? "right" : "left");
+ setFocusNavigation(leftItem, mirror ? "right" : "left", mirror ? Qt::TabFocusReason : Qt::BacktabFocusReason);
event->accept();
}
break;
@@ -632,20 +632,20 @@ void QQuickKeyNavigationAttached::keyPressed(QKeyEvent *event, bool post)
mirror = QQuickItemPrivate::get(parentItem)->effectiveLayoutMirror;
QQuickItem* rightItem = mirror ? d->left : d->right;
if (rightItem) {
- setFocusNavigation(rightItem, mirror ? "left" : "right");
+ setFocusNavigation(rightItem, mirror ? "left" : "right", mirror ? Qt::BacktabFocusReason : Qt::TabFocusReason);
event->accept();
}
break;
}
case Qt::Key_Up:
if (d->up) {
- setFocusNavigation(d->up, "up");
+ setFocusNavigation(d->up, "up", Qt::BacktabFocusReason);
event->accept();
}
break;
case Qt::Key_Down:
if (d->down) {
- setFocusNavigation(d->down, "down");
+ setFocusNavigation(d->down, "down", Qt::TabFocusReason);
event->accept();
}
break;
@@ -3077,6 +3077,7 @@ QQuickItemPrivate::QQuickItemPrivate()
, implicitAntialiasing(false)
, antialiasingValid(false)
, isTabFence(false)
+ , replayingPressEvent(false)
, dirtyAttributes(0)
, nextDirtyItem(0)
, prevDirtyItem(0)
@@ -5711,7 +5712,7 @@ QString QQuickItemPrivate::dirtyToString() const
{
#define DIRTY_TO_STRING(value) if (dirtyAttributes & value) { \
if (!rv.isEmpty()) \
- rv.append(QLatin1String("|")); \
+ rv.append(QLatin1Char('|')); \
rv.append(QLatin1String(#value)); \
}
@@ -7445,9 +7446,11 @@ bool QQuickItem::event(QEvent *ev)
dropEvent(static_cast<QDropEvent*>(ev));
break;
#endif // QT_NO_DRAGANDDROP
+#ifndef QT_NO_GESTURES
case QEvent::NativeGesture:
ev->ignore();
break;
+#endif // QT_NO_GESTURES
default:
return QObject::event(ev);
}
@@ -7560,6 +7563,8 @@ QQuickItemLayer::~QQuickItemLayer()
None of the other layer properties have any effect when the layer
is disabled.
+
+ \sa {Item Layers}
*/
void QQuickItemLayer::setEnabled(bool e)
{
@@ -7684,7 +7689,7 @@ void QQuickItemLayer::deactivateEffect()
The effect is typically a \l ShaderEffect component, although any \l Item component can be
assigned. The effect should have a source texture property with a name matching \l layer.samplerName.
- \sa layer.samplerName
+ \sa layer.samplerName, {Item Layers}
*/
void QQuickItemLayer::setEffect(QQmlComponent *component)
@@ -7724,6 +7729,8 @@ void QQuickItemLayer::setEffect(QQmlComponent *component)
\note Some OpenGL ES 2 implementations do not support mipmapping of
non-power-of-two textures.
+
+ \sa {Item Layers}
*/
void QQuickItemLayer::setMipmap(bool mipmap)
@@ -7757,6 +7764,7 @@ void QQuickItemLayer::setMipmap(bool mipmap)
be used with caution, as support for these formats in the underlying
hardare and driver is often not present.
+ \sa {Item Layers}
*/
void QQuickItemLayer::setFormat(QQuickShaderEffectSource::Format f)
@@ -7779,6 +7787,8 @@ void QQuickItemLayer::setFormat(QQuickShaderEffectSource::Format f)
rendered into the texture. The source rectangle can be larger than
the item itself. If the rectangle is null, which is the default,
then the whole item is rendered to the texture.
+
+ \sa {Item Layers}
*/
void QQuickItemLayer::setSourceRect(const QRectF &sourceRect)
@@ -7797,6 +7807,8 @@ void QQuickItemLayer::setSourceRect(const QRectF &sourceRect)
\qmlproperty bool QtQuick::Item::layer.smooth
Holds whether the layer is smoothly transformed.
+
+ \sa {Item Layers}
*/
void QQuickItemLayer::setSmooth(bool s)
@@ -7820,6 +7832,8 @@ void QQuickItemLayer::setSmooth(bool s)
\note Some platforms have a limit on how small framebuffer objects can be,
which means the actual texture size might be larger than the requested
size.
+
+ \sa {Item Layers}
*/
void QQuickItemLayer::setSize(const QSize &size)
@@ -7850,6 +7864,8 @@ void QQuickItemLayer::setSize(const QSize &size)
\note Some OpenGL ES 2 implementations do not support the GL_REPEAT
wrap mode with non-power-of-two textures.
+
+ \sa {Item Layers}
*/
void QQuickItemLayer::setWrapMode(QQuickShaderEffectSource::WrapMode mode)
@@ -7901,7 +7917,7 @@ void QQuickItemLayer::setTextureMirroring(QQuickShaderEffectSource::TextureMirro
This value must match the name of the effect's source texture property
so that the Item can pass the layer's offscreen surface to the effect correctly.
- \sa layer.effect, ShaderEffect
+ \sa layer.effect, ShaderEffect, {Item Layers}
*/
void QQuickItemLayer::setName(const QByteArray &name) {
diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h
index 6670975f20..9172f7eff1 100644
--- a/src/quick/items/qquickitem_p.h
+++ b/src/quick/items/qquickitem_p.h
@@ -433,6 +433,7 @@ public:
// when any of the item's descendants gets focus, the item constrains the tab
// focus chain and prevents tabbing outside.
bool isTabFence:1;
+ bool replayingPressEvent:1;
enum DirtyType {
TransformOrigin = 0x00000001,
diff --git a/src/quick/items/qquickitemanimation_p.h b/src/quick/items/qquickitemanimation_p.h
index 9f0b3dccb8..338af46ecb 100644
--- a/src/quick/items/qquickitemanimation_p.h
+++ b/src/quick/items/qquickitemanimation_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKITEMANIMATION_H
#define QQUICKITEMANIMATION_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickitem.h"
#include <QtQuick/private/qquickanimation_p.h>
diff --git a/src/quick/items/qquickitemchangelistener_p.h b/src/quick/items/qquickitemchangelistener_p.h
index d987b62454..fd8076c6a2 100644
--- a/src/quick/items/qquickitemchangelistener_p.h
+++ b/src/quick/items/qquickitemchangelistener_p.h
@@ -55,16 +55,16 @@ class QQuickAnchorsPrivate;
class QQuickItemChangeListener
{
public:
- virtual ~QQuickItemChangeListener() {};
+ virtual ~QQuickItemChangeListener() {}
virtual void itemGeometryChanged(QQuickItem *, const QRectF & /* new */, const QRectF & /* old */ ) {}
virtual void itemSiblingOrderChanged(QQuickItem *) {}
virtual void itemVisibilityChanged(QQuickItem *) {}
virtual void itemOpacityChanged(QQuickItem *) {}
virtual void itemDestroyed(QQuickItem *) {}
- virtual void itemChildAdded(QQuickItem *, QQuickItem *) {}
- virtual void itemChildRemoved(QQuickItem *, QQuickItem *) {}
- virtual void itemParentChanged(QQuickItem *, QQuickItem *) {}
+ virtual void itemChildAdded(QQuickItem *, QQuickItem * /* child */ ) {}
+ virtual void itemChildRemoved(QQuickItem *, QQuickItem * /* child */ ) {}
+ virtual void itemParentChanged(QQuickItem *, QQuickItem * /* parent */ ) {}
virtual void itemRotationChanged(QQuickItem *) {}
virtual void itemImplicitWidthChanged(QQuickItem *) {}
virtual void itemImplicitHeightChanged(QQuickItem *) {}
diff --git a/src/quick/items/qquickitemsmodule_p.h b/src/quick/items/qquickitemsmodule_p.h
index a7442e972a..b04e9ff23f 100644
--- a/src/quick/items/qquickitemsmodule_p.h
+++ b/src/quick/items/qquickitemsmodule_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKITEMSMODULE_P_H
#define QQUICKITEMSMODULE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick/items/qquickitemview_p.h b/src/quick/items/qquickitemview_p.h
index 3e28ff336d..789b5a3e55 100644
--- a/src/quick/items/qquickitemview_p.h
+++ b/src/quick/items/qquickitemview_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKITEMVIEW_P_H
#define QQUICKITEMVIEW_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickflickable_p.h"
#include <qpointer.h>
#include <QtCore/QLoggingCategory>
diff --git a/src/quick/items/qquickitemview_p_p.h b/src/quick/items/qquickitemview_p_p.h
index 0931db4e56..8af703eb03 100644
--- a/src/quick/items/qquickitemview_p_p.h
+++ b/src/quick/items/qquickitemview_p_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKITEMVIEW_P_P_H
#define QQUICKITEMVIEW_P_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickitemview_p.h"
#include "qquickitemviewtransition_p.h"
#include "qquickflickable_p_p.h"
diff --git a/src/quick/items/qquickitemviewtransition.cpp b/src/quick/items/qquickitemviewtransition.cpp
index 6fa299bf03..565377df58 100644
--- a/src/quick/items/qquickitemviewtransition.cpp
+++ b/src/quick/items/qquickitemviewtransition.cpp
@@ -851,7 +851,7 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent)
*/
/*!
- \qmlattachedproperty list QtQuick::ViewTransition::index
+ \qmlattachedproperty int QtQuick::ViewTransition::index
This attached property holds the index of the item that is being
transitioned.
@@ -861,7 +861,7 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent)
*/
/*!
- \qmlattachedproperty list QtQuick::ViewTransition::item
+ \qmlattachedproperty item QtQuick::ViewTransition::item
This attached property holds the item that is being transitioned.
@@ -870,7 +870,7 @@ QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent)
*/
/*!
- \qmlattachedproperty list QtQuick::ViewTransition::destination
+ \qmlattachedproperty point QtQuick::ViewTransition::destination
This attached property holds the final destination position for the transitioned
item within the view.
diff --git a/src/quick/items/qquickitemviewtransition_p.h b/src/quick/items/qquickitemviewtransition_p.h
index 6f93697cc5..b4c2705fd3 100644
--- a/src/quick/items/qquickitemviewtransition_p.h
+++ b/src/quick/items/qquickitemviewtransition_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKITEMVIEWTRANSITION_P_P_H
#define QQUICKITEMVIEWTRANSITION_P_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuick/private/qtquickglobal_p.h>
#include <QtCore/qobject.h>
#include <QtCore/qpoint.h>
diff --git a/src/quick/items/qquicklistview_p.h b/src/quick/items/qquicklistview_p.h
index 7f64e12bba..5f8be2ab02 100644
--- a/src/quick/items/qquicklistview_p.h
+++ b/src/quick/items/qquicklistview_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKLISTVIEW_P_H
#define QQUICKLISTVIEW_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickitemview_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/quick/items/qquickloader_p.h b/src/quick/items/qquickloader_p.h
index 6ed4f2437b..e9d765fa5c 100644
--- a/src/quick/items/qquickloader_p.h
+++ b/src/quick/items/qquickloader_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKLOADER_P_H
#define QQUICKLOADER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickimplicitsizeitem_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/quick/items/qquickmousearea_p.h b/src/quick/items/qquickmousearea_p.h
index 4ad14e6bdd..e3cbf2553c 100644
--- a/src/quick/items/qquickmousearea_p.h
+++ b/src/quick/items/qquickmousearea_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKMOUSEAREA_P_H
#define QQUICKMOUSEAREA_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickitem.h"
#include <private/qtquickglobal_p.h>
#include <QtCore/qstringlist.h>
diff --git a/src/quick/items/qquickmultipointtoucharea_p.h b/src/quick/items/qquickmultipointtoucharea_p.h
index e5c547da81..792724a9c8 100644
--- a/src/quick/items/qquickmultipointtoucharea_p.h
+++ b/src/quick/items/qquickmultipointtoucharea_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKMULTIPOINTTOUCHAREA_H
#define QQUICKMULTIPOINTTOUCHAREA_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickitem.h"
#include "qevent.h"
diff --git a/src/quick/items/qquickpainteditem_p.h b/src/quick/items/qquickpainteditem_p.h
index e77254c0e6..d0e4f9481d 100644
--- a/src/quick/items/qquickpainteditem_p.h
+++ b/src/quick/items/qquickpainteditem_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKPAINTEDITEM_P_P_H
#define QQUICKPAINTEDITEM_P_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickitem_p.h"
#include <QtGui/qcolor.h>
diff --git a/src/quick/items/qquickpathview_p.h b/src/quick/items/qquickpathview_p.h
index 0f2e4a956c..0973d65a58 100644
--- a/src/quick/items/qquickpathview_p.h
+++ b/src/quick/items/qquickpathview_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKPATHVIEW_P_H
#define QQUICKPATHVIEW_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickitem.h"
#include <private/qquickpath_p.h>
diff --git a/src/quick/items/qquickpincharea.cpp b/src/quick/items/qquickpincharea.cpp
index 07bf268309..f419d570f3 100644
--- a/src/quick/items/qquickpincharea.cpp
+++ b/src/quick/items/qquickpincharea.cpp
@@ -765,11 +765,11 @@ bool QQuickPinchArea::event(QEvent *event)
d->pinchRotation = angle;
updatePinchTarget();
} break;
-#endif // QT_NO_GESTURES
default:
return QQuickItem::event(event);
}
} break;
+#endif // QT_NO_GESTURES
case QEvent::Wheel:
event->ignore();
return false;
diff --git a/src/quick/items/qquickpincharea_p.h b/src/quick/items/qquickpincharea_p.h
index 602b2804cc..d623a70010 100644
--- a/src/quick/items/qquickpincharea_p.h
+++ b/src/quick/items/qquickpincharea_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKPINCHAREA_H
#define QQUICKPINCHAREA_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickitem.h"
QT_BEGIN_NAMESPACE
diff --git a/src/quick/items/qquickpositioners_p.h b/src/quick/items/qquickpositioners_p.h
index bc67701306..fca64b0a22 100644
--- a/src/quick/items/qquickpositioners_p.h
+++ b/src/quick/items/qquickpositioners_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKPOSITIONERS_P_H
#define QQUICKPOSITIONERS_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickimplicitsizeitem_p.h"
#include "qquickitemviewtransition_p.h"
diff --git a/src/quick/items/qquickrectangle_p.h b/src/quick/items/qquickrectangle_p.h
index 16afa39bdd..feca74cb41 100644
--- a/src/quick/items/qquickrectangle_p.h
+++ b/src/quick/items/qquickrectangle_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKRECTANGLE_P_H
#define QQUICKRECTANGLE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickitem.h"
#include <QtGui/qbrush.h>
diff --git a/src/quick/items/qquickrepeater_p.h b/src/quick/items/qquickrepeater_p.h
index 5f652da975..c0a0a32f5f 100644
--- a/src/quick/items/qquickrepeater_p.h
+++ b/src/quick/items/qquickrepeater_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKREPEATER_P_H
#define QQUICKREPEATER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickitem.h"
QT_BEGIN_NAMESPACE
diff --git a/src/quick/items/qquickscalegrid_p_p.h b/src/quick/items/qquickscalegrid_p_p.h
index b12da7a706..1d067f1a94 100644
--- a/src/quick/items/qquickscalegrid_p_p.h
+++ b/src/quick/items/qquickscalegrid_p_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKSCALEGRID_P_P_H
#define QQUICKSCALEGRID_P_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickborderimage_p.h"
#include <QtQml/qqml.h>
diff --git a/src/quick/items/qquickscreen.cpp b/src/quick/items/qquickscreen.cpp
index 3bf7229b33..5bd6430f2d 100644
--- a/src/quick/items/qquickscreen.cpp
+++ b/src/quick/items/qquickscreen.cpp
@@ -351,15 +351,24 @@ void QQuickScreenAttached::screenChanged(QScreen *screen)
emit orientationUpdateMaskChanged();
}
- emit widthChanged();
- emit heightChanged();
- emit nameChanged();
- emit orientationChanged();
- emit primaryOrientationChanged();
- emit desktopGeometryChanged();
- emit logicalPixelDensityChanged();
- emit pixelDensityChanged();
- emit devicePixelRatioChanged();
+ if (!oldScreen || screen->size() != oldScreen->size()) {
+ emit widthChanged();
+ emit heightChanged();
+ }
+ if (!oldScreen || screen->name() != oldScreen->name())
+ emit nameChanged();
+ if (!oldScreen || screen->orientation() != oldScreen->orientation())
+ emit orientationChanged();
+ if (!oldScreen || screen->primaryOrientation() != oldScreen->primaryOrientation())
+ emit primaryOrientationChanged();
+ if (!oldScreen || screen->availableVirtualGeometry() != oldScreen->availableVirtualGeometry())
+ emit desktopGeometryChanged();
+ if (!oldScreen || screen->logicalDotsPerInch() != oldScreen->logicalDotsPerInch())
+ emit logicalPixelDensityChanged();
+ if (!oldScreen || screen->physicalDotsPerInch() != oldScreen->physicalDotsPerInch())
+ emit pixelDensityChanged();
+ if (!oldScreen || screen->devicePixelRatio() != oldScreen->devicePixelRatio())
+ emit devicePixelRatioChanged();
connect(screen, SIGNAL(geometryChanged(QRect)),
this, SIGNAL(widthChanged()));
diff --git a/src/quick/items/qquickscreen_p.h b/src/quick/items/qquickscreen_p.h
index 3d0f00b22c..d8c8cbde2f 100644
--- a/src/quick/items/qquickscreen_p.h
+++ b/src/quick/items/qquickscreen_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKSCREEN_P_H
#define QQUICKSCREEN_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include <QRect>
#include <QSize>
@@ -102,7 +113,7 @@ protected Q_SLOTS:
void screenChanged(QScreen*);
private:
- QScreen* m_screen;
+ QPointer<QScreen> m_screen;
QQuickWindow* m_window;
QQuickItem* m_attachee;
Qt::ScreenOrientations m_updateMask;
diff --git a/src/quick/items/qquickshadereffect.cpp b/src/quick/items/qquickshadereffect.cpp
index 0be305b693..349207f145 100644
--- a/src/quick/items/qquickshadereffect.cpp
+++ b/src/quick/items/qquickshadereffect.cpp
@@ -578,8 +578,12 @@ void QQuickShaderEffectCommon::propertyChanged(QQuickItem *item, int mappedId,
\li QTransform -> mat3
\li QMatrix4x4 -> mat4
\li QQuaternion -> vec4, scalar value is \c w.
- \li \l Image, \l ShaderEffectSource -> sampler2D - Origin is in the top-left
- corner, and the color values are premultiplied.
+ \li \l Image -> sampler2D - Origin is in the top-left corner, and the
+ color values are premultiplied. The texture is provided as is,
+ excluding the Image item's fillMode. To include fillMode, use a
+ ShaderEffectSource or Image::layer::enabled.
+ \li \l ShaderEffectSource -> sampler2D - Origin is in the top-left
+ corner, and the color values are premultiplied.
\endlist
The QML scene graph back-end may choose to allocate textures in texture
diff --git a/src/quick/items/qquickshadereffect_p.h b/src/quick/items/qquickshadereffect_p.h
index 75a8319615..a5e993ee0c 100644
--- a/src/quick/items/qquickshadereffect_p.h
+++ b/src/quick/items/qquickshadereffect_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKSHADEREFFECT_P_H
#define QQUICKSHADEREFFECT_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuick/qquickitem.h>
#include <QtQuick/qsgmaterial.h>
diff --git a/src/quick/items/qquickshadereffectmesh_p.h b/src/quick/items/qquickshadereffectmesh_p.h
index b392753bf8..eb0f03ea81 100644
--- a/src/quick/items/qquickshadereffectmesh_p.h
+++ b/src/quick/items/qquickshadereffectmesh_p.h
@@ -43,6 +43,17 @@
#ifndef QQUICKSHADEREFFECTMESH_P_H
#define QQUICKSHADEREFFECTMESH_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
QT_BEGIN_NAMESPACE
class QSGGeometry;
diff --git a/src/quick/items/qquickshadereffectnode_p.h b/src/quick/items/qquickshadereffectnode_p.h
index 28382c483c..420ca1237b 100644
--- a/src/quick/items/qquickshadereffectnode_p.h
+++ b/src/quick/items/qquickshadereffectnode_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKSHADEREFFECTNODE_P_H
#define QQUICKSHADEREFFECTNODE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuick/qsgnode.h>
#include <QtQuick/qsgmaterial.h>
#include <QtQuick/qsgtextureprovider.h>
diff --git a/src/quick/items/qquickshadereffectsource_p.h b/src/quick/items/qquickshadereffectsource_p.h
index 629acf0f55..c9d50cef9e 100644
--- a/src/quick/items/qquickshadereffectsource_p.h
+++ b/src/quick/items/qquickshadereffectsource_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKSHADEREFFECTSOURCE_P_H
#define QQUICKSHADEREFFECTSOURCE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickitem.h"
#include <QtQuick/qsgtextureprovider.h>
#include <private/qsgadaptationlayer_p.h>
diff --git a/src/quick/items/qquicksprite_p.h b/src/quick/items/qquicksprite_p.h
index 86350738a0..43c5e44be3 100644
--- a/src/quick/items/qquicksprite_p.h
+++ b/src/quick/items/qquicksprite_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKSPRITE_P_H
#define QQUICKSPRITE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QObject>
#include <QUrl>
#include <QVariantMap>
diff --git a/src/quick/items/qquickspriteengine_p.h b/src/quick/items/qquickspriteengine_p.h
index ef52bcc9fe..48808e73c9 100644
--- a/src/quick/items/qquickspriteengine_p.h
+++ b/src/quick/items/qquickspriteengine_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKSPRITEENGINE_P_H
#define QQUICKSPRITEENGINE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QObject>
#include <QVector>
#include <QTimer>
diff --git a/src/quick/items/qquickspritesequence_p.h b/src/quick/items/qquickspritesequence_p.h
index f5d467580d..54ed2636b2 100644
--- a/src/quick/items/qquickspritesequence_p.h
+++ b/src/quick/items/qquickspritesequence_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKSPRITESEQUENCE_P_H
#define QQUICKSPRITESEQUENCE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuick/QQuickItem>
#include <QTime>
diff --git a/src/quick/items/qquickstateoperations_p.h b/src/quick/items/qquickstateoperations_p.h
index 1999e23a83..f1959fa374 100644
--- a/src/quick/items/qquickstateoperations_p.h
+++ b/src/quick/items/qquickstateoperations_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKSTATEOPERATIONS_P_H
#define QQUICKSTATEOPERATIONS_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickitem.h"
#include "qquickanchors_p.h"
diff --git a/src/quick/items/qquicktext_p.h b/src/quick/items/qquicktext_p.h
index 6a4b128f6e..5b385aeb0a 100644
--- a/src/quick/items/qquicktext_p.h
+++ b/src/quick/items/qquicktext_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKTEXT_P_H
#define QQUICKTEXT_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickimplicitsizeitem_p.h"
#include <private/qtquickglobal_p.h>
#include <QtGui/qtextoption.h>
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp
index 5523beb72a..7cf3b449a0 100644
--- a/src/quick/items/qquicktextedit.cpp
+++ b/src/quick/items/qquicktextedit.cpp
@@ -773,6 +773,19 @@ void QQuickTextEditPrivate::setBottomPadding(qreal value, bool reset)
}
}
+bool QQuickTextEditPrivate::isImplicitResizeEnabled() const
+{
+ return !extra.isAllocated() || extra->implicitResize;
+}
+
+void QQuickTextEditPrivate::setImplicitResizeEnabled(bool enabled)
+{
+ if (!enabled)
+ extra.value().implicitResize = false;
+ else if (extra.isAllocated())
+ extra->implicitResize = true;
+}
+
QQuickTextEdit::VAlignment QQuickTextEdit::vAlign() const
{
Q_D(const QQuickTextEdit);
@@ -2115,7 +2128,7 @@ QQuickTextEditPrivate::ExtraData::ExtraData()
, explicitLeftPadding(false)
, explicitRightPadding(false)
, explicitBottomPadding(false)
- , explicitImplicitSize(false)
+ , implicitResize(true)
{
}
@@ -2346,7 +2359,7 @@ void QQuickTextEdit::updateSize()
const bool wasInLayout = d->inLayout;
d->inLayout = true;
- if (!d->extra.isAllocated() || !d->extra->explicitImplicitSize)
+ if (d->isImplicitResizeEnabled())
setImplicitWidth(naturalWidth + leftPadding() + rightPadding());
d->inLayout = wasInLayout;
if (d->inLayout) // probably the result of a binding loop, but by letting it
@@ -2366,7 +2379,7 @@ void QQuickTextEdit::updateSize()
QFontMetricsF fm(d->font);
qreal newHeight = d->document->isEmpty() ? qCeil(fm.height()) : d->document->size().height();
- if (!d->extra.isAllocated() || !d->extra->explicitImplicitSize) {
+ if (d->isImplicitResizeEnabled()) {
// ### Setting the implicitWidth triggers another updateSize(), and unless there are bindings nothing has changed.
if (!widthValid() && !d->requireImplicitWidth)
setImplicitSize(newWidth + leftPadding() + rightPadding(), newHeight + topPadding() + bottomPadding());
diff --git a/src/quick/items/qquicktextedit_p.h b/src/quick/items/qquicktextedit_p.h
index cfe599c0d3..f8b7100cfa 100644
--- a/src/quick/items/qquicktextedit_p.h
+++ b/src/quick/items/qquicktextedit_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKTEXTEDIT_P_H
#define QQUICKTEXTEDIT_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickimplicitsizeitem_p.h"
#include <QtGui/qtextoption.h>
diff --git a/src/quick/items/qquicktextedit_p_p.h b/src/quick/items/qquicktextedit_p_p.h
index e6f1c0ee21..a2b4c1ab99 100644
--- a/src/quick/items/qquicktextedit_p_p.h
+++ b/src/quick/items/qquicktextedit_p_p.h
@@ -94,7 +94,7 @@ public:
bool explicitLeftPadding : 1;
bool explicitRightPadding : 1;
bool explicitBottomPadding : 1;
- bool explicitImplicitSize : 1;
+ bool implicitResize : 1;
};
QLazilyAllocated<ExtraData> extra;
@@ -159,6 +159,9 @@ public:
void setRightPadding(qreal value, bool reset = false);
void setBottomPadding(qreal value, bool reset = false);
+ bool isImplicitResizeEnabled() const;
+ void setImplicitResizeEnabled(bool enabled);
+
QColor color;
QColor selectionColor;
QColor selectedTextColor;
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp
index d69c489b2d..ab8e75bfef 100644
--- a/src/quick/items/qquicktextinput.cpp
+++ b/src/quick/items/qquicktextinput.cpp
@@ -2518,7 +2518,7 @@ QQuickTextInputPrivate::ExtraData::ExtraData()
, explicitLeftPadding(false)
, explicitRightPadding(false)
, explicitBottomPadding(false)
- , explicitImplicitSize(false)
+ , implicitResize(true)
{
}
@@ -2796,6 +2796,19 @@ void QQuickTextInputPrivate::setBottomPadding(qreal value, bool reset)
}
}
+bool QQuickTextInputPrivate::isImplicitResizeEnabled() const
+{
+ return !extra.isAllocated() || extra->implicitResize;
+}
+
+void QQuickTextInputPrivate::setImplicitResizeEnabled(bool enabled)
+{
+ if (!enabled)
+ extra.value().implicitResize = false;
+ else if (extra.isAllocated())
+ extra->implicitResize = true;
+}
+
void QQuickTextInputPrivate::updateLayout()
{
Q_Q(QQuickTextInput);
@@ -2821,7 +2834,7 @@ void QQuickTextInputPrivate::updateLayout()
line.setLineWidth(INT_MAX);
const bool wasInLayout = inLayout;
inLayout = true;
- if (!extra.isAllocated() || !extra->explicitImplicitSize)
+ if (isImplicitResizeEnabled())
q->setImplicitWidth(qCeil(line.naturalTextWidth()) + q->leftPadding() + q->rightPadding());
inLayout = wasInLayout;
if (inLayout) // probably the result of a binding loop, but by letting it
@@ -2853,7 +2866,7 @@ void QQuickTextInputPrivate::updateLayout()
q->polish();
q->update();
- if (!extra.isAllocated() || !extra->explicitImplicitSize) {
+ if (isImplicitResizeEnabled()) {
if (!requireImplicitWidth && !q->widthValid())
q->setImplicitSize(width + q->leftPadding() + q->rightPadding(), height + q->topPadding() + q->bottomPadding());
else
diff --git a/src/quick/items/qquicktextinput_p.h b/src/quick/items/qquicktextinput_p.h
index b91149f5f3..8733b31960 100644
--- a/src/quick/items/qquicktextinput_p.h
+++ b/src/quick/items/qquicktextinput_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKTEXTINPUT_P_H
#define QQUICKTEXTINPUT_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickimplicitsizeitem_p.h"
#include <QtGui/qtextoption.h>
#include <QtGui/qvalidator.h>
diff --git a/src/quick/items/qquicktextinput_p_p.h b/src/quick/items/qquicktextinput_p_p.h
index fa7462c0c5..6aaa630839 100644
--- a/src/quick/items/qquicktextinput_p_p.h
+++ b/src/quick/items/qquicktextinput_p_p.h
@@ -84,7 +84,7 @@ public:
bool explicitLeftPadding : 1;
bool explicitRightPadding : 1;
bool explicitBottomPadding : 1;
- bool explicitImplicitSize : 1;
+ bool implicitResize : 1;
};
QLazilyAllocated<ExtraData> extra;
@@ -447,6 +447,9 @@ public:
void setRightPadding(qreal value, bool reset = false);
void setBottomPadding(qreal value, bool reset = false);
+ bool isImplicitResizeEnabled() const;
+ void setImplicitResizeEnabled(bool enabled);
+
private:
void removeSelectedText();
void internalSetText(const QString &txt, int pos = -1, bool edited = true);
diff --git a/src/quick/items/qquicktextnode_p.h b/src/quick/items/qquicktextnode_p.h
index 6063813a8d..01de0dbf2f 100644
--- a/src/quick/items/qquicktextnode_p.h
+++ b/src/quick/items/qquicktextnode_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKTEXTNODE_P_H
#define QQUICKTEXTNODE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuick/qsgnode.h>
#include "qquicktext_p.h"
#include <qglyphrun.h>
diff --git a/src/quick/items/qquicktextnodeengine_p.h b/src/quick/items/qquicktextnodeengine_p.h
index f9ebe43183..2eae950f06 100644
--- a/src/quick/items/qquicktextnodeengine_p.h
+++ b/src/quick/items/qquicktextnodeengine_p.h
@@ -44,6 +44,17 @@
#ifndef QQUICKTEXTNODEENGINE_P_H
#define QQUICKTEXTNODEENGINE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
QT_BEGIN_NAMESPACE
// Engine that takes glyph runs as input, and produces a set of glyph nodes, clip nodes,
diff --git a/src/quick/items/qquicktranslate_p.h b/src/quick/items/qquicktranslate_p.h
index 6dfb5a08b7..09868b5939 100644
--- a/src/quick/items/qquicktranslate_p.h
+++ b/src/quick/items/qquicktranslate_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKTRANSLATE_P_H
#define QQUICKTRANSLATE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickitem.h"
#include <QtGui/qmatrix4x4.h>
diff --git a/src/quick/items/qquickview_p.h b/src/quick/items/qquickview_p.h
index 57aafd086a..6f970f959d 100644
--- a/src/quick/items/qquickview_p.h
+++ b/src/quick/items/qquickview_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKVIEW_P_H
#define QQUICKVIEW_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickview.h"
#include <QtCore/qurl.h>
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 8ab910f299..c8256ed62a 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -1401,9 +1401,11 @@ bool QQuickWindow::event(QEvent *e)
d->windowManager->handleUpdateRequest(this);
break;
}
+#ifndef QT_NO_GESTURES
case QEvent::NativeGesture:
d->deliverNativeGestureEvent(d->contentItem, static_cast<QNativeGestureEvent*>(e));
break;
+#endif
default:
break;
}
@@ -1432,29 +1434,8 @@ void QQuickWindowPrivate::deliverKeyEvent(QKeyEvent *e)
{
Q_Q(QQuickWindow);
-#ifndef QT_NO_SHORTCUT
- // Try looking for a Shortcut before sending key events
- if (e->type() == QEvent::KeyPress
- && QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(q->focusObject(), e))
- return;
-#endif
-
if (activeFocusItem)
q->sendEvent(activeFocusItem, e);
-#ifdef Q_OS_MAC
- else {
- // This is the case for popup windows on Mac, where popup windows get focus
- // in Qt (after exposure) but they are not "key windows" in the Cocoa sense.
- // Therefore, the will never receive key events from Cocoa. Instead, the
- // toplevel non-popup window (the application current "key window") will
- // receive them. (QWidgetWindow does something similar for widgets, by keeping
- // a list of popup windows, and forwarding the key event to the top-most popup.)
- QWindow *focusWindow = QGuiApplication::focusWindow();
- if (focusWindow && focusWindow != q
- && (focusWindow->flags() & Qt::Popup) == Qt::Popup)
- QGuiApplication::sendEvent(focusWindow, e);
- }
-#endif
}
QMouseEvent *QQuickWindowPrivate::cloneMouseEvent(QMouseEvent *event, QPointF *transformedLocalPos)
@@ -1780,6 +1761,7 @@ void QQuickWindow::wheelEvent(QWheelEvent *event)
}
#endif // QT_NO_WHEELEVENT
+#ifndef QT_NO_GESTURES
bool QQuickWindowPrivate::deliverNativeGestureEvent(QQuickItem *item, QNativeGestureEvent *event)
{
QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item);
@@ -1811,6 +1793,7 @@ bool QQuickWindowPrivate::deliverNativeGestureEvent(QQuickItem *item, QNativeGes
return false;
}
+#endif // QT_NO_GESTURES
bool QQuickWindowPrivate::deliverTouchCancelEvent(QTouchEvent *event)
{
@@ -2452,9 +2435,11 @@ bool QQuickWindowPrivate::sendFilteredMouseEvent(QQuickItem *target, QQuickItem
if (!target)
return false;
- bool filtered = false;
-
QQuickItemPrivate *targetPrivate = QQuickItemPrivate::get(target);
+ if (targetPrivate->replayingPressEvent)
+ return false;
+
+ bool filtered = false;
if (targetPrivate->filtersChildMouseEvents && !hasFiltered->contains(target)) {
hasFiltered->insert(target);
if (target->childMouseEventFilter(item, event))
diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h
index 0d33d2398a..e475c48b0a 100644
--- a/src/quick/items/qquickwindow_p.h
+++ b/src/quick/items/qquickwindow_p.h
@@ -145,7 +145,9 @@ public:
#ifndef QT_NO_WHEELEVENT
bool deliverWheelEvent(QQuickItem *, QWheelEvent *);
#endif
+#ifndef QT_NO_GESTURES
bool deliverNativeGestureEvent(QQuickItem *, QNativeGestureEvent *);
+#endif
bool deliverTouchPoints(QQuickItem *, QTouchEvent *, const QList<QTouchEvent::TouchPoint> &, QSet<int> *,
QHash<QQuickItem *, QList<QTouchEvent::TouchPoint> > *, QSet<QQuickItem*> *filtered);
void deliverTouchEvent(QTouchEvent *);
diff --git a/src/quick/items/qquickwindowattached_p.h b/src/quick/items/qquickwindowattached_p.h
index 8138ab216a..98b28430b2 100644
--- a/src/quick/items/qquickwindowattached_p.h
+++ b/src/quick/items/qquickwindowattached_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKWINDOW_ATTACHED_P_H
#define QQUICKWINDOW_ATTACHED_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include <QWindow>
diff --git a/src/quick/items/qquickwindowmodule_p.h b/src/quick/items/qquickwindowmodule_p.h
index bfc51953ca..8396019102 100644
--- a/src/quick/items/qquickwindowmodule_p.h
+++ b/src/quick/items/qquickwindowmodule_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKWINDOWMODULE_H
#define QQUICKWINDOWMODULE_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qtquickglobal_p.h>
#include <qquickwindow.h>
#include <qqmlparserstatus.h>
diff --git a/src/quick/qtquick2_p.h b/src/quick/qtquick2_p.h
index f501323cde..523842a4cd 100644
--- a/src/quick/qtquick2_p.h
+++ b/src/quick/qtquick2_p.h
@@ -34,6 +34,17 @@
#ifndef QTQUICK2_P_H
#define QTQUICK2_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qtquickglobal_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick/scenegraph/coreapi/qsgabstractrenderer_p.h b/src/quick/scenegraph/coreapi/qsgabstractrenderer_p.h
index c5504513f4..17de89bf11 100644
--- a/src/quick/scenegraph/coreapi/qsgabstractrenderer_p.h
+++ b/src/quick/scenegraph/coreapi/qsgabstractrenderer_p.h
@@ -34,6 +34,17 @@
#ifndef QSGABSTRACTRENDERER_P_H
#define QSGABSTRACTRENDERER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qsgabstractrenderer.h"
#include "qsgnode.h"
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index 8632ea0b52..60ada14c32 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -821,7 +821,8 @@ Renderer::Renderer(QSGRenderContext *ctx)
m_vao->create();
}
- m_useDepthBuffer = ctx->openglContext()->format().depthBufferSize() > 0;
+ bool useDepth = qEnvironmentVariableIsEmpty("QSG_NO_DEPTH_BUFFER");
+ m_useDepthBuffer = useDepth && ctx->openglContext()->format().depthBufferSize() > 0;
}
static void qsg_wipeBuffer(Buffer *buffer, QOpenGLFunctions *funcs)
@@ -1087,8 +1088,10 @@ void Renderer::nodeWasRemoved(Node *node)
e->removed = true;
m_elementsToDelete.add(e);
- if (m_renderNodeElements.isEmpty())
- m_useDepthBuffer = context()->openglContext()->format().depthBufferSize() > 0;
+ if (m_renderNodeElements.isEmpty()) {
+ static bool useDepth = qEnvironmentVariableIsEmpty("QSG_NO_DEPTH_BUFFER");
+ m_useDepthBuffer = useDepth && context()->openglContext()->format().depthBufferSize() > 0;
+ }
}
}
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
index 6e52d6a849..8cd9e7e3ff 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
@@ -34,6 +34,17 @@
#ifndef QSGBATCHRENDERER_P_H
#define QSGBATCHRENDERER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qsgrenderer_p.h>
#include <private/qsgnodeupdater_p.h>
#include <private/qdatabuffer_p.h>
diff --git a/src/quick/scenegraph/coreapi/qsggeometry_p.h b/src/quick/scenegraph/coreapi/qsggeometry_p.h
index c52a45b25b..152fcb3427 100644
--- a/src/quick/scenegraph/coreapi/qsggeometry_p.h
+++ b/src/quick/scenegraph/coreapi/qsggeometry_p.h
@@ -34,6 +34,17 @@
#ifndef QSGGEOMETRY_P_H
#define QSGGEOMETRY_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qsggeometry.h"
QT_BEGIN_NAMESPACE
diff --git a/src/quick/scenegraph/coreapi/qsgmaterialshader_p.h b/src/quick/scenegraph/coreapi/qsgmaterialshader_p.h
index fab6d00f84..6b31e406ca 100644
--- a/src/quick/scenegraph/coreapi/qsgmaterialshader_p.h
+++ b/src/quick/scenegraph/coreapi/qsgmaterialshader_p.h
@@ -34,6 +34,17 @@
#ifndef QSGMATERIALSHADER_P_H
#define QSGMATERIALSHADER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qtquickglobal_p.h>
#include <QOpenGLShader>
diff --git a/src/quick/scenegraph/coreapi/qsgnode_p.h b/src/quick/scenegraph/coreapi/qsgnode_p.h
index c455e342c8..7fbb65ef81 100644
--- a/src/quick/scenegraph/coreapi/qsgnode_p.h
+++ b/src/quick/scenegraph/coreapi/qsgnode_p.h
@@ -34,6 +34,17 @@
#ifndef QSGNODE_P_H
#define QSGNODE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qglobal.h>
#include "qsgnode.h"
diff --git a/src/quick/scenegraph/coreapi/qsgnodeupdater_p.h b/src/quick/scenegraph/coreapi/qsgnodeupdater_p.h
index e578586a19..2e408d0dbe 100644
--- a/src/quick/scenegraph/coreapi/qsgnodeupdater_p.h
+++ b/src/quick/scenegraph/coreapi/qsgnodeupdater_p.h
@@ -34,6 +34,17 @@
#ifndef QSGNODEUPDATER_P_H
#define QSGNODEUPDATER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qtquickglobal_p.h>
#include <QtGui/private/qdatabuffer_p.h>
diff --git a/src/quick/scenegraph/coreapi/qsgrenderer_p.h b/src/quick/scenegraph/coreapi/qsgrenderer_p.h
index 7e4d52730a..319d0a46b6 100644
--- a/src/quick/scenegraph/coreapi/qsgrenderer_p.h
+++ b/src/quick/scenegraph/coreapi/qsgrenderer_p.h
@@ -34,6 +34,17 @@
#ifndef QSGRENDERER_P_H
#define QSGRENDERER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qsgabstractrenderer.h"
#include "qsgabstractrenderer_p.h"
#include "qsgnode.h"
diff --git a/src/quick/scenegraph/qsgadaptationlayer_p.h b/src/quick/scenegraph/qsgadaptationlayer_p.h
index ceb455fb28..c7ed398d1b 100644
--- a/src/quick/scenegraph/qsgadaptationlayer_p.h
+++ b/src/quick/scenegraph/qsgadaptationlayer_p.h
@@ -34,6 +34,17 @@
#ifndef QSGADAPTATIONLAYER_P_H
#define QSGADAPTATIONLAYER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuick/qsgnode.h>
#include <QtQuick/qsgtexture.h>
#include <QtCore/qobject.h>
diff --git a/src/quick/scenegraph/qsgcontext_p.h b/src/quick/scenegraph/qsgcontext_p.h
index 49b6f6e2a0..b1900cba76 100644
--- a/src/quick/scenegraph/qsgcontext_p.h
+++ b/src/quick/scenegraph/qsgcontext_p.h
@@ -34,6 +34,17 @@
#ifndef QSGCONTEXT_H
#define QSGCONTEXT_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/QObject>
#include <QtCore/qabstractanimation.h>
diff --git a/src/quick/scenegraph/qsgcontextplugin_p.h b/src/quick/scenegraph/qsgcontextplugin_p.h
index 66f28f3ac0..eb30ed18a4 100644
--- a/src/quick/scenegraph/qsgcontextplugin_p.h
+++ b/src/quick/scenegraph/qsgcontextplugin_p.h
@@ -34,6 +34,17 @@
#ifndef QSGCONTEXTPLUGIN_H
#define QSGCONTEXTPLUGIN_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qtquickglobal_p.h>
#include <QtQuick/qquickimageprovider.h>
#include <QtCore/qplugin.h>
diff --git a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h
index cffe02330a..59fa9850bc 100644
--- a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h
+++ b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h
@@ -34,6 +34,17 @@
#ifndef QSGDEFAULTDISTANCEFIELDGLYPHCACHE_H
#define QSGDEFAULTDISTANCEFIELDGLYPHCACHE_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qsgadaptationlayer_p.h"
#include <QtGui/qopenglfunctions.h>
#include <qopenglshaderprogram.h>
diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.h b/src/quick/scenegraph/qsgdefaultglyphnode_p.h
index 157c5f480c..cd178b932d 100644
--- a/src/quick/scenegraph/qsgdefaultglyphnode_p.h
+++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.h
@@ -34,6 +34,17 @@
#ifndef QSGDEFAULTGLYPHNODE_P_H
#define QSGDEFAULTGLYPHNODE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qsgadaptationlayer_p.h>
#include <QtQuick/qsgnode.h>
diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h b/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h
index 736b2de9ea..64d7116bbd 100644
--- a/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h
+++ b/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h
@@ -34,6 +34,17 @@
#ifndef QSGDEFAULTGLYPHNODE_P_P_H
#define QSGDEFAULTGLYPHNODE_P_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qcolor.h>
#include <QtGui/private/qopengltextureglyphcache_p.h>
#include <QtQuick/qsgmaterial.h>
diff --git a/src/quick/scenegraph/qsgdefaultimagenode_p.h b/src/quick/scenegraph/qsgdefaultimagenode_p.h
index c77321ae51..ff611e102b 100644
--- a/src/quick/scenegraph/qsgdefaultimagenode_p.h
+++ b/src/quick/scenegraph/qsgdefaultimagenode_p.h
@@ -35,6 +35,17 @@
#ifndef QSGDEFAULTIMAGENODE_P_H
#define QSGDEFAULTIMAGENODE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qsgadaptationlayer_p.h>
#include <QtQuick/qsgtexturematerial.h>
diff --git a/src/quick/scenegraph/qsgdefaultlayer_p.h b/src/quick/scenegraph/qsgdefaultlayer_p.h
index 7baaed5f67..7fb30436d1 100644
--- a/src/quick/scenegraph/qsgdefaultlayer_p.h
+++ b/src/quick/scenegraph/qsgdefaultlayer_p.h
@@ -33,6 +33,17 @@
#ifndef QSGDEFAULTLAYER_P_H
#define QSGDEFAULTLAYER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qsgadaptationlayer_p.h>
#include <private/qsgcontext_p.h>
#include <qsgsimplerectnode.h>
diff --git a/src/quick/scenegraph/qsgdefaultrectanglenode_p.h b/src/quick/scenegraph/qsgdefaultrectanglenode_p.h
index 18e679d8b4..0987b1f9b4 100644
--- a/src/quick/scenegraph/qsgdefaultrectanglenode_p.h
+++ b/src/quick/scenegraph/qsgdefaultrectanglenode_p.h
@@ -35,6 +35,17 @@
#ifndef QSGDEFAULTRECTANGLENODE_P_H
#define QSGDEFAULTRECTANGLENODE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qsgadaptationlayer_p.h>
#include <QtQuick/qsgvertexcolormaterial.h>
diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h
index bce9379bee..ab171c4fb8 100644
--- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h
+++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h
@@ -34,6 +34,17 @@
#ifndef QSGDISTANCEFIELDGLYPHNODE_P_H
#define QSGDISTANCEFIELDGLYPHNODE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qsgadaptationlayer_p.h>
#include <QtQuick/qsgtexture.h>
diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h b/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h
index 9aba26e5f0..d6538a39ed 100644
--- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h
+++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h
@@ -34,6 +34,17 @@
#ifndef QSGDISTANCEFIELDGLYPHNODE_P_P_H
#define QSGDISTANCEFIELDGLYPHNODE_P_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuick/qsgmaterial.h>
#include "qsgdistancefieldglyphnode_p.h"
#include "qsgadaptationlayer_p.h"
diff --git a/src/quick/scenegraph/qsgrenderloop_p.h b/src/quick/scenegraph/qsgrenderloop_p.h
index 3336731fda..1292e7ad9b 100644
--- a/src/quick/scenegraph/qsgrenderloop_p.h
+++ b/src/quick/scenegraph/qsgrenderloop_p.h
@@ -34,6 +34,17 @@
#ifndef QSGRenderLoop_P_H
#define QSGRenderLoop_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtGui/QImage>
#include <QtGui/QSurface>
#include <private/qtquickglobal_p.h>
diff --git a/src/quick/scenegraph/qsgthreadedrenderloop_p.h b/src/quick/scenegraph/qsgthreadedrenderloop_p.h
index 67df9dcd31..3fef6a0a88 100644
--- a/src/quick/scenegraph/qsgthreadedrenderloop_p.h
+++ b/src/quick/scenegraph/qsgthreadedrenderloop_p.h
@@ -34,6 +34,17 @@
#ifndef QSGTHREADEDRENDERLOOP_P_H
#define QSGTHREADEDRENDERLOOP_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/QThread>
#include <QtGui/QOpenGLContext>
#include <private/qsgcontext_p.h>
diff --git a/src/quick/scenegraph/qsgwindowsrenderloop_p.h b/src/quick/scenegraph/qsgwindowsrenderloop_p.h
index fd2dde6f2f..654a0ebbfd 100644
--- a/src/quick/scenegraph/qsgwindowsrenderloop_p.h
+++ b/src/quick/scenegraph/qsgwindowsrenderloop_p.h
@@ -34,6 +34,17 @@
#ifndef QSGWINDOWSRENDERLOOP_P_H
#define QSGWINDOWSRENDERLOOP_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/QObject>
#include <QtCore/QElapsedTimer>
diff --git a/src/quick/scenegraph/util/qsgareaallocator_p.h b/src/quick/scenegraph/util/qsgareaallocator_p.h
index d2823ce3ac..f7f753bb9c 100644
--- a/src/quick/scenegraph/util/qsgareaallocator_p.h
+++ b/src/quick/scenegraph/util/qsgareaallocator_p.h
@@ -34,6 +34,17 @@
#ifndef QSGAREAALLOCATOR_P_H
#define QSGAREAALLOCATOR_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qtquickglobal_p.h>
#include <QtCore/qsize.h>
diff --git a/src/quick/scenegraph/util/qsgatlastexture_p.h b/src/quick/scenegraph/util/qsgatlastexture_p.h
index c0f6ab912d..e77e0fa104 100644
--- a/src/quick/scenegraph/util/qsgatlastexture_p.h
+++ b/src/quick/scenegraph/util/qsgatlastexture_p.h
@@ -34,6 +34,17 @@
#ifndef QSGATLASTEXTURE_P_H
#define QSGATLASTEXTURE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/QSize>
#include <QtGui/qopengl.h>
diff --git a/src/quick/scenegraph/util/qsgdefaultpainternode_p.h b/src/quick/scenegraph/util/qsgdefaultpainternode_p.h
index 115ddc66f2..6b6f485915 100644
--- a/src/quick/scenegraph/util/qsgdefaultpainternode_p.h
+++ b/src/quick/scenegraph/util/qsgdefaultpainternode_p.h
@@ -34,6 +34,17 @@
#ifndef QSGDEFAULTPAINTERNODE_P_H
#define QSGDEFAULTPAINTERNODE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qsgadaptationlayer_p.h>
#include "qsgtexturematerial.h"
#include "qsgtexture_p.h"
diff --git a/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h b/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h
index e9d07ae605..c6d0de4435 100644
--- a/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h
+++ b/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h
@@ -34,6 +34,17 @@
#ifndef QSGDEPTHSTENCILBUFFER_P_H
#define QSGDEPTHSTENCILBUFFER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qsize.h>
#include <QtGui/private/qopenglcontext_p.h>
#include <QtGui/private/qopenglextensions_p.h>
diff --git a/src/quick/scenegraph/util/qsgdistancefieldutil_p.h b/src/quick/scenegraph/util/qsgdistancefieldutil_p.h
index 7ed4b44a6d..3ee29230d5 100644
--- a/src/quick/scenegraph/util/qsgdistancefieldutil_p.h
+++ b/src/quick/scenegraph/util/qsgdistancefieldutil_p.h
@@ -34,6 +34,17 @@
#ifndef QSGDISTANCEFIELDUTIL_H
#define QSGDISTANCEFIELDUTIL_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qrawfont.h>
#include <private/qfontengine_p.h>
#include <private/qsgadaptationlayer_p.h>
diff --git a/src/quick/scenegraph/util/qsgengine_p.h b/src/quick/scenegraph/util/qsgengine_p.h
index 770c4a536c..9bae09ea71 100644
--- a/src/quick/scenegraph/util/qsgengine_p.h
+++ b/src/quick/scenegraph/util/qsgengine_p.h
@@ -34,6 +34,17 @@
#ifndef QSGENGINE_P_H
#define QSGENGINE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qsgengine.h"
#include <private/qobject_p.h>
diff --git a/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp b/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp
index 93a9c98ffb..0d6375de1e 100644
--- a/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp
+++ b/src/quick/scenegraph/util/qsgshadersourcebuilder.cpp
@@ -373,7 +373,7 @@ QString QSGShaderSourceBuilder::resolveShaderPath(const QString &path) const
if (contextProfile() != QSurfaceFormat::CoreProfile) {
return path;
} else {
- int idx = path.lastIndexOf(QStringLiteral("."));
+ int idx = path.lastIndexOf(QLatin1Char('.'));
QString resolvedPath;
if (idx != -1)
resolvedPath = path.left(idx)
diff --git a/src/quick/scenegraph/util/qsgshadersourcebuilder_p.h b/src/quick/scenegraph/util/qsgshadersourcebuilder_p.h
index a270acb6ab..180ced7990 100644
--- a/src/quick/scenegraph/util/qsgshadersourcebuilder_p.h
+++ b/src/quick/scenegraph/util/qsgshadersourcebuilder_p.h
@@ -34,6 +34,17 @@
#ifndef QSGSHADERSOURCEBUILDER_P_H
#define QSGSHADERSOURCEBUILDER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qtquickglobal_p.h>
#include <QtGui/qsurfaceformat.h>
diff --git a/src/quick/scenegraph/util/qsgtexture_p.h b/src/quick/scenegraph/util/qsgtexture_p.h
index c4edee6d29..221b85c2f7 100644
--- a/src/quick/scenegraph/util/qsgtexture_p.h
+++ b/src/quick/scenegraph/util/qsgtexture_p.h
@@ -34,6 +34,17 @@
#ifndef QSGTEXTURE_P_H
#define QSGTEXTURE_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtQuick/qtquickglobal.h>
#include <private/qobject_p.h>
diff --git a/src/quick/scenegraph/util/qsgtexturematerial_p.h b/src/quick/scenegraph/util/qsgtexturematerial_p.h
index 7146ea95ec..5abd25977c 100644
--- a/src/quick/scenegraph/util/qsgtexturematerial_p.h
+++ b/src/quick/scenegraph/util/qsgtexturematerial_p.h
@@ -34,6 +34,17 @@
#ifndef TEXTUREMATERIAL_P_H
#define TEXTUREMATERIAL_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qsgtexturematerial.h"
#include <private/qtquickglobal_p.h>
diff --git a/src/quick/util/qquickanimation_p.h b/src/quick/util/qquickanimation_p.h
index c4d5cd20cd..4d3532ce84 100644
--- a/src/quick/util/qquickanimation_p.h
+++ b/src/quick/util/qquickanimation_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKANIMATION_H
#define QQUICKANIMATION_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickstate_p.h"
#include <QtGui/qvector3d.h>
diff --git a/src/quick/util/qquickanimationcontroller_p.h b/src/quick/util/qquickanimationcontroller_p.h
index 171090b6a7..efd1dbafc4 100644
--- a/src/quick/util/qquickanimationcontroller_p.h
+++ b/src/quick/util/qquickanimationcontroller_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKANIMATIONCONTROLLER_H
#define QQUICKANIMATIONCONTROLLER_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include "qquickanimation_p.h"
diff --git a/src/quick/util/qquickanimator_p.h b/src/quick/util/qquickanimator_p.h
index 7647e582b8..1ba0367839 100644
--- a/src/quick/util/qquickanimator_p.h
+++ b/src/quick/util/qquickanimator_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKANIMATOR_P_H
#define QQUICKANIMATOR_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickanimation_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/quick/util/qquickanimator_p_p.h b/src/quick/util/qquickanimator_p_p.h
index ad16b1c361..f5f0295f74 100644
--- a/src/quick/util/qquickanimator_p_p.h
+++ b/src/quick/util/qquickanimator_p_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKANIMATOR_P_P_H
#define QQUICKANIMATOR_P_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickanimator_p.h"
#include "qquickanimation_p_p.h"
#include <QtQuick/qquickitem.h>
diff --git a/src/quick/util/qquickanimatorcontroller_p.h b/src/quick/util/qquickanimatorcontroller_p.h
index 4de485c37c..5dd9b09e0b 100644
--- a/src/quick/util/qquickanimatorcontroller_p.h
+++ b/src/quick/util/qquickanimatorcontroller_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKANIMATORCONTROLLER_P_H
#define QQUICKANIMATORCONTROLLER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickanimatorjob_p.h"
#include <QtQuick/qsgnode.h>
#include <QtQuick/qquickitem.h>
diff --git a/src/quick/util/qquickanimatorjob_p.h b/src/quick/util/qquickanimatorjob_p.h
index ca70aecb8e..fd2543ea8a 100644
--- a/src/quick/util/qquickanimatorjob_p.h
+++ b/src/quick/util/qquickanimatorjob_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKANIMATORJOB_P_H
#define QQUICKANIMATORJOB_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qabstractanimationjob_p.h>
#include <private/qquickanimator_p.h>
#include <private/qtquickglobal_p.h>
diff --git a/src/quick/util/qquickapplication_p.h b/src/quick/util/qquickapplication_p.h
index c22d8cfe6b..082f68101a 100644
--- a/src/quick/util/qquickapplication_p.h
+++ b/src/quick/util/qquickapplication_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKAPPLICATION_P_H
#define QQUICKAPPLICATION_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/QObject>
#include <qqml.h>
#include <QtQml/private/qqmlglobal_p.h>
diff --git a/src/quick/util/qquickbehavior_p.h b/src/quick/util/qquickbehavior_p.h
index d566ca8ba1..a8bff1511b 100644
--- a/src/quick/util/qquickbehavior_p.h
+++ b/src/quick/util/qquickbehavior_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKBEHAVIOR_H
#define QQUICKBEHAVIOR_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <private/qtquickglobal_p.h>
#include <private/qqmlpropertyvalueinterceptor_p.h>
diff --git a/src/quick/util/qquickfontloader.cpp b/src/quick/util/qquickfontloader.cpp
index 67df47fb37..496acaa8e3 100644
--- a/src/quick/util/qquickfontloader.cpp
+++ b/src/quick/util/qquickfontloader.cpp
@@ -47,6 +47,8 @@
#include <qqmlinfo.h>
#include <qqmlfile.h>
+#include <QtCore/QCoreApplication>
+
QT_BEGIN_NAMESPACE
#define FONTLOADER_MAXIMUM_REDIRECT_RECURSION 16
@@ -132,10 +134,50 @@ public:
QUrl url;
QString name;
QQuickFontLoader::Status status;
- static QHash<QUrl, QQuickFontObject*> fonts;
};
-QHash<QUrl, QQuickFontObject*> QQuickFontLoaderPrivate::fonts;
+static void q_QFontLoaderFontsStaticReset();
+static void q_QFontLoaderFontsAddReset()
+{
+ qAddPostRoutine(q_QFontLoaderFontsStaticReset);
+}
+class QFontLoaderFonts
+{
+public:
+ QFontLoaderFonts()
+ {
+ qAddPostRoutine(q_QFontLoaderFontsStaticReset);
+ qAddPreRoutine(q_QFontLoaderFontsAddReset);
+ }
+
+ ~QFontLoaderFonts()
+ {
+ qRemovePostRoutine(q_QFontLoaderFontsStaticReset);
+ reset();
+ }
+
+
+ void reset()
+ {
+ QVector<QQuickFontObject *> deleted;
+ QHash<QUrl, QQuickFontObject*>::iterator it;
+ for (it = map.begin(); it != map.end(); ++it) {
+ if (!deleted.contains(it.value())) {
+ deleted.append(it.value());
+ delete it.value();
+ }
+ }
+ map.clear();
+ }
+
+ QHash<QUrl, QQuickFontObject *> map;
+};
+Q_GLOBAL_STATIC(QFontLoaderFonts, fontLoaderFonts);
+
+static void q_QFontLoaderFontsStaticReset()
+{
+ fontLoaderFonts()->reset();
+}
/*!
\qmltype FontLoader
@@ -193,29 +235,29 @@ void QQuickFontLoader::setSource(const QUrl &url)
QString localFile = QQmlFile::urlToLocalFileOrQrc(d->url);
if (!localFile.isEmpty()) {
- if (!d->fonts.contains(d->url)) {
+ if (!fontLoaderFonts()->map.contains(d->url)) {
int id = QFontDatabase::addApplicationFont(localFile);
if (id != -1) {
updateFontInfo(QFontDatabase::applicationFontFamilies(id).at(0), Ready);
QQuickFontObject *fo = new QQuickFontObject(id);
- d->fonts[d->url] = fo;
+ fontLoaderFonts()->map[d->url] = fo;
} else {
updateFontInfo(QString(), Error);
}
} else {
- updateFontInfo(QFontDatabase::applicationFontFamilies(d->fonts[d->url]->id).at(0), Ready);
+ updateFontInfo(QFontDatabase::applicationFontFamilies(fontLoaderFonts()->map[d->url]->id).at(0), Ready);
}
} else {
- if (!d->fonts.contains(d->url)) {
+ if (!fontLoaderFonts()->map.contains(d->url)) {
QQuickFontObject *fo = new QQuickFontObject;
- d->fonts[d->url] = fo;
+ fontLoaderFonts()->map[d->url] = fo;
fo->download(d->url, qmlEngine(this)->networkAccessManager());
d->status = Loading;
emit statusChanged();
QObject::connect(fo, SIGNAL(fontDownloaded(QString,QQuickFontLoader::Status)),
this, SLOT(updateFontInfo(QString,QQuickFontLoader::Status)));
} else {
- QQuickFontObject *fo = d->fonts[d->url];
+ QQuickFontObject *fo = fontLoaderFonts()->map[d->url];
if (fo->id == -1) {
d->status = Loading;
emit statusChanged();
diff --git a/src/quick/util/qquickfontloader_p.h b/src/quick/util/qquickfontloader_p.h
index 507d0210ee..1e2a70be7d 100644
--- a/src/quick/util/qquickfontloader_p.h
+++ b/src/quick/util/qquickfontloader_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKFONTLOADER_H
#define QQUICKFONTLOADER_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include <QtCore/qobject.h>
diff --git a/src/quick/util/qquickfontmetrics_p.h b/src/quick/util/qquickfontmetrics_p.h
index 88880a2be8..37aaef7345 100644
--- a/src/quick/util/qquickfontmetrics_p.h
+++ b/src/quick/util/qquickfontmetrics_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKFONTMETRICS_H
#define QQUICKFONTMETRICS_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include <QtGui/QFontMetricsF>
diff --git a/src/quick/util/qquickpath_p.h b/src/quick/util/qquickpath_p.h
index 5230a3cdea..b39b6e5c01 100644
--- a/src/quick/util/qquickpath_p.h
+++ b/src/quick/util/qquickpath_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKPATH_H
#define QQUICKPATH_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include <private/qqmlnullablevalue_p.h>
diff --git a/src/quick/util/qquickpathinterpolator_p.h b/src/quick/util/qquickpathinterpolator_p.h
index 895aa56078..38c5debbed 100644
--- a/src/quick/util/qquickpathinterpolator_p.h
+++ b/src/quick/util/qquickpathinterpolator_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKPATHINTERPOLATOR_P_H
#define QQUICKPATHINTERPOLATOR_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include <QObject>
diff --git a/src/quick/util/qquickpixmapcache_p.h b/src/quick/util/qquickpixmapcache_p.h
index 482a2e5653..6ab318ba7b 100644
--- a/src/quick/util/qquickpixmapcache_p.h
+++ b/src/quick/util/qquickpixmapcache_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKPIXMAPCACHE_H
#define QQUICKPIXMAPCACHE_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qcoreapplication.h>
#include <QtCore/qstring.h>
#include <QtGui/qpixmap.h>
diff --git a/src/quick/util/qquickpropertychanges_p.h b/src/quick/util/qquickpropertychanges_p.h
index 15e5ec2936..d5938fd102 100644
--- a/src/quick/util/qquickpropertychanges_p.h
+++ b/src/quick/util/qquickpropertychanges_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKPROPERTYCHANGES_H
#define QQUICKPROPERTYCHANGES_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickstatechangescript_p.h"
#include <private/qqmlcustomparser_p.h>
diff --git a/src/quick/util/qquicksmoothedanimation_p.h b/src/quick/util/qquicksmoothedanimation_p.h
index efac9217f5..9f18170283 100644
--- a/src/quick/util/qquicksmoothedanimation_p.h
+++ b/src/quick/util/qquicksmoothedanimation_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKSMOOTHEDANIMATION_H
#define QQUICKSMOOTHEDANIMATION_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include "qquickanimation_p.h"
diff --git a/src/quick/util/qquickspringanimation_p.h b/src/quick/util/qquickspringanimation_p.h
index 082fd341f7..b924c4c72e 100644
--- a/src/quick/util/qquickspringanimation_p.h
+++ b/src/quick/util/qquickspringanimation_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKSPRINGANIMATION_H
#define QQUICKSPRINGANIMATION_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include "qquickanimation_p.h"
diff --git a/src/quick/util/qquickstate_p.h b/src/quick/util/qquickstate_p.h
index 1870b70626..6d051ff578 100644
--- a/src/quick/util/qquickstate_p.h
+++ b/src/quick/util/qquickstate_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKSTATE_H
#define QQUICKSTATE_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include <qqmlproperty.h>
#include <QtCore/qobject.h>
diff --git a/src/quick/util/qquickstatechangescript_p.h b/src/quick/util/qquickstatechangescript_p.h
index 6c019a43d2..f9580a53df 100644
--- a/src/quick/util/qquickstatechangescript_p.h
+++ b/src/quick/util/qquickstatechangescript_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKSTATEOPERATIONS_H
#define QQUICKSTATEOPERATIONS_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickstate_p.h"
#include <qqmlscriptstring.h>
diff --git a/src/quick/util/qquickstategroup_p.h b/src/quick/util/qquickstategroup_p.h
index 8ea2dbc4b3..03676a68fb 100644
--- a/src/quick/util/qquickstategroup_p.h
+++ b/src/quick/util/qquickstategroup_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKSTATEGROUP_H
#define QQUICKSTATEGROUP_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickstate_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/quick/util/qquickstyledtext_p.h b/src/quick/util/qquickstyledtext_p.h
index 2f07a740e5..cd6710ff26 100644
--- a/src/quick/util/qquickstyledtext_p.h
+++ b/src/quick/util/qquickstyledtext_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKSTYLEDTEXT_H
#define QQUICKSTYLEDTEXT_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QSize>
#include <QPointF>
#include <QList>
diff --git a/src/quick/util/qquicksvgparser_p.h b/src/quick/util/qquicksvgparser_p.h
index ed9a7558d0..60661a7840 100644
--- a/src/quick/util/qquicksvgparser_p.h
+++ b/src/quick/util/qquicksvgparser_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKSVGPARSER_P_H
#define QQUICKSVGPARSER_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/qstring.h>
#include <QtGui/qpainterpath.h>
diff --git a/src/quick/util/qquicksystempalette_p.h b/src/quick/util/qquicksystempalette_p.h
index fb898eb1fa..99654d76f7 100644
--- a/src/quick/util/qquicksystempalette_p.h
+++ b/src/quick/util/qquicksystempalette_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKSYSTEMPALETTE_H
#define QQUICKSYSTEMPALETTE_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include <QtCore/qobject.h>
diff --git a/src/quick/util/qquicktextmetrics_p.h b/src/quick/util/qquicktextmetrics_p.h
index c0265d9507..96e304b907 100644
--- a/src/quick/util/qquicktextmetrics_p.h
+++ b/src/quick/util/qquicktextmetrics_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKTEXTMETRICS_H
#define QQUICKTEXTMETRICS_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include <QtGui/QFontMetricsF>
diff --git a/src/quick/util/qquicktransition_p.h b/src/quick/util/qquicktransition_p.h
index 826df6794b..d4cd1a087b 100644
--- a/src/quick/util/qquicktransition_p.h
+++ b/src/quick/util/qquicktransition_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKTRANSITION_H
#define QQUICKTRANSITION_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickstate_p.h"
#include <private/qabstractanimationjob_p.h>
#include <qqml.h>
diff --git a/src/quick/util/qquicktransitionmanager_p_p.h b/src/quick/util/qquicktransitionmanager_p_p.h
index a6d91d7efd..43e63b80d9 100644
--- a/src/quick/util/qquicktransitionmanager_p_p.h
+++ b/src/quick/util/qquicktransitionmanager_p_p.h
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
class QQuickStatePrivate;
class QQuickTransitionManagerPrivate;
-class Q_AUTOTEST_EXPORT QQuickTransitionManager
+class Q_QUICK_PRIVATE_EXPORT QQuickTransitionManager
{
public:
QQuickTransitionManager();
diff --git a/src/quick/util/qquickutilmodule_p.h b/src/quick/util/qquickutilmodule_p.h
index 77d0e7dd3b..c2e80d22ce 100644
--- a/src/quick/util/qquickutilmodule_p.h
+++ b/src/quick/util/qquickutilmodule_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKUTILMODULE_H
#define QQUICKUTILMODULE_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick/util/qquickvalidator_p.h b/src/quick/util/qquickvalidator_p.h
index 59d7884afc..da071ef2f5 100644
--- a/src/quick/util/qquickvalidator_p.h
+++ b/src/quick/util/qquickvalidator_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKVALIDATOR_P_H
#define QQUICKVALIDATOR_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtGui/qvalidator.h>
#include <QtQml/qqml.h>
diff --git a/src/quick/util/qquickvaluetypes_p.h b/src/quick/util/qquickvaluetypes_p.h
index 7a2e8888b7..3b196da206 100644
--- a/src/quick/util/qquickvaluetypes_p.h
+++ b/src/quick/util/qquickvaluetypes_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKVALUETYPES_P_H
#define QQUICKVALUETYPES_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <qqml.h>
#include <qtquickglobal.h>
#include <private/qqmlvaluetype_p.h>
diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp
index 47bcabc115..edaa1352ae 100644
--- a/src/quickwidgets/qquickwidget.cpp
+++ b/src/quickwidgets/qquickwidget.cpp
@@ -211,6 +211,8 @@ void QQuickWidgetPrivate::render(bool needsSync)
if (!fbo)
return;
+ Q_ASSERT(context);
+
if (!context->makeCurrent(offscreenSurface)) {
qWarning("QQuickWidget: Cannot render due to failing makeCurrent()");
return;
@@ -345,8 +347,8 @@ QObject *QQuickWidgetPrivate::focusObject()
This limitation only applies when there are other widgets underneath the QQuickWidget
inside the same window. Making the window semi-transparent, with other applications
and the desktop visible in the background, is done in the traditional way: Set
- Qt::WA_TranslucentBackground and change the Qt Quick Scenegraph's clear color to
- Qt::transparent via setClearColor().
+ Qt::WA_TranslucentBackground on the top-level window, request an alpha channel, and
+ change the Qt Quick Scenegraph's clear color to Qt::transparent via setClearColor().
\sa {Exposing Attributes of C++ Types to QML}, {Qt Quick Widgets Example}, QQuickView
*/
@@ -1089,7 +1091,10 @@ void QQuickWidget::showEvent(QShowEvent *)
Q_D(QQuickWidget);
d->updatePending = false;
d->createContext();
- d->render(true);
+ if (d->offscreenWindow->openglContext())
+ d->render(true);
+ else
+ triggerUpdate();
}
/*! \reimp */
@@ -1293,9 +1298,10 @@ QImage QQuickWidget::grabFramebuffer() const
/*!
Sets the clear \a color. By default this is an opaque color.
- To get a semi- or fully transparent QQuickWidget, call this function with \a
- color set to Qt::transparent and set the Qt::WA_TranslucentBackground widget
- attribute.
+ To get a semi-transparent QQuickWidget, call this function with
+ \a color set to Qt::transparent, set the Qt::WA_TranslucentBackground
+ widget attribute on the top-level window, and request an alpha
+ channel via setFormat().
\sa QQuickWindow::setColor()
*/
diff --git a/src/quickwidgets/qquickwidget_p.h b/src/quickwidgets/qquickwidget_p.h
index fa8bb3beb7..46f6ac5d8a 100644
--- a/src/quickwidgets/qquickwidget_p.h
+++ b/src/quickwidgets/qquickwidget_p.h
@@ -34,6 +34,17 @@
#ifndef QQUICKWIDGET_P_H
#define QQUICKWIDGET_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include "qquickwidget.h"
#include <private/qwidget_p.h>
diff --git a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp
index 4ab1ac0a4c..98ef590317 100644
--- a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp
+++ b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp
@@ -98,7 +98,7 @@ bool tst_QQmlDebuggingEnabler::init(bool blockMode, bool qmlscene, int portFrom,
if (qmlscene) {
process->start(QStringList() << QLatin1String("-qmljsdebugger=port:") +
- QString::number(portFrom) + QLatin1String(",") + QString::number(portTo) +
+ QString::number(portFrom) + QLatin1Char(',') + QString::number(portTo) +
QLatin1String(blockMode ? ",block": "") <<
testFile(QLatin1String("test.qml")));
} else {
diff --git a/tests/auto/qml/debugger/shared/debugutil_p.h b/tests/auto/qml/debugger/shared/debugutil_p.h
index 440cf34e81..d544a89ff2 100644
--- a/tests/auto/qml/debugger/shared/debugutil_p.h
+++ b/tests/auto/qml/debugger/shared/debugutil_p.h
@@ -35,6 +35,17 @@
#ifndef DEBUGUTIL_H
#define DEBUGUTIL_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QEventLoop>
#include <QTimer>
#include <QThread>
diff --git a/tests/auto/qml/parserstress/tests/ecma/Date/15.9.1.13-1.js b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.1.13-1.js
index 720b39dd54..720b39dd54 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma/Date/15.9.1.13-1.js
+++ b/tests/auto/qml/parserstress/tests/ecma/Date/15.9.1.13-1.js
diff --git a/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.3-2.js b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.3-2.js
index 3762842461..3762842461 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.3-2.js
+++ b/tests/auto/qml/parserstress/tests/ecma/ExecutionContexts/10.1.3-2.js
diff --git a/tests/auto/qml/parserstress/tests/ecma/README b/tests/auto/qml/parserstress/tests/ecma/README
index 91f174ab61..91f174ab61 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma/README
+++ b/tests/auto/qml/parserstress/tests/ecma/README
diff --git a/tests/auto/qml/parserstress/tests/ecma_2/README b/tests/auto/qml/parserstress/tests/ecma_2/README
index 6da6cdd514..6da6cdd514 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_2/README
+++ b/tests/auto/qml/parserstress/tests/ecma_2/README
diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/constructor-001.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/constructor-001.js
index cc7907d006..cc7907d006 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_2/extensions/constructor-001.js
+++ b/tests/auto/qml/parserstress/tests/ecma_2/extensions/constructor-001.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/function-001.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/function-001.js
index 5153d25f9d..5153d25f9d 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_2/extensions/function-001.js
+++ b/tests/auto/qml/parserstress/tests/ecma_2/extensions/function-001.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-001.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-001.js
index 8ea446a248..8ea446a248 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-001.js
+++ b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-001.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-002.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-002.js
index 9cc837d8ef..9cc837d8ef 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-002.js
+++ b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-002.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-003-n.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-003-n.js
index 7a763a895c..7a763a895c 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-003-n.js
+++ b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-003-n.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-004-n.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-004-n.js
index 1662ae566b..1662ae566b 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-004-n.js
+++ b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-004-n.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-005-n.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-005-n.js
index 1a9b1b3437..1a9b1b3437 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-005-n.js
+++ b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-005-n.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-006.js b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-006.js
index 03c0f16fb9..03c0f16fb9 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-006.js
+++ b/tests/auto/qml/parserstress/tests/ecma_2/extensions/instanceof-006.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.4.11-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.4.11-01.js
index 0436b8c1e0..0436b8c1e0 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.4.11-01.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.4.11-01.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.5.1-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.5.1-01.js
index b55430b44e..b55430b44e 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.5.1-01.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Array/15.4.5.1-01.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-01.js
index 4e277e6da5..4e277e6da5 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-01.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-01.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-02.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-02.js
index ee426a0cec..ee426a0cec 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-02.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-02.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-03.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-03.js
index 95ee7f7a92..95ee7f7a92 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-03.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-03.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-04.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-04.js
index fe9f8fc71e..fe9f8fc71e 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-04.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-322135-04.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-387501.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-387501.js
index 36cf1478d2..36cf1478d2 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-387501.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-387501.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-421325.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-421325.js
index c869d7bff4..c869d7bff4 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-421325.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-421325.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-430717.js b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-430717.js
index f750ffb449..f750ffb449 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-430717.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Array/regress-430717.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.1.2-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.1.2-01.js
index 61b1de6ef1..61b1de6ef1 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.1.2-01.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.1.2-01.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.3.2-1.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.3.2-1.js
index d79b60b996..d79b60b996 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.3.2-1.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.3.2-1.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.4.3.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.4.3.js
index b197dcb9c2..b197dcb9c2 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.4.3.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.4.3.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.5-02.js b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.5-02.js
index e3b073e7ec..e3b073e7ec 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.5-02.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Date/15.9.5.5-02.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.6.1-01.js b/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.6.1-01.js
index 6fbe85e19f..6fbe85e19f 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.6.1-01.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/10.6.1-01.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/regress-448595-01.js b/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/regress-448595-01.js
index f303199b51..f303199b51 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/regress-448595-01.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/ExecutionContexts/regress-448595-01.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-01.js
index fd47d5d86b..fd47d5d86b 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-01.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-01.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-02.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-02.js
index 8f387c1349..8f387c1349 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-02.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-02.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-03.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-03.js
index 99af0f87c5..99af0f87c5 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-03.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.10-03.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.1-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.1-01.js
index 05f9622ce2..05f9622ce2 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.1-01.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.1-01.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.2-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.2-01.js
index 64e426888a..64e426888a 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.2-01.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.2-01.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.3-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.3-01.js
index d5af3b86d4..d5af3b86d4 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.3-01.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Expressions/11.7.3-01.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Function/arguments-002.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/arguments-002.js
index 78005560a7..78005560a7 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Function/arguments-002.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Function/arguments-002.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Function/regress-313570.js b/tests/auto/qml/parserstress/tests/ecma_3/Function/regress-313570.js
index e159c4c87f..e159c4c87f 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Function/regress-313570.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Function/regress-313570.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/LexicalConventions/7.9.1.js b/tests/auto/qml/parserstress/tests/ecma_3/LexicalConventions/7.9.1.js
index 10ee26f929..10ee26f929 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/LexicalConventions/7.9.1.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/LexicalConventions/7.9.1.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Number/regress-442242-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Number/regress-442242-01.js
index e3fa070e5a..e3fa070e5a 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Number/regress-442242-01.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Number/regress-442242-01.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Object/8.6.1-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/8.6.1-01.js
index 2897ece555..2897ece555 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Object/8.6.1-01.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Object/8.6.1-01.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-361274.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-361274.js
index d3962004e3..d3962004e3 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-361274.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-361274.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-385393-07.js b/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-385393-07.js
index 0473fe4956..0473fe4956 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-385393-07.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Object/regress-385393-07.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.13.1-002.js b/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.13.1-002.js
index 5d3307e4a7..5d3307e4a7 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.13.1-002.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.13.1-002.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.4.1-002.js b/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.4.1-002.js
index c48565ba5f..c48565ba5f 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.4.1-002.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Operators/11.4.1-002.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Operators/order-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Operators/order-01.js
index 671faceb81..671faceb81 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Operators/order-01.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Operators/order-01.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/README b/tests/auto/qml/parserstress/tests/ecma_3/README
index eebd421c2e..eebd421c2e 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/README
+++ b/tests/auto/qml/parserstress/tests/ecma_3/README
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.2.12.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.2.12.js
index d68b86c2ed..d68b86c2ed 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.2.12.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/15.10.2.12.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-285219.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-285219.js
index 9d462359fa..9d462359fa 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-285219.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-285219.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-289669.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-289669.js
index 2e3d044b74..2e3d044b74 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-289669.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-289669.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-307456.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-307456.js
index dd2f540f6c..dd2f540f6c 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-307456.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-307456.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-309840.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-309840.js
index 8680b7bcfd..8680b7bcfd 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-309840.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-309840.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-311414.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-311414.js
index a24a07bb2b..a24a07bb2b 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-311414.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-311414.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-312351.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-312351.js
index a9b00d317c..a9b00d317c 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-312351.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-312351.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-330684.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-330684.js
index b097fbc3d7..b097fbc3d7 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-330684.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-330684.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-334158.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-334158.js
index 41ebf0a731..41ebf0a731 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-334158.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-334158.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-346090.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-346090.js
index dfd53a9922..dfd53a9922 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-346090.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-346090.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-367888.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-367888.js
index 923c1e5ab3..923c1e5ab3 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-367888.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-367888.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375642.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375642.js
index 236eb00d28..236eb00d28 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375642.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375642.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375711.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375711.js
index 6e7339f9e9..6e7339f9e9 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375711.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375711.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-01-n.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-01-n.js
index 437dcbd5c5..437dcbd5c5 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-01-n.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-01-n.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-02.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-02.js
index 3cd858e845..3cd858e845 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-02.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-02.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-03.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-03.js
index ffc5c5a4cc..ffc5c5a4cc 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-03.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-03.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-04.js b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-04.js
index 0c78a372ee..0c78a372ee 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-04.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/RegExp/regress-375715-04.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-385393-04.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-385393-04.js
index 6e735fd1d2..6e735fd1d2 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-385393-04.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-385393-04.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-419152.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-419152.js
index f57f3a4f98..f57f3a4f98 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-419152.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-419152.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420087.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420087.js
index 1f21d19739..1f21d19739 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420087.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420087.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420610.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420610.js
index ecd5a2dd42..ecd5a2dd42 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420610.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-420610.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-441477-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-441477-01.js
index 27ddfab51d..27ddfab51d 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-441477-01.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Regress/regress-441477-01.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Statements/12.6.3.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/12.6.3.js
index 97c3ca3136..97c3ca3136 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Statements/12.6.3.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Statements/12.6.3.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-302439.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-302439.js
index e1ebdb6e30..e1ebdb6e30 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-302439.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-302439.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-324650.js b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-324650.js
index 003cd0fa42..003cd0fa42 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-324650.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Statements/regress-324650.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/String/regress-304376.js b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-304376.js
index 733cd713d8..733cd713d8 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/String/regress-304376.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-304376.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/String/regress-313567.js b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-313567.js
index 9610238cc3..9610238cc3 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/String/regress-313567.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-313567.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/String/regress-392378.js b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-392378.js
index 59564b272e..59564b272e 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/String/regress-392378.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/String/regress-392378.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-01.js b/tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-01.js
index bb10ac6f7a..bb10ac6f7a 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-01.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/Unicode/regress-352044-01.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/browser.js b/tests/auto/qml/parserstress/tests/ecma_3/browser.js
index 2339522cb6..2339522cb6 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/browser.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/browser.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/10.1.3-2.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/10.1.3-2.js
index f941cb7800..f941cb7800 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/extensions/10.1.3-2.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/extensions/10.1.3-2.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/7.9.1.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/7.9.1.js
index b69e9d065a..b69e9d065a 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/extensions/7.9.1.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/extensions/7.9.1.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-274152.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-274152.js
index d7074d9128..d7074d9128 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-274152.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-274152.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-320854.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-320854.js
index 85e684882f..85e684882f 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-320854.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-320854.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-327170.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-327170.js
index 5d15ce31a9..5d15ce31a9 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-327170.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-327170.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-368516.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-368516.js
index a5f5fb769b..a5f5fb769b 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-368516.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-368516.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-385393-03.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-385393-03.js
index 40c7e8dd81..40c7e8dd81 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-385393-03.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-385393-03.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-429248.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-429248.js
index 9966269115..9966269115 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-429248.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-429248.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-430740.js b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-430740.js
index 446adb95a6..446adb95a6 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-430740.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/extensions/regress-430740.js
diff --git a/tests/auto/qml/parserstress/tests/ecma_3/template.js b/tests/auto/qml/parserstress/tests/ecma_3/template.js
index 4dedd5a0e3..4dedd5a0e3 100755..100644
--- a/tests/auto/qml/parserstress/tests/ecma_3/template.js
+++ b/tests/auto/qml/parserstress/tests/ecma_3/template.js
diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
index 4c7dba9f90..39bc8b2e5f 100644
--- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp
+++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
@@ -155,7 +155,7 @@ private slots:
void callConstants();
- void installTranslatorFunctions();
+ void installTranslationFunctions();
void translateScript_data();
void translateScript();
void translateScript_crossScript();
@@ -172,6 +172,16 @@ private slots:
void translateScriptUnicodeIdBased();
void translateFromBuiltinCallback();
+ void installConsoleFunctions();
+ void logging();
+ void tracing();
+ void asserts();
+ void exceptions();
+
+ void installGarbageCollectionFunctions();
+
+ void installAllExtensions();
+
void privateMethods();
void engineForObject();
@@ -1480,6 +1490,8 @@ void tst_QJSEngine::gcWithNestedDataStructure()
// The GC must be able to traverse deeply nested objects, otherwise this
// test would crash.
QJSEngine eng;
+ eng.installExtensions(QJSEngine::GarbageCollectionExtension);
+
QJSValue ret = eng.evaluate(
"function makeList(size)"
"{"
@@ -3171,7 +3183,7 @@ void tst_QJSEngine::callConstants()
QCOMPARE(exceptionResult.toString(), QString("TypeError: true is not a function"));
}
-void tst_QJSEngine::installTranslatorFunctions()
+void tst_QJSEngine::installTranslationFunctions()
{
QJSEngine eng;
QJSValue global = eng.globalObject();
@@ -3182,7 +3194,7 @@ void tst_QJSEngine::installTranslatorFunctions()
QVERIFY(global.property("qsTrId").isUndefined());
QVERIFY(global.property("QT_TRID_NOOP").isUndefined());
- eng.installTranslatorFunctions();
+ eng.installExtensions(QJSEngine::TranslationExtension);
QVERIFY(global.property("qsTranslate").isCallable());
QVERIFY(global.property("QT_TRANSLATE_NOOP").isCallable());
QVERIFY(global.property("qsTr").isCallable());
@@ -3597,6 +3609,107 @@ void tst_QJSEngine::translateFromBuiltinCallback()
eng.evaluate("[10,20].forEach(foo)", "script.js");
}
+void tst_QJSEngine::installConsoleFunctions()
+{
+ QJSEngine engine;
+ QJSValue global = engine.globalObject();
+ QVERIFY(global.property("console").isUndefined());
+ QVERIFY(global.property("print").isUndefined());
+
+ engine.installExtensions(QJSEngine::ConsoleExtension);
+ QVERIFY(global.property("console").isObject());
+ QVERIFY(global.property("print").isCallable());
+}
+
+void tst_QJSEngine::logging()
+{
+ QLoggingCategory loggingCategory("js");
+ QVERIFY(loggingCategory.isDebugEnabled());
+ QVERIFY(loggingCategory.isWarningEnabled());
+ QVERIFY(loggingCategory.isCriticalEnabled());
+
+ QJSEngine engine;
+ engine.installExtensions(QJSEngine::ConsoleExtension);
+
+ QTest::ignoreMessage(QtDebugMsg, "console.debug");
+ engine.evaluate("console.debug('console.debug')");
+ QTest::ignoreMessage(QtDebugMsg, "console.log");
+ engine.evaluate("console.log('console.log')");
+ QTest::ignoreMessage(QtInfoMsg, "console.info");
+ engine.evaluate("console.info('console.info')");
+ QTest::ignoreMessage(QtWarningMsg, "console.warn");
+ engine.evaluate("console.warn('console.warn')");
+ QTest::ignoreMessage(QtCriticalMsg, "console.error");
+ engine.evaluate("console.error('console.error')");
+
+ QTest::ignoreMessage(QtDebugMsg, ": 1");
+ engine.evaluate("console.count()");
+
+ QTest::ignoreMessage(QtDebugMsg, ": 2");
+ engine.evaluate("console.count()");
+}
+
+void tst_QJSEngine::tracing()
+{
+ QJSEngine engine;
+ engine.installExtensions(QJSEngine::ConsoleExtension);
+
+ QTest::ignoreMessage(QtDebugMsg, "%entry (:1)");
+ engine.evaluate("console.trace()");
+
+ QTest::ignoreMessage(QtDebugMsg, "a (:1)\nb (:1)\nc (:1)\n%entry (:1)");
+ engine.evaluate("function a() { console.trace(); } function b() { a(); } function c() { b(); }");
+ engine.evaluate("c()");
+}
+
+void tst_QJSEngine::asserts()
+{
+ QJSEngine engine;
+ engine.installExtensions(QJSEngine::ConsoleExtension);
+
+ QTest::ignoreMessage(QtCriticalMsg, "This will fail\n%entry (:1)");
+ engine.evaluate("console.assert(0, 'This will fail')");
+
+ QTest::ignoreMessage(QtCriticalMsg, "This will fail too\n%entry (:1)");
+ engine.evaluate("console.assert(1 > 2, 'This will fail too')");
+}
+
+void tst_QJSEngine::exceptions()
+{
+ QJSEngine engine;
+ engine.installExtensions(QJSEngine::ConsoleExtension);
+
+ QTest::ignoreMessage(QtCriticalMsg, "Exception 1\n%entry (:1)");
+ engine.evaluate("console.exception('Exception 1')");
+}
+
+void tst_QJSEngine::installGarbageCollectionFunctions()
+{
+ QJSEngine engine;
+ QJSValue global = engine.globalObject();
+ QVERIFY(global.property("gc").isUndefined());
+
+ engine.installExtensions(QJSEngine::GarbageCollectionExtension);
+ QVERIFY(global.property("gc").isCallable());
+}
+
+void tst_QJSEngine::installAllExtensions()
+{
+ QJSEngine engine;
+ QJSValue global = engine.globalObject();
+ // Pick out a few properties from each extension and check that they're there.
+ QVERIFY(global.property("qsTranslate").isUndefined());
+ QVERIFY(global.property("console").isUndefined());
+ QVERIFY(global.property("print").isUndefined());
+ QVERIFY(global.property("gc").isUndefined());
+
+ engine.installExtensions(QJSEngine::AllExtensions);
+ QVERIFY(global.property("qsTranslate").isCallable());
+ QVERIFY(global.property("console").isObject());
+ QVERIFY(global.property("print").isCallable());
+ QVERIFY(global.property("gc").isCallable());
+}
+
class ObjectWithPrivateMethods : public QObject
{
Q_OBJECT
diff --git a/tests/auto/qml/qjsonbinding/tst_qjsonbinding.cpp b/tests/auto/qml/qjsonbinding/tst_qjsonbinding.cpp
index e01ea73e1b..52d676ef3c 100644
--- a/tests/auto/qml/qjsonbinding/tst_qjsonbinding.cpp
+++ b/tests/auto/qml/qjsonbinding/tst_qjsonbinding.cpp
@@ -110,7 +110,7 @@ QJsonValue tst_qjsonbinding::valueFromJson(const QByteArray &json)
// QJsonDocument::fromJson() only handles objects and arrays...
// Wrap the JSON inside a dummy object and extract the value.
- QByteArray wrappedJson = "{\"prop\":" + json + "}";
+ QByteArray wrappedJson = "{\"prop\":" + json + '}';
doc = QJsonDocument::fromJson(wrappedJson);
Q_ASSERT(doc.isObject());
return doc.object().value("prop");
diff --git a/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp b/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp
index c3d95a10fb..6553baea76 100644
--- a/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp
+++ b/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp
@@ -2436,7 +2436,7 @@ void tst_QJSValue::prettyPrinter()
QFETCH(QString, function);
QFETCH(QString, expected);
QJSEngine eng;
- QJSValue val = eng.evaluate("(" + function + ")");
+ QJSValue val = eng.evaluate(QLatin1Char('(') + function + QLatin1Char(')'));
QVERIFY(val.isCallable());
QString actual = val.toString();
QSKIP("Function::toString() doesn't give the whole function on v4");
diff --git a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
index 2a534b5913..28d687bd1c 100644
--- a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
+++ b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
@@ -84,7 +84,7 @@ void tst_qmlplugindump::builtins()
if (dumper.error() != QProcess::UnknownError
|| dumper.exitStatus() != QProcess::NormalExit) {
qWarning() << QString("Error while running '%1 %2'").arg(
- qmlplugindumpPath, args.join(QLatin1String(" ")));
+ qmlplugindumpPath, args.join(QLatin1Char(' ')));
}
if (dumper.error() == QProcess::FailedToStart) {
diff --git a/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp b/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp
index 6b2add309a..6f2febaccf 100644
--- a/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp
+++ b/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp
@@ -73,7 +73,7 @@ namespace {
QString toString(const QQmlDirParser::Plugin &p)
{
- return p.name + "|" + p.path;
+ return p.name + QLatin1Char('|') + p.path;
}
QStringList toStringList(const QList<QQmlDirParser::Plugin> &plugins)
@@ -88,7 +88,9 @@ namespace {
QString toString(const QQmlDirParser::Component &c)
{
- return c.typeName + "|" + c.fileName + "|" + QString::number(c.majorVersion) + "|" + QString::number(c.minorVersion) + "|" + (c.internal ? "true" : "false");
+ return c.typeName + QLatin1Char('|') + c.fileName + QLatin1Char('|')
+ + QString::number(c.majorVersion) + QLatin1Char('|') + QString::number(c.minorVersion)
+ + QLatin1Char('|') + (c.internal ? "true" : "false");
}
QStringList toStringList(const QQmlDirComponents &components)
@@ -104,7 +106,8 @@ namespace {
QString toString(const QQmlDirParser::Script &s)
{
- return s.nameSpace + "|" + s.fileName + "|" + QString::number(s.majorVersion) + "|" + QString::number(s.minorVersion);
+ return s.nameSpace + QLatin1Char('|') + s.fileName + QLatin1Char('|')
+ + QString::number(s.majorVersion) + '|' + QString::number(s.minorVersion);
}
QStringList toStringList(const QList<QQmlDirParser::Script> &scripts)
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index e186c364c3..5a7732fa9a 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -4203,9 +4203,7 @@ void tst_qqmlecmascript::importScripts()
QFETCH(QStringList, propertyNames);
QFETCH(QVariantList, propertyValues);
- TestHTTPServer server;
- QVERIFY2(server.listen(), qPrintable(server.errorString()));
- server.serveDirectory(dataDirectory() + "/remote");
+ ThreadedTestHTTPServer server(dataDirectory() + "/remote");
QStringList importPathList = engine.importPathList();
@@ -7117,6 +7115,7 @@ void tst_qqmlecmascript::onDestruction()
QObject *obj = c.create();
QVERIFY(obj != 0);
delete obj;
+ QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
}
{
@@ -7128,6 +7127,7 @@ void tst_qqmlecmascript::onDestruction()
QQmlComponent c(&engine, testFileUrl("onDestruction.qml"));
QObject *obj = c.create();
QVERIFY(obj != 0);
+ QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
}
}
@@ -7326,7 +7326,7 @@ void tst_qqmlecmascript::sequenceSort_data()
for (size_t t=0 ; t < sizeof(types)/sizeof(types[0]) ; ++t) {
for (size_t s=0 ; s < sizeof(sort)/sizeof(sort[0]) ; ++s) {
for (int c=0 ; c < 2 ; ++c) {
- QString testName = QLatin1String(types[t]) + QLatin1String("_") + QLatin1String(sort[s]);
+ QString testName = QLatin1String(types[t]) + QLatin1Char('_') + QLatin1String(sort[s]);
QString fnName = QLatin1String("test_") + testName;
bool useComparer = c != 0;
testName += useComparer ? QLatin1String("[custom]") : QLatin1String("[default]");
diff --git a/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp b/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp
index 4f559b0d33..2f581e296a 100644
--- a/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp
+++ b/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp
@@ -96,8 +96,8 @@ private:
QList<QByteArray> actual; \
for (int ii = 0; ii < errors.count(); ++ii) { \
const QQmlError &error = errors.at(ii); \
- QByteArray errorStr = QByteArray::number(error.line()) + ":" + \
- QByteArray::number(error.column()) + ":" + \
+ QByteArray errorStr = QByteArray::number(error.line()) + ':' + \
+ QByteArray::number(error.column()) + ':' + \
error.description().toUtf8(); \
actual << errorStr; \
} \
diff --git a/tests/auto/qml/qqmllanguage/data/CompositeTypeWithAttachedProperty.qml b/tests/auto/qml/qqmllanguage/data/CompositeTypeWithAttachedProperty.qml
new file mode 100644
index 0000000000..6a14e72a31
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/CompositeTypeWithAttachedProperty.qml
@@ -0,0 +1,4 @@
+import Test 1.0
+
+MyCompositeBaseType {
+}
diff --git a/tests/auto/qml/qqmllanguage/data/registeredCompositeTypeWithAttachedProperty.qml b/tests/auto/qml/qqmllanguage/data/registeredCompositeTypeWithAttachedProperty.qml
new file mode 100644
index 0000000000..d34e4650b3
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/registeredCompositeTypeWithAttachedProperty.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+RegisteredCompositeTypeWithAttachedProperty {
+ RegisteredCompositeTypeWithAttachedProperty.objectName: "test"
+ property string attachedProperty: RegisteredCompositeTypeWithAttachedProperty.objectName
+}
diff --git a/tests/auto/qml/qqmllanguage/testtypes.h b/tests/auto/qml/qqmllanguage/testtypes.h
index 985acc2539..c64fda5ea1 100644
--- a/tests/auto/qml/qqmllanguage/testtypes.h
+++ b/tests/auto/qml/qqmllanguage/testtypes.h
@@ -1086,6 +1086,7 @@ class MyCompositeBaseType : public QObject
public:
enum CompositeEnum { EnumValue0, EnumValue42 = 42 };
+ static QObject *qmlAttachedProperties(QObject *parent) { return new QObject(parent); }
};
Q_DECLARE_METATYPE(MyEnum2Class::EnumB)
@@ -1100,6 +1101,7 @@ QML_DECLARE_TYPE(MyRevisionedSubclass)
QML_DECLARE_TYPE(MySubclass)
QML_DECLARE_TYPE(MyReceiversTestObject)
QML_DECLARE_TYPE(MyCompositeBaseType)
+QML_DECLARE_TYPEINFO(MyCompositeBaseType, QML_HAS_ATTACHED_PROPERTIES)
class CustomBinding : public QObject, public QQmlParserStatus
{
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
index 6b6d52ca34..5a93013dfe 100644
--- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
+++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
@@ -160,6 +160,7 @@ private slots:
void receivers();
void registeredCompositeType();
void registeredCompositeTypeWithEnum();
+ void registeredCompositeTypeWithAttachedProperty();
void implicitImportsLast();
void basicRemote_data();
@@ -281,8 +282,8 @@ private:
QList<QQmlError> errors = component.errors(); \
for (int ii = 0; ii < errors.count(); ++ii) { \
const QQmlError &error = errors.at(ii); \
- QByteArray errorStr = QByteArray::number(error.line()) + ":" + \
- QByteArray::number(error.column()) + ":" + \
+ QByteArray errorStr = QByteArray::number(error.line()) + ':' + \
+ QByteArray::number(error.column()) + ':' + \
error.description().toUtf8(); \
actual << errorStr; \
} \
@@ -2540,9 +2541,7 @@ void tst_qqmllanguage::basicRemote()
QFETCH(QString, type);
QFETCH(QString, error);
- TestHTTPServer server;
- QVERIFY2(server.listen(), qPrintable(server.errorString()));
- server.serveDirectory(dataDirectory());
+ ThreadedTestHTTPServer server(dataDirectory());
url = server.baseUrl().resolved(url);
@@ -2587,9 +2586,7 @@ void tst_qqmllanguage::importsRemote()
QFETCH(QString, type);
QFETCH(QString, error);
- TestHTTPServer server;
- QVERIFY2(server.listen(), qPrintable(server.errorString()));
- server.serveDirectory(dataDirectory());
+ ThreadedTestHTTPServer server(dataDirectory());
qml.replace(QStringLiteral("{{ServerBaseUrl}}"), server.baseUrl().toString());
@@ -2682,9 +2679,7 @@ void tst_qqmllanguage::importsInstalledRemote()
QFETCH(QString, type);
QFETCH(QString, error);
- TestHTTPServer server;
- QVERIFY2(server.listen(), qPrintable(server.errorString()));
- server.serveDirectory(dataDirectory());
+ ThreadedTestHTTPServer server(dataDirectory());
QString serverdir = server.urlString("/lib/");
engine.setImportPathList(QStringList(defaultImportPathList) << serverdir);
@@ -2749,9 +2744,7 @@ void tst_qqmllanguage::importsPath()
QFETCH(QString, qml);
QFETCH(QString, value);
- TestHTTPServer server;
- QVERIFY2(server.listen(), qPrintable(server.errorString()));
- server.serveDirectory(dataDirectory());
+ ThreadedTestHTTPServer server(dataDirectory());
for (int i = 0; i < importPath.count(); ++i)
importPath[i].replace(QStringLiteral("{{ServerBaseUrl}}"), server.baseUrl().toString());
@@ -3174,6 +3167,7 @@ void tst_qqmllanguage::initTestCase()
qmlRegisterType(testFileUrl("CompositeType.DoesNotExist.qml"), "Test", 1, 0, "RegisteredCompositeType2");
qmlRegisterType(testFileUrl("invalidRoot.1.qml"), "Test", 1, 0, "RegisteredCompositeType3");
qmlRegisterType(testFileUrl("CompositeTypeWithEnum.qml"), "Test", 1, 0, "RegisteredCompositeTypeWithEnum");
+ qmlRegisterType(testFileUrl("CompositeTypeWithAttachedProperty.qml"), "Test", 1, 0, "RegisteredCompositeTypeWithAttachedProperty");
// Registering the TestType class in other modules should have no adverse effects
qmlRegisterType<TestType>("org.qtproject.TestPre", 1, 0, "Test");
@@ -3365,12 +3359,24 @@ void tst_qqmllanguage::registeredCompositeTypeWithEnum()
delete o;
}
+// QTBUG-43581
+void tst_qqmllanguage::registeredCompositeTypeWithAttachedProperty()
+{
+ QQmlComponent component(&engine, testFileUrl("registeredCompositeTypeWithAttachedProperty.qml"));
+
+ VERIFY_ERRORS(0);
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+
+ QCOMPARE(o->property("attachedProperty").toString(), QStringLiteral("test"));
+
+ delete o;
+}
+
// QTBUG-18268
void tst_qqmllanguage::remoteLoadCrash()
{
- TestHTTPServer server;
- QVERIFY2(server.listen(), qPrintable(server.errorString()));
- server.serveDirectory(dataDirectory());
+ ThreadedTestHTTPServer server(dataDirectory());
QQmlComponent component(&engine);
component.setData("import QtQuick 2.0; Text {}", server.url("/remoteLoadCrash.qml"));
@@ -3859,9 +3865,7 @@ void tst_qqmllanguage::compositeSingletonQmlDirError()
// Load a remote composite singleton type via qmldir that defines the type as a singleton
void tst_qqmllanguage::compositeSingletonRemote()
{
- TestHTTPServer server;
- QVERIFY2(server.listen(), qPrintable(server.errorString()));
- server.serveDirectory(dataDirectory());
+ ThreadedTestHTTPServer server(dataDirectory());
QFile f(testFile("singletonTest15.qml"));
QVERIFY(f.open(QIODevice::ReadOnly));
diff --git a/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp b/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp
index 519ee7ac26..d26c1c584b 100644
--- a/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp
+++ b/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp
@@ -625,7 +625,7 @@ void tst_qqmllistmodel::enumerate()
int expectedStringCount = sizeof(expectedStrings) / sizeof(expectedStrings[0]);
- QStringList r = item->property("result").toString().split(":");
+ QStringList r = item->property("result").toString().split(QLatin1Char(':'));
int matchCount = 0;
for (int i=0 ; i < expectedStringCount ; ++i) {
diff --git a/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp
index ba3f72f2c1..030af07a70 100644
--- a/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp
+++ b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp
@@ -676,7 +676,7 @@ void tst_qqmllocale::addDateTimeFormatData(const QString &l)
int i = 0;
while (formats[i]) {
QByteArray t(locale);
- t += " ";
+ t += ' ';
t += formats[i];
QTest::newRow(t.constData()) << l << QString(formats[i]);
++i;
@@ -768,7 +768,7 @@ void tst_qqmllocale::addDateFormatData(const QString &l)
int i = 0;
while (formats[i]) {
QByteArray t(locale);
- t += " ";
+ t += ' ';
t += formats[i];
QTest::newRow(t.constData()) << l << QString(formats[i]);
++i;
@@ -860,7 +860,7 @@ void tst_qqmllocale::addTimeFormatData(const QString &l)
int i = 0;
while (formats[i]) {
QByteArray t(locale);
- t += " ";
+ t += ' ';
t += formats[i];
QTest::newRow(t.constData()) << l << QString(formats[i]);
++i;
diff --git a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp
index 0e326abad9..89477609ca 100644
--- a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp
+++ b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp
@@ -110,8 +110,8 @@ void tst_qqmlmoduleplugin::initTestCase()
QList<QByteArray> actual; \
for (int ii = 0; ii < errors.count(); ++ii) { \
const QQmlError &error = errors.at(ii); \
- QByteArray errorStr = QByteArray::number(error.line()) + ":" + \
- QByteArray::number(error.column()) + ":" + \
+ QByteArray errorStr = QByteArray::number(error.line()) + ':' + \
+ QByteArray::number(error.column()) + ':' + \
error.description().toUtf8(); \
actual << errorStr; \
} \
@@ -202,8 +202,11 @@ void tst_qqmlmoduleplugin::incorrectPluginCase()
caseSensitive = false;
QString libname = "PluGin.dll";
#endif
- if (!caseSensitive)
- expectedError = QLatin1String("plugin cannot be loaded for module \"org.qtproject.WrongCase\": File name case mismatch for \"") + QDir(m_importsDirectory).filePath("org/qtproject/WrongCase/" + libname) + QLatin1String("\"");
+ if (!caseSensitive) {
+ expectedError = QLatin1String("plugin cannot be loaded for module \"org.qtproject.WrongCase\": File name case mismatch for \"")
+ + QDir(m_importsDirectory).filePath("org/qtproject/WrongCase/" + libname)
+ + QLatin1Char('"');
+ }
#endif
QCOMPARE(errors.at(0).description(), expectedError);
@@ -236,9 +239,7 @@ void tst_qqmlmoduleplugin::importPluginWithQmlFile()
void tst_qqmlmoduleplugin::remoteImportWithQuotedUrl()
{
- TestHTTPServer server;
- QVERIFY2(server.listen(), qPrintable(server.errorString()));
- server.serveDirectory(m_dataImportsDirectory);
+ ThreadedTestHTTPServer server(m_dataImportsDirectory);
QQmlEngine engine;
QQmlComponent component(&engine);
diff --git a/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp b/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp
index 47bf151a37..68f85daacd 100644
--- a/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp
+++ b/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp
@@ -621,7 +621,7 @@ void tst_qqmlxmlhttprequest::send_options()
QVERIFY(!object.isNull());
QString url = server.baseUrl().toString();
if (url_suffix != "/")
- url.append("/");
+ url.append(QLatin1Char('/'));
if (!url_suffix.isEmpty())
url.append(url_suffix);
object->setProperty("url", url);
diff --git a/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp b/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp
index dc6e2fa561..aca809a137 100644
--- a/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp
+++ b/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp
@@ -93,8 +93,8 @@ void tst_qquickfolderlistmodel::checkNoErrors(const QQmlComponent& component)
QList<QQmlError> errors = component.errors();
for (int ii = 0; ii < errors.count(); ++ii) {
const QQmlError &error = errors.at(ii);
- QByteArray errorStr = QByteArray::number(error.line()) + ":" +
- QByteArray::number(error.column()) + ":" +
+ QByteArray errorStr = QByteArray::number(error.line()) + ':' +
+ QByteArray::number(error.column()) + ':' +
error.description().toUtf8();
qWarning() << errorStr;
}
diff --git a/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp b/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp
index 45694f38dd..f4c37b4d66 100644
--- a/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp
+++ b/tests/auto/quick/qquickanimatedimage/tst_qquickanimatedimage.cpp
@@ -252,9 +252,7 @@ void tst_qquickanimatedimage::remote()
QFETCH(QString, fileName);
QFETCH(bool, paused);
- TestHTTPServer server;
- QVERIFY2(server.listen(), qPrintable(server.errorString()));
- server.serveDirectory(dataDirectory());
+ ThreadedTestHTTPServer server(dataDirectory());
QQmlEngine engine;
QQmlComponent component(&engine, server.url(fileName));
diff --git a/tests/auto/quick/qquickanimationcontroller/data/tst_coloranimation.qml b/tests/auto/quick/qquickanimationcontroller/data/tst_coloranimation.qml
index 8374552974..8374552974 100755..100644
--- a/tests/auto/quick/qquickanimationcontroller/data/tst_coloranimation.qml
+++ b/tests/auto/quick/qquickanimationcontroller/data/tst_coloranimation.qml
diff --git a/tests/auto/quick/qquickanimationcontroller/data/tst_completion.qml b/tests/auto/quick/qquickanimationcontroller/data/tst_completion.qml
index 1a8ca81ba0..1a8ca81ba0 100755..100644
--- a/tests/auto/quick/qquickanimationcontroller/data/tst_completion.qml
+++ b/tests/auto/quick/qquickanimationcontroller/data/tst_completion.qml
diff --git a/tests/auto/quick/qquickflickable/data/nestedPressDelay.qml b/tests/auto/quick/qquickflickable/data/nestedPressDelay.qml
index 742656641f..bdb866ce65 100644
--- a/tests/auto/quick/qquickflickable/data/nestedPressDelay.qml
+++ b/tests/auto/quick/qquickflickable/data/nestedPressDelay.qml
@@ -8,12 +8,18 @@ Flickable {
contentHeight: 320
flickableDirection: Flickable.HorizontalFlick
pressDelay: 10000
- Rectangle {
+ MouseArea {
+ objectName: "filteringMouseArea"
x: 20
y: 20
width: 400
height: 300
- color: "yellow"
+ drag.filterChildren: true
+ Rectangle {
+ id: rectangle
+ color: "yellow"
+ anchors.fill: parent
+ }
Flickable {
objectName: "innerFlickable"
anchors.fill: parent
diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
index eee7ffe560..dc7171746c 100644
--- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
+++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
@@ -67,6 +67,7 @@ private slots:
void flickDeceleration();
void pressDelay();
void nestedPressDelay();
+ void filterReplayedPress();
void nestedClickThenFlick();
void flickableDirection();
void resizeContent();
@@ -93,6 +94,7 @@ private slots:
void pressDelayWithLoader();
void movementFromProgrammaticFlick();
void cleanup();
+ void contentSize();
private:
void flickWithTouch(QQuickWindow *window, QTouchDevice *touchDevice, const QPoint &from, const QPoint &to);
@@ -521,6 +523,48 @@ void tst_qquickflickable::nestedPressDelay()
QTest::mouseRelease(window.data(), Qt::LeftButton, 0, QPoint(90, 150));
}
+void tst_qquickflickable::filterReplayedPress()
+{
+ QScopedPointer<QQuickView> window(new QQuickView);
+ window->setSource(testFileUrl("nestedPressDelay.qml"));
+ QTRY_COMPARE(window->status(), QQuickView::Ready);
+ QQuickViewTestUtil::centerOnScreen(window.data());
+ QQuickViewTestUtil::moveMouseAway(window.data());
+ window->show();
+ QVERIFY(QTest::qWaitForWindowActive(window.data()));
+ QVERIFY(window->rootObject() != 0);
+
+ QQuickFlickable *outer = qobject_cast<QQuickFlickable*>(window->rootObject());
+ QVERIFY(outer != 0);
+
+ QQuickFlickable *inner = window->rootObject()->findChild<QQuickFlickable*>("innerFlickable");
+ QVERIFY(inner != 0);
+
+ QQuickItem *filteringMouseArea = outer->findChild<QQuickItem *>("filteringMouseArea");
+ QVERIFY(filteringMouseArea);
+
+ moveAndPress(window.data(), QPoint(150, 150));
+ // the MouseArea filtering the Flickable is pressed immediately.
+ QCOMPARE(filteringMouseArea->property("pressed").toBool(), true);
+
+ // Some event causes the mouse area to set keepMouseGrab.
+ filteringMouseArea->setKeepMouseGrab(true);
+ QCOMPARE(filteringMouseArea->keepMouseGrab(), true);
+
+ // The inner pressDelay will prevail (50ms, vs. 10sec)
+ // QTRY_VERIFY() has 5sec timeout, so will timeout well within 10sec.
+ QTRY_VERIFY(outer->property("pressed").toBool());
+
+ // The replayed press event isn't delivered to parent items of the
+ // flickable with the press delay, and the state of the parent mouse
+ // area is therefore unaffected.
+ QCOMPARE(filteringMouseArea->property("pressed").toBool(), true);
+ QCOMPARE(filteringMouseArea->keepMouseGrab(), true);
+
+ QTest::mouseRelease(window.data(), Qt::LeftButton, 0, QPoint(150, 150));
+}
+
+
// QTBUG-37316
void tst_qquickflickable::nestedClickThenFlick()
{
@@ -1739,6 +1783,40 @@ void tst_qquickflickable::movementFromProgrammaticFlick()
QTRY_COMPARE(flickable->property("signalString").toString(), QString("msfsfeme"));
}
+// QTBUG_35038
+void tst_qquickflickable::contentSize()
+{
+ QQuickFlickable flickable;
+ QCOMPARE(flickable.contentWidth(), qreal(-1));
+ QCOMPARE(flickable.contentHeight(), qreal(-1));
+
+ QSignalSpy cwspy(&flickable, SIGNAL(contentWidthChanged()));
+ QVERIFY(cwspy.isValid());
+
+ QSignalSpy chspy(&flickable, SIGNAL(contentHeightChanged()));
+ QVERIFY(chspy.isValid());
+
+ flickable.setWidth(100);
+ QCOMPARE(flickable.width(), qreal(100));
+ QCOMPARE(flickable.contentWidth(), qreal(-1.0));
+ QCOMPARE(cwspy.count(), 0);
+
+ flickable.setContentWidth(10);
+ QCOMPARE(flickable.width(), qreal(100));
+ QCOMPARE(flickable.contentWidth(), qreal(10));
+ QCOMPARE(cwspy.count(), 1);
+
+ flickable.setHeight(100);
+ QCOMPARE(flickable.height(), qreal(100));
+ QCOMPARE(flickable.contentHeight(), qreal(-1.0));
+ QCOMPARE(chspy.count(), 0);
+
+ flickable.setContentHeight(10);
+ QCOMPARE(flickable.height(), qreal(100));
+ QCOMPARE(flickable.contentHeight(), qreal(10));
+ QCOMPARE(chspy.count(), 1);
+}
+
QTEST_MAIN(tst_qquickflickable)
#include "tst_qquickflickable.moc"
diff --git a/tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp b/tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp
index f4f1e290c1..b16e89dc39 100644
--- a/tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp
+++ b/tests/auto/quick/qquickfontloader/tst_qquickfontloader.cpp
@@ -119,7 +119,7 @@ void tst_qquickfontloader::localFont()
void tst_qquickfontloader::failLocalFont()
{
QString componentStr = "import QtQuick 2.0\nFontLoader { source: \"" + testFileUrl("dummy.ttf").toString() + "\" }";
- QTest::ignoreMessage(QtWarningMsg, QString("<Unknown File>:2:1: QML FontLoader: Cannot load font: \"" + testFileUrl("dummy.ttf").toString() + "\"").toUtf8().constData());
+ QTest::ignoreMessage(QtWarningMsg, QString("<Unknown File>:2:1: QML FontLoader: Cannot load font: \"" + testFileUrl("dummy.ttf").toString() + QLatin1Char('"')).toUtf8().constData());
QQmlComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QQuickFontLoader *fontObject = qobject_cast<QQuickFontLoader*>(component.create());
diff --git a/tests/auto/quick/qquickfontloader_static/data/font.ttf b/tests/auto/quick/qquickfontloader_static/data/font.ttf
new file mode 100644
index 0000000000..aae50d5035
--- /dev/null
+++ b/tests/auto/quick/qquickfontloader_static/data/font.ttf
Binary files differ
diff --git a/tests/auto/quick/qquickfontloader_static/qquickfontloader_static.pro b/tests/auto/quick/qquickfontloader_static/qquickfontloader_static.pro
new file mode 100644
index 0000000000..f6835c05c0
--- /dev/null
+++ b/tests/auto/quick/qquickfontloader_static/qquickfontloader_static.pro
@@ -0,0 +1,12 @@
+CONFIG += testcase
+TARGET = tst_qquickfontloader_static
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qquickfontloader_static.cpp
+
+include (../../shared/util.pri)
+
+TESTDATA = data/*
+
+QT += core-private gui-private qml-private quick-private network testlib
+DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/quick/qquickfontloader_static/tst_qquickfontloader_static.cpp b/tests/auto/quick/qquickfontloader_static/tst_qquickfontloader_static.cpp
new file mode 100644
index 0000000000..f7f00172ba
--- /dev/null
+++ b/tests/auto/quick/qquickfontloader_static/tst_qquickfontloader_static.cpp
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/QGuiApplication>
+#include <QtQuick/QQuickView>
+#include <QtQml/QQmlComponent>
+#include "../../shared/util.h"
+#include <qtest.h>
+
+QByteArray qmltemplate("import QtQuick 2.0\n"
+"\n"
+"Rectangle {\n"
+" width: 400\n"
+" height: 400\n"
+" color: \"red\"\n"
+" FontLoader { id: fixedFont; source: \"%1\" }\n"
+" Text {\n"
+" text: \"hello world\"\n"
+" anchors.centerIn: parent\n"
+" font.family: fixedFont.name\n"
+" }\n"
+"}\n");
+
+int main(int argc, char **argv)
+{
+ for (int i = 0; i < 3; i++) {
+ QGuiApplication app(argc, argv);
+ QQmlDataTest dataTest;
+ dataTest.initTestCase();
+ QQuickView window;
+ QQmlComponent component (window.engine());
+ QUrl current = QUrl::fromLocalFile("");
+ qmltemplate.replace("%1", dataTest.testFileUrl("font.ttf").toString().toLocal8Bit());
+ component.setData(qmltemplate, current);
+ window.setContent(current, &component, component.create());
+ window.show();
+ QTest::qWaitForWindowActive(&window);
+ }
+}
diff --git a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
index 9f3de8292f..f3351fcc4e 100644
--- a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
+++ b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
@@ -2089,10 +2089,14 @@ void tst_QQuickItem::keyNavigation_focusReason()
QVERIFY(key.isAccepted());
QCOMPARE(focusEventFilter.lastFocusReason, Qt::BacktabFocusReason);
- // some arbitrary cursor key
+ // right - it's also one kind of key navigation
key = QKeyEvent(QEvent::KeyPress, Qt::Key_Right, Qt::NoModifier, "", false, 1);
QGuiApplication::sendEvent(window, &key);
QVERIFY(key.isAccepted());
+ QCOMPARE(focusEventFilter.lastFocusReason, Qt::TabFocusReason);
+
+ item->setFocus(true, Qt::OtherFocusReason);
+ QVERIFY(item->hasActiveFocus());
QCOMPARE(focusEventFilter.lastFocusReason, Qt::OtherFocusReason);
delete window;
diff --git a/tests/auto/quick/qquickloader/tst_qquickloader.cpp b/tests/auto/quick/qquickloader/tst_qquickloader.cpp
index 83294b10ab..b9d058ab80 100644
--- a/tests/auto/quick/qquickloader/tst_qquickloader.cpp
+++ b/tests/auto/quick/qquickloader/tst_qquickloader.cpp
@@ -437,9 +437,7 @@ void tst_QQuickLoader::noResize()
void tst_QQuickLoader::networkRequestUrl()
{
- TestHTTPServer server;
- QVERIFY2(server.listen(), qPrintable(server.errorString()));
- server.serveDirectory(dataDirectory());
+ ThreadedTestHTTPServer server(dataDirectory());
QQmlComponent component(&engine);
const QString qml = "import QtQuick 2.0\nLoader { property int signalCount : 0; source: \"" + server.baseUrl().toString() + "/Rect120x60.qml\"; onLoaded: signalCount += 1 }";
@@ -462,9 +460,7 @@ void tst_QQuickLoader::networkRequestUrl()
/* XXX Component waits until all dependencies are loaded. Is this actually possible? */
void tst_QQuickLoader::networkComponent()
{
- TestHTTPServer server;
- QVERIFY2(server.listen(), qPrintable(server.errorString()));
- server.serveDirectory(dataDirectory(), TestHTTPServer::Delay);
+ ThreadedTestHTTPServer server(dataDirectory(), TestHTTPServer::Delay);
QQmlComponent component(&engine);
const QString qml = "import QtQuick 2.0\n"
@@ -473,8 +469,9 @@ void tst_QQuickLoader::networkComponent()
" Component { id: comp; NW.Rect120x60 {} }\n"
" Loader { sourceComponent: comp } }";
component.setData(qml.toUtf8(), dataDirectory());
- QCOMPARE(component.status(), QQmlComponent::Loading);
- server.sendDelayedItem();
+ // The component may be loaded synchronously or asynchronously, so we cannot test for
+ // status == Loading here. Also, it makes no sense to instruct the server to send here
+ // because in the synchronous case we're already done loading.
QTRY_COMPARE(component.status(), QQmlComponent::Ready);
QQuickItem *item = qobject_cast<QQuickItem*>(component.create());
@@ -494,9 +491,7 @@ void tst_QQuickLoader::networkComponent()
void tst_QQuickLoader::failNetworkRequest()
{
- TestHTTPServer server;
- QVERIFY2(server.listen(), qPrintable(server.errorString()));
- server.serveDirectory(dataDirectory());
+ ThreadedTestHTTPServer server(dataDirectory());
QTest::ignoreMessage(QtWarningMsg, QString(server.baseUrl().toString() + "/IDontExist.qml: File not found").toUtf8());
@@ -710,9 +705,7 @@ void tst_QQuickLoader::initialPropertyValues()
QFETCH(QStringList, propertyNames);
QFETCH(QVariantList, propertyValues);
- TestHTTPServer server;
- QVERIFY2(server.listen(), qPrintable(server.errorString()));
- server.serveDirectory(dataDirectory());
+ ThreadedTestHTTPServer server(dataDirectory());
foreach (const QString &warning, expectedWarnings)
QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData());
diff --git a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
index eda3be5c1d..e4473b9540 100644
--- a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
+++ b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
@@ -72,7 +72,7 @@ QString createExpectedFileIfNotFound(const QString& filebasename, const QImage&
QString persistent_dir = QQmlDataTest::instance()->dataDirectory();
QString arch = "unknown-architecture"; // QTest needs to help with this.
- QString expectfile = persistent_dir + QDir::separator() + filebasename + "-" + arch + ".png";
+ QString expectfile = persistent_dir + QDir::separator() + filebasename + QLatin1Char('-') + arch + ".png";
if (!QFile::exists(expectfile)) {
actual.save(expectfile);
@@ -2599,9 +2599,7 @@ void tst_qquicktextedit::cursorDelegate()
void tst_qquicktextedit::remoteCursorDelegate()
{
- TestHTTPServer server;
- QVERIFY2(server.listen(), qPrintable(server.errorString()));
- server.serveDirectory(dataDirectory(), TestHTTPServer::Delay);
+ ThreadedTestHTTPServer server(dataDirectory(), TestHTTPServer::Delay);
QQuickView view;
@@ -2737,20 +2735,21 @@ void tst_qquicktextedit::delegateLoading()
QFETCH(QString, qmlfile);
QFETCH(QString, error);
- TestHTTPServer server;
- QVERIFY2(server.listen(), qPrintable(server.errorString()));
- server.serveDirectory(testFile("httpfail"), TestHTTPServer::Disconnect);
- server.serveDirectory(testFile("httpslow"), TestHTTPServer::Delay);
- server.serveDirectory(testFile("http"));
+ QHash<QString, TestHTTPServer::Mode> dirs;
+ dirs[testFile("httpfail")] = TestHTTPServer::Disconnect;
+ dirs[testFile("httpslow")] = TestHTTPServer::Delay;
+ dirs[testFile("http")] = TestHTTPServer::Normal;
+ ThreadedTestHTTPServer server(dirs);
error.replace(QStringLiteral("{{ServerBaseUrl}}"), server.baseUrl().toString());
+ if (!error.isEmpty())
+ QTest::ignoreMessage(QtWarningMsg, error.toUtf8());
QQuickView view(server.url(qmlfile));
view.show();
view.requestActivate();
if (!error.isEmpty()) {
- QTest::ignoreMessage(QtWarningMsg, error.toUtf8());
QTRY_VERIFY(view.status()==QQuickView::Error);
QTRY_VERIFY(!view.rootObject()); // there is fail item inside this test
} else {
diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
index 85123c6f92..493c03d00e 100644
--- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
+++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
@@ -71,7 +71,7 @@ QString createExpectedFileIfNotFound(const QString& filebasename, const QImage&
QString persistent_dir = QQmlDataTest::instance()->dataDirectory();
QString arch = "unknown-architecture"; // QTest needs to help with this.
- QString expectfile = persistent_dir + QDir::separator() + filebasename + "-" + arch + ".png";
+ QString expectfile = persistent_dir + QDir::separator() + filebasename + QLatin1Char('-') + arch + ".png";
if (!QFile::exists(expectfile)) {
actual.save(expectfile);
@@ -2857,10 +2857,7 @@ void tst_qquicktextinput::cursorDelegate()
void tst_qquicktextinput::remoteCursorDelegate()
{
- TestHTTPServer server;
- QVERIFY2(server.listen(), qPrintable(server.errorString()));
- server.serveDirectory(dataDirectory(), TestHTTPServer::Delay);
-
+ ThreadedTestHTTPServer server(dataDirectory(), TestHTTPServer::Delay);
QQuickView view;
QQmlComponent component(view.engine(), server.url("/RemoteCursor.qml"));
diff --git a/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp b/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp
index c0bf86a212..09ceb7aebd 100644
--- a/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp
+++ b/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp
@@ -115,15 +115,15 @@ private:
QString xml;
if (!data.isEmpty()) {
- QStringList items = data.split(";");
+ QStringList items = data.split(QLatin1Char(';'));
foreach(const QString &item, items) {
if (item.isEmpty())
continue;
QVariantList variants;
xml += QLatin1String("<item>");
- QStringList fields = item.split(",");
+ QStringList fields = item.split(QLatin1Char(','));
foreach(const QString &field, fields) {
- QStringList values = field.split("=");
+ QStringList values = field.split(QLatin1Char('='));
if (values.count() != 2) {
qWarning() << "makeItemXmlAndData: invalid field:" << field;
continue;
@@ -857,22 +857,22 @@ void tst_qquickxmllistmodel::threading()
QModelIndex index = m1->index(i, 0);
QList<int> roles = m1->roleNames().keys();
std::sort(roles.begin(), roles.end());
- QCOMPARE(m1->data(index, roles.at(0)).toString(), QString("A" + QString::number(i)));
- QCOMPARE(m1->data(index, roles.at(1)).toString(), QString("1" + QString::number(i)));
+ QCOMPARE(m1->data(index, roles.at(0)).toString(), QLatin1Char('A') + QString::number(i));
+ QCOMPARE(m1->data(index, roles.at(1)).toString(), QLatin1Char('1') + QString::number(i));
QCOMPARE(m1->data(index, roles.at(2)).toString(), QString("Football"));
index = m2->index(i, 0);
roles = m2->roleNames().keys();
std::sort(roles.begin(), roles.end());
- QCOMPARE(m2->data(index, roles.at(0)).toString(), QString("B" + QString::number(i)));
- QCOMPARE(m2->data(index, roles.at(1)).toString(), QString("2" + QString::number(i)));
+ QCOMPARE(m2->data(index, roles.at(0)).toString(), QLatin1Char('B') + QString::number(i));
+ QCOMPARE(m2->data(index, roles.at(1)).toString(), QLatin1Char('2') + QString::number(i));
QCOMPARE(m2->data(index, roles.at(2)).toString(), QString("Athletics"));
index = m3->index(i, 0);
roles = m3->roleNames().keys();
std::sort(roles.begin(), roles.end());
- QCOMPARE(m3->data(index, roles.at(0)).toString(), QString("C" + QString::number(i)));
- QCOMPARE(m3->data(index, roles.at(1)).toString(), QString("3" + QString::number(i)));
+ QCOMPARE(m3->data(index, roles.at(0)).toString(), QLatin1Char('C') + QString::number(i));
+ QCOMPARE(m3->data(index, roles.at(1)).toString(), QLatin1Char('3') + QString::number(i));
QCOMPARE(m3->data(index, roles.at(2)).toString(), QString("Curling"));
}
}
diff --git a/tests/auto/quick/quick.pro b/tests/auto/quick/quick.pro
index 5593fd94f6..f25a28d45b 100644
--- a/tests/auto/quick/quick.pro
+++ b/tests/auto/quick/quick.pro
@@ -18,6 +18,7 @@ PRIVATETESTS += \
qquickapplication \
qquickbehaviors \
qquickfontloader \
+ qquickfontloader_static \
qquickfontmetrics \
qquickimageprovider \
qquickpath \
diff --git a/tests/auto/quick/shared/viewtestutil.cpp b/tests/auto/quick/shared/viewtestutil.cpp
index 0ba81cf2ef..9121314420 100644
--- a/tests/auto/quick/shared/viewtestutil.cpp
+++ b/tests/auto/quick/shared/viewtestutil.cpp
@@ -281,11 +281,11 @@ void QQuickViewTestUtil::QaimModel::resetItems(const QList<QPair<QString, QStrin
void QQuickViewTestUtil::QaimModel::matchAgainst(const QList<QPair<QString, QString> > &other, const QString &error1, const QString &error2) {
for (int i=0; i<other.count(); i++) {
QVERIFY2(list.contains(other[i]),
- QTest::toString(other[i].first + " " + other[i].second + " " + error1));
+ QTest::toString(other[i].first + QLatin1Char(' ') + other[i].second + QLatin1Char(' ') + error1));
}
for (int i=0; i<list.count(); i++) {
QVERIFY2(other.contains(list[i]),
- QTest::toString(list[i].first + " " + list[i].second + " " + error2));
+ QTest::toString(list[i].first + QLatin1Char(' ') + list[i].second + QLatin1Char(' ') + error2));
}
}
diff --git a/tests/auto/shared/testhttpserver.cpp b/tests/auto/shared/testhttpserver.cpp
index 6c466293b6..80ce10cacd 100644
--- a/tests/auto/shared/testhttpserver.cpp
+++ b/tests/auto/shared/testhttpserver.cpp
@@ -36,6 +36,7 @@
#include <QDebug>
#include <QFile>
#include <QTimer>
+#include <QTest>
/*!
\internal
@@ -80,6 +81,16 @@ The following request urls will then result in the appropriate action:
\row \li http://localhost:14445/slowMain.qml \li slowMain.qml returned after 500ms
\endtable
*/
+
+static QUrl localHostUrl(quint16 port)
+{
+ QUrl url;
+ url.setScheme(QStringLiteral("http"));
+ url.setHost(QStringLiteral("127.0.0.1"));
+ url.setPort(port);
+ return url;
+}
+
TestHTTPServer::TestHTTPServer()
: m_state(AwaitingHeader)
{
@@ -93,11 +104,12 @@ bool TestHTTPServer::listen()
QUrl TestHTTPServer::baseUrl() const
{
- QUrl url;
- url.setScheme(QStringLiteral("http"));
- url.setHost(QStringLiteral("127.0.0.1"));
- url.setPort(m_server.serverPort());
- return url;
+ return localHostUrl(m_server.serverPort());
+}
+
+quint16 TestHTTPServer::port() const
+{
+ return m_server.serverPort();
}
QUrl TestHTTPServer::url(const QString &documentPath) const
@@ -377,3 +389,60 @@ void TestHTTPServer::serveGET(QTcpSocket *socket, const QByteArray &data)
socket->disconnectFromHost();
}
}
+
+ThreadedTestHTTPServer::ThreadedTestHTTPServer(const QString &dir, TestHTTPServer::Mode mode) :
+ m_port(0)
+{
+ m_dirs[dir] = mode;
+ start();
+}
+
+ThreadedTestHTTPServer::ThreadedTestHTTPServer(const QHash<QString, TestHTTPServer::Mode> &dirs) :
+ m_dirs(dirs), m_port(0)
+{
+ start();
+}
+
+ThreadedTestHTTPServer::~ThreadedTestHTTPServer()
+{
+ quit();
+ wait();
+}
+
+QUrl ThreadedTestHTTPServer::baseUrl() const
+{
+ return localHostUrl(m_port);
+}
+
+QUrl ThreadedTestHTTPServer::url(const QString &documentPath) const
+{
+ return baseUrl().resolved(documentPath);
+}
+
+QString ThreadedTestHTTPServer::urlString(const QString &documentPath) const
+{
+ return url(documentPath).toString();
+}
+
+void ThreadedTestHTTPServer::run()
+{
+ TestHTTPServer server;
+ {
+ QMutexLocker locker(&m_mutex);
+ QVERIFY2(server.listen(), qPrintable(server.errorString()));
+ m_port = server.port();
+ for (QHash<QString, TestHTTPServer::Mode>::ConstIterator i = m_dirs.constBegin();
+ i != m_dirs.constEnd(); ++i) {
+ server.serveDirectory(i.key(), i.value());
+ }
+ m_condition.wakeAll();
+ }
+ exec();
+}
+
+void ThreadedTestHTTPServer::start()
+{
+ QMutexLocker locker(&m_mutex);
+ QThread::start();
+ m_condition.wait(&m_mutex);
+}
diff --git a/tests/auto/shared/testhttpserver.h b/tests/auto/shared/testhttpserver.h
index 0fc8e4a79c..bf826b247b 100644
--- a/tests/auto/shared/testhttpserver.h
+++ b/tests/auto/shared/testhttpserver.h
@@ -37,6 +37,9 @@
#include <QTcpServer>
#include <QUrl>
#include <QPair>
+#include <QThread>
+#include <QMutex>
+#include <QWaitCondition>
class TestHTTPServer : public QObject
{
@@ -45,6 +48,7 @@ public:
TestHTTPServer();
bool listen();
+ quint16 port() const;
QUrl baseUrl() const;
QUrl url(const QString &documentPath) const;
QString urlString(const QString &documentPath) const;
@@ -100,5 +104,29 @@ private:
QTcpServer m_server;
};
+class ThreadedTestHTTPServer : public QThread
+{
+ Q_OBJECT
+public:
+ ThreadedTestHTTPServer(const QString &dir, TestHTTPServer::Mode mode = TestHTTPServer::Normal);
+ ThreadedTestHTTPServer(const QHash<QString, TestHTTPServer::Mode> &dirs);
+ ~ThreadedTestHTTPServer();
+
+ QUrl baseUrl() const;
+ QUrl url(const QString &documentPath) const;
+ QString urlString(const QString &documentPath) const;
+
+protected:
+ void run();
+
+private:
+ void start();
+
+ QHash<QString, TestHTTPServer::Mode> m_dirs;
+ quint16 m_port;
+ QMutex m_mutex;
+ QWaitCondition m_condition;
+};
+
#endif // TESTHTTPSERVER_H
diff --git a/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp b/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp
index 8974f75ecd..b2dd34cca7 100644
--- a/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp
+++ b/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp
@@ -244,7 +244,7 @@ quint16 tst_Scenegraph::checksumFileOrDir(const QString &path)
static const QStringList nameFilters = QStringList() << "*.qml" << "*.cpp" << "*.png" << "*.jpg";
quint16 cs = 0;
foreach (QString item, QDir(fi.filePath()).entryList(nameFilters, QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot))
- cs ^= checksumFileOrDir(path + "/" + item);
+ cs ^= checksumFileOrDir(path + QLatin1Char('/') + item);
return cs;
}
return 0;
diff --git a/tools/qmleasing/segmentproperties.cpp b/tools/qmleasing/segmentproperties.cpp
index cfc10b7f54..cf49b2488c 100644
--- a/tools/qmleasing/segmentproperties.cpp
+++ b/tools/qmleasing/segmentproperties.cpp
@@ -103,7 +103,7 @@ void SegmentProperties::invalidate()
{
m_blockSignals = true;
- m_ui_pane_p.label->setText(QLatin1String("p") + QString::number(m_segment));
+ m_ui_pane_p.label->setText(QLatin1Char('p') + QString::number(m_segment));
m_ui_pane_p.smooth->setChecked(m_smooth);
m_ui_pane_p.smooth->parentWidget()->setEnabled(!m_last);
diff --git a/tools/qmleasing/splineeditor.cpp b/tools/qmleasing/splineeditor.cpp
index 56444f6b3b..2ae4d11309 100644
--- a/tools/qmleasing/splineeditor.cpp
+++ b/tools/qmleasing/splineeditor.cpp
@@ -293,10 +293,11 @@ QString SplineEditor::generateCode()
{
QString s = QLatin1String("[");
foreach (const QPointF &point, m_controlPoints) {
- s += QString::number(point.x(), 'g', 2) + "," + QString::number(point.y(), 'g', 3) + ",";
+ s += QString::number(point.x(), 'g', 2) + QLatin1Char(',')
+ + QString::number(point.y(), 'g', 3) + QLatin1Char(',');
}
s.chop(1); //removing last ","
- s += "]";
+ s += QLatin1Char(']');
return s;
}
@@ -675,7 +676,7 @@ void SplineEditor::setEasingCurve(const QString &code)
{
if (m_block)
return;
- if (code.left(1) == QLatin1String("[") && code.right(1) == QLatin1String("]")) {
+ if (code.startsWith(QLatin1Char('[')) && code.endsWith(QLatin1Char(']'))) {
QString cleanCode = code;
cleanCode.remove(0, 1);
cleanCode.chop(1);
diff --git a/tools/qmlimportscanner/main.cpp b/tools/qmlimportscanner/main.cpp
index 7f8c3080c4..395c31a710 100644
--- a/tools/qmlimportscanner/main.cpp
+++ b/tools/qmlimportscanner/main.cpp
@@ -129,10 +129,10 @@ QVariantMap pluginsForModulePath(const QString &modulePath) {
line = qmldirFile.readLine();
if (line.startsWith("plugin")) {
plugins += QString::fromUtf8(line.split(' ').at(1));
- plugins += QStringLiteral(" ");
+ plugins += QLatin1Char(' ');
} else if (line.startsWith("classname")) {
classnames += QString::fromUtf8(line.split(' ').at(1));
- classnames += QStringLiteral(" ");
+ classnames += QLatin1Char(' ');
} else if (line.startsWith("depends")) {
QList<QByteArray> dep = line.split(' ');
if (dep.length() != 3)
@@ -199,7 +199,7 @@ QVariantList findPathsForModuleImports(const QVariantList &imports)
if (plugininfo.contains(QStringLiteral("dependencies"))) {
QStringList dependencies = plugininfo.value(QStringLiteral("dependencies")).toStringList();
foreach (const QString &line, dependencies) {
- QList<QString> dep = line.split(QStringLiteral(" "));
+ QList<QString> dep = line.split(QLatin1Char(' '));
QVariantMap depImport;
depImport[QStringLiteral("type")] = QStringLiteral("module");
depImport[QStringLiteral("name")] = dep[0];
diff --git a/tools/qmljs/qmljs.cpp b/tools/qmljs/qmljs.cpp
index 132817ff8c..27aeed4c0c 100644
--- a/tools/qmljs/qmljs.cpp
+++ b/tools/qmljs/qmljs.cpp
@@ -126,8 +126,8 @@ static void showException(QV4::ExecutionContext *ctx, const QV4::Value &exceptio
foreach (const QV4::StackFrame &frame, trace) {
std::cerr << " at " << qPrintable(frame.function) << " (" << qPrintable(frame.source);
if (frame.line >= 0)
- std::cerr << ":" << frame.line;
- std::cerr << ")" << std::endl;
+ std::cerr << ':' << frame.line;
+ std::cerr << ')' << std::endl;
}
}
diff --git a/tools/qmlmin/main.cpp b/tools/qmlmin/main.cpp
index 35b62ef6fd..a3f2b92bde 100644
--- a/tools/qmlmin/main.cpp
+++ b/tools/qmlmin/main.cpp
@@ -245,7 +245,7 @@ void Minify::escape(const QChar &ch, QString *out)
switch (hx.length()) {
case 1: out->append(QLatin1String("000")); break;
case 2: out->append(QLatin1String("00")); break;
- case 3: out->append(QLatin1String("0")); break;
+ case 3: out->append(QLatin1Char('0')); break;
case 4: break;
default: Q_ASSERT(!"unreachable");
}
@@ -274,7 +274,8 @@ bool Minify::parse(int startToken)
_tokens.append(tokenKind());
_tokenStrings.append(tokenText());
} else {
- std::cerr << qPrintable(fileName()) << ":" << tokenStartLine() << ":" << tokenStartColumn() << ": syntax error" << std::endl;
+ std::cerr << qPrintable(fileName()) << ':' << tokenStartLine() << ':'
+ << tokenStartColumn() << ": syntax error" << std::endl;
return false;
}
}
@@ -394,7 +395,8 @@ bool Minify::parse(int startToken)
goto again;
}
- std::cerr << qPrintable(fileName()) << ":" << tokenStartLine() << ":" << tokenStartColumn() << ": syntax error" << std::endl;
+ std::cerr << qPrintable(fileName()) << ':' << tokenStartLine() << ':' << tokenStartColumn()
+ << ": syntax error" << std::endl;
return false;
}
@@ -447,7 +449,8 @@ bool Tokenize::parse(int startToken)
_tokens.append(tokenKind());
_tokenStrings.append(tokenText());
} else {
- std::cerr << qPrintable(fileName()) << ":" << tokenStartLine() << ":" << tokenStartColumn() << ": syntax error" << std::endl;
+ std::cerr << qPrintable(fileName()) << ':' << tokenStartLine() << ':'
+ << tokenStartColumn() << ": syntax error" << std::endl;
return false;
}
}
@@ -511,7 +514,8 @@ bool Tokenize::parse(int startToken)
goto again;
}
- std::cerr << qPrintable(fileName()) << ":" << tokenStartLine() << ":" << tokenStartColumn() << ": syntax error" << std::endl;
+ std::cerr << qPrintable(fileName()) << ':' << tokenStartLine() << ':'
+ << tokenStartColumn() << ": syntax error" << std::endl;
return false;
}
@@ -599,7 +603,7 @@ int runQmlmin(int argc, char *argv[])
else {
usage(/*show help*/ isInvalidOpt);
if (isInvalidOpt)
- std::cerr << "qmlmin: invalid option '" << qPrintable(arg) << "'" << std::endl;
+ std::cerr << "qmlmin: invalid option '" << qPrintable(arg) << '\'' << std::endl;
else
std::cerr << "qmlmin: too many input files specified" << std::endl;
return EXIT_FAILURE;
@@ -632,7 +636,7 @@ int runQmlmin(int argc, char *argv[])
//
QQmlJS::Minify secondMinify(width);
if (! secondMinify(fileName, minify.minifiedCode()) || secondMinify.minifiedCode() != minify.minifiedCode()) {
- std::cerr << "qmlmin: cannot minify '" << qPrintable(fileName) << "'" << std::endl;
+ std::cerr << "qmlmin: cannot minify '" << qPrintable(fileName) << '\'' << std::endl;
return EXIT_FAILURE;
}
@@ -641,7 +645,7 @@ int runQmlmin(int argc, char *argv[])
minimizedTokens(fileName, minify.minifiedCode());
if (originalTokens.tokenStream().size() != minimizedTokens.tokenStream().size()) {
- std::cerr << "qmlmin: cannot minify '" << qPrintable(fileName) << "'" << std::endl;
+ std::cerr << "qmlmin: cannot minify '" << qPrintable(fileName) << '\'' << std::endl;
return EXIT_FAILURE;
}
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index 0238a4aaae..98c9b54bcd 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -32,6 +32,7 @@
****************************************************************************/
#include <QtQml/qqmlengine.h>
+#include <QtQml/private/qqmlengine_p.h>
#include <QtQml/private/qqmlmetatype_p.h>
#include <QtQml/private/qqmlopenmetaobject_p.h>
#include <QtQuick/private/qquickevents_p_p.h>
@@ -129,11 +130,11 @@ void collectReachableMetaObjects(QObject *object, QSet<const QMetaObject *> *met
}
}
-void collectReachableMetaObjects(const QQmlType *ty, QSet<const QMetaObject *> *metas)
+void collectReachableMetaObjects(QQmlEnginePrivate *engine, const QQmlType *ty, QSet<const QMetaObject *> *metas)
{
collectReachableMetaObjects(ty->metaObject(), metas, ty->isExtendedType());
- if (ty->attachedPropertiesType())
- collectReachableMetaObjects(ty->attachedPropertiesType(), metas);
+ if (ty->attachedPropertiesType(engine))
+ collectReachableMetaObjects(ty->attachedPropertiesType(engine), metas);
}
/* We want to add the MetaObject for 'Qt' to the list, this is a
@@ -195,11 +196,11 @@ QByteArray convertToId(const QMetaObject *mo)
// Collect all metaobjects for types registered with qmlRegisterType() without parameters
-void collectReachableMetaObjectsWithoutQmlName( QSet<const QMetaObject *>& metas ) {
+void collectReachableMetaObjectsWithoutQmlName(QQmlEnginePrivate *engine, QSet<const QMetaObject *>& metas ) {
foreach (const QQmlType *ty, QQmlMetaType::qmlAllTypes()) {
if ( ! metas.contains(ty->metaObject()) ) {
if (!ty->isComposite()) {
- collectReachableMetaObjects(ty, &metas);
+ collectReachableMetaObjects(engine, ty, &metas);
} else {
qmlTypesByCompositeName[ty->elementName()] = ty;
}
@@ -225,7 +226,7 @@ QSet<const QMetaObject *> collectReachableMetaObjects(QQmlEngine *engine,
qmlTypesByCppName[ty->metaObject()->className()].insert(ty);
if (ty->isExtendedType())
extensions[ty->typeName()].insert(ty->metaObject()->className());
- collectReachableMetaObjects(ty, &metas);
+ collectReachableMetaObjects(QQmlEnginePrivate::get(engine), ty, &metas);
} else {
qmlTypesByCompositeName[ty->elementName()] = ty;
}
@@ -324,7 +325,7 @@ QSet<const QMetaObject *> collectReachableMetaObjects(QQmlEngine *engine,
}
}
- collectReachableMetaObjectsWithoutQmlName(metas);
+ collectReachableMetaObjectsWithoutQmlName(QQmlEnginePrivate::get(engine), metas);
return metas;
}
@@ -374,7 +375,7 @@ public:
if (qmlTyName.startsWith("./")) {
qmlTyName.remove(0, 2);
}
- if (qmlTyName.startsWith("/")) {
+ if (qmlTyName.startsWith(QLatin1Char('/'))) {
qmlTyName.remove(0, 1);
}
const QString exportString = enquote(
@@ -510,7 +511,7 @@ public:
qml->writeEndObject();
}
- void dump(const QMetaObject *meta, bool isUncreatable, bool isSingleton)
+ void dump(QQmlEnginePrivate *engine, const QMetaObject *meta, bool isUncreatable, bool isSingleton)
{
qml->writeStartObject("Component");
@@ -556,7 +557,7 @@ public:
}
qml->writeArrayBinding(QLatin1String("exportMetaObjectRevisions"), metaObjectRevisions);
- if (const QMetaObject *attachedType = (*qmlTypes.begin())->attachedPropertiesType()) {
+ if (const QMetaObject *attachedType = (*qmlTypes.begin())->attachedPropertiesType(engine)) {
// Can happen when a type is registered that returns itself as attachedPropertiesType()
// because there is no creatable type to attach to.
if (attachedType != meta) {
@@ -735,7 +736,7 @@ static bool readDependenciesData(QString dependenciesFile, const QByteArray &fil
std::cerr << "parsing "
<< qPrintable( dependenciesFile ) << " skipping";
foreach (const QString &uriToSkip, urisToSkip)
- std::cerr << " " << qPrintable(uriToSkip);
+ std::cerr << ' ' << qPrintable(uriToSkip);
std::cerr << std::endl;
}
QJsonParseError parseError;
@@ -828,7 +829,7 @@ static bool getDependencies(const QQmlEngine &engine, const QString &pluginImpor
if (!importScanner.waitForFinished()) {
std::cerr << "failure to start " << qPrintable(command);
foreach (const QString &arg, commandArgs)
- std::cerr << " " << qPrintable(arg);
+ std::cerr << ' ' << qPrintable(arg);
std::cerr << std::endl;
return false;
}
@@ -1173,7 +1174,7 @@ int main(int argc, char *argv[])
if (relocatable)
dumper.setRelocatableModuleUri(pluginImportUri);
foreach (const QMetaObject *meta, nameToMeta) {
- dumper.dump(meta, uncreatableMetas.contains(meta), singletonMetas.contains(meta));
+ dumper.dump(QQmlEnginePrivate::get(&engine), meta, uncreatableMetas.contains(meta), singletonMetas.contains(meta));
}
foreach (const QQmlType *compositeType, qmlTypesByCompositeName)
dumper.dumpComposite(&engine, compositeType, defaultReachableNames);
diff --git a/tools/qmlprofiler/qmlprofilerapplication.cpp b/tools/qmlprofiler/qmlprofilerapplication.cpp
index 93cc49659f..74356c21a3 100644
--- a/tools/qmlprofiler/qmlprofilerapplication.cpp
+++ b/tools/qmlprofiler/qmlprofilerapplication.cpp
@@ -475,7 +475,7 @@ void QmlProfilerApplication::run()
connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)), this,
SLOT(processFinished()));
logStatus(QString("Starting '%1 %2' ...").arg(m_programPath,
- arguments.join(" ")));
+ arguments.join(QLatin1Char(' '))));
m_process->start(m_programPath, arguments);
if (!m_process->waitForStarted()) {
logError(QString("Could not run '%1': %2").arg(m_programPath,
diff --git a/tools/qmlprofiler/qmlprofilerdata.cpp b/tools/qmlprofiler/qmlprofilerdata.cpp
index a8a5b1f7b3..91ffbac4a9 100644
--- a/tools/qmlprofiler/qmlprofilerdata.cpp
+++ b/tools/qmlprofiler/qmlprofilerdata.cpp
@@ -233,8 +233,8 @@ void QmlProfilerData::addQmlEvent(QQmlProfilerDefinitions::RangeType type,
if (data.isEmpty())
details = tr("Source code not available");
else {
- details = data.join(QStringLiteral(" ")).replace(
- QLatin1Char('\n'),QStringLiteral(" ")).simplified();
+ details = data.join(QLatin1Char(' ')).replace(
+ QLatin1Char('\n'), QLatin1Char(' ')).simplified();
QRegExp rewrite(QStringLiteral("\\(function \\$(\\w+)\\(\\) \\{ (return |)(.+) \\}\\)"));
bool match = rewrite.exactMatch(details);
if (match) {
diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp
index 14845ed433..ab37b6457d 100644
--- a/tools/qmlscene/main.cpp
+++ b/tools/qmlscene/main.cpp
@@ -204,7 +204,7 @@ static int displayOptionsDialog(Options *options)
QFileInfoList fileInfos = findQmlFiles(":/bundle") + findQmlFiles("./qmlscene-resources");
foreach (QFileInfo fileInfo, fileInfos)
- qmlFileComboBox->addItem(fileInfo.dir().dirName() + "/" + fileInfo.fileName(), QVariant::fromValue(fileInfo));
+ qmlFileComboBox->addItem(fileInfo.dir().dirName() + QLatin1Char('/') + fileInfo.fileName(), QVariant::fromValue(fileInfo));
QCheckBox *originalCheckBox = new QCheckBox(&dialog);
originalCheckBox->setText("Use original QML viewer");
@@ -235,7 +235,7 @@ static int displayOptionsDialog(Options *options)
QVariant variant = qmlFileComboBox->itemData(qmlFileComboBox->currentIndex());
QFileInfo fileInfo = variant.value<QFileInfo>();
- if (fileInfo.canonicalFilePath().startsWith(":"))
+ if (fileInfo.canonicalFilePath().startsWith(QLatin1Char(':')))
options->file = QUrl("qrc" + fileInfo.canonicalFilePath());
else
options->file = QUrl::fromLocalFile(fileInfo.canonicalFilePath());
@@ -270,7 +270,7 @@ static bool checkVersion(const QUrl &url)
bool codeFound= false;
while (!codeFound) {
QString line = stream.readLine();
- if (line.contains("{")) {
+ if (line.contains(QLatin1Char('{'))) {
codeFound = true;
} else {
QString import;