aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/declarative/debugger/qdebugmessageservice.cpp12
-rw-r--r--src/declarative/debugger/qdebugmessageservice_p.h4
-rw-r--r--src/declarative/debugger/qdeclarativedebug.h3
-rw-r--r--src/declarative/debugger/qdeclarativedebugclient.cpp2
-rw-r--r--src/declarative/debugger/qdeclarativedebugclient_p.h3
-rw-r--r--src/declarative/debugger/qdeclarativedebughelper.cpp2
-rw-r--r--src/declarative/debugger/qdeclarativedebughelper_p.h2
-rw-r--r--src/declarative/debugger/qdeclarativedebugserver.cpp2
-rw-r--r--src/declarative/debugger/qdeclarativedebugserver_p.h3
-rw-r--r--src/declarative/debugger/qdeclarativedebugserverconnection_p.h3
-rw-r--r--src/declarative/debugger/qdeclarativedebugservice.cpp2
-rw-r--r--src/declarative/debugger/qdeclarativedebugservice_p.h3
-rw-r--r--src/declarative/debugger/qdeclarativedebugservice_p_p.h3
-rw-r--r--src/declarative/debugger/qdeclarativedebugstatesdelegate_p.h5
-rw-r--r--src/declarative/debugger/qdeclarativedebugtrace.cpp32
-rw-r--r--src/declarative/debugger/qdeclarativedebugtrace_p.h11
-rw-r--r--src/declarative/debugger/qdeclarativeenginedebug.cpp2
-rw-r--r--src/declarative/debugger/qdeclarativeenginedebug_p.h3
-rw-r--r--src/declarative/debugger/qdeclarativeenginedebugservice.cpp11
-rw-r--r--src/declarative/debugger/qdeclarativeenginedebugservice_p.h4
-rw-r--r--src/declarative/debugger/qdeclarativeinspectorinterface_p.h3
-rw-r--r--src/declarative/debugger/qdeclarativeinspectorservice.cpp2
-rw-r--r--src/declarative/debugger/qdeclarativeinspectorservice_p.h3
-rw-r--r--src/declarative/debugger/qpacketprotocol.cpp2
-rw-r--r--src/declarative/debugger/qpacketprotocol_p.h3
-rw-r--r--src/declarative/debugger/qv8debugservice.cpp2
-rw-r--r--src/declarative/debugger/qv8debugservice_p.h3
-rw-r--r--src/declarative/debugger/qv8profilerservice.cpp2
-rw-r--r--src/declarative/debugger/qv8profilerservice_p.h3
-rw-r--r--src/declarative/qml/ftw/qbitfield_p.h2
-rw-r--r--src/declarative/qml/ftw/qdeclarativepool.cpp2
-rw-r--r--src/declarative/qml/ftw/qdeclarativepool_p.h2
-rw-r--r--src/declarative/qml/ftw/qdeclarativerefcount_p.h3
-rw-r--r--src/declarative/qml/ftw/qdeclarativethread.cpp2
-rw-r--r--src/declarative/qml/ftw/qdeclarativethread_p.h2
-rw-r--r--src/declarative/qml/ftw/qdeclarativetrace.cpp2
-rw-r--r--src/declarative/qml/ftw/qdeclarativetrace_p.h2
-rw-r--r--src/declarative/qml/ftw/qdeletewatcher_p.h2
-rw-r--r--src/declarative/qml/ftw/qfastmetabuilder.cpp2
-rw-r--r--src/declarative/qml/ftw/qfastmetabuilder_p.h2
-rw-r--r--src/declarative/qml/ftw/qfieldlist_p.h2
-rw-r--r--src/declarative/qml/ftw/qfinitestack_p.h2
-rw-r--r--src/declarative/qml/ftw/qflagpointer_p.h2
-rw-r--r--src/declarative/qml/ftw/qhashedstring.cpp2
-rw-r--r--src/declarative/qml/ftw/qhashedstring_p.h15
-rw-r--r--src/declarative/qml/ftw/qhashfield_p.h2
-rw-r--r--src/declarative/qml/ftw/qintrusivelist.cpp2
-rw-r--r--src/declarative/qml/ftw/qintrusivelist_p.h2
-rw-r--r--src/declarative/qml/ftw/qpodvector_p.h2
-rw-r--r--src/declarative/qml/ftw/qrecursionwatcher_p.h2
-rw-r--r--src/declarative/qml/ftw/qrecyclepool_p.h2
-rw-r--r--src/declarative/qml/parser/qdeclarativejs.g8
-rw-r--r--src/declarative/qml/parser/qdeclarativejsast.cpp2
-rw-r--r--src/declarative/qml/parser/qdeclarativejsast_p.h2
-rw-r--r--src/declarative/qml/parser/qdeclarativejsastfwd_p.h2
-rw-r--r--src/declarative/qml/parser/qdeclarativejsastvisitor.cpp2
-rw-r--r--src/declarative/qml/parser/qdeclarativejsastvisitor_p.h2
-rw-r--r--src/declarative/qml/parser/qdeclarativejsengine_p.cpp2
-rw-r--r--src/declarative/qml/parser/qdeclarativejsengine_p.h2
-rw-r--r--src/declarative/qml/parser/qdeclarativejsglobal_p.h2
-rw-r--r--src/declarative/qml/parser/qdeclarativejsgrammar.cpp2
-rw-r--r--src/declarative/qml/parser/qdeclarativejsgrammar_p.h2
-rw-r--r--src/declarative/qml/parser/qdeclarativejskeywords_p.h2
-rw-r--r--src/declarative/qml/parser/qdeclarativejslexer.cpp2
-rw-r--r--src/declarative/qml/parser/qdeclarativejslexer_p.h2
-rw-r--r--src/declarative/qml/parser/qdeclarativejsmemorypool_p.h2
-rw-r--r--src/declarative/qml/parser/qdeclarativejsparser.cpp2
-rw-r--r--src/declarative/qml/parser/qdeclarativejsparser_p.h2
-rw-r--r--src/declarative/qml/qdeclarative.h3
-rw-r--r--src/declarative/qml/qdeclarativeaccessors.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeaccessors_p.h2
-rw-r--r--src/declarative/qml/qdeclarativeapplication.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeapplication_p.h3
-rw-r--r--src/declarative/qml/qdeclarativebinding.cpp9
-rw-r--r--src/declarative/qml/qdeclarativebinding_p.h2
-rw-r--r--src/declarative/qml/qdeclarativebinding_p_p.h2
-rw-r--r--src/declarative/qml/qdeclarativeboundsignal.cpp4
-rw-r--r--src/declarative/qml/qdeclarativeboundsignal_p.h2
-rw-r--r--src/declarative/qml/qdeclarativecleanup.cpp2
-rw-r--r--src/declarative/qml/qdeclarativecleanup_p.h2
-rw-r--r--src/declarative/qml/qdeclarativecompileddata.cpp2
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp43
-rw-r--r--src/declarative/qml/qdeclarativecompiler_p.h2
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp4
-rw-r--r--src/declarative/qml/qdeclarativecomponent.h3
-rw-r--r--src/declarative/qml/qdeclarativecomponent_p.h2
-rw-r--r--src/declarative/qml/qdeclarativecomponentattached_p.h3
-rw-r--r--src/declarative/qml/qdeclarativecontext.cpp2
-rw-r--r--src/declarative/qml/qdeclarativecontext.h3
-rw-r--r--src/declarative/qml/qdeclarativecontext_p.h2
-rw-r--r--src/declarative/qml/qdeclarativecustomparser.cpp2
-rw-r--r--src/declarative/qml/qdeclarativecustomparser_p.h3
-rw-r--r--src/declarative/qml/qdeclarativecustomparser_p_p.h2
-rw-r--r--src/declarative/qml/qdeclarativedata_p.h2
-rw-r--r--src/declarative/qml/qdeclarativedirparser.cpp21
-rw-r--r--src/declarative/qml/qdeclarativedirparser_p.h19
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp4
-rw-r--r--src/declarative/qml/qdeclarativeengine.h3
-rw-r--r--src/declarative/qml/qdeclarativeengine_p.h2
-rw-r--r--src/declarative/qml/qdeclarativeerror.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeerror.h3
-rw-r--r--src/declarative/qml/qdeclarativeexpression.cpp28
-rw-r--r--src/declarative/qml/qdeclarativeexpression.h8
-rw-r--r--src/declarative/qml/qdeclarativeexpression_p.h7
-rw-r--r--src/declarative/qml/qdeclarativeextensioninterface.h3
-rw-r--r--src/declarative/qml/qdeclarativeextensionplugin.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeextensionplugin.h3
-rw-r--r--src/declarative/qml/qdeclarativeglobal_p.h3
-rw-r--r--src/declarative/qml/qdeclarativeguard_p.h2
-rw-r--r--src/declarative/qml/qdeclarativeimageprovider.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeimageprovider.h3
-rw-r--r--src/declarative/qml/qdeclarativeimport.cpp116
-rw-r--r--src/declarative/qml/qdeclarativeimport_p.h11
-rw-r--r--src/declarative/qml/qdeclarativeincubator.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeincubator.h3
-rw-r--r--src/declarative/qml/qdeclarativeincubator_p.h2
-rw-r--r--src/declarative/qml/qdeclarativeinfo.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeinfo.h4
-rw-r--r--src/declarative/qml/qdeclarativeinstruction.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeinstruction_p.h11
-rw-r--r--src/declarative/qml/qdeclarativeintegercache.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeintegercache_p.h2
-rw-r--r--src/declarative/qml/qdeclarativelist.cpp4
-rw-r--r--src/declarative/qml/qdeclarativelist.h3
-rw-r--r--src/declarative/qml/qdeclarativelist_p.h4
-rw-r--r--src/declarative/qml/qdeclarativelistmodel.cpp2
-rw-r--r--src/declarative/qml/qdeclarativelistmodel_p.h3
-rw-r--r--src/declarative/qml/qdeclarativelistmodel_p_p.h3
-rw-r--r--src/declarative/qml/qdeclarativelistmodelworkeragent.cpp9
-rw-r--r--src/declarative/qml/qdeclarativelistmodelworkeragent_p.h5
-rw-r--r--src/declarative/qml/qdeclarativelocale.cpp6
-rw-r--r--src/declarative/qml/qdeclarativelocale_p.h3
-rw-r--r--src/declarative/qml/qdeclarativemetatype.cpp2
-rw-r--r--src/declarative/qml/qdeclarativemetatype_p.h2
-rw-r--r--src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp2
-rw-r--r--src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.h3
-rw-r--r--src/declarative/qml/qdeclarativenotifier.cpp2
-rw-r--r--src/declarative/qml/qdeclarativenotifier_p.h2
-rw-r--r--src/declarative/qml/qdeclarativenullablevalue_p_p.h2
-rw-r--r--src/declarative/qml/qdeclarativeopenmetaobject.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeopenmetaobject_p.h3
-rw-r--r--src/declarative/qml/qdeclarativeparserstatus.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeparserstatus.h3
-rw-r--r--src/declarative/qml/qdeclarativeprivate.h3
-rw-r--r--src/declarative/qml/qdeclarativeproperty.cpp30
-rw-r--r--src/declarative/qml/qdeclarativeproperty.h3
-rw-r--r--src/declarative/qml/qdeclarativeproperty_p.h2
-rw-r--r--src/declarative/qml/qdeclarativepropertycache.cpp2
-rw-r--r--src/declarative/qml/qdeclarativepropertycache_p.h2
-rw-r--r--src/declarative/qml/qdeclarativepropertyvalueinterceptor.cpp2
-rw-r--r--src/declarative/qml/qdeclarativepropertyvalueinterceptor_p.h2
-rw-r--r--src/declarative/qml/qdeclarativepropertyvaluesource.cpp2
-rw-r--r--src/declarative/qml/qdeclarativepropertyvaluesource.h3
-rw-r--r--src/declarative/qml/qdeclarativeproxymetaobject.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeproxymetaobject_p.h3
-rw-r--r--src/declarative/qml/qdeclarativerewrite.cpp2
-rw-r--r--src/declarative/qml/qdeclarativerewrite_p.h2
-rw-r--r--src/declarative/qml/qdeclarativescript.cpp27
-rw-r--r--src/declarative/qml/qdeclarativescript_p.h3
-rw-r--r--src/declarative/qml/qdeclarativescriptstring.cpp2
-rw-r--r--src/declarative/qml/qdeclarativescriptstring.h3
-rw-r--r--src/declarative/qml/qdeclarativescriptstring_p.h5
-rw-r--r--src/declarative/qml/qdeclarativesqldatabase.cpp2
-rw-r--r--src/declarative/qml/qdeclarativesqldatabase_p.h2
-rw-r--r--src/declarative/qml/qdeclarativestringconverters.cpp2
-rw-r--r--src/declarative/qml/qdeclarativestringconverters_p.h2
-rw-r--r--src/declarative/qml/qdeclarativetypeloader.cpp28
-rw-r--r--src/declarative/qml/qdeclarativetypeloader_p.h5
-rw-r--r--src/declarative/qml/qdeclarativetypenamecache.cpp72
-rw-r--r--src/declarative/qml/qdeclarativetypenamecache_p.h34
-rw-r--r--src/declarative/qml/qdeclarativetypenotavailable.cpp4
-rw-r--r--src/declarative/qml/qdeclarativetypenotavailable_p.h3
-rw-r--r--src/declarative/qml/qdeclarativevaluetype.cpp2
-rw-r--r--src/declarative/qml/qdeclarativevaluetype_p.h2
-rw-r--r--src/declarative/qml/qdeclarativevme.cpp5
-rw-r--r--src/declarative/qml/qdeclarativevme_p.h2
-rw-r--r--src/declarative/qml/qdeclarativevmemetaobject.cpp2
-rw-r--r--src/declarative/qml/qdeclarativevmemetaobject_p.h2
-rw-r--r--src/declarative/qml/qdeclarativewatcher.cpp2
-rw-r--r--src/declarative/qml/qdeclarativewatcher_p.h2
-rw-r--r--src/declarative/qml/qdeclarativeworkerscript.cpp6
-rw-r--r--src/declarative/qml/qdeclarativeworkerscript_p.h3
-rw-r--r--src/declarative/qml/qdeclarativexmlhttprequest.cpp2
-rw-r--r--src/declarative/qml/qdeclarativexmlhttprequest_p.h2
-rw-r--r--src/declarative/qml/qlistmodelinterface.cpp2
-rw-r--r--src/declarative/qml/qlistmodelinterface_p.h3
-rw-r--r--src/declarative/qml/rewriter/textwriter.cpp2
-rw-r--r--src/declarative/qml/rewriter/textwriter_p.h2
-rw-r--r--src/declarative/qml/v4/qv4bindings.cpp18
-rw-r--r--src/declarative/qml/v4/qv4bindings_p.h2
-rw-r--r--src/declarative/qml/v4/qv4compiler.cpp2
-rw-r--r--src/declarative/qml/v4/qv4compiler_p.h2
-rw-r--r--src/declarative/qml/v4/qv4compiler_p_p.h2
-rw-r--r--src/declarative/qml/v4/qv4instruction.cpp2
-rw-r--r--src/declarative/qml/v4/qv4instruction_p.h2
-rw-r--r--src/declarative/qml/v4/qv4ir.cpp2
-rw-r--r--src/declarative/qml/v4/qv4ir_p.h2
-rw-r--r--src/declarative/qml/v4/qv4irbuilder.cpp2
-rw-r--r--src/declarative/qml/v4/qv4irbuilder_p.h2
-rw-r--r--src/declarative/qml/v4/qv4program_p.h2
-rw-r--r--src/declarative/qml/v8/qdeclarativebuiltinfunctions.cpp120
-rw-r--r--src/declarative/qml/v8/qdeclarativebuiltinfunctions_p.h5
-rw-r--r--src/declarative/qml/v8/qjsconverter_impl_p.h2
-rw-r--r--src/declarative/qml/v8/qjsconverter_p.h4
-rw-r--r--src/declarative/qml/v8/qjsengine.cpp44
-rw-r--r--src/declarative/qml/v8/qjsengine.h44
-rw-r--r--src/declarative/qml/v8/qjsengine_p.h4
-rw-r--r--src/declarative/qml/v8/qjsvalue.cpp230
-rw-r--r--src/declarative/qml/v8/qjsvalue.h68
-rw-r--r--src/declarative/qml/v8/qjsvalue_impl_p.h32
-rw-r--r--src/declarative/qml/v8/qjsvalue_p.h12
-rw-r--r--src/declarative/qml/v8/qjsvalueiterator.cpp4
-rw-r--r--src/declarative/qml/v8/qjsvalueiterator.h5
-rw-r--r--src/declarative/qml/v8/qjsvalueiterator_impl_p.h4
-rw-r--r--src/declarative/qml/v8/qjsvalueiterator_p.h4
-rw-r--r--src/declarative/qml/v8/qscript_impl_p.h4
-rw-r--r--src/declarative/qml/v8/qscriptisolate_p.h4
-rw-r--r--src/declarative/qml/v8/qscriptoriginalglobalobject_p.h4
-rw-r--r--src/declarative/qml/v8/qscriptshareddata_p.h4
-rw-r--r--src/declarative/qml/v8/qscripttools_p.h4
-rw-r--r--src/declarative/qml/v8/qv8_p.h2
-rw-r--r--src/declarative/qml/v8/qv8bindings.cpp2
-rw-r--r--src/declarative/qml/v8/qv8bindings_p.h2
-rw-r--r--src/declarative/qml/v8/qv8contextwrapper.cpp2
-rw-r--r--src/declarative/qml/v8/qv8contextwrapper_p.h2
-rw-r--r--src/declarative/qml/v8/qv8debug_p.h2
-rw-r--r--src/declarative/qml/v8/qv8domerrors.cpp2
-rw-r--r--src/declarative/qml/v8/qv8domerrors_p.h2
-rw-r--r--src/declarative/qml/v8/qv8engine.cpp35
-rw-r--r--src/declarative/qml/v8/qv8engine_impl_p.h4
-rw-r--r--src/declarative/qml/v8/qv8engine_p.h7
-rw-r--r--src/declarative/qml/v8/qv8include.cpp2
-rw-r--r--src/declarative/qml/v8/qv8include_p.h2
-rw-r--r--src/declarative/qml/v8/qv8listwrapper.cpp2
-rw-r--r--src/declarative/qml/v8/qv8listwrapper_p.h2
-rw-r--r--src/declarative/qml/v8/qv8profiler_p.h2
-rw-r--r--src/declarative/qml/v8/qv8qobjectwrapper.cpp5
-rw-r--r--src/declarative/qml/v8/qv8qobjectwrapper_p.h2
-rw-r--r--src/declarative/qml/v8/qv8sequencewrapper.cpp2
-rw-r--r--src/declarative/qml/v8/qv8sequencewrapper_p.h2
-rw-r--r--src/declarative/qml/v8/qv8sequencewrapper_p_p.h8
-rw-r--r--src/declarative/qml/v8/qv8stringwrapper.cpp2
-rw-r--r--src/declarative/qml/v8/qv8stringwrapper_p.h2
-rw-r--r--src/declarative/qml/v8/qv8typewrapper.cpp13
-rw-r--r--src/declarative/qml/v8/qv8typewrapper_p.h2
-rw-r--r--src/declarative/qml/v8/qv8valuetypewrapper.cpp5
-rw-r--r--src/declarative/qml/v8/qv8valuetypewrapper_p.h2
-rw-r--r--src/declarative/qml/v8/qv8variantresource_p.h2
-rw-r--r--src/declarative/qml/v8/qv8variantwrapper.cpp2
-rw-r--r--src/declarative/qml/v8/qv8variantwrapper_p.h2
-rw-r--r--src/declarative/qml/v8/qv8worker.cpp2
-rw-r--r--src/declarative/qml/v8/qv8worker_p.h2
-rw-r--r--src/declarative/util/qdeclarativepropertymap.cpp2
-rw-r--r--src/declarative/util/qdeclarativepropertymap.h3
-rw-r--r--src/imports/etcprovider/plugin.cpp4
-rw-r--r--src/imports/etcprovider/plugin.h5
-rw-r--r--src/imports/etcprovider/qetcprovider.cpp2
-rw-r--r--src/imports/etcprovider/qetcprovider.h3
-rw-r--r--src/imports/folderlistmodel/plugin.cpp2
-rw-r--r--src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp2
-rw-r--r--src/imports/folderlistmodel/qdeclarativefolderlistmodel.h3
-rw-r--r--src/imports/gestures/plugin.cpp2
-rw-r--r--src/imports/gestures/qdeclarativegesturearea.cpp2
-rw-r--r--src/imports/gestures/qdeclarativegesturearea_p.h3
-rw-r--r--src/imports/particles/V1/qdeclarativeparticles.cpp2
-rw-r--r--src/imports/particles/V1/qdeclarativeparticles_p.h3
-rw-r--r--src/imports/particles/particles.cpp4
-rw-r--r--src/imports/qt47/plugin.cpp2
-rw-r--r--src/imports/qt47/qt47.pro10
-rw-r--r--src/imports/qtquick1/plugin.cpp2
-rw-r--r--src/imports/qtquick1/qtquick1.pro10
-rw-r--r--src/imports/qtquick2/plugin.cpp2
-rw-r--r--src/imports/testlib/SignalSpy.qml4
-rw-r--r--src/imports/testlib/TestCase.qml12
-rw-r--r--src/imports/testlib/main.cpp4
-rw-r--r--src/imports/testlib/signalspy.h4
-rw-r--r--src/imports/testlib/signalspy.qdoc4
-rw-r--r--src/imports/testlib/testcase.h4
-rw-r--r--src/imports/testlib/testcase.qdoc4
-rw-r--r--src/imports/testlib/testlogger.js4
-rw-r--r--src/imports/xmllistmodel/plugin.cpp2
-rw-r--r--src/imports/xmllistmodel/qdeclarativexmllistmodel.cpp2
-rw-r--r--src/imports/xmllistmodel/qdeclarativexmllistmodel_p.h3
-rw-r--r--src/plugins/accessible/qtquick1/main.cpp2
-rw-r--r--src/plugins/accessible/qtquick1/qaccessibledeclarativeitem.cpp2
-rw-r--r--src/plugins/accessible/qtquick1/qaccessibledeclarativeitem.h2
-rw-r--r--src/plugins/accessible/qtquick1/qaccessibledeclarativeview.cpp2
-rw-r--r--src/plugins/accessible/qtquick1/qaccessibledeclarativeview.h2
-rw-r--r--src/plugins/accessible/quick/main.cpp2
-rw-r--r--src/plugins/accessible/quick/qaccessiblequickitem.cpp11
-rw-r--r--src/plugins/accessible/quick/qaccessiblequickitem.h2
-rw-r--r--src/plugins/accessible/quick/qaccessiblequickview.cpp2
-rw-r--r--src/plugins/accessible/quick/qaccessiblequickview.h2
-rw-r--r--src/plugins/accessible/shared/qdeclarativeaccessible.cpp7
-rw-r--r--src/plugins/accessible/shared/qdeclarativeaccessible.h3
-rw-r--r--src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_ost/qostdevice.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_ost/usbostcomm.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/abstractliveedittool.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/abstractliveedittool.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/boundingrecthighlighter.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/boundingrecthighlighter.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/colorpickertool.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/colorpickertool.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/livelayeritem.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/livelayeritem.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/liverubberbandselectionmanipulator.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/liverubberbandselectionmanipulator.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/liveselectionindicator.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/liveselectionindicator.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/liveselectionrectangle.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/liveselectionrectangle.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/liveselectiontool.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/liveselectiontool.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/livesingleselectionmanipulator.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/livesingleselectionmanipulator.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/qdeclarativeviewinspector.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/qdeclarativeviewinspector.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/qdeclarativeviewinspector_p.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/qtquick1plugin.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/qtquick1plugin.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/subcomponentmasklayeritem.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/subcomponentmasklayeritem.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/zoomtool.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick1/zoomtool.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick2/highlight.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick2/highlight.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.h2
-rw-r--r--src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp2
-rw-r--r--src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h2
-rw-r--r--src/plugins/qmltooling/shared/abstracttool.cpp2
-rw-r--r--src/plugins/qmltooling/shared/abstracttool.h2
-rw-r--r--src/plugins/qmltooling/shared/abstractviewinspector.cpp2
-rw-r--r--src/plugins/qmltooling/shared/abstractviewinspector.h2
-rw-r--r--src/plugins/qmltooling/shared/qdeclarativeinspectorprotocol.h2
-rw-r--r--src/plugins/qmltooling/shared/qmlinspectorconstants.h2
-rw-r--r--src/qmltest/qtestoptions_p.h5
-rw-r--r--src/qmltest/quicktest.cpp4
-rw-r--r--src/qmltest/quicktest.h4
-rw-r--r--src/qmltest/quicktestevent.cpp4
-rw-r--r--src/qmltest/quicktestevent_p.h2
-rw-r--r--src/qmltest/quicktestglobal.h4
-rw-r--r--src/qmltest/quicktestresult.cpp14
-rw-r--r--src/qmltest/quicktestresult_p.h4
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeaccessibleattached.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeaccessibleattached_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeanchors.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeanchors_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeanchors_p_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeanimatedimage.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeanimatedimage_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeanimatedimage_p_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeborderimage.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeborderimage_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeborderimage_p_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeevents.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeevents_p_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeflickable.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeflickable_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeflickable_p_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeflipable.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeflipable_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativefocuspanel.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativefocuspanel_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativefocusscope.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativefocusscope_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativegraphicswidget.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativegraphicswidget_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativegridview.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativegridview_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeimage.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeimage_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeimage_p_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeimagebase.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeimagebase_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeimagebase_p_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeimplicitsizeitem.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeimplicitsizeitem_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeimplicitsizeitem_p_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeitem.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeitem.h4
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeitem_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeitemchangelistener_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeitemsmodule.cpp4
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeitemsmodule_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativelayoutitem.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativelayoutitem_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativelistview.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativelistview_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeloader.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeloader_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeloader_p_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativemousearea.cpp7
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativemousearea_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativemousearea_p_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativepainteditem.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativepainteditem_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativepainteditem_p_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativepath.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativepath_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativepath_p_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativepathview.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativepathview_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativepathview_p_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativepincharea.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativepincharea_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativepincharea_p_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativepositioners.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativepositioners_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativepositioners_p_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativerectangle.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativerectangle_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativerectangle_p_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativerepeater.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativerepeater_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativerepeater_p_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativescalegrid.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativescalegrid_p_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativetext.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativetext_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativetext_p_p.h2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativetextedit.cpp12
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativetextedit_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativetextedit_p_p.h7
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativetextinput.cpp12
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativetextinput_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativetextinput_p_p.h7
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativetextlayout.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativetextlayout_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativetranslate.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativetranslate_p.h3
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativevisualitemmodel.cpp2
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativevisualitemmodel_p.h3
-rw-r--r--src/qtquick1/qtquick1.cpp2
-rw-r--r--src/qtquick1/qtquick1.pro10
-rw-r--r--src/qtquick1/qtquick1_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativeanimation.cpp4
-rw-r--r--src/qtquick1/util/qdeclarativeanimation_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativeanimation_p_p.h2
-rw-r--r--src/qtquick1/util/qdeclarativeapplication.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativeapplication_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativebehavior.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativebehavior_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativebind.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativebind_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativeconnections.cpp4
-rw-r--r--src/qtquick1/util/qdeclarativeconnections_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativefontloader.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativefontloader_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativelistaccessor.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativelistaccessor_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativelistmodel.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativelistmodel_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativelistmodel_p_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativelistmodelworkeragent.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativelistmodelworkeragent_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativeopenmetaobject.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativeopenmetaobject_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativepackage.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativepackage_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativepixmapcache.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativepixmapcache_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativepropertychanges.cpp8
-rw-r--r--src/qtquick1/util/qdeclarativepropertychanges_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativesmoothedanimation.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativesmoothedanimation_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativesmoothedanimation_p_p.h2
-rw-r--r--src/qtquick1/util/qdeclarativespringanimation.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativespringanimation_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativestate.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativestate_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativestate_p_p.h2
-rw-r--r--src/qtquick1/util/qdeclarativestategroup.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativestategroup_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativestateoperations.cpp4
-rw-r--r--src/qtquick1/util/qdeclarativestateoperations_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativestyledtext.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativestyledtext_p.h2
-rw-r--r--src/qtquick1/util/qdeclarativesystempalette.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativesystempalette_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativetimeline.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativetimeline_p_p.h2
-rw-r--r--src/qtquick1/util/qdeclarativetimer.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativetimer_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativetransition.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativetransition_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativetransitionmanager.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativetransitionmanager_p_p.h2
-rw-r--r--src/qtquick1/util/qdeclarativeutilmodule.cpp4
-rw-r--r--src/qtquick1/util/qdeclarativeutilmodule_p.h3
-rw-r--r--src/qtquick1/util/qdeclarativeview.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativeview.h3
-rw-r--r--src/qtquick1/util/qdeclarativexmllistmodel.cpp2
-rw-r--r--src/qtquick1/util/qdeclarativexmllistmodel_p.h3
-rw-r--r--src/quick/designer/designersupport.cpp2
-rw-r--r--src/quick/designer/designersupport.h2
-rwxr-xr-xsrc/quick/items/checksync.pl2
-rw-r--r--src/quick/items/context2d/qquickcanvasitem.cpp4
-rw-r--r--src/quick/items/context2d/qquickcanvasitem_p.h4
-rw-r--r--src/quick/items/context2d/qquickcontext2d.cpp4
-rw-r--r--src/quick/items/context2d/qquickcontext2d_p.h4
-rw-r--r--src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp4
-rw-r--r--src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h4
-rw-r--r--src/quick/items/context2d/qquickcontext2dnode.cpp4
-rw-r--r--src/quick/items/context2d/qquickcontext2dnode_p.h4
-rw-r--r--src/quick/items/context2d/qquickcontext2dtexture.cpp2
-rw-r--r--src/quick/items/context2d/qquickcontext2dtexture_p.h4
-rw-r--r--src/quick/items/context2d/qquickcontext2dtile.cpp4
-rw-r--r--src/quick/items/context2d/qquickcontext2dtile_p.h4
-rw-r--r--src/quick/items/qquickaccessibleattached.cpp2
-rw-r--r--src/quick/items/qquickaccessibleattached_p.h3
-rw-r--r--src/quick/items/qquickanchors.cpp2
-rw-r--r--src/quick/items/qquickanchors_p.h2
-rw-r--r--src/quick/items/qquickanchors_p_p.h2
-rw-r--r--src/quick/items/qquickanimatedimage.cpp2
-rw-r--r--src/quick/items/qquickanimatedimage_p.h2
-rw-r--r--src/quick/items/qquickanimatedimage_p_p.h2
-rw-r--r--src/quick/items/qquickanimation.cpp4
-rw-r--r--src/quick/items/qquickanimation_p.h4
-rw-r--r--src/quick/items/qquickanimation_p_p.h4
-rw-r--r--src/quick/items/qquickborderimage.cpp2
-rw-r--r--src/quick/items/qquickborderimage_p.h2
-rw-r--r--src/quick/items/qquickborderimage_p_p.h2
-rw-r--r--src/quick/items/qquickcanvas.cpp9
-rw-r--r--src/quick/items/qquickcanvas.h4
-rw-r--r--src/quick/items/qquickcanvas_p.h4
-rw-r--r--src/quick/items/qquickclipnode.cpp4
-rw-r--r--src/quick/items/qquickclipnode_p.h4
-rw-r--r--src/quick/items/qquickdrag.cpp2
-rw-r--r--src/quick/items/qquickdrag_p.h2
-rw-r--r--src/quick/items/qquickdroparea.cpp2
-rw-r--r--src/quick/items/qquickdroparea_p.h2
-rw-r--r--src/quick/items/qquickevents.cpp2
-rw-r--r--src/quick/items/qquickevents_p_p.h2
-rw-r--r--src/quick/items/qquickflickable.cpp2
-rw-r--r--src/quick/items/qquickflickable_p.h2
-rw-r--r--src/quick/items/qquickflickable_p_p.h2
-rw-r--r--src/quick/items/qquickflipable.cpp2
-rw-r--r--src/quick/items/qquickflipable_p.h2
-rw-r--r--src/quick/items/qquickfocusscope.cpp2
-rw-r--r--src/quick/items/qquickfocusscope_p.h2
-rw-r--r--src/quick/items/qquickgridview.cpp104
-rw-r--r--src/quick/items/qquickgridview_p.h2
-rw-r--r--src/quick/items/qquickimage.cpp2
-rw-r--r--src/quick/items/qquickimage_p.h2
-rw-r--r--src/quick/items/qquickimage_p_p.h2
-rw-r--r--src/quick/items/qquickimagebase.cpp2
-rw-r--r--src/quick/items/qquickimagebase_p.h2
-rw-r--r--src/quick/items/qquickimagebase_p_p.h2
-rw-r--r--src/quick/items/qquickimplicitsizeitem.cpp2
-rw-r--r--src/quick/items/qquickimplicitsizeitem_p.h2
-rw-r--r--src/quick/items/qquickimplicitsizeitem_p_p.h2
-rw-r--r--src/quick/items/qquickitem.cpp5
-rw-r--r--src/quick/items/qquickitem.h2
-rw-r--r--src/quick/items/qquickitem_p.h2
-rw-r--r--src/quick/items/qquickitemchangelistener_p.h2
-rw-r--r--src/quick/items/qquickitemsmodule.cpp4
-rw-r--r--src/quick/items/qquickitemsmodule_p.h2
-rw-r--r--src/quick/items/qquickitemview.cpp181
-rw-r--r--src/quick/items/qquickitemview_p.h2
-rw-r--r--src/quick/items/qquickitemview_p_p.h28
-rw-r--r--src/quick/items/qquicklistview.cpp82
-rw-r--r--src/quick/items/qquicklistview_p.h2
-rw-r--r--src/quick/items/qquickloader.cpp2
-rw-r--r--src/quick/items/qquickloader_p.h2
-rw-r--r--src/quick/items/qquickloader_p_p.h2
-rw-r--r--src/quick/items/qquickmousearea.cpp2
-rw-r--r--src/quick/items/qquickmousearea_p.h2
-rw-r--r--src/quick/items/qquickmousearea_p_p.h2
-rw-r--r--src/quick/items/qquickmultipointtoucharea.cpp2
-rw-r--r--src/quick/items/qquickmultipointtoucharea_p.h2
-rw-r--r--src/quick/items/qquickninepatchnode.cpp4
-rw-r--r--src/quick/items/qquickninepatchnode_p.h4
-rw-r--r--src/quick/items/qquickpainteditem.cpp2
-rw-r--r--src/quick/items/qquickpainteditem.h2
-rw-r--r--src/quick/items/qquickpainteditem_p.h2
-rw-r--r--src/quick/items/qquickpathview.cpp2
-rw-r--r--src/quick/items/qquickpathview_p.h2
-rw-r--r--src/quick/items/qquickpathview_p_p.h2
-rw-r--r--src/quick/items/qquickpincharea.cpp2
-rw-r--r--src/quick/items/qquickpincharea_p.h2
-rw-r--r--src/quick/items/qquickpincharea_p_p.h2
-rw-r--r--src/quick/items/qquickpositioners.cpp20
-rw-r--r--src/quick/items/qquickpositioners_p.h2
-rw-r--r--src/quick/items/qquickpositioners_p_p.h2
-rw-r--r--src/quick/items/qquickrectangle.cpp2
-rw-r--r--src/quick/items/qquickrectangle_p.h2
-rw-r--r--src/quick/items/qquickrectangle_p_p.h2
-rw-r--r--src/quick/items/qquickrepeater.cpp2
-rw-r--r--src/quick/items/qquickrepeater_p.h2
-rw-r--r--src/quick/items/qquickrepeater_p_p.h2
-rw-r--r--src/quick/items/qquickscalegrid.cpp2
-rw-r--r--src/quick/items/qquickscalegrid_p_p.h2
-rw-r--r--src/quick/items/qquickscreen.cpp33
-rw-r--r--src/quick/items/qquickscreen_p.h9
-rw-r--r--src/quick/items/qquickshadereffect.cpp86
-rw-r--r--src/quick/items/qquickshadereffect_p.h24
-rw-r--r--src/quick/items/qquickshadereffectmesh.cpp53
-rw-r--r--src/quick/items/qquickshadereffectmesh_p.h12
-rw-r--r--src/quick/items/qquickshadereffectnode.cpp96
-rw-r--r--src/quick/items/qquickshadereffectnode_p.h12
-rw-r--r--src/quick/items/qquickshadereffectsource.cpp4
-rw-r--r--src/quick/items/qquickshadereffectsource_p.h4
-rw-r--r--src/quick/items/qquicksprite.cpp18
-rw-r--r--src/quick/items/qquicksprite_p.h2
-rw-r--r--src/quick/items/qquickspriteengine.cpp247
-rw-r--r--src/quick/items/qquickspriteengine_p.h19
-rw-r--r--src/quick/items/qquickspriteimage.cpp139
-rw-r--r--src/quick/items/qquickspriteimage_p.h6
-rw-r--r--src/quick/items/qquickstateoperations.cpp4
-rw-r--r--src/quick/items/qquickstateoperations_p.h4
-rw-r--r--src/quick/items/qquicktext.cpp200
-rw-r--r--src/quick/items/qquicktext_p.h12
-rw-r--r--src/quick/items/qquicktext_p_p.h29
-rw-r--r--src/quick/items/qquicktextcontrol.cpp4
-rw-r--r--src/quick/items/qquicktextcontrol_p.h3
-rw-r--r--src/quick/items/qquicktextcontrol_p_p.h2
-rw-r--r--src/quick/items/qquicktextedit.cpp121
-rw-r--r--src/quick/items/qquicktextedit_p.h14
-rw-r--r--src/quick/items/qquicktextedit_p_p.h17
-rw-r--r--src/quick/items/qquicktextinput.cpp159
-rw-r--r--src/quick/items/qquicktextinput_p.h4
-rw-r--r--src/quick/items/qquicktextinput_p_p.h29
-rw-r--r--src/quick/items/qquicktextnode.cpp106
-rw-r--r--src/quick/items/qquicktextnode_p.h7
-rw-r--r--src/quick/items/qquicktranslate.cpp2
-rw-r--r--src/quick/items/qquicktranslate_p.h2
-rw-r--r--src/quick/items/qquickview.cpp4
-rw-r--r--src/quick/items/qquickview.h4
-rw-r--r--src/quick/items/qquickview_p.h2
-rw-r--r--src/quick/items/qquickvisualadaptormodel.cpp2
-rw-r--r--src/quick/items/qquickvisualadaptormodel_p.h2
-rw-r--r--src/quick/items/qquickvisualdatamodel.cpp6
-rw-r--r--src/quick/items/qquickvisualdatamodel_p.h2
-rw-r--r--src/quick/items/qquickvisualdatamodel_p_p.h2
-rw-r--r--src/quick/items/qquickvisualitemmodel.cpp2
-rw-r--r--src/quick/items/qquickvisualitemmodel_p.h2
-rw-r--r--src/quick/items/qquickwindowmanager.cpp4
-rw-r--r--src/quick/items/qquickwindowmanager_p.h4
-rw-r--r--src/quick/items/qquickwindowmodule.cpp2
-rw-r--r--src/quick/items/qquickwindowmodule_p.h3
-rw-r--r--src/quick/particles/qquickage.cpp2
-rw-r--r--src/quick/particles/qquickage_p.h2
-rw-r--r--src/quick/particles/qquickangledirection.cpp2
-rw-r--r--src/quick/particles/qquickangledirection_p.h2
-rw-r--r--src/quick/particles/qquickcumulativedirection.cpp2
-rw-r--r--src/quick/particles/qquickcumulativedirection_p.h2
-rw-r--r--src/quick/particles/qquickcustomaffector.cpp2
-rw-r--r--src/quick/particles/qquickcustomaffector_p.h2
-rw-r--r--src/quick/particles/qquickcustomparticle.cpp4
-rw-r--r--src/quick/particles/qquickcustomparticle_p.h4
-rw-r--r--src/quick/particles/qquickdirection.cpp2
-rw-r--r--src/quick/particles/qquickdirection_p.h2
-rw-r--r--src/quick/particles/qquickellipseextruder.cpp2
-rw-r--r--src/quick/particles/qquickellipseextruder_p.h2
-rw-r--r--src/quick/particles/qquickfriction.cpp2
-rw-r--r--src/quick/particles/qquickfriction_p.h2
-rw-r--r--src/quick/particles/qquickgravity.cpp2
-rw-r--r--src/quick/particles/qquickgravity_p.h2
-rw-r--r--src/quick/particles/qquickgroupgoal.cpp2
-rw-r--r--src/quick/particles/qquickgroupgoal_p.h2
-rw-r--r--src/quick/particles/qquickimageparticle.cpp153
-rw-r--r--src/quick/particles/qquickimageparticle_p.h18
-rw-r--r--src/quick/particles/qquickitemparticle.cpp2
-rw-r--r--src/quick/particles/qquickitemparticle_p.h2
-rw-r--r--src/quick/particles/qquicklineextruder.cpp2
-rw-r--r--src/quick/particles/qquicklineextruder_p.h2
-rw-r--r--src/quick/particles/qquickmaskextruder.cpp2
-rw-r--r--src/quick/particles/qquickmaskextruder_p.h2
-rw-r--r--src/quick/particles/qquickparticleaffector.cpp2
-rw-r--r--src/quick/particles/qquickparticleaffector_p.h2
-rw-r--r--src/quick/particles/qquickparticleemitter.cpp2
-rw-r--r--src/quick/particles/qquickparticleemitter_p.h2
-rw-r--r--src/quick/particles/qquickparticleextruder.cpp2
-rw-r--r--src/quick/particles/qquickparticleextruder_p.h2
-rw-r--r--src/quick/particles/qquickparticlegroup.cpp2
-rw-r--r--src/quick/particles/qquickparticlegroup_p.h2
-rw-r--r--src/quick/particles/qquickparticlepainter.cpp2
-rw-r--r--src/quick/particles/qquickparticlepainter_p.h2
-rw-r--r--src/quick/particles/qquickparticlesmodule.cpp2
-rw-r--r--src/quick/particles/qquickparticlesmodule_p.h2
-rw-r--r--src/quick/particles/qquickparticlesystem.cpp45
-rw-r--r--src/quick/particles/qquickparticlesystem_p.h5
-rw-r--r--src/quick/particles/qquickpointattractor.cpp2
-rw-r--r--src/quick/particles/qquickpointattractor_p.h2
-rw-r--r--src/quick/particles/qquickpointdirection.cpp2
-rw-r--r--src/quick/particles/qquickpointdirection_p.h2
-rw-r--r--src/quick/particles/qquickrectangleextruder.cpp2
-rw-r--r--src/quick/particles/qquickrectangleextruder_p.h2
-rw-r--r--src/quick/particles/qquickspritegoal.cpp2
-rw-r--r--src/quick/particles/qquickspritegoal_p.h2
-rw-r--r--src/quick/particles/qquicktargetdirection.cpp2
-rw-r--r--src/quick/particles/qquicktargetdirection_p.h2
-rw-r--r--src/quick/particles/qquicktrailemitter.cpp2
-rw-r--r--src/quick/particles/qquicktrailemitter_p.h2
-rw-r--r--src/quick/particles/qquickturbulence.cpp2
-rw-r--r--src/quick/particles/qquickturbulence_p.h2
-rw-r--r--src/quick/particles/qquickv8particledata.cpp4
-rw-r--r--src/quick/particles/qquickv8particledata_p.h2
-rw-r--r--src/quick/particles/qquickwander.cpp2
-rw-r--r--src/quick/particles/qquickwander_p.h2
-rw-r--r--src/quick/qtquick2.cpp8
-rw-r--r--src/quick/qtquick2_p.h2
-rw-r--r--src/quick/qtquickglobal.h4
-rw-r--r--src/quick/qtquickglobal_p.h2
-rw-r--r--src/quick/scenegraph/coreapi/qsgdefaultrenderer.cpp4
-rw-r--r--src/quick/scenegraph/coreapi/qsgdefaultrenderer_p.h4
-rw-r--r--src/quick/scenegraph/coreapi/qsggeometry.cpp4
-rw-r--r--src/quick/scenegraph/coreapi/qsggeometry.h4
-rw-r--r--src/quick/scenegraph/coreapi/qsggeometry_p.h2
-rw-r--r--src/quick/scenegraph/coreapi/qsgmaterial.cpp10
-rw-r--r--src/quick/scenegraph/coreapi/qsgmaterial.h8
-rw-r--r--src/quick/scenegraph/coreapi/qsgnode.cpp4
-rw-r--r--src/quick/scenegraph/coreapi/qsgnode.h4
-rw-r--r--src/quick/scenegraph/coreapi/qsgnodeupdater.cpp8
-rw-r--r--src/quick/scenegraph/coreapi/qsgnodeupdater_p.h4
-rw-r--r--src/quick/scenegraph/coreapi/qsgrenderer.cpp4
-rw-r--r--src/quick/scenegraph/coreapi/qsgrenderer_p.h4
-rw-r--r--src/quick/scenegraph/qsgadaptationlayer.cpp19
-rw-r--r--src/quick/scenegraph/qsgadaptationlayer_p.h15
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp40
-rw-r--r--src/quick/scenegraph/qsgcontext_p.h5
-rw-r--r--src/quick/scenegraph/qsgcontextplugin.cpp4
-rw-r--r--src/quick/scenegraph/qsgcontextplugin_p.h4
-rw-r--r--src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp4
-rw-r--r--src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h4
-rw-r--r--src/quick/scenegraph/qsgdefaultglyphnode.cpp4
-rw-r--r--src/quick/scenegraph/qsgdefaultglyphnode_p.cpp6
-rw-r--r--src/quick/scenegraph/qsgdefaultglyphnode_p.h4
-rw-r--r--src/quick/scenegraph/qsgdefaultglyphnode_p_p.h4
-rw-r--r--src/quick/scenegraph/qsgdefaultimagenode.cpp4
-rw-r--r--src/quick/scenegraph/qsgdefaultimagenode_p.h4
-rw-r--r--src/quick/scenegraph/qsgdefaultrectanglenode.cpp4
-rw-r--r--src/quick/scenegraph/qsgdefaultrectanglenode_p.h4
-rw-r--r--src/quick/scenegraph/qsgdistancefieldglyphnode.cpp18
-rw-r--r--src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp30
-rw-r--r--src/quick/scenegraph/qsgdistancefieldglyphnode_p.h5
-rw-r--r--src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h4
-rw-r--r--src/quick/scenegraph/qsgflashnode.cpp4
-rw-r--r--src/quick/scenegraph/qsgflashnode_p.h4
-rw-r--r--src/quick/scenegraph/qsgpathsimplifier.cpp4
-rw-r--r--src/quick/scenegraph/qsgpathsimplifier_p.h4
-rw-r--r--src/quick/scenegraph/qsgshareddistancefieldglyphcache.cpp621
-rw-r--r--src/quick/scenegraph/qsgshareddistancefieldglyphcache_p.h113
-rw-r--r--src/quick/scenegraph/scenegraph.pri7
-rw-r--r--src/quick/scenegraph/util/qsgareaallocator.cpp4
-rw-r--r--src/quick/scenegraph/util/qsgareaallocator_p.h4
-rw-r--r--src/quick/scenegraph/util/qsgdistancefieldutil.cpp4
-rw-r--r--src/quick/scenegraph/util/qsgdistancefieldutil_p.h4
-rw-r--r--src/quick/scenegraph/util/qsgengine.cpp8
-rw-r--r--src/quick/scenegraph/util/qsgengine.h4
-rw-r--r--src/quick/scenegraph/util/qsgflatcolormaterial.cpp4
-rw-r--r--src/quick/scenegraph/util/qsgflatcolormaterial.h4
-rw-r--r--src/quick/scenegraph/util/qsgpainternode.cpp4
-rw-r--r--src/quick/scenegraph/util/qsgpainternode_p.h4
-rw-r--r--src/quick/scenegraph/util/qsgsimplematerial.h4
-rw-r--r--src/quick/scenegraph/util/qsgsimplerectnode.cpp4
-rw-r--r--src/quick/scenegraph/util/qsgsimplerectnode.h4
-rw-r--r--src/quick/scenegraph/util/qsgsimpletexturenode.cpp4
-rw-r--r--src/quick/scenegraph/util/qsgsimpletexturenode.h4
-rw-r--r--src/quick/scenegraph/util/qsgtexture.cpp4
-rw-r--r--src/quick/scenegraph/util/qsgtexture.h4
-rw-r--r--src/quick/scenegraph/util/qsgtexture_p.h4
-rw-r--r--src/quick/scenegraph/util/qsgtexturematerial.cpp4
-rw-r--r--src/quick/scenegraph/util/qsgtexturematerial.h4
-rw-r--r--src/quick/scenegraph/util/qsgtexturematerial_p.h4
-rw-r--r--src/quick/scenegraph/util/qsgtextureprovider.cpp4
-rw-r--r--src/quick/scenegraph/util/qsgtextureprovider.h4
-rw-r--r--src/quick/scenegraph/util/qsgvertexcolormaterial.cpp4
-rw-r--r--src/quick/scenegraph/util/qsgvertexcolormaterial.h4
-rw-r--r--src/quick/util/qdeclarativeanimation.cpp2
-rw-r--r--src/quick/util/qdeclarativeanimation_p.h2
-rw-r--r--src/quick/util/qdeclarativeanimation_p_p.h2
-rw-r--r--src/quick/util/qdeclarativebehavior.cpp2
-rw-r--r--src/quick/util/qdeclarativebehavior_p.h2
-rw-r--r--src/quick/util/qdeclarativebind.cpp2
-rw-r--r--src/quick/util/qdeclarativebind_p.h2
-rw-r--r--src/quick/util/qdeclarativechangeset.cpp2
-rw-r--r--src/quick/util/qdeclarativechangeset_p.h2
-rw-r--r--src/quick/util/qdeclarativeconnections.cpp9
-rw-r--r--src/quick/util/qdeclarativeconnections_p.h2
-rw-r--r--src/quick/util/qdeclarativefontloader.cpp2
-rw-r--r--src/quick/util/qdeclarativefontloader_p.h2
-rw-r--r--src/quick/util/qdeclarativelistaccessor.cpp2
-rw-r--r--src/quick/util/qdeclarativelistaccessor_p.h2
-rw-r--r--src/quick/util/qdeclarativelistcompositor.cpp2
-rw-r--r--src/quick/util/qdeclarativelistcompositor_p.h2
-rw-r--r--src/quick/util/qdeclarativepackage.cpp2
-rw-r--r--src/quick/util/qdeclarativepackage_p.h2
-rw-r--r--src/quick/util/qdeclarativepath.cpp2
-rw-r--r--src/quick/util/qdeclarativepath_p.h2
-rw-r--r--src/quick/util/qdeclarativepath_p_p.h2
-rw-r--r--src/quick/util/qdeclarativepathinterpolator.cpp2
-rw-r--r--src/quick/util/qdeclarativepathinterpolator_p.h2
-rw-r--r--src/quick/util/qdeclarativepixmapcache.cpp2
-rw-r--r--src/quick/util/qdeclarativepixmapcache_p.h2
-rw-r--r--src/quick/util/qdeclarativepropertychanges.cpp8
-rw-r--r--src/quick/util/qdeclarativepropertychanges_p.h2
-rw-r--r--src/quick/util/qdeclarativesmoothedanimation.cpp2
-rw-r--r--src/quick/util/qdeclarativesmoothedanimation_p.h2
-rw-r--r--src/quick/util/qdeclarativesmoothedanimation_p_p.h2
-rw-r--r--src/quick/util/qdeclarativespringanimation.cpp2
-rw-r--r--src/quick/util/qdeclarativespringanimation_p.h2
-rw-r--r--src/quick/util/qdeclarativestate.cpp2
-rw-r--r--src/quick/util/qdeclarativestate_p.h2
-rw-r--r--src/quick/util/qdeclarativestate_p_p.h2
-rw-r--r--src/quick/util/qdeclarativestategroup.cpp2
-rw-r--r--src/quick/util/qdeclarativestategroup_p.h2
-rw-r--r--src/quick/util/qdeclarativestateoperations.cpp2
-rw-r--r--src/quick/util/qdeclarativestateoperations_p.h2
-rw-r--r--src/quick/util/qdeclarativestyledtext.cpp2
-rw-r--r--src/quick/util/qdeclarativestyledtext_p.h2
-rw-r--r--src/quick/util/qdeclarativesvgparser.cpp2
-rw-r--r--src/quick/util/qdeclarativesvgparser_p.h2
-rw-r--r--src/quick/util/qdeclarativesystempalette.cpp2
-rw-r--r--src/quick/util/qdeclarativesystempalette_p.h2
-rw-r--r--src/quick/util/qdeclarativetimeline.cpp2
-rw-r--r--src/quick/util/qdeclarativetimeline_p_p.h2
-rw-r--r--src/quick/util/qdeclarativetimer.cpp2
-rw-r--r--src/quick/util/qdeclarativetimer_p.h2
-rw-r--r--src/quick/util/qdeclarativetransition.cpp2
-rw-r--r--src/quick/util/qdeclarativetransition_p.h2
-rw-r--r--src/quick/util/qdeclarativetransitionmanager.cpp2
-rw-r--r--src/quick/util/qdeclarativetransitionmanager_p_p.h2
-rw-r--r--src/quick/util/qdeclarativeutilmodule.cpp2
-rw-r--r--src/quick/util/qdeclarativeutilmodule_p.h2
833 files changed, 4167 insertions, 2058 deletions
diff --git a/src/declarative/debugger/qdebugmessageservice.cpp b/src/declarative/debugger/qdebugmessageservice.cpp
index 1604e3524b..4e92603bdd 100644
--- a/src/declarative/debugger/qdebugmessageservice.cpp
+++ b/src/declarative/debugger/qdebugmessageservice.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -66,7 +66,7 @@ public:
QDebugMessageService::QDebugMessageService(QObject *parent) :
QDeclarativeDebugService(*(new QDebugMessageServicePrivate()),
- QLatin1String("DebugMessages"), 1, parent)
+ QLatin1String("DebugMessages"), 2, parent)
{
Q_D(QDebugMessageService);
@@ -89,13 +89,9 @@ void QDebugMessageService::sendDebugMessage(QtMsgType type, const char *buf)
//We do not want to alter the message handling mechanism
//We just eavesdrop and forward the messages to a port
//only if a client is connected to it.
- QByteArray debugMessage;
- QDataStream rs(&debugMessage, QIODevice::WriteOnly);
- rs << type << QString::fromLocal8Bit(buf).toUtf8();
-
QByteArray message;
QDataStream ws(&message, QIODevice::WriteOnly);
- ws << QByteArray("MESSAGE") << debugMessage;
+ ws << QByteArray("MESSAGE") << type << QString::fromLocal8Bit(buf).toUtf8();
sendMessage(message);
if (d->oldMsgHandler)
diff --git a/src/declarative/debugger/qdebugmessageservice_p.h b/src/declarative/debugger/qdebugmessageservice_p.h
index c2951e61ae..f4c25fbf31 100644
--- a/src/declarative/debugger/qdebugmessageservice_p.h
+++ b/src/declarative/debugger/qdebugmessageservice_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/debugger/qdeclarativedebug.h b/src/declarative/debugger/qdeclarativedebug.h
index 8b0a65c251..a75ebf990c 100644
--- a/src/declarative/debugger/qdeclarativedebug.h
+++ b/src/declarative/debugger/qdeclarativedebug.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
struct Q_DECLARATIVE_EXPORT QDeclarativeDebuggingEnabler
{
diff --git a/src/declarative/debugger/qdeclarativedebugclient.cpp b/src/declarative/debugger/qdeclarativedebugclient.cpp
index 474b153fa9..e841003c62 100644
--- a/src/declarative/debugger/qdeclarativedebugclient.cpp
+++ b/src/declarative/debugger/qdeclarativedebugclient.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/debugger/qdeclarativedebugclient_p.h b/src/declarative/debugger/qdeclarativedebugclient_p.h
index a1b7297b5d..4a8b0d2676 100644
--- a/src/declarative/debugger/qdeclarativedebugclient_p.h
+++ b/src/declarative/debugger/qdeclarativedebugclient_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -61,7 +61,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeDebugConnectionPrivate;
class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugConnection : public QIODevice
diff --git a/src/declarative/debugger/qdeclarativedebughelper.cpp b/src/declarative/debugger/qdeclarativedebughelper.cpp
index f14dfe78c6..3473e0bd36 100644
--- a/src/declarative/debugger/qdeclarativedebughelper.cpp
+++ b/src/declarative/debugger/qdeclarativedebughelper.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/debugger/qdeclarativedebughelper_p.h b/src/declarative/debugger/qdeclarativedebughelper_p.h
index f075f59ba0..8a2dc814fd 100644
--- a/src/declarative/debugger/qdeclarativedebughelper_p.h
+++ b/src/declarative/debugger/qdeclarativedebughelper_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/debugger/qdeclarativedebugserver.cpp b/src/declarative/debugger/qdeclarativedebugserver.cpp
index fde72bb9b8..433ba2372b 100644
--- a/src/declarative/debugger/qdeclarativedebugserver.cpp
+++ b/src/declarative/debugger/qdeclarativedebugserver.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/debugger/qdeclarativedebugserver_p.h b/src/declarative/debugger/qdeclarativedebugserver_p.h
index 538d364cf1..a56c99b92c 100644
--- a/src/declarative/debugger/qdeclarativedebugserver_p.h
+++ b/src/declarative/debugger/qdeclarativedebugserver_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -60,7 +60,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeDebugService;
diff --git a/src/declarative/debugger/qdeclarativedebugserverconnection_p.h b/src/declarative/debugger/qdeclarativedebugserverconnection_p.h
index 1f237d26b0..1026f745b8 100644
--- a/src/declarative/debugger/qdeclarativedebugserverconnection_p.h
+++ b/src/declarative/debugger/qdeclarativedebugserverconnection_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -59,7 +59,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeDebugServer;
class Q_DECLARATIVE_EXPORT QDeclarativeDebugServerConnection
diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/declarative/debugger/qdeclarativedebugservice.cpp
index 76d9cfd1ed..2aea106d1b 100644
--- a/src/declarative/debugger/qdeclarativedebugservice.cpp
+++ b/src/declarative/debugger/qdeclarativedebugservice.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/debugger/qdeclarativedebugservice_p.h b/src/declarative/debugger/qdeclarativedebugservice_p.h
index a4c9d00d88..f67eda23e3 100644
--- a/src/declarative/debugger/qdeclarativedebugservice_p.h
+++ b/src/declarative/debugger/qdeclarativedebugservice_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -61,7 +61,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeDebugServicePrivate;
class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugService : public QObject
diff --git a/src/declarative/debugger/qdeclarativedebugservice_p_p.h b/src/declarative/debugger/qdeclarativedebugservice_p_p.h
index 14f5696090..03fea3f59d 100644
--- a/src/declarative/debugger/qdeclarativedebugservice_p_p.h
+++ b/src/declarative/debugger/qdeclarativedebugservice_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -60,7 +60,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeDebugServer;
diff --git a/src/declarative/debugger/qdeclarativedebugstatesdelegate_p.h b/src/declarative/debugger/qdeclarativedebugstatesdelegate_p.h
index 9c4d0949cc..678b63ba10 100644
--- a/src/declarative/debugger/qdeclarativedebugstatesdelegate_p.h
+++ b/src/declarative/debugger/qdeclarativedebugstatesdelegate_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -59,7 +59,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeContext;
class QDeclarativeProperty;
@@ -79,7 +78,7 @@ public:
virtual void updateBinding(QDeclarativeContext *context,
const QDeclarativeProperty &property,
const QVariant &expression, bool isLiteralValue,
- const QString &fileName, int line,
+ const QString &fileName, int line, int column,
bool *inBaseState) = 0;
virtual bool setBindingForInvalidProperty(QObject *object,
const QString &propertyName,
diff --git a/src/declarative/debugger/qdeclarativedebugtrace.cpp b/src/declarative/debugger/qdeclarativedebugtrace.cpp
index 60c02c4551..8e60164769 100644
--- a/src/declarative/debugger/qdeclarativedebugtrace.cpp
+++ b/src/declarative/debugger/qdeclarativedebugtrace.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -66,7 +66,7 @@ QByteArray QDeclarativeDebugData::toByteArray() const
if (messageType == (int)QDeclarativeDebugTrace::RangeData)
ds << detailData;
if (messageType == (int)QDeclarativeDebugTrace::RangeLocation)
- ds << detailData << line;
+ ds << detailData << line << column;
if (messageType == (int)QDeclarativeDebugTrace::Event &&
detailType == (int)QDeclarativeDebugTrace::AnimationFrame)
ds << framerate << animationcount;
@@ -128,14 +128,14 @@ void QDeclarativeDebugTrace::rangeData(RangeType t, const QUrl &data)
traceInstance()->rangeDataImpl(t, data);
}
-void QDeclarativeDebugTrace::rangeLocation(RangeType t, const QString &fileName, int line)
+void QDeclarativeDebugTrace::rangeLocation(RangeType t, const QString &fileName, int line, int column)
{
- traceInstance()->rangeLocationImpl(t, fileName, line);
+ traceInstance()->rangeLocationImpl(t, fileName, line, column);
}
-void QDeclarativeDebugTrace::rangeLocation(RangeType t, const QUrl &fileName, int line)
+void QDeclarativeDebugTrace::rangeLocation(RangeType t, const QUrl &fileName, int line, int column)
{
- traceInstance()->rangeLocationImpl(t, fileName, line);
+ traceInstance()->rangeLocationImpl(t, fileName, line, column);
}
void QDeclarativeDebugTrace::endRange(RangeType t)
@@ -180,7 +180,7 @@ void QDeclarativeDebugTrace::addEventImpl(EventType event)
if (!QDeclarativeDebugService::isDebuggingEnabled() || !m_enabled)
return;
- QDeclarativeDebugData ed = {m_timer.nsecsElapsed(), (int)Event, (int)event, QString(), -1, 0, 0};
+ QDeclarativeDebugData ed = {m_timer.nsecsElapsed(), (int)Event, (int)event, QString(), -1, -1, 0, 0};
processMessage(ed);
}
@@ -189,7 +189,7 @@ void QDeclarativeDebugTrace::startRangeImpl(RangeType range)
if (!QDeclarativeDebugService::isDebuggingEnabled() || !m_enabled)
return;
- QDeclarativeDebugData rd = {m_timer.nsecsElapsed(), (int)RangeStart, (int)range, QString(), -1, 0, 0};
+ QDeclarativeDebugData rd = {m_timer.nsecsElapsed(), (int)RangeStart, (int)range, QString(), -1, -1, 0, 0};
processMessage(rd);
}
@@ -198,7 +198,7 @@ void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QString &rData
if (!QDeclarativeDebugService::isDebuggingEnabled() || !m_enabled)
return;
- QDeclarativeDebugData rd = {m_timer.nsecsElapsed(), (int)RangeData, (int)range, rData, -1, 0, 0};
+ QDeclarativeDebugData rd = {m_timer.nsecsElapsed(), (int)RangeData, (int)range, rData, -1, -1, 0, 0};
processMessage(rd);
}
@@ -207,25 +207,25 @@ void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QUrl &rData)
if (!QDeclarativeDebugService::isDebuggingEnabled() || !m_enabled)
return;
- QDeclarativeDebugData rd = {m_timer.nsecsElapsed(), (int)RangeData, (int)range, rData.toString(QUrl::FormattingOption(0x100)), -1, 0, 0};
+ QDeclarativeDebugData rd = {m_timer.nsecsElapsed(), (int)RangeData, (int)range, rData.toString(QUrl::FormattingOption(0x100)), -1, -1, 0, 0};
processMessage(rd);
}
-void QDeclarativeDebugTrace::rangeLocationImpl(RangeType range, const QString &fileName, int line)
+void QDeclarativeDebugTrace::rangeLocationImpl(RangeType range, const QString &fileName, int line, int column)
{
if (!QDeclarativeDebugService::isDebuggingEnabled() || !m_enabled)
return;
- QDeclarativeDebugData rd = {m_timer.nsecsElapsed(), (int)RangeLocation, (int)range, fileName, line, 0, 0};
+ QDeclarativeDebugData rd = {m_timer.nsecsElapsed(), (int)RangeLocation, (int)range, fileName, line, column, 0, 0};
processMessage(rd);
}
-void QDeclarativeDebugTrace::rangeLocationImpl(RangeType range, const QUrl &fileName, int line)
+void QDeclarativeDebugTrace::rangeLocationImpl(RangeType range, const QUrl &fileName, int line, int column)
{
if (!QDeclarativeDebugService::isDebuggingEnabled() || !m_enabled)
return;
- QDeclarativeDebugData rd = {m_timer.nsecsElapsed(), (int)RangeLocation, (int)range, fileName.toString(QUrl::FormattingOption(0x100)), line, 0, 0};
+ QDeclarativeDebugData rd = {m_timer.nsecsElapsed(), (int)RangeLocation, (int)range, fileName.toString(QUrl::FormattingOption(0x100)), line, column, 0, 0};
processMessage(rd);
}
@@ -234,7 +234,7 @@ void QDeclarativeDebugTrace::endRangeImpl(RangeType range)
if (!QDeclarativeDebugService::isDebuggingEnabled() || !m_enabled)
return;
- QDeclarativeDebugData rd = {m_timer.nsecsElapsed(), (int)RangeEnd, (int)range, QString(), -1, 0, 0};
+ QDeclarativeDebugData rd = {m_timer.nsecsElapsed(), (int)RangeEnd, (int)range, QString(), -1, -1, 0, 0};
processMessage(rd);
}
@@ -249,7 +249,7 @@ void QDeclarativeDebugTrace::animationFrameImpl(qint64 delta)
if (animCount > 0 && delta > 0) {
// trim fps to integer
int fps = 1000 / delta;
- QDeclarativeDebugData ed = {m_timer.nsecsElapsed(), (int)Event, (int)AnimationFrame, QString(), -1, fps, animCount};
+ QDeclarativeDebugData ed = {m_timer.nsecsElapsed(), (int)Event, (int)AnimationFrame, QString(), -1, -1, fps, animCount};
processMessage(ed);
}
}
diff --git a/src/declarative/debugger/qdeclarativedebugtrace_p.h b/src/declarative/debugger/qdeclarativedebugtrace_p.h
index 8d15294d58..3ca529858d 100644
--- a/src/declarative/debugger/qdeclarativedebugtrace_p.h
+++ b/src/declarative/debugger/qdeclarativedebugtrace_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -71,6 +71,7 @@ struct Q_AUTOTEST_EXPORT QDeclarativeDebugData
//###
QString detailData; //used by RangeData and RangeLocation
int line; //used by RangeLocation
+ int column; //used by RangeLocation
int framerate; //used by animation events
int animationcount; //used by animation events
@@ -125,8 +126,8 @@ public:
static void startRange(RangeType);
static void rangeData(RangeType, const QString &);
static void rangeData(RangeType, const QUrl &);
- static void rangeLocation(RangeType, const QString &, int);
- static void rangeLocation(RangeType, const QUrl &, int);
+ static void rangeLocation(RangeType, const QString &, int, int);
+ static void rangeLocation(RangeType, const QUrl &, int, int);
static void endRange(RangeType);
static void animationFrame(qint64);
@@ -145,8 +146,8 @@ private:
void startRangeImpl(RangeType);
void rangeDataImpl(RangeType, const QString &);
void rangeDataImpl(RangeType, const QUrl &);
- void rangeLocationImpl(RangeType, const QString &, int);
- void rangeLocationImpl(RangeType, const QUrl &, int);
+ void rangeLocationImpl(RangeType, const QString &, int, int);
+ void rangeLocationImpl(RangeType, const QUrl &, int, int);
void endRangeImpl(RangeType);
void animationFrameImpl(qint64);
diff --git a/src/declarative/debugger/qdeclarativeenginedebug.cpp b/src/declarative/debugger/qdeclarativeenginedebug.cpp
index f61a2c0011..4c2e62cba3 100644
--- a/src/declarative/debugger/qdeclarativeenginedebug.cpp
+++ b/src/declarative/debugger/qdeclarativeenginedebug.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/debugger/qdeclarativeenginedebug_p.h b/src/declarative/debugger/qdeclarativeenginedebug_p.h
index f05f443f84..8c2667ec45 100644
--- a/src/declarative/debugger/qdeclarativeenginedebug_p.h
+++ b/src/declarative/debugger/qdeclarativeenginedebug_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -63,7 +63,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeDebugConnection;
class QDeclarativeDebugWatch;
diff --git a/src/declarative/debugger/qdeclarativeenginedebugservice.cpp b/src/declarative/debugger/qdeclarativeenginedebugservice.cpp
index fa23bc1024..c235b55480 100644
--- a/src/declarative/debugger/qdeclarativeenginedebugservice.cpp
+++ b/src/declarative/debugger/qdeclarativeenginedebugservice.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -540,7 +540,8 @@ void QDeclarativeEngineDebugService::setBinding(int objectId,
const QVariant &expression,
bool isLiteralValue,
QString filename,
- int line)
+ int line,
+ int column)
{
QObject *object = objectForId(objectId);
QDeclarativeContext *context = qmlContext(object);
@@ -552,7 +553,7 @@ void QDeclarativeEngineDebugService::setBinding(int objectId,
bool inBaseState = true;
if (m_statesDelegate) {
m_statesDelegate->updateBinding(context, property, expression, isLiteralValue,
- filename, line, &inBaseState);
+ filename, line, column, &inBaseState);
}
if (inBaseState) {
@@ -561,11 +562,11 @@ void QDeclarativeEngineDebugService::setBinding(int objectId,
} else if (hasValidSignal(object, propertyName)) {
QDeclarativeExpression *declarativeExpression = new QDeclarativeExpression(context, object, expression.toString());
QDeclarativePropertyPrivate::setSignalExpression(property, declarativeExpression);
- declarativeExpression->setSourceLocation(filename, line);
+ declarativeExpression->setSourceLocation(filename, line, column);
} else if (property.isProperty()) {
QDeclarativeBinding *binding = new QDeclarativeBinding(expression.toString(), object, context);
binding->setTarget(property);
- binding->setSourceLocation(filename, line);
+ binding->setSourceLocation(filename, line, column);
binding->setNotifyOnValueChanged(true);
QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(property, binding);
if (oldBinding)
diff --git a/src/declarative/debugger/qdeclarativeenginedebugservice_p.h b/src/declarative/debugger/qdeclarativeenginedebugservice_p.h
index 0c7f6644df..9db84f7aa3 100644
--- a/src/declarative/debugger/qdeclarativeenginedebugservice_p.h
+++ b/src/declarative/debugger/qdeclarativeenginedebugservice_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -117,7 +117,7 @@ private:
QDeclarativeObjectData objectData(QObject *);
QDeclarativeObjectProperty propertyData(QObject *, int);
QVariant valueContents(const QVariant &defaultValue) const;
- void setBinding(int objectId, const QString &propertyName, const QVariant &expression, bool isLiteralValue, QString filename = QString(), int line = -1);
+ void setBinding(int objectId, const QString &propertyName, const QVariant &expression, bool isLiteralValue, QString filename = QString(), int line = -1, int column = 0);
void resetBinding(int objectId, const QString &propertyName);
void setMethodBody(int objectId, const QString &method, const QString &body);
diff --git a/src/declarative/debugger/qdeclarativeinspectorinterface_p.h b/src/declarative/debugger/qdeclarativeinspectorinterface_p.h
index 8299eb18ae..27deeb22f6 100644
--- a/src/declarative/debugger/qdeclarativeinspectorinterface_p.h
+++ b/src/declarative/debugger/qdeclarativeinspectorinterface_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -59,7 +59,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class Q_DECLARATIVE_EXPORT QDeclarativeInspectorInterface
{
diff --git a/src/declarative/debugger/qdeclarativeinspectorservice.cpp b/src/declarative/debugger/qdeclarativeinspectorservice.cpp
index ddc621f3eb..ea8ace9f6c 100644
--- a/src/declarative/debugger/qdeclarativeinspectorservice.cpp
+++ b/src/declarative/debugger/qdeclarativeinspectorservice.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/debugger/qdeclarativeinspectorservice_p.h b/src/declarative/debugger/qdeclarativeinspectorservice_p.h
index 3bf9b6e136..91b28d9fb9 100644
--- a/src/declarative/debugger/qdeclarativeinspectorservice_p.h
+++ b/src/declarative/debugger/qdeclarativeinspectorservice_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -62,7 +62,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeInspectorInterface;
diff --git a/src/declarative/debugger/qpacketprotocol.cpp b/src/declarative/debugger/qpacketprotocol.cpp
index 2951ae0cd0..8bcee59344 100644
--- a/src/declarative/debugger/qpacketprotocol.cpp
+++ b/src/declarative/debugger/qpacketprotocol.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/debugger/qpacketprotocol_p.h b/src/declarative/debugger/qpacketprotocol_p.h
index a138a0eb9b..54eafe9da1 100644
--- a/src/declarative/debugger/qpacketprotocol_p.h
+++ b/src/declarative/debugger/qpacketprotocol_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -62,7 +62,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QIODevice;
class QBuffer;
diff --git a/src/declarative/debugger/qv8debugservice.cpp b/src/declarative/debugger/qv8debugservice.cpp
index 2cfa224ba9..ac3404651f 100644
--- a/src/declarative/debugger/qv8debugservice.cpp
+++ b/src/declarative/debugger/qv8debugservice.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/debugger/qv8debugservice_p.h b/src/declarative/debugger/qv8debugservice_p.h
index f2ac4dc7ed..795a517007 100644
--- a/src/declarative/debugger/qv8debugservice_p.h
+++ b/src/declarative/debugger/qv8debugservice_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -60,7 +60,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QV8Engine;
class QV8DebugServicePrivate;
diff --git a/src/declarative/debugger/qv8profilerservice.cpp b/src/declarative/debugger/qv8profilerservice.cpp
index 52dc2cede6..f9cd4fb427 100644
--- a/src/declarative/debugger/qv8profilerservice.cpp
+++ b/src/declarative/debugger/qv8profilerservice.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/debugger/qv8profilerservice_p.h b/src/declarative/debugger/qv8profilerservice_p.h
index ee278e20b5..bc6795b646 100644
--- a/src/declarative/debugger/qv8profilerservice_p.h
+++ b/src/declarative/debugger/qv8profilerservice_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -59,7 +59,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
struct Q_AUTOTEST_EXPORT QV8ProfilerData
{
diff --git a/src/declarative/qml/ftw/qbitfield_p.h b/src/declarative/qml/ftw/qbitfield_p.h
index fb5efe0ea1..28a0297f68 100644
--- a/src/declarative/qml/ftw/qbitfield_p.h
+++ b/src/declarative/qml/ftw/qbitfield_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/ftw/qdeclarativepool.cpp b/src/declarative/qml/ftw/qdeclarativepool.cpp
index 5d864ea0cd..897882e818 100644
--- a/src/declarative/qml/ftw/qdeclarativepool.cpp
+++ b/src/declarative/qml/ftw/qdeclarativepool.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/ftw/qdeclarativepool_p.h b/src/declarative/qml/ftw/qdeclarativepool_p.h
index 3bf6187851..b5e4f18aeb 100644
--- a/src/declarative/qml/ftw/qdeclarativepool_p.h
+++ b/src/declarative/qml/ftw/qdeclarativepool_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/ftw/qdeclarativerefcount_p.h b/src/declarative/qml/ftw/qdeclarativerefcount_p.h
index afee77ba2c..5d287e07f2 100644
--- a/src/declarative/qml/ftw/qdeclarativerefcount_p.h
+++ b/src/declarative/qml/ftw/qdeclarativerefcount_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -60,7 +60,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeRefCount
{
diff --git a/src/declarative/qml/ftw/qdeclarativethread.cpp b/src/declarative/qml/ftw/qdeclarativethread.cpp
index ecfbe5c7e2..9883e53e93 100644
--- a/src/declarative/qml/ftw/qdeclarativethread.cpp
+++ b/src/declarative/qml/ftw/qdeclarativethread.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/ftw/qdeclarativethread_p.h b/src/declarative/qml/ftw/qdeclarativethread_p.h
index 20385b54ee..5206de1eab 100644
--- a/src/declarative/qml/ftw/qdeclarativethread_p.h
+++ b/src/declarative/qml/ftw/qdeclarativethread_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/ftw/qdeclarativetrace.cpp b/src/declarative/qml/ftw/qdeclarativetrace.cpp
index 44c3d4c537..1497750b35 100644
--- a/src/declarative/qml/ftw/qdeclarativetrace.cpp
+++ b/src/declarative/qml/ftw/qdeclarativetrace.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/ftw/qdeclarativetrace_p.h b/src/declarative/qml/ftw/qdeclarativetrace_p.h
index 957de6ba52..83fa145f91 100644
--- a/src/declarative/qml/ftw/qdeclarativetrace_p.h
+++ b/src/declarative/qml/ftw/qdeclarativetrace_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/ftw/qdeletewatcher_p.h b/src/declarative/qml/ftw/qdeletewatcher_p.h
index e04fdea955..194fbddac6 100644
--- a/src/declarative/qml/ftw/qdeletewatcher_p.h
+++ b/src/declarative/qml/ftw/qdeletewatcher_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/ftw/qfastmetabuilder.cpp b/src/declarative/qml/ftw/qfastmetabuilder.cpp
index 95de0837b8..e1cedefe46 100644
--- a/src/declarative/qml/ftw/qfastmetabuilder.cpp
+++ b/src/declarative/qml/ftw/qfastmetabuilder.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/ftw/qfastmetabuilder_p.h b/src/declarative/qml/ftw/qfastmetabuilder_p.h
index defb4b9bde..ec2423b296 100644
--- a/src/declarative/qml/ftw/qfastmetabuilder_p.h
+++ b/src/declarative/qml/ftw/qfastmetabuilder_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/ftw/qfieldlist_p.h b/src/declarative/qml/ftw/qfieldlist_p.h
index b77616d219..801d55748d 100644
--- a/src/declarative/qml/ftw/qfieldlist_p.h
+++ b/src/declarative/qml/ftw/qfieldlist_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/ftw/qfinitestack_p.h b/src/declarative/qml/ftw/qfinitestack_p.h
index 84ec6c0180..6d0e9170c5 100644
--- a/src/declarative/qml/ftw/qfinitestack_p.h
+++ b/src/declarative/qml/ftw/qfinitestack_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/ftw/qflagpointer_p.h b/src/declarative/qml/ftw/qflagpointer_p.h
index 19f6761c9d..28c4c18369 100644
--- a/src/declarative/qml/ftw/qflagpointer_p.h
+++ b/src/declarative/qml/ftw/qflagpointer_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/ftw/qhashedstring.cpp b/src/declarative/qml/ftw/qhashedstring.cpp
index 1380e0efc6..cd9191c526 100644
--- a/src/declarative/qml/ftw/qhashedstring.cpp
+++ b/src/declarative/qml/ftw/qhashedstring.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/ftw/qhashedstring_p.h b/src/declarative/qml/ftw/qhashedstring_p.h
index 2fddf24b5c..f4dd6ee87f 100644
--- a/src/declarative/qml/ftw/qhashedstring_p.h
+++ b/src/declarative/qml/ftw/qhashedstring_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -104,6 +104,8 @@ public:
inline v8::Handle<v8::String> string() const;
+ inline QString toString() const;
+
private:
v8::String::CompleteHashData m_hash;
v8::Handle<v8::String> m_string;
@@ -917,6 +919,17 @@ v8::Handle<v8::String> QHashedV8String::string() const
return m_string;
}
+QString QHashedV8String::toString() const
+{
+ QString result;
+ result.reserve(m_hash.length);
+
+ for (int i = 0; i < m_hash.length; ++i)
+ result.append(m_string->GetCharacter(i));
+
+ return result;
+}
+
QHashedStringRef::QHashedStringRef()
: m_data(0), m_length(0), m_utf8length(-1), m_hash(0)
{
diff --git a/src/declarative/qml/ftw/qhashfield_p.h b/src/declarative/qml/ftw/qhashfield_p.h
index df308fae27..44668676e2 100644
--- a/src/declarative/qml/ftw/qhashfield_p.h
+++ b/src/declarative/qml/ftw/qhashfield_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/ftw/qintrusivelist.cpp b/src/declarative/qml/ftw/qintrusivelist.cpp
index 542d35d676..3c26c39b46 100644
--- a/src/declarative/qml/ftw/qintrusivelist.cpp
+++ b/src/declarative/qml/ftw/qintrusivelist.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/ftw/qintrusivelist_p.h b/src/declarative/qml/ftw/qintrusivelist_p.h
index 7315224c5f..f1691b3151 100644
--- a/src/declarative/qml/ftw/qintrusivelist_p.h
+++ b/src/declarative/qml/ftw/qintrusivelist_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/ftw/qpodvector_p.h b/src/declarative/qml/ftw/qpodvector_p.h
index 59bb53d6d4..e1acdc02aa 100644
--- a/src/declarative/qml/ftw/qpodvector_p.h
+++ b/src/declarative/qml/ftw/qpodvector_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/ftw/qrecursionwatcher_p.h b/src/declarative/qml/ftw/qrecursionwatcher_p.h
index 3ce95b59c7..f99edc834d 100644
--- a/src/declarative/qml/ftw/qrecursionwatcher_p.h
+++ b/src/declarative/qml/ftw/qrecursionwatcher_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/ftw/qrecyclepool_p.h b/src/declarative/qml/ftw/qrecyclepool_p.h
index a9bbc14a54..8e16d5cbf0 100644
--- a/src/declarative/qml/ftw/qrecyclepool_p.h
+++ b/src/declarative/qml/ftw/qrecyclepool_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/parser/qdeclarativejs.g b/src/declarative/qml/parser/qdeclarativejs.g
index 9ed2e86744..fa73238044 100644
--- a/src/declarative/qml/parser/qdeclarativejs.g
+++ b/src/declarative/qml/parser/qdeclarativejs.g
@@ -2,7 +2,7 @@
--
-- Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-- All rights reserved.
--- Contact: Nokia Corporation (qt-info@nokia.com)
+-- Contact: http://www.qt-project.org/
--
-- This file is part of the QtDeclarative module of the Qt Toolkit.
--
@@ -16,7 +16,7 @@
-- will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
--
-- If you have questions regarding the use of this file, please contact
--- Nokia at qt-info@nokia.com.
+-- us via http://www.qt-project.org/.
-- $QT_END_LICENSE$
--
----------------------------------------------------------------------------
@@ -87,7 +87,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -140,7 +140,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/parser/qdeclarativejsast.cpp b/src/declarative/qml/parser/qdeclarativejsast.cpp
index 5331430332..5d6ca676a6 100644
--- a/src/declarative/qml/parser/qdeclarativejsast.cpp
+++ b/src/declarative/qml/parser/qdeclarativejsast.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/parser/qdeclarativejsast_p.h b/src/declarative/qml/parser/qdeclarativejsast_p.h
index ac463c7d88..5d2430a2e9 100644
--- a/src/declarative/qml/parser/qdeclarativejsast_p.h
+++ b/src/declarative/qml/parser/qdeclarativejsast_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/parser/qdeclarativejsastfwd_p.h b/src/declarative/qml/parser/qdeclarativejsastfwd_p.h
index 6f60ea7572..f1241bc393 100644
--- a/src/declarative/qml/parser/qdeclarativejsastfwd_p.h
+++ b/src/declarative/qml/parser/qdeclarativejsastfwd_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/parser/qdeclarativejsastvisitor.cpp b/src/declarative/qml/parser/qdeclarativejsastvisitor.cpp
index 207467fdf8..d3a37b8352 100644
--- a/src/declarative/qml/parser/qdeclarativejsastvisitor.cpp
+++ b/src/declarative/qml/parser/qdeclarativejsastvisitor.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/parser/qdeclarativejsastvisitor_p.h b/src/declarative/qml/parser/qdeclarativejsastvisitor_p.h
index 7d75670daa..9cfe778316 100644
--- a/src/declarative/qml/parser/qdeclarativejsastvisitor_p.h
+++ b/src/declarative/qml/parser/qdeclarativejsastvisitor_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/parser/qdeclarativejsengine_p.cpp b/src/declarative/qml/parser/qdeclarativejsengine_p.cpp
index 8f4572ee10..cb5667cd31 100644
--- a/src/declarative/qml/parser/qdeclarativejsengine_p.cpp
+++ b/src/declarative/qml/parser/qdeclarativejsengine_p.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/parser/qdeclarativejsengine_p.h b/src/declarative/qml/parser/qdeclarativejsengine_p.h
index a7365a9e1d..1044b167bd 100644
--- a/src/declarative/qml/parser/qdeclarativejsengine_p.h
+++ b/src/declarative/qml/parser/qdeclarativejsengine_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/parser/qdeclarativejsglobal_p.h b/src/declarative/qml/parser/qdeclarativejsglobal_p.h
index 19aae59b9d..96f915a68d 100644
--- a/src/declarative/qml/parser/qdeclarativejsglobal_p.h
+++ b/src/declarative/qml/parser/qdeclarativejsglobal_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/parser/qdeclarativejsgrammar.cpp b/src/declarative/qml/parser/qdeclarativejsgrammar.cpp
index a0bbd5ee6b..2f86d75ae3 100644
--- a/src/declarative/qml/parser/qdeclarativejsgrammar.cpp
+++ b/src/declarative/qml/parser/qdeclarativejsgrammar.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/parser/qdeclarativejsgrammar_p.h b/src/declarative/qml/parser/qdeclarativejsgrammar_p.h
index d0dfcc5630..b4c8a25673 100644
--- a/src/declarative/qml/parser/qdeclarativejsgrammar_p.h
+++ b/src/declarative/qml/parser/qdeclarativejsgrammar_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/parser/qdeclarativejskeywords_p.h b/src/declarative/qml/parser/qdeclarativejskeywords_p.h
index d9c23e81e8..b6e006ac6c 100644
--- a/src/declarative/qml/parser/qdeclarativejskeywords_p.h
+++ b/src/declarative/qml/parser/qdeclarativejskeywords_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/parser/qdeclarativejslexer.cpp b/src/declarative/qml/parser/qdeclarativejslexer.cpp
index 4603a12b42..8ab273b72e 100644
--- a/src/declarative/qml/parser/qdeclarativejslexer.cpp
+++ b/src/declarative/qml/parser/qdeclarativejslexer.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/parser/qdeclarativejslexer_p.h b/src/declarative/qml/parser/qdeclarativejslexer_p.h
index de328866c5..174ce0a8c5 100644
--- a/src/declarative/qml/parser/qdeclarativejslexer_p.h
+++ b/src/declarative/qml/parser/qdeclarativejslexer_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/parser/qdeclarativejsmemorypool_p.h b/src/declarative/qml/parser/qdeclarativejsmemorypool_p.h
index 45f5752e3e..6a769004a9 100644
--- a/src/declarative/qml/parser/qdeclarativejsmemorypool_p.h
+++ b/src/declarative/qml/parser/qdeclarativejsmemorypool_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/parser/qdeclarativejsparser.cpp b/src/declarative/qml/parser/qdeclarativejsparser.cpp
index 1639900338..9bec256ce5 100644
--- a/src/declarative/qml/parser/qdeclarativejsparser.cpp
+++ b/src/declarative/qml/parser/qdeclarativejsparser.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/parser/qdeclarativejsparser_p.h b/src/declarative/qml/parser/qdeclarativejsparser_p.h
index 20915659bf..6bb317460f 100644
--- a/src/declarative/qml/parser/qdeclarativejsparser_p.h
+++ b/src/declarative/qml/parser/qdeclarativejsparser_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarative.h b/src/declarative/qml/qdeclarative.h
index c2efecdb0c..adec9a09f6 100644
--- a/src/declarative/qml/qdeclarative.h
+++ b/src/declarative/qml/qdeclarative.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -86,7 +86,6 @@ QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativePropertyValueInterceptor;
diff --git a/src/declarative/qml/qdeclarativeaccessors.cpp b/src/declarative/qml/qdeclarativeaccessors.cpp
index 887b7dcd9a..c771e0c534 100644
--- a/src/declarative/qml/qdeclarativeaccessors.cpp
+++ b/src/declarative/qml/qdeclarativeaccessors.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativeaccessors_p.h b/src/declarative/qml/qdeclarativeaccessors_p.h
index 99b5371704..01afc6a5b0 100644
--- a/src/declarative/qml/qdeclarativeaccessors_p.h
+++ b/src/declarative/qml/qdeclarativeaccessors_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativeapplication.cpp b/src/declarative/qml/qdeclarativeapplication.cpp
index 05e8a6c9f9..afc37ee301 100644
--- a/src/declarative/qml/qdeclarativeapplication.cpp
+++ b/src/declarative/qml/qdeclarativeapplication.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativeapplication_p.h b/src/declarative/qml/qdeclarativeapplication_p.h
index 4d86e93866..bcb66b8851 100644
--- a/src/declarative/qml/qdeclarativeapplication_p.h
+++ b/src/declarative/qml/qdeclarativeapplication_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -50,7 +50,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeApplicationPrivate;
class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeApplication : public QObject
diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp
index 552b5988bf..5e2f655cdb 100644
--- a/src/declarative/qml/qdeclarativebinding.cpp
+++ b/src/declarative/qml/qdeclarativebinding.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -216,7 +216,7 @@ void QDeclarativeBindingPrivate::refresh()
}
QDeclarativeBindingPrivate::QDeclarativeBindingPrivate()
-: updating(false), enabled(false), columnNumber(0)
+: updating(false), enabled(false)
{
}
@@ -268,13 +268,12 @@ QDeclarativeBinding::QDeclarativeBinding(const QString &str, bool isRewritten, Q
QDeclarativeContextData *ctxt,
const QString &url, int lineNumber, int columnNumber,
QObject *parent)
-: QDeclarativeExpression(ctxt, obj, str, isRewritten, url, lineNumber, *new QDeclarativeBindingPrivate)
+: QDeclarativeExpression(ctxt, obj, str, isRewritten, url, lineNumber, columnNumber, *new QDeclarativeBindingPrivate)
{
Q_D(QDeclarativeBinding);
setParent(parent);
setNotifyOnValueChanged(true);
- d->columnNumber = columnNumber;
}
/*!
@@ -340,7 +339,7 @@ public:
{
QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Binding);
QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::Binding, bind->expression());
- QDeclarativeDebugTrace::rangeLocation(QDeclarativeDebugTrace::Binding, bind->sourceFile(), bind->lineNumber());
+ QDeclarativeDebugTrace::rangeLocation(QDeclarativeDebugTrace::Binding, bind->sourceFile(), bind->lineNumber(), bind->columnNumber());
}
~QDeclarativeBindingProfiler()
diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h
index eaba03a38d..a58a9f0516 100644
--- a/src/declarative/qml/qdeclarativebinding_p.h
+++ b/src/declarative/qml/qdeclarativebinding_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativebinding_p_p.h b/src/declarative/qml/qdeclarativebinding_p_p.h
index 60f5ef1c12..48a9a379f9 100644
--- a/src/declarative/qml/qdeclarativebinding_p_p.h
+++ b/src/declarative/qml/qdeclarativebinding_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativeboundsignal.cpp b/src/declarative/qml/qdeclarativeboundsignal.cpp
index 51691ca6bd..c3a2ed15c7 100644
--- a/src/declarative/qml/qdeclarativeboundsignal.cpp
+++ b/src/declarative/qml/qdeclarativeboundsignal.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -173,7 +173,7 @@ int QDeclarativeBoundSignal::qt_metacall(QMetaObject::Call c, int id, void **a)
if (QDeclarativeDebugService::isDebuggingEnabled()) {
QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::HandlingSignal);
QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::HandlingSignal, QLatin1String(m_signal.signature()) % QLatin1String(": ") % m_expression->expression());
- QDeclarativeDebugTrace::rangeLocation(QDeclarativeDebugTrace::HandlingSignal, m_expression->sourceFile(), m_expression->lineNumber());
+ QDeclarativeDebugTrace::rangeLocation(QDeclarativeDebugTrace::HandlingSignal, m_expression->sourceFile(), m_expression->lineNumber(), m_expression->columnNumber());
QV8DebugService::instance()->signalEmitted(QString::fromAscii(m_signal.signature()));
}
m_isEvaluating = true;
diff --git a/src/declarative/qml/qdeclarativeboundsignal_p.h b/src/declarative/qml/qdeclarativeboundsignal_p.h
index 1dbcc071b8..1654e36cf6 100644
--- a/src/declarative/qml/qdeclarativeboundsignal_p.h
+++ b/src/declarative/qml/qdeclarativeboundsignal_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativecleanup.cpp b/src/declarative/qml/qdeclarativecleanup.cpp
index 9a17000c05..44b0bdb18d 100644
--- a/src/declarative/qml/qdeclarativecleanup.cpp
+++ b/src/declarative/qml/qdeclarativecleanup.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativecleanup_p.h b/src/declarative/qml/qdeclarativecleanup_p.h
index cef30f7f82..06f9d2f391 100644
--- a/src/declarative/qml/qdeclarativecleanup_p.h
+++ b/src/declarative/qml/qdeclarativecleanup_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativecompileddata.cpp b/src/declarative/qml/qdeclarativecompileddata.cpp
index 9a0b9f0209..42d38e553d 100644
--- a/src/declarative/qml/qdeclarativecompileddata.cpp
+++ b/src/declarative/qml/qdeclarativecompileddata.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index 3a7a6013e6..07e381c18f 100644
--- a/src/declarative/qml/qdeclarativecompiler.cpp
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -404,6 +404,14 @@ bool QDeclarativeCompiler::testLiteralAssignment(QDeclarativeScript::Property *p
return true;
}
+static QUrl urlFromUserString(const QString &data)
+{
+ QUrl u;
+ // Preserve any valid percent-encoded octets supplied by the source
+ u.setEncodedUrl(data.toUtf8(), QUrl::TolerantMode);
+ return u;
+}
+
/*!
Generate a store instruction for assigning literal \a v to property \a prop.
@@ -511,7 +519,7 @@ void QDeclarativeCompiler::genLiteralAssignment(QDeclarativeScript::Property *pr
{
Instruction::StoreUrl instr;
QString string = v->value.asString();
- QUrl u = string.isEmpty() ? QUrl() : output->url.resolved(QUrl(string));
+ QUrl u = string.isEmpty() ? QUrl() : output->url.resolved(urlFromUserString(string));
instr.propertyIndex = prop->index;
instr.value = output->indexForUrl(u);
output->addInstruction(instr);
@@ -720,7 +728,7 @@ void QDeclarativeCompiler::genLiteralAssignment(QDeclarativeScript::Property *pr
} else if (type == qMetaTypeId<QList<QUrl> >()) {
Instruction::StoreUrlQList instr;
QString string = v->value.asString();
- QUrl u = string.isEmpty() ? QUrl() : output->url.resolved(QUrl(string));
+ QUrl u = string.isEmpty() ? QUrl() : output->url.resolved(urlFromUserString(string));
instr.propertyIndex = prop->index;
instr.value = output->indexForUrl(u);
output->addInstruction(instr);
@@ -851,19 +859,28 @@ void QDeclarativeCompiler::compileTree(QDeclarativeScript::Object *tree)
if (componentStats)
componentStats->componentStat.lineNumber = tree->location.start.line;
- // Build global import scripts
- QStringList importedScriptIndexes;
-
- foreach (const QDeclarativeTypeData::ScriptReference &script, unit->resolvedScripts()) {
- importedScriptIndexes.append(script.qualifier);
- }
-
// We generate the importCache before we build the tree so that
// it can be used in the binding compiler. Given we "expect" the
// QML compilation to succeed, this isn't a waste.
output->importCache = new QDeclarativeTypeNameCache();
- for (int ii = 0; ii < importedScriptIndexes.count(); ++ii)
- output->importCache->add(importedScriptIndexes.at(ii), ii);
+ foreach (const QString &ns, unit->namespaces()) {
+ output->importCache->add(ns);
+ }
+
+ int scriptIndex = 0;
+ foreach (const QDeclarativeTypeData::ScriptReference &script, unit->resolvedScripts()) {
+ QString qualifier = script.qualifier;
+ QString enclosingNamespace;
+
+ const int lastDotIndex = qualifier.lastIndexOf(QLatin1Char('.'));
+ if (lastDotIndex != -1) {
+ enclosingNamespace = qualifier.left(lastDotIndex);
+ qualifier = qualifier.mid(lastDotIndex+1);
+ }
+
+ output->importCache->add(qualifier, scriptIndex++, enclosingNamespace);
+ }
+
unit->imports().populateCache(output->importCache, engine);
if (!buildObject(tree, BindingContext()) || !completeComponentBuild())
@@ -1270,6 +1287,7 @@ void QDeclarativeCompiler::genObjectBody(QDeclarativeScript::Object *obj)
// ss.bindingId = rewriteBinding(script, prop->name());
ss.bindingId = rewriteBinding(prop->values.first()->value, QString()); // XXX
ss.line = prop->location.start.line;
+ ss.column = prop->location.start.column;
output->addInstruction(ss);
}
@@ -1331,6 +1349,7 @@ void QDeclarativeCompiler::genObjectBody(QDeclarativeScript::Object *obj)
store.value = output->indexForString(rewrite);
store.context = v->signalExpressionContextStack;
store.line = v->location.start.line;
+ store.column = v->location.start.column;
output->addInstruction(store);
}
diff --git a/src/declarative/qml/qdeclarativecompiler_p.h b/src/declarative/qml/qdeclarativecompiler_p.h
index d6e0b5023c..e181f1f1f9 100644
--- a/src/declarative/qml/qdeclarativecompiler_p.h
+++ b/src/declarative/qml/qdeclarativecompiler_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index 5e9938dc39..2f224ea1f1 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -768,7 +768,7 @@ QDeclarativeComponentPrivate::beginCreate(QDeclarativeContextData *context)
QDeclarativeData *data = QDeclarativeData::get(rv);
Q_ASSERT(data);
QDeclarativeDebugTrace::rangeLocation(QDeclarativeDebugTrace::Creating,
- cc->url, data->lineNumber);
+ cc->url, data->lineNumber, data->columnNumber);
}
}
diff --git a/src/declarative/qml/qdeclarativecomponent.h b/src/declarative/qml/qdeclarativecomponent.h
index 2e33bf8aec..89be2635a5 100644
--- a/src/declarative/qml/qdeclarativecomponent.h
+++ b/src/declarative/qml/qdeclarativecomponent.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -53,7 +53,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QByteArray;
class QDeclarativeEngine;
diff --git a/src/declarative/qml/qdeclarativecomponent_p.h b/src/declarative/qml/qdeclarativecomponent_p.h
index ed6d27903e..85f072aaff 100644
--- a/src/declarative/qml/qdeclarativecomponent_p.h
+++ b/src/declarative/qml/qdeclarativecomponent_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativecomponentattached_p.h b/src/declarative/qml/qdeclarativecomponentattached_p.h
index bbded8eb5e..4b2b624816 100644
--- a/src/declarative/qml/qdeclarativecomponentattached_p.h
+++ b/src/declarative/qml/qdeclarativecomponentattached_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -49,7 +49,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class Q_AUTOTEST_EXPORT QDeclarativeComponentAttached : public QObject
{
diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp
index 6b4f97520a..992fa7f46a 100644
--- a/src/declarative/qml/qdeclarativecontext.cpp
+++ b/src/declarative/qml/qdeclarativecontext.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativecontext.h b/src/declarative/qml/qdeclarativecontext.h
index 9a068c979e..bc5b156705 100644
--- a/src/declarative/qml/qdeclarativecontext.h
+++ b/src/declarative/qml/qdeclarativecontext.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -52,7 +52,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QString;
class QDeclarativeEngine;
diff --git a/src/declarative/qml/qdeclarativecontext_p.h b/src/declarative/qml/qdeclarativecontext_p.h
index 88304a8423..ee56eb9025 100644
--- a/src/declarative/qml/qdeclarativecontext_p.h
+++ b/src/declarative/qml/qdeclarativecontext_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativecustomparser.cpp b/src/declarative/qml/qdeclarativecustomparser.cpp
index 59d2b11159..694493703c 100644
--- a/src/declarative/qml/qdeclarativecustomparser.cpp
+++ b/src/declarative/qml/qdeclarativecustomparser.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativecustomparser_p.h b/src/declarative/qml/qdeclarativecustomparser_p.h
index 01f02d035e..a4d87b2290 100644
--- a/src/declarative/qml/qdeclarativecustomparser_p.h
+++ b/src/declarative/qml/qdeclarativecustomparser_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -65,7 +65,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeCompiler;
diff --git a/src/declarative/qml/qdeclarativecustomparser_p_p.h b/src/declarative/qml/qdeclarativecustomparser_p_p.h
index 27df9e7097..ecd84afcfb 100644
--- a/src/declarative/qml/qdeclarativecustomparser_p_p.h
+++ b/src/declarative/qml/qdeclarativecustomparser_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativedata_p.h b/src/declarative/qml/qdeclarativedata_p.h
index 48790d78bc..d9f3d1b163 100644
--- a/src/declarative/qml/qdeclarativedata_p.h
+++ b/src/declarative/qml/qdeclarativedata_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativedirparser.cpp b/src/declarative/qml/qdeclarativedirparser.cpp
index 256157f5b5..c4a11a9a43 100644
--- a/src/declarative/qml/qdeclarativedirparser.cpp
+++ b/src/declarative/qml/qdeclarativedirparser.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -103,6 +103,7 @@ bool QDeclarativeDirParser::parse()
_errors.clear();
_plugins.clear();
_components.clear();
+ _scripts.clear();
if (_source.isEmpty() && !_filePathSouce.isEmpty()) {
QFile file(_filePathSouce);
@@ -220,9 +221,16 @@ bool QDeclarativeDirParser::parse()
const int minorVersion = version.mid(dotIndex + 1).toInt(&validVersionNumber);
if (validVersionNumber) {
- const Component entry(sections[0], sections[2], majorVersion, minorVersion);
-
- _components.append(entry);
+ const QString &fileName = sections[2];
+
+ if (fileName.endsWith(QLatin1String(".js"))) {
+ // A 'js' extension indicates a namespaced script import
+ const Script entry(sections[0], fileName, majorVersion, minorVersion);
+ _scripts.append(entry);
+ } else {
+ const Component entry(sections[0], fileName, majorVersion, minorVersion);
+ _components.append(entry);
+ }
}
}
}
@@ -275,6 +283,11 @@ QList<QDeclarativeDirParser::Component> QDeclarativeDirParser::components() cons
return _components;
}
+QList<QDeclarativeDirParser::Script> QDeclarativeDirParser::scripts() const
+{
+ return _scripts;
+}
+
#ifdef QT_CREATOR
QList<QDeclarativeDirParser::TypeInfo> QDeclarativeDirParser::typeInfos() const
{
diff --git a/src/declarative/qml/qdeclarativedirparser_p.h b/src/declarative/qml/qdeclarativedirparser_p.h
index ddc3c9f5cb..0f726b7060 100644
--- a/src/declarative/qml/qdeclarativedirparser_p.h
+++ b/src/declarative/qml/qdeclarativedirparser_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -109,7 +109,22 @@ public:
bool internal;
};
+ struct Script
+ {
+ Script()
+ : majorVersion(0), minorVersion(0) {}
+
+ Script(const QString &nameSpace, const QString &fileName, int majorVersion, int minorVersion)
+ : nameSpace(nameSpace), fileName(fileName), majorVersion(majorVersion), minorVersion(minorVersion) {}
+
+ QString nameSpace;
+ QString fileName;
+ int majorVersion;
+ int minorVersion;
+ };
+
QList<Component> components() const;
+ QList<Script> scripts() const;
QList<Plugin> plugins() const;
#ifdef QT_CREATOR
@@ -134,6 +149,7 @@ private:
QString _source;
QString _filePathSouce;
QList<Component> _components;
+ QList<Script> _scripts;
QList<Plugin> _plugins;
#ifdef QT_CREATOR
QList<TypeInfo> _typeInfos;
@@ -142,6 +158,7 @@ private:
};
typedef QList<QDeclarativeDirParser::Component> QDeclarativeDirComponents;
+typedef QList<QDeclarativeDirParser::Script> QDeclarativeDirScripts;
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 1d613ccc26..54f17ca48d 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -964,7 +964,7 @@ Q_AUTOTEST_EXPORT void qmlExecuteDeferred(QObject *object)
QString typeName = type ? type->qmlTypeName() : QString::fromUtf8(object->metaObject()->className());
QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::Creating, typeName);
if (data->outerContext)
- QDeclarativeDebugTrace::rangeLocation(QDeclarativeDebugTrace::Creating, data->outerContext->url, data->lineNumber);
+ QDeclarativeDebugTrace::rangeLocation(QDeclarativeDebugTrace::Creating, data->outerContext->url, data->lineNumber, data->columnNumber);
}
QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(data->context->engine);
diff --git a/src/declarative/qml/qdeclarativeengine.h b/src/declarative/qml/qdeclarativeengine.h
index 00cd2c257e..e466863c20 100644
--- a/src/declarative/qml/qdeclarativeengine.h
+++ b/src/declarative/qml/qdeclarativeengine.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -53,7 +53,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeComponent;
class QDeclarativeEnginePrivate;
diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h
index 61a1464087..c48ba3c35d 100644
--- a/src/declarative/qml/qdeclarativeengine_p.h
+++ b/src/declarative/qml/qdeclarativeengine_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativeerror.cpp b/src/declarative/qml/qdeclarativeerror.cpp
index a538c75151..2addd68f7c 100644
--- a/src/declarative/qml/qdeclarativeerror.cpp
+++ b/src/declarative/qml/qdeclarativeerror.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativeerror.h b/src/declarative/qml/qdeclarativeerror.h
index 0de1628b82..f66186f41f 100644
--- a/src/declarative/qml/qdeclarativeerror.h
+++ b/src/declarative/qml/qdeclarativeerror.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -49,7 +49,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDebug;
class QDeclarativeErrorPrivate;
diff --git a/src/declarative/qml/qdeclarativeexpression.cpp b/src/declarative/qml/qdeclarativeexpression.cpp
index f375716de6..e616d0a6d1 100644
--- a/src/declarative/qml/qdeclarativeexpression.cpp
+++ b/src/declarative/qml/qdeclarativeexpression.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -120,10 +120,11 @@ void QDeclarativeExpressionPrivate::init(QDeclarativeContextData *ctxt, v8::Hand
void QDeclarativeExpressionPrivate::init(QDeclarativeContextData *ctxt, const QString &expr,
bool isRewritten, QObject *me, const QString &srcUrl,
- int lineNumber)
+ int lineNumber, int columnNumber)
{
url = srcUrl;
line = lineNumber;
+ column = columnNumber;
expression = expr;
@@ -159,9 +160,9 @@ QDeclarativeExpressionPrivate::evalFunction(QDeclarativeContextData *ctxt, QObje
}
QDeclarativeExpression *QDeclarativeExpressionPrivate::create(QDeclarativeContextData *ctxt, QObject *object, const QString &expr, bool isRewritten,
- const QString &url, int lineNumber)
+ const QString &url, int lineNumber, int columnNumber)
{
- return new QDeclarativeExpression(ctxt, object, expr, isRewritten, url, lineNumber, *new QDeclarativeExpressionPrivate);
+ return new QDeclarativeExpression(ctxt, object, expr, isRewritten, url, lineNumber, columnNumber, *new QDeclarativeExpressionPrivate);
}
/*!
@@ -206,12 +207,12 @@ QDeclarativeExpression::QDeclarativeExpression()
/*! \internal */
QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContextData *ctxt,
QObject *object, const QString &expr, bool isRewritten,
- const QString &url, int lineNumber,
+ const QString &url, int lineNumber, int columnNumber,
QDeclarativeExpressionPrivate &dd)
: QObject(dd, 0)
{
Q_D(QDeclarativeExpression);
- d->init(ctxt, expr, isRewritten, object, url, lineNumber);
+ d->init(ctxt, expr, isRewritten, object, url, lineNumber, columnNumber);
}
/*!
@@ -250,7 +251,7 @@ QDeclarativeExpression::QDeclarativeExpression(const QDeclarativeScriptString &s
if (cdata)
d->init(ctxtdata, cdata->primitives.at(id), true, script.scopeObject(),
- cdata->name, script.d.data()->lineNumber);
+ cdata->name, script.d.data()->lineNumber, script.d.data()->columnNumber);
else
defaultConstruction = true;
@@ -695,14 +696,25 @@ int QDeclarativeExpression::lineNumber() const
}
/*!
+ Returns the source file column number for this expression. The source location
+ must have been previously set by calling setSourceLocation().
+*/
+int QDeclarativeExpression::columnNumber() const
+{
+ Q_D(const QDeclarativeExpression);
+ return d->column;
+}
+
+/*!
Set the location of this expression to \a line of \a url. This information
is used by the script engine.
*/
-void QDeclarativeExpression::setSourceLocation(const QString &url, int line)
+void QDeclarativeExpression::setSourceLocation(const QString &url, int line, int column)
{
Q_D(QDeclarativeExpression);
d->url = url;
d->line = line;
+ d->column = column;
}
/*!
diff --git a/src/declarative/qml/qdeclarativeexpression.h b/src/declarative/qml/qdeclarativeexpression.h
index dca0692002..4ccc6ca87f 100644
--- a/src/declarative/qml/qdeclarativeexpression.h
+++ b/src/declarative/qml/qdeclarativeexpression.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -52,7 +52,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QString;
class QDeclarativeRefCount;
@@ -80,7 +79,8 @@ public:
QString sourceFile() const;
int lineNumber() const;
- void setSourceLocation(const QString &fileName, int line);
+ int columnNumber() const;
+ void setSourceLocation(const QString &fileName, int line, int column = 0);
QObject *scopeObject() const;
@@ -99,7 +99,7 @@ protected:
QDeclarativeExpression(QDeclarativeContextData *, QObject *, void *,
QDeclarativeExpressionPrivate &dd);
QDeclarativeExpression(QDeclarativeContextData *, QObject *, const QString &, bool,
- const QString &, int, QDeclarativeExpressionPrivate &dd);
+ const QString &, int, int, QDeclarativeExpressionPrivate &dd);
private:
QDeclarativeExpression(QDeclarativeContextData *, QObject *, const QString &);
diff --git a/src/declarative/qml/qdeclarativeexpression_p.h b/src/declarative/qml/qdeclarativeexpression_p.h
index 772f448174..b4c9f1a4be 100644
--- a/src/declarative/qml/qdeclarativeexpression_p.h
+++ b/src/declarative/qml/qdeclarativeexpression_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -177,7 +177,7 @@ public:
void init(QDeclarativeContextData *, const QString &, QObject *);
void init(QDeclarativeContextData *, v8::Handle<v8::Function>, QObject *);
- void init(QDeclarativeContextData *, const QString &, bool, QObject *, const QString &, int);
+ void init(QDeclarativeContextData *, const QString &, bool, QObject *, const QString &, int, int);
QVariant value(QObject *secondaryScope = 0, bool *isUndefined = 0);
@@ -194,7 +194,7 @@ public:
const QString &code, const QString &filename, int line,
v8::Persistent<v8::Object> *qmlscope = 0);
static QDeclarativeExpression *create(QDeclarativeContextData *, QObject *, const QString &, bool,
- const QString &, int);
+ const QString &, int, int);
bool expressionFunctionValid:1;
bool expressionFunctionRewritten:1;
@@ -209,6 +209,7 @@ public:
QString url; // This is a QString for a reason. QUrls are slooooooow...
int line;
+ int column;
QString name; //function name, hint for the debugger
QDeclarativeRefCount *dataRef;
diff --git a/src/declarative/qml/qdeclarativeextensioninterface.h b/src/declarative/qml/qdeclarativeextensioninterface.h
index a4a931d27d..5675dd568b 100644
--- a/src/declarative/qml/qdeclarativeextensioninterface.h
+++ b/src/declarative/qml/qdeclarativeextensioninterface.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeEngine;
diff --git a/src/declarative/qml/qdeclarativeextensionplugin.cpp b/src/declarative/qml/qdeclarativeextensionplugin.cpp
index c93e4db66c..abdc65239f 100644
--- a/src/declarative/qml/qdeclarativeextensionplugin.cpp
+++ b/src/declarative/qml/qdeclarativeextensionplugin.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativeextensionplugin.h b/src/declarative/qml/qdeclarativeextensionplugin.h
index 52ef13eb5e..cd2b462caa 100644
--- a/src/declarative/qml/qdeclarativeextensionplugin.h
+++ b/src/declarative/qml/qdeclarativeextensionplugin.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -50,7 +50,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeEngine;
diff --git a/src/declarative/qml/qdeclarativeglobal_p.h b/src/declarative/qml/qdeclarativeglobal_p.h
index 63a8fed6c8..9a1f633c94 100644
--- a/src/declarative/qml/qdeclarativeglobal_p.h
+++ b/src/declarative/qml/qdeclarativeglobal_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -49,7 +49,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
#define DEFINE_BOOL_CONFIG_OPTION(name, var) \
static bool name() \
diff --git a/src/declarative/qml/qdeclarativeguard_p.h b/src/declarative/qml/qdeclarativeguard_p.h
index 35d369609e..ef965a91bb 100644
--- a/src/declarative/qml/qdeclarativeguard_p.h
+++ b/src/declarative/qml/qdeclarativeguard_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativeimageprovider.cpp b/src/declarative/qml/qdeclarativeimageprovider.cpp
index 87a1c5fe01..53f5bd3e2d 100644
--- a/src/declarative/qml/qdeclarativeimageprovider.cpp
+++ b/src/declarative/qml/qdeclarativeimageprovider.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativeimageprovider.h b/src/declarative/qml/qdeclarativeimageprovider.h
index 70305258d5..eb304a2ca4 100644
--- a/src/declarative/qml/qdeclarativeimageprovider.h
+++ b/src/declarative/qml/qdeclarativeimageprovider.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -49,7 +49,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeImageProviderPrivate;
class QSGTexture;
diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp
index cb634c995b..34527e6414 100644
--- a/src/declarative/qml/qdeclarativeimport.cpp
+++ b/src/declarative/qml/qdeclarativeimport.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -94,6 +94,7 @@ public:
int minversion;
bool isLibrary;
QDeclarativeDirComponents qmlDirComponents;
+ QDeclarativeDirScripts qmlDirScripts;
};
QList<Data> imports;
@@ -112,6 +113,7 @@ public:
bool importExtension(const QString &absoluteFilePath, const QString &uri,
QDeclarativeImportDatabase *database, QDeclarativeDirComponents* components,
+ QDeclarativeDirScripts *scripts,
QList<QDeclarativeError> *errors);
QString resolvedUri(const QString &dir_arg, QDeclarativeImportDatabase *database);
@@ -199,15 +201,17 @@ void QDeclarativeImports::populateCache(QDeclarativeTypeNameCache *cache, QDecla
++iter) {
const QDeclarativeImportedNamespace &set = *iter.value();
- QDeclarativeTypeNameCache::Import &import = cache->m_namedImports[iter.key()];
for (int ii = set.imports.count() - 1; ii >= 0; --ii) {
const QDeclarativeImportedNamespace::Data &data = set.imports.at(ii);
QDeclarativeTypeModule *module = QDeclarativeMetaType::typeModule(data.uri, data.majversion);
- if (module)
+ if (module) {
+ QDeclarativeTypeNameCache::Import &import = cache->m_namedImports[iter.key()];
import.modules.append(QDeclarativeTypeModuleVersion(module, data.minversion));
+ }
QDeclarativeMetaType::ModuleApi moduleApi = QDeclarativeMetaType::moduleApi(data.uri, data.majversion, data.minversion);
if (moduleApi.script || moduleApi.qobject) {
+ QDeclarativeTypeNameCache::Import &import = cache->m_namedImports[iter.key()];
QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
import.moduleApi = ep->moduleApiInstance(moduleApi);
}
@@ -215,6 +219,44 @@ void QDeclarativeImports::populateCache(QDeclarativeTypeNameCache *cache, QDecla
}
}
+QList<QDeclarativeImports::ScriptReference> QDeclarativeImports::resolvedScripts() const
+{
+ QList<QDeclarativeImports::ScriptReference> scripts;
+
+ const QDeclarativeImportedNamespace &set = d->unqualifiedset;
+
+ for (int ii = set.imports.count() - 1; ii >= 0; --ii) {
+ const QDeclarativeImportedNamespace::Data &data = set.imports.at(ii);
+
+ foreach (const QDeclarativeDirParser::Script &script, data.qmlDirScripts) {
+ ScriptReference ref;
+ ref.nameSpace = script.nameSpace;
+ ref.location = QUrl(data.url).resolved(QUrl(script.fileName));
+ scripts.append(ref);
+ }
+ }
+
+ for (QHash<QString,QDeclarativeImportedNamespace* >::ConstIterator iter = d->set.constBegin();
+ iter != d->set.constEnd();
+ ++iter) {
+ const QDeclarativeImportedNamespace &set = *iter.value();
+
+ for (int ii = set.imports.count() - 1; ii >= 0; --ii) {
+ const QDeclarativeImportedNamespace::Data &data = set.imports.at(ii);
+
+ foreach (const QDeclarativeDirParser::Script &script, data.qmlDirScripts) {
+ ScriptReference ref;
+ ref.nameSpace = script.nameSpace;
+ ref.qualifier = iter.key();
+ ref.location = QUrl(data.url).resolved(QUrl(script.fileName));
+ scripts.append(ref);
+ }
+ }
+ }
+
+ return scripts;
+}
+
/*!
\internal
@@ -350,9 +392,11 @@ QDeclarativeImportsPrivate::~QDeclarativeImportsPrivate()
delete s;
}
-bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath, const QString &uri,
- QDeclarativeImportDatabase *database,
- QDeclarativeDirComponents* components, QList<QDeclarativeError> *errors)
+bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath, const QString &uri,
+ QDeclarativeImportDatabase *database,
+ QDeclarativeDirComponents* components,
+ QDeclarativeDirScripts* scripts,
+ QList<QDeclarativeError> *errors)
{
const QDeclarativeDirParser *qmldirParser = typeLoader->qmlDirParser(absoluteFilePath);
if (qmldirParser->hasError()) {
@@ -406,6 +450,8 @@ bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath
if (components)
*components = qmldirParser->components();
+ if (scripts)
+ *scripts = qmldirParser->scripts();
return true;
}
@@ -450,6 +496,7 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
static QLatin1Char Slash('/');
QDeclarativeDirComponents qmldircomponents = qmldircomponentsnetwork;
+ QDeclarativeDirScripts qmldirscripts;
QString uri = uri_arg;
QDeclarativeImportedNamespace *s;
if (prefix.isEmpty()) {
@@ -486,12 +533,14 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
else
url = QUrl::fromLocalFile(fi.absolutePath()).toString();
uri = resolvedUri(dir, database);
- if (!importExtension(absoluteFilePath, uri, database, &qmldircomponents, errors))
+ if (!importExtension(absoluteFilePath, uri, database, &qmldircomponents, &qmldirscripts, errors))
return false;
break;
}
}
+ // TODO: Should this search be omitted if found == true?
+
// step 2: search for extension with encoded version major
foreach (const QString &p, database->fileImportPath) {
dir = p+Slash+url;
@@ -508,7 +557,7 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
else
url = QUrl::fromLocalFile(fi.absolutePath()).toString();
uri = resolvedUri(dir, database);
- if (!importExtension(absoluteFilePath, uri, database, &qmldircomponents, errors))
+ if (!importExtension(absoluteFilePath, uri, database, &qmldircomponents, &qmldirscripts, errors))
return false;
break;
}
@@ -530,7 +579,7 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
else
url = QUrl::fromLocalFile(absolutePath).toString();
uri = resolvedUri(dir, database);
- if (!importExtension(absoluteFilePath, uri, database, &qmldircomponents, errors))
+ if (!importExtension(absoluteFilePath, uri, database, &qmldircomponents, &qmldirscripts, errors))
return false;
break;
}
@@ -540,7 +589,7 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
if (QDeclarativeMetaType::isModule(uri, vmaj, vmin))
versionFound = true;
- if (!versionFound && qmldircomponents.isEmpty()) {
+ if (!versionFound && qmldircomponents.isEmpty() && qmldirscripts.isEmpty()) {
if (errors) {
QDeclarativeError error; // we don't set the url or line or column as these will be set by the loader.
if (QDeclarativeMetaType::isAnyModule(uri))
@@ -570,7 +619,7 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
if (uri.endsWith(Slash))
uri.chop(1);
if (!typeLoader->absoluteFilePath(localFileOrQrc).isEmpty()) {
- if (!importExtension(localFileOrQrc,uri,database,&qmldircomponents,errors))
+ if (!importExtension(localFileOrQrc,uri,database,&qmldircomponents,&qmldirscripts,errors))
return false;
}
} else {
@@ -596,16 +645,18 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
url = resolveLocalUrl(base, url);
}
- if (!versionFound && vmaj > -1 && vmin > -1 && !qmldircomponents.isEmpty()) {
- QList<QDeclarativeDirParser::Component>::ConstIterator it = qmldircomponents.begin();
+ if (!versionFound && (vmaj > -1) && (vmin > -1) && !qmldircomponents.isEmpty()) {
int lowest_min = INT_MAX;
int highest_min = INT_MIN;
- for (; it != qmldircomponents.end(); ++it) {
- if (it->majorVersion == vmaj) {
- lowest_min = qMin(lowest_min, it->minorVersion);
- highest_min = qMax(highest_min, it->minorVersion);
+
+ QList<QDeclarativeDirParser::Component>::const_iterator cend = qmldircomponents.constEnd();
+ for (QList<QDeclarativeDirParser::Component>::const_iterator cit = qmldircomponents.constBegin(); cit != cend; ++cit) {
+ if (cit->majorVersion == vmaj) {
+ lowest_min = qMin(lowest_min, cit->minorVersion);
+ highest_min = qMax(highest_min, cit->minorVersion);
}
}
+
if (lowest_min > vmin || highest_min < vmin) {
if (errors) {
QDeclarativeError error; // we don't set the url or line or column information, as these will be set by the loader.
@@ -619,6 +670,35 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
if (!url.endsWith(Slash))
url += Slash;
+ QMap<QString, QDeclarativeDirParser::Script> scripts;
+
+ if (!qmldirscripts.isEmpty()) {
+ // Verify that we haven't imported these scripts already
+ QList<QDeclarativeImportedNamespace::Data>::const_iterator end = s->imports.constEnd();
+ for (QList<QDeclarativeImportedNamespace::Data>::const_iterator it = s->imports.constBegin(); it != end; ++it) {
+ if (it->uri == uri) {
+ QDeclarativeError error;
+ error.setDescription(QDeclarativeImportDatabase::tr("\"%1\" is ambiguous. Found in %2 and in %3").arg(uri).arg(url).arg(it->url));
+ errors->prepend(error);
+ return false;
+ }
+ }
+
+ QList<QDeclarativeDirParser::Script>::const_iterator send = qmldirscripts.constEnd();
+ for (QList<QDeclarativeDirParser::Script>::const_iterator sit = qmldirscripts.constBegin(); sit != send; ++sit) {
+ // Only include scripts that match our requested version
+ if (((vmaj == -1) || (sit->majorVersion == vmaj)) &&
+ ((vmin == -1) || (sit->minorVersion <= vmin))) {
+
+ // Load the highest version that matches
+ QMap<QString, QDeclarativeDirParser::Script>::iterator it = scripts.find(sit->nameSpace);
+ if (it == scripts.end() || (it->minorVersion < sit->minorVersion)) {
+ scripts.insert(sit->nameSpace, *sit);
+ }
+ }
+ }
+ }
+
QDeclarativeImportedNamespace::Data data;
data.uri = uri;
data.url = url;
@@ -626,6 +706,8 @@ bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomp
data.minversion = vmin;
data.isLibrary = importType == QDeclarativeScript::Import::Library;
data.qmlDirComponents = qmldircomponents;
+ data.qmlDirScripts = scripts.values();
+
s->imports.prepend(data);
return true;
diff --git a/src/declarative/qml/qdeclarativeimport_p.h b/src/declarative/qml/qdeclarativeimport_p.h
index a71ccbeb30..a9648c0413 100644
--- a/src/declarative/qml/qdeclarativeimport_p.h
+++ b/src/declarative/qml/qdeclarativeimport_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -101,6 +101,15 @@ public:
void populateCache(QDeclarativeTypeNameCache *cache, QDeclarativeEngine *) const;
+ struct ScriptReference
+ {
+ QString nameSpace;
+ QString qualifier;
+ QUrl location;
+ };
+
+ QList<ScriptReference> resolvedScripts() const;
+
private:
friend class QDeclarativeImportDatabase;
QDeclarativeImportsPrivate *d;
diff --git a/src/declarative/qml/qdeclarativeincubator.cpp b/src/declarative/qml/qdeclarativeincubator.cpp
index 194c1e1214..6262d2eed0 100644
--- a/src/declarative/qml/qdeclarativeincubator.cpp
+++ b/src/declarative/qml/qdeclarativeincubator.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativeincubator.h b/src/declarative/qml/qdeclarativeincubator.h
index 1699688274..2e281ad9de 100644
--- a/src/declarative/qml/qdeclarativeincubator.h
+++ b/src/declarative/qml/qdeclarativeincubator.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeEngine;
diff --git a/src/declarative/qml/qdeclarativeincubator_p.h b/src/declarative/qml/qdeclarativeincubator_p.h
index 6730fc7bb6..0084107453 100644
--- a/src/declarative/qml/qdeclarativeincubator_p.h
+++ b/src/declarative/qml/qdeclarativeincubator_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativeinfo.cpp b/src/declarative/qml/qdeclarativeinfo.cpp
index e2b20b0f2b..b71739cc93 100644
--- a/src/declarative/qml/qdeclarativeinfo.cpp
+++ b/src/declarative/qml/qdeclarativeinfo.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativeinfo.h b/src/declarative/qml/qdeclarativeinfo.h
index e97d841217..43dd359e6c 100644
--- a/src/declarative/qml/qdeclarativeinfo.h
+++ b/src/declarative/qml/qdeclarativeinfo.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -50,7 +50,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeInfoPrivate;
class Q_DECLARATIVE_EXPORT QDeclarativeInfo : public QDebug
@@ -60,7 +59,6 @@ public:
~QDeclarativeInfo();
inline QDeclarativeInfo &operator<<(QChar t) { QDebug::operator<<(t); return *this; }
- inline QDeclarativeInfo &operator<<(QBool t) { QDebug::operator<<(t); return *this; }
inline QDeclarativeInfo &operator<<(bool t) { QDebug::operator<<(t); return *this; }
inline QDeclarativeInfo &operator<<(char t) { QDebug::operator<<(t); return *this; }
inline QDeclarativeInfo &operator<<(signed short t) { QDebug::operator<<(t); return *this; }
diff --git a/src/declarative/qml/qdeclarativeinstruction.cpp b/src/declarative/qml/qdeclarativeinstruction.cpp
index 6d3457ad11..10b7940fe3 100644
--- a/src/declarative/qml/qdeclarativeinstruction.cpp
+++ b/src/declarative/qml/qdeclarativeinstruction.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativeinstruction_p.h b/src/declarative/qml/qdeclarativeinstruction_p.h
index 08cf7c28b8..155bcf8eca 100644
--- a/src/declarative/qml/qdeclarativeinstruction_p.h
+++ b/src/declarative/qml/qdeclarativeinstruction_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -326,6 +326,7 @@ union QDeclarativeInstruction
int scope;
int bindingId;
ushort line;
+ ushort column;
};
struct instr_storeScript {
QML_INSTR_HEADER
@@ -366,17 +367,10 @@ union QDeclarativeInstruction
QML_INSTR_HEADER
int propertyIndex;
struct QRect {
-#if defined(Q_OS_MAC)
- int y1;
- int x1;
- int y2;
- int x2;
-#else
int x1;
int y1;
int x2;
int y2;
-#endif
} rect;
};
struct instr_storeRectF {
@@ -407,6 +401,7 @@ union QDeclarativeInstruction
int value;
short context;
ushort line;
+ ushort column;
};
struct instr_assignSignalObject {
QML_INSTR_HEADER
diff --git a/src/declarative/qml/qdeclarativeintegercache.cpp b/src/declarative/qml/qdeclarativeintegercache.cpp
index f4a8f8c6de..6dd2f48e2f 100644
--- a/src/declarative/qml/qdeclarativeintegercache.cpp
+++ b/src/declarative/qml/qdeclarativeintegercache.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativeintegercache_p.h b/src/declarative/qml/qdeclarativeintegercache_p.h
index 64061b43c5..fbedb2f3c7 100644
--- a/src/declarative/qml/qdeclarativeintegercache_p.h
+++ b/src/declarative/qml/qdeclarativeintegercache_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativelist.cpp b/src/declarative/qml/qdeclarativelist.cpp
index c717ed0509..924d9b13f1 100644
--- a/src/declarative/qml/qdeclarativelist.cpp
+++ b/src/declarative/qml/qdeclarativelist.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativelist.h b/src/declarative/qml/qdeclarativelist.h
index 5b2d5b4e3b..b3e66eaf9e 100644
--- a/src/declarative/qml/qdeclarativelist.h
+++ b/src/declarative/qml/qdeclarativelist.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -50,7 +50,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QObject;
struct QMetaObject;
diff --git a/src/declarative/qml/qdeclarativelist_p.h b/src/declarative/qml/qdeclarativelist_p.h
index 10495e990c..2c33c8200c 100644
--- a/src/declarative/qml/qdeclarativelist_p.h
+++ b/src/declarative/qml/qdeclarativelist_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativelistmodel.cpp b/src/declarative/qml/qdeclarativelistmodel.cpp
index 5dc546f90e..172511e1a1 100644
--- a/src/declarative/qml/qdeclarativelistmodel.cpp
+++ b/src/declarative/qml/qdeclarativelistmodel.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativelistmodel_p.h b/src/declarative/qml/qdeclarativelistmodel_p.h
index 256cdf1bd2..e2e55e5028 100644
--- a/src/declarative/qml/qdeclarativelistmodel_p.h
+++ b/src/declarative/qml/qdeclarativelistmodel_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -59,7 +59,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeListModelWorkerAgent;
class ListModel;
diff --git a/src/declarative/qml/qdeclarativelistmodel_p_p.h b/src/declarative/qml/qdeclarativelistmodel_p_p.h
index 6b7a3478c7..982667b80b 100644
--- a/src/declarative/qml/qdeclarativelistmodel_p_p.h
+++ b/src/declarative/qml/qdeclarativelistmodel_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -62,7 +62,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class DynamicRoleModelNode;
diff --git a/src/declarative/qml/qdeclarativelistmodelworkeragent.cpp b/src/declarative/qml/qdeclarativelistmodelworkeragent.cpp
index dd27f26137..91c0a6c031 100644
--- a/src/declarative/qml/qdeclarativelistmodelworkeragent.cpp
+++ b/src/declarative/qml/qdeclarativelistmodelworkeragent.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -92,6 +92,13 @@ QDeclarativeListModelWorkerAgent::QDeclarativeListModelWorkerAgent(QDeclarativeL
{
}
+QDeclarativeListModelWorkerAgent::~QDeclarativeListModelWorkerAgent()
+{
+ mutex.lock();
+ syncDone.wakeAll();
+ mutex.unlock();
+}
+
void QDeclarativeListModelWorkerAgent::setV8Engine(QV8Engine *eng)
{
m_copy->m_engine = eng;
diff --git a/src/declarative/qml/qdeclarativelistmodelworkeragent_p.h b/src/declarative/qml/qdeclarativelistmodelworkeragent_p.h
index 9945cad787..6c97fc54b4 100644
--- a/src/declarative/qml/qdeclarativelistmodelworkeragent_p.h
+++ b/src/declarative/qml/qdeclarativelistmodelworkeragent_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -65,7 +65,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeListModel;
@@ -76,7 +75,7 @@ class QDeclarativeListModelWorkerAgent : public QObject
public:
QDeclarativeListModelWorkerAgent(QDeclarativeListModel *);
-
+ ~QDeclarativeListModelWorkerAgent();
void setV8Engine(QV8Engine *eng);
void addref();
diff --git a/src/declarative/qml/qdeclarativelocale.cpp b/src/declarative/qml/qdeclarativelocale.cpp
index 88259c5dbf..b61934d96d 100644
--- a/src/declarative/qml/qdeclarativelocale.cpp
+++ b/src/declarative/qml/qdeclarativelocale.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -990,9 +990,9 @@ v8::Handle<v8::Value> QDeclarativeLocale::locale(QV8Engine *v8engine, const QStr
*/
/*!
- \qmlproperty Array<int> QtQuick2::Locale::weekdays
+ \qmlproperty Array<int> QtQuick2::Locale::weekDays
- Holds an array of days that are considered weekdays according to the current locale,
+ Holds an array of days that are considered week days according to the current locale,
where Sunday is 0 and Saturday is 6.
\sa firstDayOfWeek
diff --git a/src/declarative/qml/qdeclarativelocale_p.h b/src/declarative/qml/qdeclarativelocale_p.h
index f4d551b749..0bdf2cea5c 100644
--- a/src/declarative/qml/qdeclarativelocale_p.h
+++ b/src/declarative/qml/qdeclarativelocale_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -53,7 +53,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeDateExtension
{
diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/declarative/qml/qdeclarativemetatype.cpp
index 6fa71d06fd..c4b5ffe45f 100644
--- a/src/declarative/qml/qdeclarativemetatype.cpp
+++ b/src/declarative/qml/qdeclarativemetatype.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativemetatype_p.h b/src/declarative/qml/qdeclarativemetatype_p.h
index c1853f0033..4e797a121a 100644
--- a/src/declarative/qml/qdeclarativemetatype_p.h
+++ b/src/declarative/qml/qdeclarativemetatype_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp b/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp
index fd08baddf1..e5d12179fe 100644
--- a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp
+++ b/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.h b/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.h
index c55f8e30bf..d4889dfcfd 100644
--- a/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.h
+++ b/src/declarative/qml/qdeclarativenetworkaccessmanagerfactory.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QNetworkAccessManager;
class Q_DECLARATIVE_EXPORT QDeclarativeNetworkAccessManagerFactory
diff --git a/src/declarative/qml/qdeclarativenotifier.cpp b/src/declarative/qml/qdeclarativenotifier.cpp
index 8c605fa0fa..f204933014 100644
--- a/src/declarative/qml/qdeclarativenotifier.cpp
+++ b/src/declarative/qml/qdeclarativenotifier.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativenotifier_p.h b/src/declarative/qml/qdeclarativenotifier_p.h
index f6e1bfc861..b6cfdf7be7 100644
--- a/src/declarative/qml/qdeclarativenotifier_p.h
+++ b/src/declarative/qml/qdeclarativenotifier_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativenullablevalue_p_p.h b/src/declarative/qml/qdeclarativenullablevalue_p_p.h
index 5d04f53b09..f4da89d6ca 100644
--- a/src/declarative/qml/qdeclarativenullablevalue_p_p.h
+++ b/src/declarative/qml/qdeclarativenullablevalue_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativeopenmetaobject.cpp b/src/declarative/qml/qdeclarativeopenmetaobject.cpp
index 6dbd254421..c9eb1511b4 100644
--- a/src/declarative/qml/qdeclarativeopenmetaobject.cpp
+++ b/src/declarative/qml/qdeclarativeopenmetaobject.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativeopenmetaobject_p.h b/src/declarative/qml/qdeclarativeopenmetaobject_p.h
index a3f3bf710d..c2f537ce7f 100644
--- a/src/declarative/qml/qdeclarativeopenmetaobject_p.h
+++ b/src/declarative/qml/qdeclarativeopenmetaobject_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -54,7 +54,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeEngine;
class QMetaPropertyBuilder;
diff --git a/src/declarative/qml/qdeclarativeparserstatus.cpp b/src/declarative/qml/qdeclarativeparserstatus.cpp
index ebf4715223..e6ad673ada 100644
--- a/src/declarative/qml/qdeclarativeparserstatus.cpp
+++ b/src/declarative/qml/qdeclarativeparserstatus.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativeparserstatus.h b/src/declarative/qml/qdeclarativeparserstatus.h
index 460600af75..6f628fa3c8 100644
--- a/src/declarative/qml/qdeclarativeparserstatus.h
+++ b/src/declarative/qml/qdeclarativeparserstatus.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class Q_DECLARATIVE_EXPORT QDeclarativeParserStatus
{
diff --git a/src/declarative/qml/qdeclarativeprivate.h b/src/declarative/qml/qdeclarativeprivate.h
index 396e9dfc19..8329f6b927 100644
--- a/src/declarative/qml/qdeclarativeprivate.h
+++ b/src/declarative/qml/qdeclarativeprivate.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -60,7 +60,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
typedef QObject *(*QDeclarativeAttachedPropertiesFunc)(QObject *);
diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp
index b393b77b5f..ff03018f00 100644
--- a/src/declarative/qml/qdeclarativeproperty.cpp
+++ b/src/declarative/qml/qdeclarativeproperty.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -1052,6 +1052,22 @@ QVariant QDeclarativePropertyPrivate::readValueProperty()
}
}
+static QUrl urlFromUserString(const QByteArray &data)
+{
+ QUrl u;
+ if (!data.isEmpty())
+ {
+ // Preserve any valid percent-encoded octets supplied by the source
+ u.setEncodedUrl(data, QUrl::TolerantMode);
+ }
+ return u;
+}
+
+static QUrl urlFromUserString(const QString &data)
+{
+ return urlFromUserString(data.toUtf8());
+}
+
// helper function to allow assignment / binding to QList<QUrl> properties.
static QVariant resolvedUrlSequence(const QVariant &value, QDeclarativeContextData *context)
{
@@ -1059,19 +1075,19 @@ static QVariant resolvedUrlSequence(const QVariant &value, QDeclarativeContextDa
if (value.userType() == qMetaTypeId<QUrl>()) {
urls.append(value.toUrl());
} else if (value.userType() == qMetaTypeId<QString>()) {
- urls.append(QUrl(value.toString()));
+ urls.append(urlFromUserString(value.toString()));
} else if (value.userType() == qMetaTypeId<QByteArray>()) {
- urls.append(QUrl(QString::fromUtf8(value.toByteArray())));
+ urls.append(urlFromUserString(value.toByteArray()));
} else if (value.userType() == qMetaTypeId<QList<QUrl> >()) {
urls = value.value<QList<QUrl> >();
} else if (value.userType() == qMetaTypeId<QStringList>()) {
QStringList urlStrings = value.value<QStringList>();
for (int i = 0; i < urlStrings.size(); ++i)
- urls.append(QUrl(urlStrings.at(i)));
+ urls.append(urlFromUserString(urlStrings.at(i)));
} else if (value.userType() == qMetaTypeId<QList<QString> >()) {
QList<QString> urlStrings = value.value<QList<QString> >();
for (int i = 0; i < urlStrings.size(); ++i)
- urls.append(QUrl(urlStrings.at(i)));
+ urls.append(urlFromUserString(urlStrings.at(i)));
} // note: QList<QByteArray> is not currently supported.
QList<QUrl> resolvedUrls;
@@ -1211,10 +1227,10 @@ bool QDeclarativePropertyPrivate::write(QObject *object,
u = value.toUrl();
found = true;
} else if (variantType == QVariant::ByteArray) {
- u = QUrl(QString::fromUtf8(value.toByteArray()));
+ u = urlFromUserString(value.toByteArray());
found = true;
} else if (variantType == QVariant::String) {
- u = QUrl(value.toString());
+ u = urlFromUserString(value.toString());
found = true;
}
diff --git a/src/declarative/qml/qdeclarativeproperty.h b/src/declarative/qml/qdeclarativeproperty.h
index b58d780050..5b26eacdcd 100644
--- a/src/declarative/qml/qdeclarativeproperty.h
+++ b/src/declarative/qml/qdeclarativeproperty.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QObject;
class QVariant;
diff --git a/src/declarative/qml/qdeclarativeproperty_p.h b/src/declarative/qml/qdeclarativeproperty_p.h
index ecb67b8f74..1edd611711 100644
--- a/src/declarative/qml/qdeclarativeproperty_p.h
+++ b/src/declarative/qml/qdeclarativeproperty_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp
index c3f197d941..30f207bede 100644
--- a/src/declarative/qml/qdeclarativepropertycache.cpp
+++ b/src/declarative/qml/qdeclarativepropertycache.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativepropertycache_p.h b/src/declarative/qml/qdeclarativepropertycache_p.h
index 9d3ccf82aa..be32075e30 100644
--- a/src/declarative/qml/qdeclarativepropertycache_p.h
+++ b/src/declarative/qml/qdeclarativepropertycache_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativepropertyvalueinterceptor.cpp b/src/declarative/qml/qdeclarativepropertyvalueinterceptor.cpp
index 891db32005..6bdabe0354 100644
--- a/src/declarative/qml/qdeclarativepropertyvalueinterceptor.cpp
+++ b/src/declarative/qml/qdeclarativepropertyvalueinterceptor.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativepropertyvalueinterceptor_p.h b/src/declarative/qml/qdeclarativepropertyvalueinterceptor_p.h
index 1142989895..2d77648e43 100644
--- a/src/declarative/qml/qdeclarativepropertyvalueinterceptor_p.h
+++ b/src/declarative/qml/qdeclarativepropertyvalueinterceptor_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativepropertyvaluesource.cpp b/src/declarative/qml/qdeclarativepropertyvaluesource.cpp
index ee6269d0cd..e6bfe5500b 100644
--- a/src/declarative/qml/qdeclarativepropertyvaluesource.cpp
+++ b/src/declarative/qml/qdeclarativepropertyvaluesource.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativepropertyvaluesource.h b/src/declarative/qml/qdeclarativepropertyvaluesource.h
index deb01912f3..7bf89214cf 100644
--- a/src/declarative/qml/qdeclarativepropertyvaluesource.h
+++ b/src/declarative/qml/qdeclarativepropertyvaluesource.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeProperty;
class Q_DECLARATIVE_EXPORT QDeclarativePropertyValueSource
diff --git a/src/declarative/qml/qdeclarativeproxymetaobject.cpp b/src/declarative/qml/qdeclarativeproxymetaobject.cpp
index 57f5c3a543..eeb4e86114 100644
--- a/src/declarative/qml/qdeclarativeproxymetaobject.cpp
+++ b/src/declarative/qml/qdeclarativeproxymetaobject.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativeproxymetaobject_p.h b/src/declarative/qml/qdeclarativeproxymetaobject_p.h
index 315983caf1..ad6947f240 100644
--- a/src/declarative/qml/qdeclarativeproxymetaobject_p.h
+++ b/src/declarative/qml/qdeclarativeproxymetaobject_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -65,7 +65,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeProxyMetaObject : public QAbstractDynamicMetaObject
{
diff --git a/src/declarative/qml/qdeclarativerewrite.cpp b/src/declarative/qml/qdeclarativerewrite.cpp
index 7749925d8b..fd072ec3f5 100644
--- a/src/declarative/qml/qdeclarativerewrite.cpp
+++ b/src/declarative/qml/qdeclarativerewrite.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativerewrite_p.h b/src/declarative/qml/qdeclarativerewrite_p.h
index cbce79028c..33a415d614 100644
--- a/src/declarative/qml/qdeclarativerewrite_p.h
+++ b/src/declarative/qml/qdeclarativerewrite_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativescript.cpp b/src/declarative/qml/qdeclarativescript.cpp
index cbb2bc2cac..f699fed8ba 100644
--- a/src/declarative/qml/qdeclarativescript.cpp
+++ b/src/declarative/qml/qdeclarativescript.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -679,9 +679,9 @@ ProcessAST::defineObjectBinding(AST::UiQualifiedId *propertyName,
AST::UiObjectInitializer *initializer)
{
int lastTypeDot = objectType.lastIndexOf(QLatin1Char('.'));
- bool isType = !objectType.isEmpty() &&
- (objectType.at(0).isUpper() ||
- (lastTypeDot >= 0 && objectType.at(lastTypeDot+1).isUpper()));
+
+ // With no preceding qualification, first char is at (-1 + 1) == 0
+ bool isType = !objectType.isEmpty() && objectType.at(lastTypeDot+1).isUpper();
int propertyCount = 0;
for (AST::UiQualifiedId *name = propertyName; name; name = name->next){
@@ -701,11 +701,26 @@ ProcessAST::defineObjectBinding(AST::UiQualifiedId *propertyName,
if (!isType) {
- if(propertyCount || !currentObject()) {
+ // Is the identifier qualified by a namespace?
+ int namespaceLength = 0;
+ if (lastTypeDot > 0) {
+ const QString qualifier(objectType.left(lastTypeDot));
+
+ for (int ii = 0; ii < _parser->_imports.count(); ++ii) {
+ const QDeclarativeScript::Import &import = _parser->_imports.at(ii);
+ if (import.qualifier == qualifier) {
+ // The qualifier is a namespace - expect a type here
+ namespaceLength = qualifier.length() + 1;
+ break;
+ }
+ }
+ }
+
+ if (propertyCount || !currentObject() || namespaceLength) {
QDeclarativeError error;
error.setDescription(QCoreApplication::translate("QDeclarativeParser","Expected type name"));
error.setLine(typeLocation.startLine);
- error.setColumn(typeLocation.startColumn);
+ error.setColumn(typeLocation.startColumn + namespaceLength);
_parser->_errors << error;
return 0;
}
diff --git a/src/declarative/qml/qdeclarativescript_p.h b/src/declarative/qml/qdeclarativescript_p.h
index 4063c3ba95..d76f788021 100644
--- a/src/declarative/qml/qdeclarativescript_p.h
+++ b/src/declarative/qml/qdeclarativescript_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -67,7 +67,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QByteArray;
class QDeclarativePropertyCache;
diff --git a/src/declarative/qml/qdeclarativescriptstring.cpp b/src/declarative/qml/qdeclarativescriptstring.cpp
index 666e187889..1142c026c3 100644
--- a/src/declarative/qml/qdeclarativescriptstring.cpp
+++ b/src/declarative/qml/qdeclarativescriptstring.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativescriptstring.h b/src/declarative/qml/qdeclarativescriptstring.h
index 20bbc1bcf7..074d91df59 100644
--- a/src/declarative/qml/qdeclarativescriptstring.h
+++ b/src/declarative/qml/qdeclarativescriptstring.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -50,7 +50,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QObject;
class QDeclarativeContext;
diff --git a/src/declarative/qml/qdeclarativescriptstring_p.h b/src/declarative/qml/qdeclarativescriptstring_p.h
index 1c5bd29987..8ec880a96a 100644
--- a/src/declarative/qml/qdeclarativescriptstring_p.h
+++ b/src/declarative/qml/qdeclarativescriptstring_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -49,13 +49,14 @@ QT_BEGIN_NAMESPACE
class QDeclarativeScriptStringPrivate : public QSharedData
{
public:
- QDeclarativeScriptStringPrivate() : context(0), scope(0), bindingId(-1), lineNumber(-1) {}
+ QDeclarativeScriptStringPrivate() : context(0), scope(0), bindingId(-1), lineNumber(-1), columnNumber(-1) {}
QDeclarativeContext *context;
QObject *scope;
QString script;
int bindingId;
int lineNumber;
+ int columnNumber;
};
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativesqldatabase.cpp b/src/declarative/qml/qdeclarativesqldatabase.cpp
index c21d47234f..5f7100e49b 100644
--- a/src/declarative/qml/qdeclarativesqldatabase.cpp
+++ b/src/declarative/qml/qdeclarativesqldatabase.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativesqldatabase_p.h b/src/declarative/qml/qdeclarativesqldatabase_p.h
index 605e5d527b..cf093eefad 100644
--- a/src/declarative/qml/qdeclarativesqldatabase_p.h
+++ b/src/declarative/qml/qdeclarativesqldatabase_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativestringconverters.cpp b/src/declarative/qml/qdeclarativestringconverters.cpp
index 40a3801423..2753fca455 100644
--- a/src/declarative/qml/qdeclarativestringconverters.cpp
+++ b/src/declarative/qml/qdeclarativestringconverters.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativestringconverters_p.h b/src/declarative/qml/qdeclarativestringconverters_p.h
index eb3f6076e9..b8efc803e6 100644
--- a/src/declarative/qml/qdeclarativestringconverters_p.h
+++ b/src/declarative/qml/qdeclarativestringconverters_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp
index cbc075dac3..bf319e5387 100644
--- a/src/declarative/qml/qdeclarativetypeloader.cpp
+++ b/src/declarative/qml/qdeclarativetypeloader.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -1427,6 +1427,11 @@ const QList<QDeclarativeTypeData::ScriptReference> &QDeclarativeTypeData::resolv
return m_scripts;
}
+const QSet<QString> &QDeclarativeTypeData::namespaces() const
+{
+ return m_namespaces;
+}
+
QDeclarativeCompiledData *QDeclarativeTypeData::compiledData() const
{
if (m_compiledData)
@@ -1648,6 +1653,27 @@ void QDeclarativeTypeData::resolveTypes()
}
}
+ // Add any imported scripts to our resolved set
+ foreach (const QDeclarativeImports::ScriptReference &script, m_imports.resolvedScripts())
+ {
+ QDeclarativeScriptBlob *blob = typeLoader()->getScript(script.location);
+ addDependency(blob);
+
+ ScriptReference ref;
+ //ref.location = ...
+ ref.qualifier = script.nameSpace;
+ if (!script.qualifier.isEmpty())
+ {
+ ref.qualifier.prepend(script.qualifier + QLatin1Char('.'));
+
+ // Add a reference to the enclosing namespace
+ m_namespaces.insert(script.qualifier);
+ }
+
+ ref.script = blob;
+ m_scripts << ref;
+ }
+
foreach (QDeclarativeScript::TypeReference *parserRef, scriptParser.referencedTypes()) {
TypeReference ref;
diff --git a/src/declarative/qml/qdeclarativetypeloader_p.h b/src/declarative/qml/qdeclarativetypeloader_p.h
index 7a4db21939..7b29f4b233 100644
--- a/src/declarative/qml/qdeclarativetypeloader_p.h
+++ b/src/declarative/qml/qdeclarativetypeloader_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -294,6 +294,7 @@ public:
const QList<TypeReference> &resolvedTypes() const;
const QList<ScriptReference> &resolvedScripts() const;
+ const QSet<QString> &namespaces() const;
QDeclarativeCompiledData *compiledData() const;
@@ -327,6 +328,8 @@ private:
QList<ScriptReference> m_scripts;
QList<QDeclarativeQmldirData *> m_qmldirs;
+ QSet<QString> m_namespaces;
+
QList<TypeReference> m_types;
bool m_typesResolved:1;
diff --git a/src/declarative/qml/qdeclarativetypenamecache.cpp b/src/declarative/qml/qdeclarativetypenamecache.cpp
index 2499f1d0c7..58ab1998c6 100644
--- a/src/declarative/qml/qdeclarativetypenamecache.cpp
+++ b/src/declarative/qml/qdeclarativetypenamecache.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -53,85 +53,71 @@ QDeclarativeTypeNameCache::~QDeclarativeTypeNameCache()
{
}
-void QDeclarativeTypeNameCache::add(const QHashedString &name, int importedScriptIndex)
+void QDeclarativeTypeNameCache::add(const QHashedString &name, int importedScriptIndex, const QHashedString &nameSpace)
{
+ Import import;
+ import.scriptIndex = importedScriptIndex;
+
+ if (nameSpace.length() != 0) {
+ Import *i = m_namedImports.value(nameSpace);
+ Q_ASSERT(i != 0);
+ m_namespacedImports[i].insert(name, import);
+ return;
+ }
+
if (m_namedImports.contains(name))
return;
- Import import;
- import.scriptIndex = importedScriptIndex;
m_namedImports.insert(name, import);
}
QDeclarativeTypeNameCache::Result QDeclarativeTypeNameCache::query(const QHashedStringRef &name)
{
- Import *i = m_namedImports.value(name);
- if (i) {
- if (i->scriptIndex != -1)
- return Result(i->scriptIndex);
- else
- return Result((const void *)i);
- }
+ Result result = query(m_namedImports, name);
- for (int ii = 0; ii < m_anonymousImports.count(); ++ii) {
- if (QDeclarativeType *type = m_anonymousImports.at(ii).type(name))
- return Result(type);
- }
+ if (!result.isValid())
+ result = typeSearch(m_anonymousImports, name);
- return Result();
+ return result;
}
QDeclarativeTypeNameCache::Result QDeclarativeTypeNameCache::query(const QHashedStringRef &name,
const void *importNamespace)
{
Q_ASSERT(importNamespace);
- Import *i = (Import *)importNamespace;
+ const Import *i = static_cast<const Import *>(importNamespace);
Q_ASSERT(i->scriptIndex == -1);
- for (int ii = 0; ii < i->modules.count(); ++ii) {
- if (QDeclarativeType *type = i->modules.at(ii).type(name))
- return Result(type);
- }
-
- return Result();
+ return typeSearch(i->modules, name);
}
QDeclarativeTypeNameCache::Result QDeclarativeTypeNameCache::query(const QHashedV8String &name)
{
- Import *i = m_namedImports.value(name);
- if (i) {
- if (i->scriptIndex != -1)
- return Result(i->scriptIndex);
- else
- return Result((const void *)i);
- }
+ Result result = query(m_namedImports, name);
- for (int ii = 0; ii < m_anonymousImports.count(); ++ii) {
- if (QDeclarativeType *type = m_anonymousImports.at(ii).type(name))
- return Result(type);
- }
+ if (!result.isValid())
+ result = typeSearch(m_anonymousImports, name);
- return Result();
+ return result;
}
QDeclarativeTypeNameCache::Result QDeclarativeTypeNameCache::query(const QHashedV8String &name, const void *importNamespace)
{
Q_ASSERT(importNamespace);
- Import *i = (Import *)importNamespace;
+ const Import *i = static_cast<const Import *>(importNamespace);
Q_ASSERT(i->scriptIndex == -1);
- for (int ii = 0; ii < i->modules.count(); ++ii) {
- if (QDeclarativeType *type = i->modules.at(ii).type(name))
- return Result(type);
- }
-
- return Result();
+ QMap<const Import *, QStringHash<Import> >::const_iterator it = m_namespacedImports.find(i);
+ if (it != m_namespacedImports.constEnd())
+ return query(*it, name);
+
+ return typeSearch(i->modules, name);
}
QDeclarativeMetaType::ModuleApiInstance *QDeclarativeTypeNameCache::moduleApi(const void *importNamespace)
{
Q_ASSERT(importNamespace);
- Import *i = (Import *)importNamespace;
+ const Import *i = static_cast<const Import *>(importNamespace);
Q_ASSERT(i->scriptIndex == -1);
return i->moduleApi;
diff --git a/src/declarative/qml/qdeclarativetypenamecache_p.h b/src/declarative/qml/qdeclarativetypenamecache_p.h
index 188e293830..8edc34d293 100644
--- a/src/declarative/qml/qdeclarativetypenamecache_p.h
+++ b/src/declarative/qml/qdeclarativetypenamecache_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -73,7 +73,7 @@ public:
inline bool isEmpty() const;
- void add(const QHashedString &, int);
+ void add(const QHashedString &name, int sciptIndex = -1, const QHashedString &nameSpace = QHashedString());
struct Result {
inline Result();
@@ -107,7 +107,35 @@ private:
int scriptIndex;
};
+ template<typename Key>
+ Result query(const QStringHash<Import> &imports, Key key)
+ {
+ Import *i = imports.value(key);
+ if (i) {
+ if (i->scriptIndex != -1) {
+ return Result(i->scriptIndex);
+ } else {
+ return Result(static_cast<const void *>(i));
+ }
+ }
+
+ return Result();
+ }
+
+ template<typename Key>
+ Result typeSearch(const QVector<QDeclarativeTypeModuleVersion> &modules, Key key)
+ {
+ QVector<QDeclarativeTypeModuleVersion>::const_iterator end = modules.constEnd();
+ for (QVector<QDeclarativeTypeModuleVersion>::const_iterator it = modules.constBegin(); it != end; ++it) {
+ if (QDeclarativeType *type = it->type(key))
+ return Result(type);
+ }
+
+ return Result();
+ }
+
QStringHash<Import> m_namedImports;
+ QMap<const Import *, QStringHash<Import> > m_namespacedImports;
QVector<QDeclarativeTypeModuleVersion> m_anonymousImports;
QDeclarativeEngine *engine;
@@ -144,7 +172,7 @@ bool QDeclarativeTypeNameCache::Result::isValid() const
}
QDeclarativeTypeNameCache::Import::Import()
-: scriptIndex(-1)
+: moduleApi(0), scriptIndex(-1)
{
}
diff --git a/src/declarative/qml/qdeclarativetypenotavailable.cpp b/src/declarative/qml/qdeclarativetypenotavailable.cpp
index 273de1bfb0..a2121f45cf 100644
--- a/src/declarative/qml/qdeclarativetypenotavailable.cpp
+++ b/src/declarative/qml/qdeclarativetypenotavailable.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativetypenotavailable_p.h b/src/declarative/qml/qdeclarativetypenotavailable_p.h
index 7adce6c98d..5faf242cf1 100644
--- a/src/declarative/qml/qdeclarativetypenotavailable_p.h
+++ b/src/declarative/qml/qdeclarativetypenotavailable_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeTypeNotAvailable : public QObject {
Q_OBJECT
diff --git a/src/declarative/qml/qdeclarativevaluetype.cpp b/src/declarative/qml/qdeclarativevaluetype.cpp
index 8ba9482cea..9e5dc9040a 100644
--- a/src/declarative/qml/qdeclarativevaluetype.cpp
+++ b/src/declarative/qml/qdeclarativevaluetype.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativevaluetype_p.h b/src/declarative/qml/qdeclarativevaluetype_p.h
index 207b80921b..145a8e3302 100644
--- a/src/declarative/qml/qdeclarativevaluetype_p.h
+++ b/src/declarative/qml/qdeclarativevaluetype_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp
index 5067bcf95e..25a62d862a 100644
--- a/src/declarative/qml/qdeclarativevme.cpp
+++ b/src/declarative/qml/qdeclarativevme.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -711,7 +711,7 @@ QObject *QDeclarativeVME::run(QList<QDeclarativeError> *errors,
QDeclarativeBoundSignal *bs = new QDeclarativeBoundSignal(target, signal, target);
QDeclarativeExpression *expr =
- new QDeclarativeExpression(CTXT, context, PRIMITIVES.at(instr.value), true, COMP->name, instr.line, *new QDeclarativeExpressionPrivate);
+ new QDeclarativeExpression(CTXT, context, PRIMITIVES.at(instr.value), true, COMP->name, instr.line, instr.column, *new QDeclarativeExpressionPrivate);
bs->setExpression(expr);
QML_END_INSTR(StoreSignal)
@@ -728,6 +728,7 @@ QObject *QDeclarativeVME::run(QList<QDeclarativeError> *errors,
ss.setScript(PRIMITIVES.at(instr.value));
ss.d.data()->bindingId = instr.bindingId;
ss.d.data()->lineNumber = instr.line;
+ ss.d.data()->columnNumber = instr.column;
void *a[] = { &ss, 0, &status, &flags };
QMetaObject::metacall(target, QMetaObject::WriteProperty,
diff --git a/src/declarative/qml/qdeclarativevme_p.h b/src/declarative/qml/qdeclarativevme_p.h
index 941381e90d..3797862ffe 100644
--- a/src/declarative/qml/qdeclarativevme_p.h
+++ b/src/declarative/qml/qdeclarativevme_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativevmemetaobject.cpp b/src/declarative/qml/qdeclarativevmemetaobject.cpp
index 0955fc0689..f33d2f3cad 100644
--- a/src/declarative/qml/qdeclarativevmemetaobject.cpp
+++ b/src/declarative/qml/qdeclarativevmemetaobject.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativevmemetaobject_p.h b/src/declarative/qml/qdeclarativevmemetaobject_p.h
index c349546b72..5c5599b31d 100644
--- a/src/declarative/qml/qdeclarativevmemetaobject_p.h
+++ b/src/declarative/qml/qdeclarativevmemetaobject_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativewatcher.cpp b/src/declarative/qml/qdeclarativewatcher.cpp
index 3fca66b1a6..9ab967b0e5 100644
--- a/src/declarative/qml/qdeclarativewatcher.cpp
+++ b/src/declarative/qml/qdeclarativewatcher.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativewatcher_p.h b/src/declarative/qml/qdeclarativewatcher_p.h
index c8b31424b1..eebaede117 100644
--- a/src/declarative/qml/qdeclarativewatcher_p.h
+++ b/src/declarative/qml/qdeclarativewatcher_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp
index 253bff5b36..bc7e645bec 100644
--- a/src/declarative/qml/qdeclarativeworkerscript.cpp
+++ b/src/declarative/qml/qdeclarativeworkerscript.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -478,6 +478,10 @@ QDeclarativeWorkerScriptEngine::~QDeclarativeWorkerScriptEngine()
QCoreApplication::postEvent(d, new QEvent((QEvent::Type)QDeclarativeWorkerScriptEnginePrivate::WorkerDestroyEvent));
d->m_lock.unlock();
+ //We have to force to cleanup the main thread's event queue here
+ //to make sure the main GUI release all pending locks/wait conditions which
+ //some worker script/agent are waiting for (QDeclarativeListModelWorkerAgent::sync() for example).
+ QCoreApplication::processEvents();
wait();
d->deleteLater();
}
diff --git a/src/declarative/qml/qdeclarativeworkerscript_p.h b/src/declarative/qml/qdeclarativeworkerscript_p.h
index a3e04a88d8..1993ee04fb 100644
--- a/src/declarative/qml/qdeclarativeworkerscript_p.h
+++ b/src/declarative/qml/qdeclarativeworkerscript_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -64,7 +64,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeWorkerScript;
class QDeclarativeWorkerScriptEnginePrivate;
diff --git a/src/declarative/qml/qdeclarativexmlhttprequest.cpp b/src/declarative/qml/qdeclarativexmlhttprequest.cpp
index e72f61b52d..b4577a8fcd 100644
--- a/src/declarative/qml/qdeclarativexmlhttprequest.cpp
+++ b/src/declarative/qml/qdeclarativexmlhttprequest.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qdeclarativexmlhttprequest_p.h b/src/declarative/qml/qdeclarativexmlhttprequest_p.h
index 3014295561..7bfac68e97 100644
--- a/src/declarative/qml/qdeclarativexmlhttprequest_p.h
+++ b/src/declarative/qml/qdeclarativexmlhttprequest_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qlistmodelinterface.cpp b/src/declarative/qml/qlistmodelinterface.cpp
index b322727b0e..8ab0f59647 100644
--- a/src/declarative/qml/qlistmodelinterface.cpp
+++ b/src/declarative/qml/qlistmodelinterface.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclaractive module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/qlistmodelinterface_p.h b/src/declarative/qml/qlistmodelinterface_p.h
index ea68b12ea8..c94f1116ac 100644
--- a/src/declarative/qml/qlistmodelinterface_p.h
+++ b/src/declarative/qml/qlistmodelinterface_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -51,7 +51,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class Q_DECLARATIVE_PRIVATE_EXPORT QListModelInterface : public QObject
{
diff --git a/src/declarative/qml/rewriter/textwriter.cpp b/src/declarative/qml/rewriter/textwriter.cpp
index eee5d70dbd..20c0c19cbf 100644
--- a/src/declarative/qml/rewriter/textwriter.cpp
+++ b/src/declarative/qml/rewriter/textwriter.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/rewriter/textwriter_p.h b/src/declarative/qml/rewriter/textwriter_p.h
index 1f70a48fe3..0def353f71 100644
--- a/src/declarative/qml/rewriter/textwriter_p.h
+++ b/src/declarative/qml/rewriter/textwriter_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v4/qv4bindings.cpp b/src/declarative/qml/v4/qv4bindings.cpp
index 4e0c1821a5..fb9f8920dd 100644
--- a/src/declarative/qml/v4/qv4bindings.cpp
+++ b/src/declarative/qml/v4/qv4bindings.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -245,7 +245,7 @@ void QV4Bindings::Binding::update(QDeclarativePropertyPrivate::WriteFlags flags)
QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Binding);
if (parent->context())
QDeclarativeDebugTrace::rangeLocation(QDeclarativeDebugTrace::Binding,
- parent->context()->url, line);
+ parent->context()->url, line, column);
parent->run(this, flags);
QDeclarativeDebugTrace::endRange(QDeclarativeDebugTrace::Binding);
}
@@ -420,15 +420,16 @@ inline static QUrl toUrl(Register *reg, int type, QDeclarativeContextData *conte
if (vt == QVariant::Url) {
base = var->toUrl();
} else if (vt == QVariant::ByteArray) {
- base = QUrl(QString::fromUtf8(var->toByteArray()));
+ // Preserve any valid percent-encoded octets supplied by the source
+ base.setEncodedUrl(var->toByteArray(), QUrl::TolerantMode);
} else if (vt == QVariant::String) {
- base = QUrl(var->toString());
+ base.setEncodedUrl(var->toString().toUtf8(), QUrl::TolerantMode);
} else {
if (ok) *ok = false;
return QUrl();
}
} else if (type == QMetaType::QString) {
- base = QUrl(*reg->getstringptr());
+ base.setEncodedUrl(reg->getstringptr()->toUtf8(), QUrl::TolerantMode);
} else {
if (ok) *ok = false;
return QUrl();
@@ -974,7 +975,7 @@ void QV4Bindings::run(int instrIndex, quint32 &executedBlocks,
output.cleanupString();
MARK_CLEAN_REGISTER(instr->unaryop.output);
}
- output.setint(tmp.toInt32());
+ output.setint(tmp.toInt());
}
}
QML_V4_END_INSTR(ConvertStringToInt, unaryop)
@@ -1012,7 +1013,10 @@ void QV4Bindings::run(int instrIndex, quint32 &executedBlocks,
output.cleanupString();
MARK_CLEAN_REGISTER(instr->unaryop.output);
}
- new (output.geturlptr()) QUrl(tmp);
+ QUrl *urlPtr = output.geturlptr();
+ new (urlPtr) QUrl();
+ urlPtr->setEncodedUrl(tmp.toUtf8(), QUrl::TolerantMode);
+
URL_REGISTER(instr->unaryop.output);
}
}
diff --git a/src/declarative/qml/v4/qv4bindings_p.h b/src/declarative/qml/v4/qv4bindings_p.h
index 88e293d867..74a86dc072 100644
--- a/src/declarative/qml/v4/qv4bindings_p.h
+++ b/src/declarative/qml/v4/qv4bindings_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v4/qv4compiler.cpp b/src/declarative/qml/v4/qv4compiler.cpp
index 89f9ad8272..1c58944146 100644
--- a/src/declarative/qml/v4/qv4compiler.cpp
+++ b/src/declarative/qml/v4/qv4compiler.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v4/qv4compiler_p.h b/src/declarative/qml/v4/qv4compiler_p.h
index da148c7579..94b31653c6 100644
--- a/src/declarative/qml/v4/qv4compiler_p.h
+++ b/src/declarative/qml/v4/qv4compiler_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v4/qv4compiler_p_p.h b/src/declarative/qml/v4/qv4compiler_p_p.h
index 5d551d2410..7115f51428 100644
--- a/src/declarative/qml/v4/qv4compiler_p_p.h
+++ b/src/declarative/qml/v4/qv4compiler_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v4/qv4instruction.cpp b/src/declarative/qml/v4/qv4instruction.cpp
index bc58c9a9eb..e5156885bd 100644
--- a/src/declarative/qml/v4/qv4instruction.cpp
+++ b/src/declarative/qml/v4/qv4instruction.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v4/qv4instruction_p.h b/src/declarative/qml/v4/qv4instruction_p.h
index e41537caa8..3be1e80f32 100644
--- a/src/declarative/qml/v4/qv4instruction_p.h
+++ b/src/declarative/qml/v4/qv4instruction_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v4/qv4ir.cpp b/src/declarative/qml/v4/qv4ir.cpp
index 46af2ee74c..a79900a6c1 100644
--- a/src/declarative/qml/v4/qv4ir.cpp
+++ b/src/declarative/qml/v4/qv4ir.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v4/qv4ir_p.h b/src/declarative/qml/v4/qv4ir_p.h
index 13f842073f..e1b45844cb 100644
--- a/src/declarative/qml/v4/qv4ir_p.h
+++ b/src/declarative/qml/v4/qv4ir_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v4/qv4irbuilder.cpp b/src/declarative/qml/v4/qv4irbuilder.cpp
index 087f755a48..452cb43150 100644
--- a/src/declarative/qml/v4/qv4irbuilder.cpp
+++ b/src/declarative/qml/v4/qv4irbuilder.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v4/qv4irbuilder_p.h b/src/declarative/qml/v4/qv4irbuilder_p.h
index 9b1876c2eb..566ebd9345 100644
--- a/src/declarative/qml/v4/qv4irbuilder_p.h
+++ b/src/declarative/qml/v4/qv4irbuilder_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v4/qv4program_p.h b/src/declarative/qml/v4/qv4program_p.h
index 216b1763c4..e7eeaf59f2 100644
--- a/src/declarative/qml/v4/qv4program_p.h
+++ b/src/declarative/qml/v4/qv4program_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qdeclarativebuiltinfunctions.cpp b/src/declarative/qml/v8/qdeclarativebuiltinfunctions.cpp
index 5153043dc9..830b521027 100644
--- a/src/declarative/qml/v8/qdeclarativebuiltinfunctions.cpp
+++ b/src/declarative/qml/v8/qdeclarativebuiltinfunctions.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -80,6 +80,36 @@ enum ConsoleLogTypes {
Error
};
+static QString extendMessage(const QString &msg) {
+ if (qmlConsoleExtended()) {
+ v8::Local<v8::StackTrace> stackTrace = v8::StackTrace::CurrentStackTrace(1);
+ if (stackTrace->GetFrameCount()) {
+ v8::Local<v8::StackFrame> frame = stackTrace->GetFrame(0);
+ int line = frame->GetLineNumber();
+ QString scriptName = QString::fromUtf16(*v8::String::Value(frame->GetScriptName()));
+
+ return QString::fromLatin1("%1 (%2:%3)").arg(msg).arg(scriptName).arg(line);
+ }
+ }
+ return msg;
+}
+
+static void printStack() {
+ //The v8 default is currently 10 stack frames.
+ v8::Handle<v8::StackTrace> stackTrace =
+ v8::StackTrace::CurrentStackTrace(10, v8::StackTrace::kOverview);
+ int stackCount = stackTrace->GetFrameCount();
+
+ for (int i = 0; i < stackCount; i++) {
+ v8::Local<v8::StackFrame> frame = stackTrace->GetFrame(i);
+ v8::String::Utf8Value func_name(frame->GetFunctionName());
+ v8::String::Utf8Value script_name(frame->GetScriptName());
+ int lineNumber = frame->GetLineNumber();
+ int columnNumber = frame->GetColumn();
+ qDebug("%s (%s:%d:%d)\n", *func_name, *script_name, lineNumber, columnNumber);
+ }
+}
+
v8::Handle<v8::Value> console(ConsoleLogTypes logType, const v8::Arguments &args)
{
v8::HandleScope handleScope;
@@ -105,19 +135,7 @@ v8::Handle<v8::Value> console(ConsoleLogTypes logType, const v8::Arguments &args
}
}
- if (qmlConsoleExtended()) {
- int line = -1;
- QString scriptName;
- //get only current frame
- v8::Local<v8::StackTrace> stackTrace = v8::StackTrace::CurrentStackTrace(1);
- if (stackTrace->GetFrameCount()) {
- v8::Local<v8::StackFrame> currentStackFrame = stackTrace->GetFrame(0);
- line = currentStackFrame->GetLineNumber();
- scriptName = V8ENGINE()->toString(currentStackFrame->GetScriptName());
- }
-
- result = QString(QLatin1String("%1 (%2:%3)")).arg(result).arg(scriptName).arg(line);
- }
+ result = extendMessage(result);
switch (logType) {
case Log:
@@ -152,6 +170,7 @@ v8::Handle<v8::Value> consoleLog(const v8::Arguments &args)
{
//console.log
//console.debug
+ //console.info
//print
return console(Log, args);
}
@@ -217,24 +236,39 @@ v8::Handle<v8::Value> consoleTimeEnd(const v8::Arguments &args)
return v8::Undefined();
}
-v8::Handle<v8::Value> consoleTrace(const v8::Arguments &args)
+v8::Handle<v8::Value> consoleCount(const v8::Arguments &args)
{
- if (args.Length() != 0)
- V8THROW_ERROR("console.trace(): Invalid arguments");
+ // first argument: name to print. Ignore any additional arguments
+ QString name;
+ if (args.Length() > 0)
+ name = V8ENGINE()->toString(args[0]);
- //The v8 default is currently 10 stack frames.
v8::Handle<v8::StackTrace> stackTrace =
- v8::StackTrace::CurrentStackTrace(10, v8::StackTrace::kOverview);
- int stackCount = stackTrace->GetFrameCount();
+ v8::StackTrace::CurrentStackTrace(1, v8::StackTrace::kOverview);
- for (int i = 0; i < stackCount; i++) {
- v8::Local<v8::StackFrame> frame = stackTrace->GetFrame(i);
- v8::String::Utf8Value func_name(frame->GetFunctionName());
- v8::String::Utf8Value script_name(frame->GetScriptName());
- int lineNumber = frame->GetLineNumber();
- int columnNumber = frame->GetColumn();
- qDebug("%s (%s:%d:%d)\n", *func_name, *script_name, lineNumber, columnNumber);
+ if (stackTrace->GetFrameCount()) {
+ v8::Local<v8::StackFrame> frame = stackTrace->GetFrame(0);
+
+ QString scriptName = V8ENGINE()->toString(frame->GetScriptName());
+ int line = frame->GetLineNumber();
+ int column = frame->GetColumn();
+
+ int value = V8ENGINE()->consoleCountHelper(scriptName, line, column);
+ QString message = name + QLatin1String(": ") + QString::number(value);
+ if (qmlConsoleExtended())
+ message = QString::fromLatin1("%1 (%2:%3)").arg(message).arg(scriptName).arg(line);
+ qDebug("%s", qPrintable(message));
}
+
+ return v8::Undefined();
+}
+
+v8::Handle<v8::Value> consoleTrace(const v8::Arguments &args)
+{
+ if (args.Length() != 0)
+ V8THROW_ERROR("console.trace(): Invalid arguments");
+
+ printStack();
return v8::Undefined();
}
@@ -243,6 +277,38 @@ v8::Handle<v8::Value> consoleWarn(const v8::Arguments &args)
return console(Warn, args);
}
+v8::Handle<v8::Value> consoleAssert(const v8::Arguments &args)
+{
+ if (args.Length() == 0)
+ V8THROW_ERROR("console.assert(): Missing argument");
+
+ if (!args[0]->ToBoolean()->Value()) {
+ QString message;
+ for (int i = 1; i < args.Length(); ++i) {
+ if (i != 1)
+ message.append(QLatin1Char(' '));
+
+ v8::Local<v8::Value> value = args[i];
+ message.append(V8ENGINE()->toString(value->ToString()));
+ }
+
+ message = extendMessage(message);
+ qCritical("%s", qPrintable(message));
+ printStack();
+ }
+ return v8::Undefined();
+}
+
+v8::Handle<v8::Value> consoleException(const v8::Arguments &args)
+{
+ if (args.Length() == 0)
+ V8THROW_ERROR("console.exception(): Missing argument");
+ console(Error, args);
+ printStack();
+
+ return v8::Undefined();
+}
+
v8::Handle<v8::Value> stringArg(const v8::Arguments &args)
{
QString value = V8ENGINE()->toString(args.This()->ToString());
diff --git a/src/declarative/qml/v8/qdeclarativebuiltinfunctions_p.h b/src/declarative/qml/v8/qdeclarativebuiltinfunctions_p.h
index 815182f2a5..62dcffb367 100644
--- a/src/declarative/qml/v8/qdeclarativebuiltinfunctions_p.h
+++ b/src/declarative/qml/v8/qdeclarativebuiltinfunctions_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -67,8 +67,11 @@ v8::Handle<v8::Value> consoleProfile(const v8::Arguments &args);
v8::Handle<v8::Value> consoleProfileEnd(const v8::Arguments &args);
v8::Handle<v8::Value> consoleTime(const v8::Arguments &args);
v8::Handle<v8::Value> consoleTimeEnd(const v8::Arguments &args);
+v8::Handle<v8::Value> consoleCount(const v8::Arguments &args);
v8::Handle<v8::Value> consoleTrace(const v8::Arguments &args);
v8::Handle<v8::Value> consoleWarn(const v8::Arguments &args);
+v8::Handle<v8::Value> consoleAssert(const v8::Arguments &args);
+v8::Handle<v8::Value> consoleException(const v8::Arguments &args);
v8::Handle<v8::Value> isQtObject(const v8::Arguments &args);
v8::Handle<v8::Value> rgba(const v8::Arguments &args);
v8::Handle<v8::Value> hsla(const v8::Arguments &args);
diff --git a/src/declarative/qml/v8/qjsconverter_impl_p.h b/src/declarative/qml/v8/qjsconverter_impl_p.h
index d00e9f5760..d5196fd619 100644
--- a/src/declarative/qml/v8/qjsconverter_impl_p.h
+++ b/src/declarative/qml/v8/qjsconverter_impl_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qjsconverter_p.h b/src/declarative/qml/v8/qjsconverter_p.h
index 442c734c8c..95dee96f25 100644
--- a/src/declarative/qml/v8/qjsconverter_p.h
+++ b/src/declarative/qml/v8/qjsconverter_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtScript module of the Qt Toolkit.
**
@@ -16,7 +16,7 @@
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** us via http://www.qt-project.org/.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/v8/qjsengine.cpp b/src/declarative/qml/v8/qjsengine.cpp
index 6bcd3ab134..97e247a6cb 100644
--- a/src/declarative/qml/v8/qjsengine.cpp
+++ b/src/declarative/qml/v8/qjsengine.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtScript module of the Qt Toolkit.
**
@@ -16,7 +16,7 @@
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** us via http://www.qt-project.org/.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -158,6 +158,8 @@ QJSEngine::QJSEngine()
{
}
+#ifdef QT_DEPRECATED
+
/*!
\internal
*/
@@ -166,6 +168,8 @@ QJSEngine::QJSEngine(QJSEngine::ContextOwnership ownership)
{
}
+#endif // QT_DEPRECATED
+
/*!
Constructs a QJSEngine object with the given \a parent.
@@ -198,7 +202,11 @@ QJSEngine::~QJSEngine()
\internal
*/
+#ifdef QT_DEPRECATED
+
/*!
+ \obsolete
+
Returns true if the last script evaluation resulted in an uncaught
exception; otherwise returns false.
@@ -215,6 +223,8 @@ bool QJSEngine::hasUncaughtException() const
}
/*!
+ \obsolete
+
Returns the current uncaught exception, or an invalid QJSValue
if there is no uncaught exception.
@@ -233,6 +243,8 @@ QJSValue QJSEngine::uncaughtException() const
}
/*!
+ \obsolete
+
Clears any uncaught exceptions in this engine.
\sa hasUncaughtException()
@@ -244,6 +256,7 @@ void QJSEngine::clearExceptions()
d->clearExceptions();
}
+#endif // QT_DEPRECATED
/*!
Runs the garbage collector.
@@ -298,7 +311,11 @@ QJSValue QJSEngine::evaluate(const QString& program, const QString& fileName, in
return QJSValuePrivate::get(d->evaluate(program, fileName, lineNumber));
}
+#ifdef QT_DEPRECATED
+
/*!
+ \obsolete
+
Returns a QJSValue of the primitive type Null.
\sa nullValue()
@@ -312,6 +329,8 @@ QJSValue QJSEngine::nullValue()
}
/*!
+ \obsolete
+
Returns a QJSValue of the primitive type Undefined.
\sa nullValue()
@@ -324,6 +343,8 @@ QJSValue QJSEngine::undefinedValue()
return QJSValuePrivate::get(new QJSValuePrivate(d, v8::Undefined()));
}
+#endif // QT_DEPRECATED
+
/*!
Creates a JavaScript object of class Object.
@@ -382,7 +403,11 @@ QJSValue QJSEngine::newQObject(QObject *object)
return d->scriptValueFromInternal(d->newQObject(object, QV8Engine::JavaScriptOwnership));
}
+#ifdef QT_DEPRECATED
+
/*!
+ \obsolete
+
Creates a JavaScript object holding the given variant \a value.
If a default prototype has been registered with the meta type id of
@@ -400,6 +425,7 @@ QJSValue QJSEngine::newVariant(const QVariant &value)
return d->scriptValueFromInternal(d->newVariant(value));
}
+#endif // QT_DEPRECATED
/*!
Returns this engine's Global Object.
@@ -419,7 +445,11 @@ QJSValue QJSEngine::globalObject() const
return d->scriptValueFromInternal(d->global());
}
+#ifdef QT_DEPRECATED
+
/*!
+ \obsolete
+
Converts the given \a value to an object, if such a conversion is
possible; otherwise returns an invalid QJSValue. The conversion
is performed according to the following table:
@@ -445,6 +475,8 @@ QJSValue QJSEngine::toObject(const QJSValue& value)
}
/*!
+ \obsolete
+
Creates a JavaScript object of class Date from the given \a value.
\sa QJSValue::toDateTime()
@@ -458,6 +490,8 @@ QJSValue QJSEngine::newDate(const QDateTime &dt)
}
/*!
+ \obsolete
+
Creates a JavaScript object of class Date with the given
\a value (the number of milliseconds since 01 January 1970,
UTC).
@@ -471,6 +505,8 @@ QJSValue QJSEngine::newDate(double date)
}
/*!
+ \obsolete
+
Creates a JavaScript object of class RegExp with the given
\a regexp.
@@ -485,6 +521,8 @@ QJSValue QJSEngine::newRegExp(const QRegExp &regexp)
}
/*!
+ \obsolete
+
Creates a JavaScript object of class RegExp with the given
\a pattern and \a flags.
@@ -499,6 +537,8 @@ QJSValue QJSEngine::newRegExp(const QString &pattern, const QString &flags)
return QJSValuePrivate::get(d->newRegExp(pattern, flags));
}
+#endif // QT_DEPRECATED
+
/*!
* \internal
* used by QJSEngine::toScriptValue
diff --git a/src/declarative/qml/v8/qjsengine.h b/src/declarative/qml/v8/qjsengine.h
index 09e055fcaf..877f6555f4 100644
--- a/src/declarative/qml/v8/qjsengine.h
+++ b/src/declarative/qml/v8/qjsengine.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtScript module of the Qt Toolkit.
**
@@ -16,7 +16,7 @@
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** us via http://www.qt-project.org/.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -35,7 +35,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDateTime;
class QV8Engine;
@@ -51,13 +50,15 @@ class Q_DECLARATIVE_EXPORT QJSEngine
{
Q_OBJECT
public:
+#ifdef QT_DEPRECATED
enum ContextOwnership {
AdoptCurrentContext,
CreateNewContext
};
+ QT_DEPRECATED explicit QJSEngine(ContextOwnership ownership);
+#endif
QJSEngine();
- explicit QJSEngine(ContextOwnership ownership);
explicit QJSEngine(QObject *parent);
virtual ~QJSEngine();
@@ -65,22 +66,8 @@ public:
QJSValue evaluate(const QString &program, const QString &fileName = QString(), int lineNumber = 1);
- bool hasUncaughtException() const;
- QJSValue uncaughtException() const;
- void clearExceptions();
-
- QJSValue nullValue();
- QJSValue undefinedValue();
-
- QJSValue newVariant(const QVariant &value);
-
- QJSValue newRegExp(const QRegExp &regexp);
-
QJSValue newObject();
QJSValue newArray(uint length = 0);
- QJSValue newRegExp(const QString &pattern, const QString &flags);
- QJSValue newDate(double value);
- QJSValue newDate(const QDateTime &value);
QJSValue newQObject(QObject *object);
@@ -97,10 +84,27 @@ public:
void collectGarbage();
- QJSValue toObject(const QJSValue &value);
-
QV8Engine *handle() const { return d; }
+#ifdef QT_DEPRECATED
+ QT_DEPRECATED bool hasUncaughtException() const;
+ QT_DEPRECATED QJSValue uncaughtException() const;
+ QT_DEPRECATED void clearExceptions();
+
+ QT_DEPRECATED QJSValue nullValue();
+ QT_DEPRECATED QJSValue undefinedValue();
+
+ QT_DEPRECATED QJSValue newVariant(const QVariant &value);
+
+ QT_DEPRECATED QJSValue newRegExp(const QRegExp &regexp);
+
+ QT_DEPRECATED QJSValue newRegExp(const QString &pattern, const QString &flags);
+ QT_DEPRECATED QJSValue newDate(double value);
+ QT_DEPRECATED QJSValue newDate(const QDateTime &value);
+
+ QT_DEPRECATED QJSValue toObject(const QJSValue &value);
+#endif
+
Q_SIGNALS:
void signalHandlerException(const QJSValue &exception);
diff --git a/src/declarative/qml/v8/qjsengine_p.h b/src/declarative/qml/v8/qjsengine_p.h
index 1bb8f416b4..6f4b2812be 100644
--- a/src/declarative/qml/v8/qjsengine_p.h
+++ b/src/declarative/qml/v8/qjsengine_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtScript module of the Qt Toolkit.
**
@@ -16,7 +16,7 @@
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** us via http://www.qt-project.org/.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/v8/qjsvalue.cpp b/src/declarative/qml/v8/qjsvalue.cpp
index 7df1d04847..db77bef2b7 100644
--- a/src/declarative/qml/v8/qjsvalue.cpp
+++ b/src/declarative/qml/v8/qjsvalue.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtScript module of the Qt Toolkit.
**
@@ -16,7 +16,7 @@
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** us via http://www.qt-project.org/.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -71,9 +71,9 @@
Object values have an internal \c{prototype} property, which can be
accessed with prototype() and setPrototype().
- Function objects (objects for which isFunction() returns true) can
+ Function objects (objects for which isCallable()) returns true) can
be invoked by calling call(). Constructor functions can be used to
- construct new objects by calling construct().
+ construct new objects by calling callAsConstructor().
Use equals() or strictlyEquals() to compare a QJSValue to another.
@@ -213,6 +213,8 @@ QJSValue::QJSValue(QScriptPassPointer<QJSValuePrivate> d)
{
}
+#ifdef QT_DEPRECATED
+
/*!
\obsolete
@@ -325,6 +327,8 @@ QJSValue::QJSValue(QJSEngine* engine, SpecialValue value)
}
}
+#endif // QT_DEPRECATED
+
/*!
Constructs a new QJSValue that is a copy of \a other.
@@ -344,7 +348,11 @@ QJSValue::~QJSValue()
{
}
+#ifdef QT_DEPRECATED
+
/*!
+ \obsolete
+
Returns true if this QJSValue is valid; otherwise returns
false.
*/
@@ -355,6 +363,8 @@ bool QJSValue::isValid() const
return d->isValid();
}
+#endif // QT_DEPRECATED
+
/*!
Returns true if this QJSValue is of the primitive type Boolean;
otherwise returns false.
@@ -461,11 +471,25 @@ bool QJSValue::isObject() const
}
/*!
- Returns true if this QJSValue is a function; otherwise returns
- false.
+ Returns true if this QJSValue can be called a function, otherwise
+ returns false.
\sa call()
*/
+bool QJSValue::isCallable() const
+{
+ Q_D(const QJSValue);
+ QScriptIsolate api(d->engine());
+ return d->isCallable();
+}
+
+#ifdef QT_DEPRECATED
+
+/*!
+ \obsolete
+
+ Use isCallable() instead.
+*/
bool QJSValue::isFunction() const
{
Q_D(const QJSValue);
@@ -473,6 +497,8 @@ bool QJSValue::isFunction() const
return d->isCallable();
}
+#endif // QT_DEPRECATED
+
/*!
Returns true if this QJSValue is a variant value;
otherwise returns false.
@@ -515,7 +541,7 @@ QString QJSValue::toString() const
attempt to convert the object to a primitive value (possibly
resulting in an uncaught script exception).
- \sa isNumber(), toInteger(), toInt32(), toUInt32(), toUInt16()
+ \sa isNumber(), toInteger(), toInt(), toUInt(), toUInt16()
*/
double QJSValue::toNumber() const
{
@@ -543,7 +569,11 @@ bool QJSValue::toBool() const
return d->toBool();
}
+#ifdef QT_DEPRECATED
+
/*!
+ \obsolete
+
Returns the integer value of this QJSValue, using the conversion
rules described in \l{ECMA-262} section 9.4, "ToInteger".
@@ -562,6 +592,8 @@ double QJSValue::toInteger() const
return d->toInteger();
}
+#endif // QT_DEPRECATED
+
/*!
Returns the signed 32-bit integer value of this QJSValue, using
the conversion rules described in \l{ECMA-262} section 9.5, "ToInt32".
@@ -572,9 +604,9 @@ double QJSValue::toInteger() const
attempt to convert the object to a primitive value (possibly
resulting in an uncaught script exception).
- \sa toNumber(), toUInt32()
+ \sa toNumber(), toUInt()
*/
-qint32 QJSValue::toInt32() const
+qint32 QJSValue::toInt() const
{
Q_D(const QJSValue);
QScriptIsolate api(d->engine());
@@ -591,7 +623,33 @@ qint32 QJSValue::toInt32() const
attempt to convert the object to a primitive value (possibly
resulting in an uncaught script exception).
- \sa toNumber(), toInt32()
+ \sa toNumber(), toInt()
+*/
+quint32 QJSValue::toUInt() const
+{
+ Q_D(const QJSValue);
+ QScriptIsolate api(d->engine());
+ return d->toUInt32();
+}
+
+#ifdef QT_DEPRECATED
+
+/*!
+ \obsolete
+
+ Use toInt() instead.
+*/
+qint32 QJSValue::toInt32() const
+{
+ Q_D(const QJSValue);
+ QScriptIsolate api(d->engine());
+ return d->toInt32();
+}
+
+/*!
+ \obsolete
+
+ Use toUInt() instead.
*/
quint32 QJSValue::toUInt32() const
{
@@ -631,6 +689,8 @@ QJSValue QJSValue::toObject() const
return QJSValuePrivate::get(d->toObject());
}
+#endif // QT_DEPRECATED
+
/*!
Returns the QVariant value of this QJSValue, if it can be
converted to a QVariant; otherwise returns an invalid QVariant.
@@ -660,9 +720,31 @@ QVariant QJSValue::toVariant() const
return d->toVariant();
}
+/*!
+ Calls this QJSValue as a function, passing \a args as arguments
+ to the function, and using the globalObject() as the "this"-object.
+ Returns the value returned from the function.
+
+ If this QJSValue is not callable, call() does nothing and
+ returns an undefined QJSValue.
+
+ Calling call() can cause an exception to occur in the script engine;
+ in that case, call() returns the value that was thrown (typically an
+ \c{Error} object). You can call
+ QJSEngine::hasUncaughtException() to determine if an exception
+ occurred.
+
+ \sa isCallable(), callWithInstance(), callAsConstructor()
+*/
+QJSValue QJSValue::call(const QJSValueList &args)
+{
+ Q_D(QJSValue);
+ QScriptIsolate api(d->engine());
+ return d->call(/*thisObject=*/0, args);
+}
/*!
- Calls this QJSValue as a function, using \a thisObject as
+ Calls this QJSValue as a function, using \a instance as
the `this' object in the function call, and passing \a args
as arguments to the function. Returns the value returned from
the function.
@@ -670,7 +752,7 @@ QVariant QJSValue::toVariant() const
If this QJSValue is not a function, call() does nothing
and returns an invalid QJSValue.
- Note that if \a thisObject is not an object, the global object
+ Note that if \a instance is not an object, the global object
(see \l{QJSEngine::globalObject()}) will be used as the
`this' object.
@@ -680,15 +762,13 @@ QVariant QJSValue::toVariant() const
QJSEngine::hasUncaughtException() to determine if an exception
occurred.
- \snippet doc/src/snippets/code/src_script_qjsvalue.cpp 1
-
- \sa construct()
+ \sa call()
*/
-QJSValue QJSValue::call(const QJSValue& thisObject, const QJSValueList& args)
+QJSValue QJSValue::callWithInstance(const QJSValue &instance, const QJSValueList &args)
{
Q_D(QJSValue);
QScriptIsolate api(d->engine());
- return d->call(QJSValuePrivate::get(thisObject), args);
+ return d->call(QJSValuePrivate::get(instance), args);
}
/*!
@@ -698,25 +778,53 @@ QJSValue QJSValue::call(const QJSValue& thisObject, const QJSValueList& args)
constructor call is an object, then that object is returned;
otherwise the default constructed object is returned.
- If this QJSValue is not a function, construct() does nothing
- and returns an invalid QJSValue.
+ If this QJSValue is not a function, callAsConstructor() does
+ nothing and returns an undefined QJSValue.
- Calling construct() can cause an exception to occur in the script
- engine; in that case, construct() returns the value that was thrown
- (typically an \c{Error} object). You can call
+ Calling this function can cause an exception to occur in the
+ script engine; in that case, the value that was thrown
+ (typically an \c{Error} object) is returned. You can call
QJSEngine::hasUncaughtException() to determine if an exception
occurred.
\sa call(), QJSEngine::newObject()
*/
+QJSValue QJSValue::callAsConstructor(const QJSValueList &args)
+{
+ Q_D(QJSValue);
+ QScriptIsolate api(d->engine());
+ return QJSValuePrivate::get(d->callAsConstructor(args));
+}
+
+#ifdef QT_DEPRECATED
+
+/*!
+ \obsolete
+
+ Use callWithInstance() instead.
+*/
+QJSValue QJSValue::call(const QJSValue& thisObject, const QJSValueList& args)
+{
+ Q_D(QJSValue);
+ QScriptIsolate api(d->engine());
+ return d->call(QJSValuePrivate::get(thisObject), args);
+}
+
+/*!
+ \obsolete
+
+ Use callAsConstructor() instead.
+*/
QJSValue QJSValue::construct(const QJSValueList &args)
{
Q_D(QJSValue);
QScriptIsolate api(d->engine());
- return QJSValuePrivate::get(d->construct(args));
+ return QJSValuePrivate::get(d->callAsConstructor(args));
}
/*!
+ \obsolete
+
Returns the QJSEngine that created this QJSValue,
or 0 if this QJSValue is invalid or the value is not
associated with a particular engine.
@@ -731,6 +839,7 @@ QJSEngine* QJSValue::engine() const
return 0;
}
+#endif // QT_DEPRECATED
/*!
If this QJSValue is an object, returns the internal prototype
@@ -839,7 +948,11 @@ bool QJSValue::strictlyEquals(const QJSValue& other) const
return d_ptr->strictlyEquals(o);
}
+#ifdef QT_DEPRECATED
+
/*!
+ \obsolete
+
Returns true if this QJSValue is an instance of
\a other; otherwise returns false.
@@ -855,6 +968,8 @@ bool QJSValue::instanceOf(const QJSValue &other) const
return d->instanceOf(QJSValuePrivate::get(other));
}
+#endif // QT_DEPRECATED
+
/*!
Returns the value of this QJSValue's property with the given \a name.
If no such property exists, an invalid QJSValue is returned.
@@ -866,7 +981,7 @@ bool QJSValue::instanceOf(const QJSValue &other) const
occurred, property() returns the value that was thrown (typically
an \c{Error} object).
- \sa setProperty(), propertyFlags(), QJSValueIterator
+ \sa setProperty(), hasProperty(), QJSValueIterator
*/
QJSValue QJSValue::property(const QString& name) const
{
@@ -915,7 +1030,7 @@ QJSValue QJSValue::property(quint32 arrayIndex) const
built-in properties, such as the \c{length} property of Array objects
or meta properties of QObject objects.
- \sa property()
+ \sa property(), deleteProperty()
*/
void QJSValue::setProperty(const QString& name, const QJSValue& value)
{
@@ -944,6 +1059,63 @@ void QJSValue::setProperty(quint32 arrayIndex, const QJSValue& value)
}
/*!
+ Attempts to delete this object's property of the given \a name.
+ Returns true if the property was deleted, otherwise returns false.
+
+ The behavior of this function is consistent with the JavaScript
+ delete operator. In particular:
+
+ \list
+ \o Non-configurable properties cannot be deleted.
+ \o This function will return true even if this object doesn't
+ have a property of the given \a name (i.e., non-existent
+ properties are "trivially deletable").
+ \o If this object doesn't have an own property of the given
+ \a name, but an object in the prototype() chain does, the
+ prototype object's property is not deleted, and this function
+ returns true.
+ \endlist
+
+ \sa setProperty(), hasOwnProperty()
+*/
+bool QJSValue::deleteProperty(const QString &name)
+{
+ Q_D(QJSValue);
+ QScriptIsolate api(d->engine());
+ return d->deleteProperty(name);
+}
+
+/*!
+ Returns true if this object has a property of the given \a name,
+ otherwise returns false.
+
+ \sa property(), hasOwnProperty()
+*/
+bool QJSValue::hasProperty(const QString &name) const
+{
+ Q_D(const QJSValue);
+ QScriptIsolate api(d->engine());
+ return d->hasProperty(name);
+}
+
+/*!
+ Returns true if this object has an own (not prototype-inherited)
+ property of the given \a name, otherwise returns false.
+
+ \sa property(), hasProperty()
+*/
+bool QJSValue::hasOwnProperty(const QString &name) const
+{
+ Q_D(const QJSValue);
+ QScriptIsolate api(d->engine());
+ return d->hasOwnProperty(name);
+}
+
+#ifdef QT_DEPRECATED
+
+/*!
+ \obsolete
+
Returns the flags of the property with the given \a name.
\sa property()
@@ -955,6 +1127,8 @@ QJSValue::PropertyFlags QJSValue::propertyFlags(const QString& name) const
return d->propertyFlags(name);
}
+#endif // QT_DEPRECATED
+
/*!
* If this QJSValue is a QObject, returns the QObject pointer
* that the QJSValue represents; otherwise, returns 0.
@@ -986,7 +1160,11 @@ QDateTime QJSValue::toDateTime() const
return d->toDataTime();
}
+#ifdef QT_DEPRECATED
+
/*!
+ \obsolete
+
Returns the QRegExp representation of this value.
If this QJSValue is not a regular expression, an empty
QRegExp is returned.
@@ -1000,6 +1178,8 @@ QRegExp QJSValue::toRegExp() const
return d->toRegExp();
}
+#endif // QT_DEPRECATED
+
/*!
Returns true if this QJSValue is an object of the Date class;
otherwise returns false.
diff --git a/src/declarative/qml/v8/qjsvalue.h b/src/declarative/qml/v8/qjsvalue.h
index c75bd3fdc4..0acaa16de4 100644
--- a/src/declarative/qml/v8/qjsvalue.h
+++ b/src/declarative/qml/v8/qjsvalue.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtScript module of the Qt Toolkit.
**
@@ -16,7 +16,7 @@
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** us via http://www.qt-project.org/.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -34,7 +34,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QJSValue;
class QJSEngine;
@@ -53,12 +52,14 @@ template <class T> class QScriptPassPointer;
class Q_DECLARATIVE_EXPORT QJSValue
{
public:
+#ifdef QT_DEPRECATED
enum PropertyFlag {
ReadOnly = 0x00000001,
Undeletable = 0x00000002,
SkipInEnumeration = 0x00000004
};
Q_DECLARE_FLAGS(PropertyFlags, PropertyFlag)
+#endif
enum SpecialValue {
NullValue,
@@ -69,12 +70,6 @@ public:
QJSValue();
~QJSValue();
QJSValue(const QJSValue &other);
- QJSValue(QJSEngine *engine, SpecialValue val);
- QJSValue(QJSEngine *engine, bool val);
- QJSValue(QJSEngine *engine, int val);
- QJSValue(QJSEngine *engine, uint val);
- QJSValue(QJSEngine *engine, double val);
- QJSValue(QJSEngine *engine, const QString &val);
QJSValue(SpecialValue value);
QJSValue(bool value);
@@ -89,11 +84,8 @@ public:
QJSValue &operator=(const QJSValue &other);
- QJSEngine *engine() const;
- bool isValid() const;
bool isBool() const;
bool isNumber() const;
- bool isFunction() const;
bool isNull() const;
bool isString() const;
bool isUndefined() const;
@@ -107,18 +99,12 @@ public:
QString toString() const;
double toNumber() const;
+ qint32 toInt() const;
+ quint32 toUInt() const;
bool toBool() const;
- double toInteger() const;
- qint32 toInt32() const;
- quint32 toUInt32() const;
- quint16 toUInt16() const;
QVariant toVariant() const;
QObject *toQObject() const;
- QJSValue toObject() const;
QDateTime toDateTime() const;
- QRegExp toRegExp() const;
-
- bool instanceOf(const QJSValue &other) const;
bool equals(const QJSValue &other) const;
bool strictlyEquals(const QJSValue &other) const;
@@ -129,21 +115,55 @@ public:
QJSValue property(const QString &name) const;
void setProperty(const QString &name, const QJSValue &value);
+ bool hasProperty(const QString &name) const;
+ bool hasOwnProperty(const QString &name) const;
+
QJSValue property(quint32 arrayIndex) const;
void setProperty(quint32 arrayIndex, const QJSValue &value);
- QJSValue::PropertyFlags propertyFlags(const QString &name) const;
+ bool deleteProperty(const QString &name);
+
+ bool isCallable() const;
+ QJSValue call(const QJSValueList &args);
+ QJSValue callWithInstance(const QJSValue &instance, const QJSValueList &args = QJSValueList());
+ QJSValue callAsConstructor(const QJSValueList &args = QJSValueList());
+
+#ifdef QT_DEPRECATED
+ QT_DEPRECATED QJSValue(QJSEngine *engine, SpecialValue val);
+ QT_DEPRECATED QJSValue(QJSEngine *engine, bool val);
+ QT_DEPRECATED QJSValue(QJSEngine *engine, int val);
+ QT_DEPRECATED QJSValue(QJSEngine *engine, uint val);
+ QT_DEPRECATED QJSValue(QJSEngine *engine, double val);
+ QT_DEPRECATED QJSValue(QJSEngine *engine, const QString &val);
+
+ QT_DEPRECATED QJSEngine *engine() const;
- QJSValue call(const QJSValue &thisObject = QJSValue(),
+ QT_DEPRECATED bool isValid() const;
+ QT_DEPRECATED bool isFunction() const;
+ QT_DEPRECATED double toInteger() const;
+ QT_DEPRECATED qint32 toInt32() const;
+ QT_DEPRECATED quint32 toUInt32() const;
+ QT_DEPRECATED quint16 toUInt16() const;
+ QT_DEPRECATED QJSValue toObject() const;
+ QT_DEPRECATED QRegExp toRegExp() const;
+
+ QT_DEPRECATED bool instanceOf(const QJSValue &other) const;
+
+ QT_DEPRECATED QJSValue::PropertyFlags propertyFlags(const QString &name) const;
+
+ QT_DEPRECATED QJSValue call(const QJSValue &thisObject = QJSValue(),
const QJSValueList &args = QJSValueList());
- QJSValue construct(const QJSValueList &args = QJSValueList());
+ QT_DEPRECATED QJSValue construct(const QJSValueList &args = QJSValueList());
+#endif
private:
// force compile error, prevent QJSValue(bool) to be called
QJSValue(void *);
+#ifdef QT_DEPRECATED
// force compile error, prevent QJSValue(QScriptEngine*, bool) to be called
QJSValue(QJSEngine *, void *);
QJSValue(QJSEngine *, const char *);
+#endif
QJSValue(QJSValuePrivate*);
QJSValue(QScriptPassPointer<QJSValuePrivate>);
@@ -154,7 +174,9 @@ private:
Q_DECLARE_PRIVATE(QJSValue)
};
+#ifdef QT_DEPRECATED
Q_DECLARE_OPERATORS_FOR_FLAGS(QJSValue::PropertyFlags)
+#endif
QT_END_NAMESPACE
diff --git a/src/declarative/qml/v8/qjsvalue_impl_p.h b/src/declarative/qml/v8/qjsvalue_impl_p.h
index 9e8259931a..c296d38b22 100644
--- a/src/declarative/qml/v8/qjsvalue_impl_p.h
+++ b/src/declarative/qml/v8/qjsvalue_impl_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtScript module of the Qt Toolkit.
**
@@ -16,7 +16,7 @@
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** us via http://www.qt-project.org/.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -880,6 +880,26 @@ inline bool QJSValuePrivate::deleteProperty(const QString& name)
return self->Delete(QJSConverter::toString(name));
}
+inline bool QJSValuePrivate::hasProperty(const QString &name) const
+{
+ if (!isObject())
+ return false;
+
+ v8::HandleScope handleScope;
+ v8::Handle<v8::Object> self(v8::Handle<v8::Object>::Cast(m_value));
+ return self->Has(QJSConverter::toString(name));
+}
+
+inline bool QJSValuePrivate::hasOwnProperty(const QString &name) const
+{
+ if (!isObject())
+ return false;
+
+ v8::HandleScope handleScope;
+ v8::Handle<v8::Object> self(v8::Handle<v8::Object>::Cast(m_value));
+ return self->HasOwnProperty(QJSConverter::toString(name));
+}
+
inline QJSValue::PropertyFlags QJSValuePrivate::propertyFlags(const QString& name) const
{
if (!isObject())
@@ -954,7 +974,7 @@ QScriptPassPointer<QJSValuePrivate> QJSValuePrivate::call(QJSValuePrivate* thisO
return new QJSValuePrivate(e, result);
}
-inline QScriptPassPointer<QJSValuePrivate> QJSValuePrivate::construct(int argc, v8::Handle<v8::Value> *argv)
+inline QScriptPassPointer<QJSValuePrivate> QJSValuePrivate::callAsConstructor(int argc, v8::Handle<v8::Value> *argv)
{
QV8Engine *e = engine();
@@ -975,7 +995,7 @@ inline QScriptPassPointer<QJSValuePrivate> QJSValuePrivate::construct(int argc,
return new QJSValuePrivate(e, result);
}
-inline QScriptPassPointer<QJSValuePrivate> QJSValuePrivate::construct(const QJSValueList& args)
+inline QScriptPassPointer<QJSValuePrivate> QJSValuePrivate::callAsConstructor(const QJSValueList& args)
{
if (!isCallable())
return InvalidValue();
@@ -986,11 +1006,11 @@ inline QScriptPassPointer<QJSValuePrivate> QJSValuePrivate::construct(const QJSV
int argc = args.size();
QVarLengthArray<v8::Handle<v8::Value>, 8> argv(argc);
if (!prepareArgumentsForCall(argv.data(), args)) {
- qWarning("QJSValue::construct() failed: cannot construct function with argument created in a different engine");
+ qWarning("QJSValue::callAsConstructor() failed: cannot construct function with argument created in a different engine");
return InvalidValue();
}
- return construct(argc, argv.data());
+ return callAsConstructor(argc, argv.data());
}
/*! \internal
diff --git a/src/declarative/qml/v8/qjsvalue_p.h b/src/declarative/qml/v8/qjsvalue_p.h
index 364742532c..23aebc7822 100644
--- a/src/declarative/qml/v8/qjsvalue_p.h
+++ b/src/declarative/qml/v8/qjsvalue_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtScript module of the Qt Toolkit.
**
@@ -16,7 +16,7 @@
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** us via http://www.qt-project.org/.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -130,15 +130,17 @@ public:
template<typename T>
inline QScriptPassPointer<QJSValuePrivate> property(T name) const;
inline bool deleteProperty(const QString& name);
+ inline bool hasProperty(const QString &name) const;
+ inline bool hasOwnProperty(const QString &name) const;
inline QJSValue::PropertyFlags propertyFlags(const QString& name) const;
inline QJSValue::PropertyFlags propertyFlags(v8::Handle<v8::String> name) const;
inline QScriptPassPointer<QJSValuePrivate> call(QJSValuePrivate* thisObject, const QJSValueList& args);
inline QScriptPassPointer<QJSValuePrivate> call(QJSValuePrivate* thisObject, const QJSValue& arguments);
inline QScriptPassPointer<QJSValuePrivate> call(QJSValuePrivate* thisObject, int argc, v8::Handle< v8::Value >* argv);
- inline QScriptPassPointer<QJSValuePrivate> construct(int argc, v8::Handle<v8::Value> *argv);
- inline QScriptPassPointer<QJSValuePrivate> construct(const QJSValueList& args);
- inline QScriptPassPointer<QJSValuePrivate> construct(const QJSValue& arguments);
+ inline QScriptPassPointer<QJSValuePrivate> callAsConstructor(int argc, v8::Handle<v8::Value> *argv);
+ inline QScriptPassPointer<QJSValuePrivate> callAsConstructor(const QJSValueList& args);
+ inline QScriptPassPointer<QJSValuePrivate> callAsConstructor(const QJSValue& arguments);
inline bool assignEngine(QV8Engine *engine);
inline QV8Engine *engine() const;
diff --git a/src/declarative/qml/v8/qjsvalueiterator.cpp b/src/declarative/qml/v8/qjsvalueiterator.cpp
index 1e9973b79d..161343924a 100644
--- a/src/declarative/qml/v8/qjsvalueiterator.cpp
+++ b/src/declarative/qml/v8/qjsvalueiterator.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtScript module of the Qt Toolkit.
**
@@ -16,7 +16,7 @@
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** us via http://www.qt-project.org/.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/v8/qjsvalueiterator.h b/src/declarative/qml/v8/qjsvalueiterator.h
index d0d4065903..69bd57f806 100644
--- a/src/declarative/qml/v8/qjsvalueiterator.h
+++ b/src/declarative/qml/v8/qjsvalueiterator.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtScript module of the Qt Toolkit.
**
@@ -16,7 +16,7 @@
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** us via http://www.qt-project.org/.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -31,7 +31,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QString;
diff --git a/src/declarative/qml/v8/qjsvalueiterator_impl_p.h b/src/declarative/qml/v8/qjsvalueiterator_impl_p.h
index 3da3a8ba9e..21f7119b3d 100644
--- a/src/declarative/qml/v8/qjsvalueiterator_impl_p.h
+++ b/src/declarative/qml/v8/qjsvalueiterator_impl_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -16,7 +16,7 @@
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** us via http://www.qt-project.org/.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/v8/qjsvalueiterator_p.h b/src/declarative/qml/v8/qjsvalueiterator_p.h
index 95e1f22337..fb68203c65 100644
--- a/src/declarative/qml/v8/qjsvalueiterator_p.h
+++ b/src/declarative/qml/v8/qjsvalueiterator_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -16,7 +16,7 @@
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** us via http://www.qt-project.org/.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/v8/qscript_impl_p.h b/src/declarative/qml/v8/qscript_impl_p.h
index 00e965a997..5f21d92843 100644
--- a/src/declarative/qml/v8/qscript_impl_p.h
+++ b/src/declarative/qml/v8/qscript_impl_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtScript module of the Qt Toolkit.
**
@@ -16,7 +16,7 @@
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** us via http://www.qt-project.org/.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/v8/qscriptisolate_p.h b/src/declarative/qml/v8/qscriptisolate_p.h
index b2ab24b7a7..6a22e19d8f 100644
--- a/src/declarative/qml/v8/qscriptisolate_p.h
+++ b/src/declarative/qml/v8/qscriptisolate_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtScript module of the Qt Toolkit.
**
@@ -16,7 +16,7 @@
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** us via http://www.qt-project.org/.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/v8/qscriptoriginalglobalobject_p.h b/src/declarative/qml/v8/qscriptoriginalglobalobject_p.h
index 4db5d17237..74151bddae 100644
--- a/src/declarative/qml/v8/qscriptoriginalglobalobject_p.h
+++ b/src/declarative/qml/v8/qscriptoriginalglobalobject_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtScript module of the Qt Toolkit.
**
@@ -16,7 +16,7 @@
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** us via http://www.qt-project.org/.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/v8/qscriptshareddata_p.h b/src/declarative/qml/v8/qscriptshareddata_p.h
index 3d4284f2ee..8b0f0e3239 100644
--- a/src/declarative/qml/v8/qscriptshareddata_p.h
+++ b/src/declarative/qml/v8/qscriptshareddata_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtScript module of the Qt Toolkit.
**
@@ -16,7 +16,7 @@
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** us via http://www.qt-project.org/.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/v8/qscripttools_p.h b/src/declarative/qml/v8/qscripttools_p.h
index b68039aa7a..9263028816 100644
--- a/src/declarative/qml/v8/qscripttools_p.h
+++ b/src/declarative/qml/v8/qscripttools_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtScript module of the Qt Toolkit.
**
@@ -16,7 +16,7 @@
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** us via http://www.qt-project.org/.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/v8/qv8_p.h b/src/declarative/qml/v8/qv8_p.h
index c70e3b5a7f..73ba1d4fd3 100644
--- a/src/declarative/qml/v8/qv8_p.h
+++ b/src/declarative/qml/v8/qv8_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8bindings.cpp b/src/declarative/qml/v8/qv8bindings.cpp
index e4aeecc5c1..3d0398d087 100644
--- a/src/declarative/qml/v8/qv8bindings.cpp
+++ b/src/declarative/qml/v8/qv8bindings.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8bindings_p.h b/src/declarative/qml/v8/qv8bindings_p.h
index e8ac1b119c..e8af97ce54 100644
--- a/src/declarative/qml/v8/qv8bindings_p.h
+++ b/src/declarative/qml/v8/qv8bindings_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8contextwrapper.cpp b/src/declarative/qml/v8/qv8contextwrapper.cpp
index 39e9fa89db..af12247870 100644
--- a/src/declarative/qml/v8/qv8contextwrapper.cpp
+++ b/src/declarative/qml/v8/qv8contextwrapper.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8contextwrapper_p.h b/src/declarative/qml/v8/qv8contextwrapper_p.h
index 3ac182d27f..04f2e6c6ab 100644
--- a/src/declarative/qml/v8/qv8contextwrapper_p.h
+++ b/src/declarative/qml/v8/qv8contextwrapper_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8debug_p.h b/src/declarative/qml/v8/qv8debug_p.h
index 13c32c6b19..b3a9c31721 100644
--- a/src/declarative/qml/v8/qv8debug_p.h
+++ b/src/declarative/qml/v8/qv8debug_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8domerrors.cpp b/src/declarative/qml/v8/qv8domerrors.cpp
index 8652cdac00..f86486cf5c 100644
--- a/src/declarative/qml/v8/qv8domerrors.cpp
+++ b/src/declarative/qml/v8/qv8domerrors.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8domerrors_p.h b/src/declarative/qml/v8/qv8domerrors_p.h
index c3c6d3bf6e..fab93b4dcf 100644
--- a/src/declarative/qml/v8/qv8domerrors_p.h
+++ b/src/declarative/qml/v8/qv8domerrors_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8engine.cpp b/src/declarative/qml/v8/qv8engine.cpp
index ef65398859..e7fe2c713d 100644
--- a/src/declarative/qml/v8/qv8engine.cpp
+++ b/src/declarative/qml/v8/qv8engine.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -501,10 +501,6 @@ QVariant QV8Engine::toBasicVariant(v8::Handle<v8::Value> value)
if (!value->IsFunction()) {
v8::Context::Scope scope(context());
v8::Handle<v8::Object> object = value->ToObject();
- v8::Local<v8::Array> properties = object->GetPropertyNames();
- int length = properties->Length();
- if (length == 0)
- return QVariant();
return variantMapFromJS(object);
}
@@ -530,14 +526,19 @@ void QV8Engine::initializeGlobal(v8::Handle<v8::Object> global)
v8::Local<v8::Function> consoleLogFn = V8FUNCTION(consoleLog, this);
console->Set(v8::String::New("debug"), consoleLogFn);
- console->Set(v8::String::New("error"), V8FUNCTION(consoleError, this));
console->Set(v8::String::New("log"), consoleLogFn);
+ console->Set(v8::String::New("info"), consoleLogFn);
+ console->Set(v8::String::New("warn"), V8FUNCTION(consoleWarn, this));
+ console->Set(v8::String::New("error"), V8FUNCTION(consoleError, this));
+ console->Set(v8::String::New("assert"), V8FUNCTION(consoleAssert, this));
+
+ console->Set(v8::String::New("count"), V8FUNCTION(consoleCount, this));
console->Set(v8::String::New("profile"), V8FUNCTION(consoleProfile, this));
console->Set(v8::String::New("profileEnd"), V8FUNCTION(consoleProfileEnd, this));
console->Set(v8::String::New("time"), V8FUNCTION(consoleTime, this));
console->Set(v8::String::New("timeEnd"), V8FUNCTION(consoleTimeEnd, this));
console->Set(v8::String::New("trace"), V8FUNCTION(consoleTrace, this));
- console->Set(v8::String::New("warn"), V8FUNCTION(consoleWarn, this));
+ console->Set(v8::String::New("exception"), V8FUNCTION(consoleException, this));
v8::Local<v8::Object> qt = v8::Object::New();
@@ -1086,14 +1087,19 @@ v8::Local<v8::Object> QV8Engine::variantMapToJS(const QVariantMap &vmap)
QVariantMap QV8Engine::variantMapFromJS(v8::Handle<v8::Object> jsObject)
{
QVariantMap result;
+
+ v8::HandleScope handleScope;
+ v8::Handle<v8::Array> propertyNames = jsObject->GetPropertyNames();
+ uint32_t length = propertyNames->Length();
+ if (length == 0)
+ return result;
+
int hash = jsObject->GetIdentityHash();
if (visitedConversionObjects.contains(hash))
return result; // Avoid recursion.
+
visitedConversionObjects.insert(hash);
- v8::HandleScope handleScope;
// TODO: Only object's own property names. Include non-enumerable properties.
- v8::Handle<v8::Array> propertyNames = jsObject->GetPropertyNames();
- uint32_t length = propertyNames->Length();
for (uint32_t i = 0; i < length; ++i) {
v8::Handle<v8::Value> name = propertyNames->Get(i);
result.insert(QJSConverter::toString(name->ToString()), variantFromJS(jsObject->Get(name)));
@@ -1511,6 +1517,15 @@ qint64 QV8Engine::stopTimer(const QString &timerName, bool *wasRunning)
return m_time.elapsed() - startedAt;
}
+int QV8Engine::consoleCountHelper(const QString &file, int line, int column)
+{
+ const QString key = file + QString::number(line) + QString::number(column);
+ int number = m_consoleCount.value(key, 0);
+ number++;
+ m_consoleCount.insert(key, number);
+ return number;
+}
+
void QV8GCCallback::registerGcPrologueCallback()
{
QV8Engine::ThreadData *td = QV8Engine::threadData();
diff --git a/src/declarative/qml/v8/qv8engine_impl_p.h b/src/declarative/qml/v8/qv8engine_impl_p.h
index 575906ebcb..eed97d41a9 100644
--- a/src/declarative/qml/v8/qv8engine_impl_p.h
+++ b/src/declarative/qml/v8/qv8engine_impl_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -16,7 +16,7 @@
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** us via http://www.qt-project.org/.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/v8/qv8engine_p.h b/src/declarative/qml/v8/qv8engine_p.h
index 9dfc1d58f2..b625704c5b 100644
--- a/src/declarative/qml/v8/qv8engine_p.h
+++ b/src/declarative/qml/v8/qv8engine_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -432,6 +432,9 @@ public:
void startTimer(const QString &timerName);
qint64 stopTimer(const QString &timerName, bool *wasRunning);
+ // used for console.count()
+ int consoleCountHelper(const QString &file, int line, int column);
+
QObject *qtObjectFromJS(v8::Handle<v8::Value> value);
QSet<int> visitedConversionObjects;
@@ -486,6 +489,8 @@ protected:
QElapsedTimer m_time;
QHash<QString, qint64> m_startedTimers;
+ QHash<QString, quint32> m_consoleCount;
+
QVariant toBasicVariant(v8::Handle<v8::Value>);
void initializeGlobal(v8::Handle<v8::Object>);
diff --git a/src/declarative/qml/v8/qv8include.cpp b/src/declarative/qml/v8/qv8include.cpp
index e0a10742f7..70585461a3 100644
--- a/src/declarative/qml/v8/qv8include.cpp
+++ b/src/declarative/qml/v8/qv8include.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8include_p.h b/src/declarative/qml/v8/qv8include_p.h
index 41feece9e7..935a209acc 100644
--- a/src/declarative/qml/v8/qv8include_p.h
+++ b/src/declarative/qml/v8/qv8include_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8listwrapper.cpp b/src/declarative/qml/v8/qv8listwrapper.cpp
index 0ef94e079c..ccbe1f74b4 100644
--- a/src/declarative/qml/v8/qv8listwrapper.cpp
+++ b/src/declarative/qml/v8/qv8listwrapper.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8listwrapper_p.h b/src/declarative/qml/v8/qv8listwrapper_p.h
index 89cb679375..46a6e72c94 100644
--- a/src/declarative/qml/v8/qv8listwrapper_p.h
+++ b/src/declarative/qml/v8/qv8listwrapper_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8profiler_p.h b/src/declarative/qml/v8/qv8profiler_p.h
index 51d681e3a1..0851a33263 100644
--- a/src/declarative/qml/v8/qv8profiler_p.h
+++ b/src/declarative/qml/v8/qv8profiler_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8qobjectwrapper.cpp b/src/declarative/qml/v8/qv8qobjectwrapper.cpp
index 2663344534..a8d5a279bd 100644
--- a/src/declarative/qml/v8/qv8qobjectwrapper.cpp
+++ b/src/declarative/qml/v8/qv8qobjectwrapper.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -589,10 +589,11 @@ static inline void StoreProperty(QV8Engine *engine, QObject *object, QDeclarativ
v8::StackTrace::kScriptName));
v8::Local<v8::StackFrame> frame = trace->GetFrame(0);
int lineNumber = frame->GetLineNumber();
+ int columNumber = frame->GetColumn();
QString url = engine->toString(frame->GetScriptName());
newBinding = new QDeclarativeBinding(&function, object, context);
- newBinding->setSourceLocation(url, lineNumber);
+ newBinding->setSourceLocation(url, lineNumber, columNumber);
newBinding->setTarget(object, *property, context);
newBinding->setEvaluateFlags(newBinding->evaluateFlags() |
QDeclarativeBinding::RequiresThisObject);
diff --git a/src/declarative/qml/v8/qv8qobjectwrapper_p.h b/src/declarative/qml/v8/qv8qobjectwrapper_p.h
index 9c545cb3b1..54d354c638 100644
--- a/src/declarative/qml/v8/qv8qobjectwrapper_p.h
+++ b/src/declarative/qml/v8/qv8qobjectwrapper_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8sequencewrapper.cpp b/src/declarative/qml/v8/qv8sequencewrapper.cpp
index 32c98f046a..091b44063c 100644
--- a/src/declarative/qml/v8/qv8sequencewrapper.cpp
+++ b/src/declarative/qml/v8/qv8sequencewrapper.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8sequencewrapper_p.h b/src/declarative/qml/v8/qv8sequencewrapper_p.h
index ef7f714e0f..2ca5ab503e 100644
--- a/src/declarative/qml/v8/qv8sequencewrapper_p.h
+++ b/src/declarative/qml/v8/qv8sequencewrapper_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8sequencewrapper_p_p.h b/src/declarative/qml/v8/qv8sequencewrapper_p_p.h
index c7a8ca4d8d..8b2487e8d0 100644
--- a/src/declarative/qml/v8/qv8sequencewrapper_p_p.h
+++ b/src/declarative/qml/v8/qv8sequencewrapper_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -180,12 +180,14 @@ static QString convertQStringToString(QV8Engine *, const QString &v)
static QUrl convertV8ValueToUrl(QV8Engine *e, v8::Handle<v8::Value> v)
{
- return QUrl(e->toString(v->ToString()));
+ QUrl u;
+ u.setEncodedUrl(e->toString(v->ToString()).toUtf8(), QUrl::TolerantMode);
+ return u;
}
static v8::Handle<v8::Value> convertUrlToV8Value(QV8Engine *e, const QUrl &v)
{
- return e->toString(v.toString());
+ return e->toString(v.toEncoded());
}
static QString convertUrlToString(QV8Engine *, const QUrl &v)
diff --git a/src/declarative/qml/v8/qv8stringwrapper.cpp b/src/declarative/qml/v8/qv8stringwrapper.cpp
index efc513a965..745d4d374a 100644
--- a/src/declarative/qml/v8/qv8stringwrapper.cpp
+++ b/src/declarative/qml/v8/qv8stringwrapper.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8stringwrapper_p.h b/src/declarative/qml/v8/qv8stringwrapper_p.h
index ff0e9dc51b..011acf8249 100644
--- a/src/declarative/qml/v8/qv8stringwrapper_p.h
+++ b/src/declarative/qml/v8/qv8stringwrapper_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8typewrapper.cpp b/src/declarative/qml/v8/qv8typewrapper.cpp
index 3016f7b37d..f1c095678b 100644
--- a/src/declarative/qml/v8/qv8typewrapper.cpp
+++ b/src/declarative/qml/v8/qv8typewrapper.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -196,9 +196,16 @@ v8::Handle<v8::Value> QV8TypeWrapper::Getter(v8::Local<v8::String> property,
resource->importNamespace);
if (r.isValid()) {
- Q_ASSERT(r.type);
+ if (r.type) {
+ return v8engine->typeWrapper()->newObject(object, r.type, resource->mode);
+ } else if (r.scriptIndex != -1) {
+ int index = r.scriptIndex;
+ QDeclarativeContextData *context = v8engine->callingContext();
+ if (index < context->importedScripts.count())
+ return context->importedScripts.at(index);
+ }
- return v8engine->typeWrapper()->newObject(object, r.type, resource->mode);
+ return v8::Undefined();
} else if (QDeclarativeMetaType::ModuleApiInstance *moduleApi = resource->typeNamespace->moduleApi(resource->importNamespace)) {
if (moduleApi->scriptCallback) {
diff --git a/src/declarative/qml/v8/qv8typewrapper_p.h b/src/declarative/qml/v8/qv8typewrapper_p.h
index e1c6b177df..f658b9b14c 100644
--- a/src/declarative/qml/v8/qv8typewrapper_p.h
+++ b/src/declarative/qml/v8/qv8typewrapper_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8valuetypewrapper.cpp b/src/declarative/qml/v8/qv8valuetypewrapper.cpp
index b712ac5028..f6ce43ee10 100644
--- a/src/declarative/qml/v8/qv8valuetypewrapper.cpp
+++ b/src/declarative/qml/v8/qv8valuetypewrapper.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -342,10 +342,11 @@ v8::Handle<v8::Value> QV8ValueTypeWrapper::Setter(v8::Local<v8::String> property
v8::StackTrace::kScriptName));
v8::Local<v8::StackFrame> frame = trace->GetFrame(0);
int lineNumber = frame->GetLineNumber();
+ int columnNumber = frame->GetColumn();
QString url = r->engine->toString(frame->GetScriptName());
newBinding = new QDeclarativeBinding(&function, reference->object, context);
- newBinding->setSourceLocation(url, lineNumber);
+ newBinding->setSourceLocation(url, lineNumber, columnNumber);
newBinding->setTarget(reference->object, cacheData, context);
newBinding->setEvaluateFlags(newBinding->evaluateFlags() |
QDeclarativeBinding::RequiresThisObject);
diff --git a/src/declarative/qml/v8/qv8valuetypewrapper_p.h b/src/declarative/qml/v8/qv8valuetypewrapper_p.h
index bb5085557c..f0f018074a 100644
--- a/src/declarative/qml/v8/qv8valuetypewrapper_p.h
+++ b/src/declarative/qml/v8/qv8valuetypewrapper_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8variantresource_p.h b/src/declarative/qml/v8/qv8variantresource_p.h
index cca272bbc9..a87fa9606c 100644
--- a/src/declarative/qml/v8/qv8variantresource_p.h
+++ b/src/declarative/qml/v8/qv8variantresource_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8variantwrapper.cpp b/src/declarative/qml/v8/qv8variantwrapper.cpp
index 2fc63333d6..cdc1444633 100644
--- a/src/declarative/qml/v8/qv8variantwrapper.cpp
+++ b/src/declarative/qml/v8/qv8variantwrapper.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8variantwrapper_p.h b/src/declarative/qml/v8/qv8variantwrapper_p.h
index d46832ae87..e3412fab0b 100644
--- a/src/declarative/qml/v8/qv8variantwrapper_p.h
+++ b/src/declarative/qml/v8/qv8variantwrapper_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8worker.cpp b/src/declarative/qml/v8/qv8worker.cpp
index e1bc3ec3a9..474b28bb5b 100644
--- a/src/declarative/qml/v8/qv8worker.cpp
+++ b/src/declarative/qml/v8/qv8worker.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/qml/v8/qv8worker_p.h b/src/declarative/qml/v8/qv8worker_p.h
index e42438f8d6..3b456a8db9 100644
--- a/src/declarative/qml/v8/qv8worker_p.h
+++ b/src/declarative/qml/v8/qv8worker_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/util/qdeclarativepropertymap.cpp b/src/declarative/util/qdeclarativepropertymap.cpp
index 9899129390..c5ff83fd2f 100644
--- a/src/declarative/util/qdeclarativepropertymap.cpp
+++ b/src/declarative/util/qdeclarativepropertymap.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/declarative/util/qdeclarativepropertymap.h b/src/declarative/util/qdeclarativepropertymap.h
index 0f21725389..0979506dd1 100644
--- a/src/declarative/util/qdeclarativepropertymap.h
+++ b/src/declarative/util/qdeclarativepropertymap.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -51,7 +51,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativePropertyMapPrivate;
class Q_DECLARATIVE_EXPORT QDeclarativePropertyMap : public QObject
diff --git a/src/imports/etcprovider/plugin.cpp b/src/imports/etcprovider/plugin.cpp
index d71a49602c..d8a94b1375 100644
--- a/src/imports/etcprovider/plugin.cpp
+++ b/src/imports/etcprovider/plugin.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
diff --git a/src/imports/etcprovider/plugin.h b/src/imports/etcprovider/plugin.h
index 6eee03ed73..73f3b0aa4b 100644
--- a/src/imports/etcprovider/plugin.h
+++ b/src/imports/etcprovider/plugin.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
@@ -49,7 +49,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class EtcProviderPlugin : public QDeclarativeExtensionPlugin
{
diff --git a/src/imports/etcprovider/qetcprovider.cpp b/src/imports/etcprovider/qetcprovider.cpp
index 868b818fe7..7b8d960468 100644
--- a/src/imports/etcprovider/qetcprovider.cpp
+++ b/src/imports/etcprovider/qetcprovider.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/imports/etcprovider/qetcprovider.h b/src/imports/etcprovider/qetcprovider.h
index 721f61ab79..2bc4362c57 100644
--- a/src/imports/etcprovider/qetcprovider.h
+++ b/src/imports/etcprovider/qetcprovider.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
@@ -53,7 +53,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
// #define ETC_DEBUG
diff --git a/src/imports/folderlistmodel/plugin.cpp b/src/imports/folderlistmodel/plugin.cpp
index 5cec6857a5..3b9f5d9a0b 100644
--- a/src/imports/folderlistmodel/plugin.cpp
+++ b/src/imports/folderlistmodel/plugin.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp
index ea0f6a75c6..deee88d88c 100644
--- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp
+++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h
index 66d159c505..3fe61d1b84 100644
--- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h
+++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -53,7 +53,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeContext;
class QModelIndex;
diff --git a/src/imports/gestures/plugin.cpp b/src/imports/gestures/plugin.cpp
index 15c9d22ec0..ba12df3cde 100644
--- a/src/imports/gestures/plugin.cpp
+++ b/src/imports/gestures/plugin.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the plugins of the Qt Toolkit.
**
diff --git a/src/imports/gestures/qdeclarativegesturearea.cpp b/src/imports/gestures/qdeclarativegesturearea.cpp
index 445c5bb9f7..8dca5e3835 100644
--- a/src/imports/gestures/qdeclarativegesturearea.cpp
+++ b/src/imports/gestures/qdeclarativegesturearea.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/imports/gestures/qdeclarativegesturearea_p.h b/src/imports/gestures/qdeclarativegesturearea_p.h
index 3048e4137f..c26b3760fd 100644
--- a/src/imports/gestures/qdeclarativegesturearea_p.h
+++ b/src/imports/gestures/qdeclarativegesturearea_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -56,7 +56,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeBoundSignal;
class QDeclarativeContext;
diff --git a/src/imports/particles/V1/qdeclarativeparticles.cpp b/src/imports/particles/V1/qdeclarativeparticles.cpp
index b38629cec2..6383956c30 100644
--- a/src/imports/particles/V1/qdeclarativeparticles.cpp
+++ b/src/imports/particles/V1/qdeclarativeparticles.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/imports/particles/V1/qdeclarativeparticles_p.h b/src/imports/particles/V1/qdeclarativeparticles_p.h
index 79213068ab..bec222589b 100644
--- a/src/imports/particles/V1/qdeclarativeparticles_p.h
+++ b/src/imports/particles/V1/qdeclarativeparticles_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeParticle;
class QDeclarativeParticles;
diff --git a/src/imports/particles/particles.cpp b/src/imports/particles/particles.cpp
index 49cec5736a..ed5739893b 100644
--- a/src/imports/particles/particles.cpp
+++ b/src/imports/particles/particles.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the plugins of the Qt Toolkit.
**
diff --git a/src/imports/qt47/plugin.cpp b/src/imports/qt47/plugin.cpp
index d223845575..b73fa38aa1 100644
--- a/src/imports/qt47/plugin.cpp
+++ b/src/imports/qt47/plugin.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the plugins of the Qt Toolkit.
**
diff --git a/src/imports/qt47/qt47.pro b/src/imports/qt47/qt47.pro
index 34a608a7d7..7bddc89e44 100644
--- a/src/imports/qt47/qt47.pro
+++ b/src/imports/qt47/qt47.pro
@@ -17,14 +17,4 @@ target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
qmldir.files += $$PWD/qmldir
qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-symbian:{
-# TARGET.UID3 =
-
- isEmpty(DESTDIR):importFiles.files = qtquick1plugin$${QT_LIBINFIX}.dll qmldir
- else:importFiles.files = $$DESTDIR/qtquick1plugin$${QT_LIBINFIX}.dll qmldir
- importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
-
- DEPLOYMENT = importFiles
-}
-
INSTALLS += target qmldir
diff --git a/src/imports/qtquick1/plugin.cpp b/src/imports/qtquick1/plugin.cpp
index 56e48d0160..8931fd2353 100644
--- a/src/imports/qtquick1/plugin.cpp
+++ b/src/imports/qtquick1/plugin.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the plugins of the Qt Toolkit.
**
diff --git a/src/imports/qtquick1/qtquick1.pro b/src/imports/qtquick1/qtquick1.pro
index 0ba435daa7..f7a9953b5b 100644
--- a/src/imports/qtquick1/qtquick1.pro
+++ b/src/imports/qtquick1/qtquick1.pro
@@ -17,14 +17,4 @@ target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
qmldir.files += $$PWD/qmldir
qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-symbian:{
-# TARGET.UID3 =
-
- isEmpty(DESTDIR):importFiles.files = qtquick1plugin$${QT_LIBINFIX}.dll qmldir
- else:importFiles.files = $$DESTDIR/qtquick1plugin$${QT_LIBINFIX}.dll qmldir
- importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
-
- DEPLOYMENT = importFiles
-}
-
INSTALLS += target qmldir
diff --git a/src/imports/qtquick2/plugin.cpp b/src/imports/qtquick2/plugin.cpp
index feabed5a55..bc16b8df7c 100644
--- a/src/imports/qtquick2/plugin.cpp
+++ b/src/imports/qtquick2/plugin.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the plugins of the Qt Toolkit.
**
diff --git a/src/imports/testlib/SignalSpy.qml b/src/imports/testlib/SignalSpy.qml
index 91b5f03522..1876a4d1ca 100644
--- a/src/imports/testlib/SignalSpy.qml
+++ b/src/imports/testlib/SignalSpy.qml
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml
index 5887ececa0..c44aaca45c 100644
--- a/src/imports/testlib/TestCase.qml
+++ b/src/imports/testlib/TestCase.qml
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -313,10 +313,8 @@ Item {
}
function skipAll(msg) {
- if (msg === undefined)
- msg = ""
- warn("The skipAll function is deprecated and will be removed soon. Please update this test by changing skipAll to skip.")
- qtest_results.skip(msg, util.callerFile(), util.callerLine())
+ msg = "The skipAll function is no longer available. Please update this test by changing skipAll to skip."
+ qtest_results.fail(msg, util.callerFile(), util.callerLine())
throw new Error("QtQuickTest::skip")
}
@@ -716,4 +714,4 @@ Item {
if (when && !completed && !running)
qtest_run()
}
-} \ No newline at end of file
+}
diff --git a/src/imports/testlib/main.cpp b/src/imports/testlib/main.cpp
index 0d3669970f..a828415774 100644
--- a/src/imports/testlib/main.cpp
+++ b/src/imports/testlib/main.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
diff --git a/src/imports/testlib/signalspy.h b/src/imports/testlib/signalspy.h
index 3e5ac15c26..639612f503 100644
--- a/src/imports/testlib/signalspy.h
+++ b/src/imports/testlib/signalspy.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
diff --git a/src/imports/testlib/signalspy.qdoc b/src/imports/testlib/signalspy.qdoc
index 79a1dc34c0..3093c0e92a 100644
--- a/src/imports/testlib/signalspy.qdoc
+++ b/src/imports/testlib/signalspy.qdoc
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
diff --git a/src/imports/testlib/testcase.h b/src/imports/testlib/testcase.h
index f9f4cf711f..679329a0fd 100644
--- a/src/imports/testlib/testcase.h
+++ b/src/imports/testlib/testcase.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
diff --git a/src/imports/testlib/testcase.qdoc b/src/imports/testlib/testcase.qdoc
index 719d9baea7..9aa5ab9bf9 100644
--- a/src/imports/testlib/testcase.qdoc
+++ b/src/imports/testlib/testcase.qdoc
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
diff --git a/src/imports/testlib/testlogger.js b/src/imports/testlib/testlogger.js
index d9f842fa73..22b50dc3eb 100644
--- a/src/imports/testlib/testlogger.js
+++ b/src/imports/testlib/testlogger.js
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
diff --git a/src/imports/xmllistmodel/plugin.cpp b/src/imports/xmllistmodel/plugin.cpp
index 2c8f4d7934..ab5c842b0c 100644
--- a/src/imports/xmllistmodel/plugin.cpp
+++ b/src/imports/xmllistmodel/plugin.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/imports/xmllistmodel/qdeclarativexmllistmodel.cpp b/src/imports/xmllistmodel/qdeclarativexmllistmodel.cpp
index b76cc6a543..8148f5fb24 100644
--- a/src/imports/xmllistmodel/qdeclarativexmllistmodel.cpp
+++ b/src/imports/xmllistmodel/qdeclarativexmllistmodel.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/imports/xmllistmodel/qdeclarativexmllistmodel_p.h b/src/imports/xmllistmodel/qdeclarativexmllistmodel_p.h
index 2157b3b44b..1f093e1ff9 100644
--- a/src/imports/xmllistmodel/qdeclarativexmllistmodel_p.h
+++ b/src/imports/xmllistmodel/qdeclarativexmllistmodel_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -55,7 +55,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeContext;
class QDeclarativeXmlListModelRole;
diff --git a/src/plugins/accessible/qtquick1/main.cpp b/src/plugins/accessible/qtquick1/main.cpp
index 9f409eda8e..d1e9258c6e 100644
--- a/src/plugins/accessible/qtquick1/main.cpp
+++ b/src/plugins/accessible/qtquick1/main.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/accessible/qtquick1/qaccessibledeclarativeitem.cpp b/src/plugins/accessible/qtquick1/qaccessibledeclarativeitem.cpp
index 8786949fae..99fd7b5751 100644
--- a/src/plugins/accessible/qtquick1/qaccessibledeclarativeitem.cpp
+++ b/src/plugins/accessible/qtquick1/qaccessibledeclarativeitem.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/accessible/qtquick1/qaccessibledeclarativeitem.h b/src/plugins/accessible/qtquick1/qaccessibledeclarativeitem.h
index 6f841a7c23..79eab02485 100644
--- a/src/plugins/accessible/qtquick1/qaccessibledeclarativeitem.h
+++ b/src/plugins/accessible/qtquick1/qaccessibledeclarativeitem.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/accessible/qtquick1/qaccessibledeclarativeview.cpp b/src/plugins/accessible/qtquick1/qaccessibledeclarativeview.cpp
index 765e00aeec..ada265af61 100644
--- a/src/plugins/accessible/qtquick1/qaccessibledeclarativeview.cpp
+++ b/src/plugins/accessible/qtquick1/qaccessibledeclarativeview.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/accessible/qtquick1/qaccessibledeclarativeview.h b/src/plugins/accessible/qtquick1/qaccessibledeclarativeview.h
index a77a49d96d..ad431b8d3b 100644
--- a/src/plugins/accessible/qtquick1/qaccessibledeclarativeview.h
+++ b/src/plugins/accessible/qtquick1/qaccessibledeclarativeview.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/accessible/quick/main.cpp b/src/plugins/accessible/quick/main.cpp
index 15d5b9589b..8dbf4ee2cc 100644
--- a/src/plugins/accessible/quick/main.cpp
+++ b/src/plugins/accessible/quick/main.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/accessible/quick/qaccessiblequickitem.cpp b/src/plugins/accessible/quick/qaccessiblequickitem.cpp
index fd087c4e1e..e8083bdfe8 100644
--- a/src/plugins/accessible/quick/qaccessiblequickitem.cpp
+++ b/src/plugins/accessible/quick/qaccessiblequickitem.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -98,8 +98,7 @@ QAccessibleInterface *QAccessibleQuickItem::parent() const
if (parent == canvas->rootItem()) {
return QAccessible::queryAccessibleInterface(canvas);
} else {
- QDeclarativeAccessible *ancestor = new QAccessibleQuickItem(parent);
- return ancestor;
+ return QAccessible::queryAccessibleInterface(parent);
}
}
return 0;
@@ -116,7 +115,7 @@ QAccessibleInterface *QAccessibleQuickItem::child(int index) const
if (!child) // FIXME can this happen?
return 0;
- return new QAccessibleQuickItem(child);
+ return QAccessible::queryAccessibleInterface(child);
}
int QAccessibleQuickItem::navigate(QAccessible::RelationFlag rel, int entry, QAccessibleInterface **target) const
@@ -125,10 +124,6 @@ int QAccessibleQuickItem::navigate(QAccessible::RelationFlag rel, int entry, QAc
Q_UNUSED(entry);
Q_UNUSED(target);
*target = 0;
- if (entry == 0) {
- *target = new QAccessibleQuickItem(item());
- return 0;
- }
return -1;
}
diff --git a/src/plugins/accessible/quick/qaccessiblequickitem.h b/src/plugins/accessible/quick/qaccessiblequickitem.h
index 75e7081dc0..88a0a746eb 100644
--- a/src/plugins/accessible/quick/qaccessiblequickitem.h
+++ b/src/plugins/accessible/quick/qaccessiblequickitem.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/accessible/quick/qaccessiblequickview.cpp b/src/plugins/accessible/quick/qaccessiblequickview.cpp
index da8c4242d7..f9eed2ea85 100644
--- a/src/plugins/accessible/quick/qaccessiblequickview.cpp
+++ b/src/plugins/accessible/quick/qaccessiblequickview.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/accessible/quick/qaccessiblequickview.h b/src/plugins/accessible/quick/qaccessiblequickview.h
index c5060be13e..016036fef6 100644
--- a/src/plugins/accessible/quick/qaccessiblequickview.h
+++ b/src/plugins/accessible/quick/qaccessiblequickview.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/accessible/shared/qdeclarativeaccessible.cpp b/src/plugins/accessible/shared/qdeclarativeaccessible.cpp
index eba6a006d1..267f819a6d 100644
--- a/src/plugins/accessible/shared/qdeclarativeaccessible.cpp
+++ b/src/plugins/accessible/shared/qdeclarativeaccessible.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -63,11 +63,6 @@ QDeclarativeAccessible::~QDeclarativeAccessible()
{
}
-QFlags<QAccessible::RelationFlag> QDeclarativeAccessible::relationTo(const QAccessibleInterface *) const
-{
- return QAccessible::Unrelated;
-}
-
QAccessibleInterface *QDeclarativeAccessible::childAt(int x, int y) const
{
// Note that this function will disregard stacking order.
diff --git a/src/plugins/accessible/shared/qdeclarativeaccessible.h b/src/plugins/accessible/shared/qdeclarativeaccessible.h
index d86d6a14c2..924582a49e 100644
--- a/src/plugins/accessible/shared/qdeclarativeaccessible.h
+++ b/src/plugins/accessible/shared/qdeclarativeaccessible.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -76,7 +76,6 @@ public:
~QDeclarativeAccessible();
virtual QRect viewRect() const = 0;
- QFlags<QAccessible::RelationFlag> relationTo(const QAccessibleInterface*) const;
QAccessibleInterface *childAt(int, int) const;
QAccessible::State state() const;
diff --git a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp
index d999de43da..ff46cae1f4 100644
--- a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp
+++ b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h
index 68ec963402..c9741e3d90 100644
--- a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h
+++ b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp b/src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp
index 310305852a..77ed161562 100644
--- a/src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp
+++ b/src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_ost/qostdevice.h b/src/plugins/qmltooling/qmldbg_ost/qostdevice.h
index 0601bc3b51..ec1d3e7a95 100644
--- a/src/plugins/qmltooling/qmldbg_ost/qostdevice.h
+++ b/src/plugins/qmltooling/qmldbg_ost/qostdevice.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_ost/usbostcomm.h b/src/plugins/qmltooling/qmldbg_ost/usbostcomm.h
index 552543bf37..d253ef83ee 100644
--- a/src/plugins/qmltooling/qmldbg_ost/usbostcomm.h
+++ b/src/plugins/qmltooling/qmldbg_ost/usbostcomm.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/abstractliveedittool.cpp b/src/plugins/qmltooling/qmldbg_qtquick1/abstractliveedittool.cpp
index 8d6d3b33a1..845e5d037e 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/abstractliveedittool.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/abstractliveedittool.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/abstractliveedittool.h b/src/plugins/qmltooling/qmldbg_qtquick1/abstractliveedittool.h
index 83a3073b5d..1cd6786fdf 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/abstractliveedittool.h
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/abstractliveedittool.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/boundingrecthighlighter.cpp b/src/plugins/qmltooling/qmldbg_qtquick1/boundingrecthighlighter.cpp
index cace52a355..2be8e6168a 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/boundingrecthighlighter.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/boundingrecthighlighter.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/boundingrecthighlighter.h b/src/plugins/qmltooling/qmldbg_qtquick1/boundingrecthighlighter.h
index 45f1b44afa..ada84548c7 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/boundingrecthighlighter.h
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/boundingrecthighlighter.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/colorpickertool.cpp b/src/plugins/qmltooling/qmldbg_qtquick1/colorpickertool.cpp
index b9e77f6e7d..c06716973e 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/colorpickertool.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/colorpickertool.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/colorpickertool.h b/src/plugins/qmltooling/qmldbg_qtquick1/colorpickertool.h
index b61b2bb4ee..da8ae65e27 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/colorpickertool.h
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/colorpickertool.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/livelayeritem.cpp b/src/plugins/qmltooling/qmldbg_qtquick1/livelayeritem.cpp
index a177185d02..2a52049819 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/livelayeritem.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/livelayeritem.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/livelayeritem.h b/src/plugins/qmltooling/qmldbg_qtquick1/livelayeritem.h
index 61c0c2dc0f..3b78d265f0 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/livelayeritem.h
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/livelayeritem.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/liverubberbandselectionmanipulator.cpp b/src/plugins/qmltooling/qmldbg_qtquick1/liverubberbandselectionmanipulator.cpp
index 7c259d5307..eb4db78f31 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/liverubberbandselectionmanipulator.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/liverubberbandselectionmanipulator.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/liverubberbandselectionmanipulator.h b/src/plugins/qmltooling/qmldbg_qtquick1/liverubberbandselectionmanipulator.h
index 8db8a87e3e..6a53e98b68 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/liverubberbandselectionmanipulator.h
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/liverubberbandselectionmanipulator.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/liveselectionindicator.cpp b/src/plugins/qmltooling/qmldbg_qtquick1/liveselectionindicator.cpp
index 5715d6e865..3935ac1be2 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/liveselectionindicator.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/liveselectionindicator.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/liveselectionindicator.h b/src/plugins/qmltooling/qmldbg_qtquick1/liveselectionindicator.h
index 7effc3a918..7ef5eb5022 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/liveselectionindicator.h
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/liveselectionindicator.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/liveselectionrectangle.cpp b/src/plugins/qmltooling/qmldbg_qtquick1/liveselectionrectangle.cpp
index e03cc59431..03d8baeb0a 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/liveselectionrectangle.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/liveselectionrectangle.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/liveselectionrectangle.h b/src/plugins/qmltooling/qmldbg_qtquick1/liveselectionrectangle.h
index cb1487e6ca..d5a719396d 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/liveselectionrectangle.h
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/liveselectionrectangle.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/liveselectiontool.cpp b/src/plugins/qmltooling/qmldbg_qtquick1/liveselectiontool.cpp
index 42a02090e4..fd2bf8d241 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/liveselectiontool.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/liveselectiontool.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/liveselectiontool.h b/src/plugins/qmltooling/qmldbg_qtquick1/liveselectiontool.h
index f271aa8ec5..a1b8d42b6e 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/liveselectiontool.h
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/liveselectiontool.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/livesingleselectionmanipulator.cpp b/src/plugins/qmltooling/qmldbg_qtquick1/livesingleselectionmanipulator.cpp
index dbdcde28c8..3989299914 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/livesingleselectionmanipulator.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/livesingleselectionmanipulator.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/livesingleselectionmanipulator.h b/src/plugins/qmltooling/qmldbg_qtquick1/livesingleselectionmanipulator.h
index e0b4a69c2b..cd05daf05c 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/livesingleselectionmanipulator.h
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/livesingleselectionmanipulator.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/qdeclarativeviewinspector.cpp b/src/plugins/qmltooling/qmldbg_qtquick1/qdeclarativeviewinspector.cpp
index a880338a19..018127ddbd 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/qdeclarativeviewinspector.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/qdeclarativeviewinspector.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/qdeclarativeviewinspector.h b/src/plugins/qmltooling/qmldbg_qtquick1/qdeclarativeviewinspector.h
index 398ae88970..776085776e 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/qdeclarativeviewinspector.h
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/qdeclarativeviewinspector.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/qdeclarativeviewinspector_p.h b/src/plugins/qmltooling/qmldbg_qtquick1/qdeclarativeviewinspector_p.h
index 0231d7ad91..7e040cc6f6 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/qdeclarativeviewinspector_p.h
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/qdeclarativeviewinspector_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/qtquick1plugin.cpp b/src/plugins/qmltooling/qmldbg_qtquick1/qtquick1plugin.cpp
index 6af41c0dc8..48f4505ab4 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/qtquick1plugin.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/qtquick1plugin.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/qtquick1plugin.h b/src/plugins/qmltooling/qmldbg_qtquick1/qtquick1plugin.h
index 8c7bcc36e8..1fa0e306f8 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/qtquick1plugin.h
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/qtquick1plugin.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/subcomponentmasklayeritem.cpp b/src/plugins/qmltooling/qmldbg_qtquick1/subcomponentmasklayeritem.cpp
index 4e9e91fb25..2949fc8c51 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/subcomponentmasklayeritem.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/subcomponentmasklayeritem.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/subcomponentmasklayeritem.h b/src/plugins/qmltooling/qmldbg_qtquick1/subcomponentmasklayeritem.h
index f9099f9ef2..318b57408d 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/subcomponentmasklayeritem.h
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/subcomponentmasklayeritem.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/zoomtool.cpp b/src/plugins/qmltooling/qmldbg_qtquick1/zoomtool.cpp
index 69d1f48905..8428a0d642 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/zoomtool.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/zoomtool.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick1/zoomtool.h b/src/plugins/qmltooling/qmldbg_qtquick1/zoomtool.h
index 76bf189279..1497b54790 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick1/zoomtool.h
+++ b/src/plugins/qmltooling/qmldbg_qtquick1/zoomtool.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/highlight.cpp b/src/plugins/qmltooling/qmldbg_qtquick2/highlight.cpp
index e2d8338de5..f38c82c71e 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick2/highlight.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick2/highlight.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/highlight.h b/src/plugins/qmltooling/qmldbg_qtquick2/highlight.h
index 8819713461..807894f3ea 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick2/highlight.h
+++ b/src/plugins/qmltooling/qmldbg_qtquick2/highlight.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp
index 6e94b4d3ef..1d176f6aac 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.h b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.h
index d0b8d7763a..8f6875cc7b 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.h
+++ b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.cpp b/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.cpp
index ef546c226a..d000eaaccf 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.h b/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.h
index 4c06a5b37d..076750fa5a 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.h
+++ b/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.cpp b/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.cpp
index 6325bd6323..f9b98a572a 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.h b/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.h
index acbba44a5b..b76c09628f 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.h
+++ b/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp
index ac848534bb..0fb9b5b9b0 100644
--- a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp
+++ b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h
index 0c33a166aa..cec5041c16 100644
--- a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h
+++ b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/shared/abstracttool.cpp b/src/plugins/qmltooling/shared/abstracttool.cpp
index a557aaeb09..973a64f048 100644
--- a/src/plugins/qmltooling/shared/abstracttool.cpp
+++ b/src/plugins/qmltooling/shared/abstracttool.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/shared/abstracttool.h b/src/plugins/qmltooling/shared/abstracttool.h
index 57cf1fc583..b4ef07e27e 100644
--- a/src/plugins/qmltooling/shared/abstracttool.h
+++ b/src/plugins/qmltooling/shared/abstracttool.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/shared/abstractviewinspector.cpp b/src/plugins/qmltooling/shared/abstractviewinspector.cpp
index a67a92841f..9753608cb3 100644
--- a/src/plugins/qmltooling/shared/abstractviewinspector.cpp
+++ b/src/plugins/qmltooling/shared/abstractviewinspector.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/shared/abstractviewinspector.h b/src/plugins/qmltooling/shared/abstractviewinspector.h
index 7fbe44466b..317a5170d0 100644
--- a/src/plugins/qmltooling/shared/abstractviewinspector.h
+++ b/src/plugins/qmltooling/shared/abstractviewinspector.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/shared/qdeclarativeinspectorprotocol.h b/src/plugins/qmltooling/shared/qdeclarativeinspectorprotocol.h
index 8de5a19382..f3d53887a0 100644
--- a/src/plugins/qmltooling/shared/qdeclarativeinspectorprotocol.h
+++ b/src/plugins/qmltooling/shared/qdeclarativeinspectorprotocol.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/plugins/qmltooling/shared/qmlinspectorconstants.h b/src/plugins/qmltooling/shared/qmlinspectorconstants.h
index 7377bc65f0..2da54d4d41 100644
--- a/src/plugins/qmltooling/shared/qmlinspectorconstants.h
+++ b/src/plugins/qmltooling/shared/qmlinspectorconstants.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qmltest/qtestoptions_p.h b/src/qmltest/qtestoptions_p.h
index c1c4f6054e..d6f06d0232 100644
--- a/src/qmltest/qtestoptions_p.h
+++ b/src/qmltest/qtestoptions_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtTest module of the Qt Toolkit.
**
@@ -51,7 +51,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Test)
namespace QTest
{
diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp
index 7ec4fc4aef..c24ea7d3e9 100644
--- a/src/qmltest/quicktest.cpp
+++ b/src/qmltest/quicktest.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
diff --git a/src/qmltest/quicktest.h b/src/qmltest/quicktest.h
index 50c31f0460..3d14b37c6c 100644
--- a/src/qmltest/quicktest.h
+++ b/src/qmltest/quicktest.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
diff --git a/src/qmltest/quicktestevent.cpp b/src/qmltest/quicktestevent.cpp
index e865954460..85cf485e49 100644
--- a/src/qmltest/quicktestevent.cpp
+++ b/src/qmltest/quicktestevent.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
diff --git a/src/qmltest/quicktestevent_p.h b/src/qmltest/quicktestevent_p.h
index d41bfea1ee..f74ff61eb2 100644
--- a/src/qmltest/quicktestevent_p.h
+++ b/src/qmltest/quicktestevent_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
diff --git a/src/qmltest/quicktestglobal.h b/src/qmltest/quicktestglobal.h
index 54a77a64c9..e3c60e8f0b 100644
--- a/src/qmltest/quicktestglobal.h
+++ b/src/qmltest/quicktestglobal.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
diff --git a/src/qmltest/quicktestresult.cpp b/src/qmltest/quicktestresult.cpp
index 27bb4d6053..a1fd7ba464 100644
--- a/src/qmltest/quicktestresult.cpp
+++ b/src/qmltest/quicktestresult.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -256,7 +256,7 @@ void QuickTestResult::setSkipped(bool skip)
*/
int QuickTestResult::passCount() const
{
- return QTestResult::passCount();
+ return QTestLog::passCount();
}
/*!
@@ -268,7 +268,7 @@ int QuickTestResult::passCount() const
*/
int QuickTestResult::failCount() const
{
- return QTestResult::failCount();
+ return QTestLog::failCount();
}
/*!
@@ -280,7 +280,7 @@ int QuickTestResult::failCount() const
*/
int QuickTestResult::skipCount() const
{
- return QTestResult::skipCount();
+ return QTestLog::skipCount();
}
/*!
@@ -437,7 +437,7 @@ void QuickTestResult::warn(const QString &message, const QUrl &location, int lin
void QuickTestResult::ignoreWarning(const QString &message)
{
- QTestResult::ignoreMessage(QtWarningMsg, message.toLatin1().constData());
+ QTestLog::ignoreMessage(QtWarningMsg, message.toLatin1().constData());
}
void QuickTestResult::wait(int ms)
@@ -582,7 +582,7 @@ int QuickTestResult::exitCode()
#else
// make sure our exit code is never going above 127
// since that could wrap and indicate 0 test fails
- return qMin(QTestResult::failCount(), 127);
+ return qMin(QTestLog::failCount(), 127);
#endif
}
diff --git a/src/qmltest/quicktestresult_p.h b/src/qmltest/quicktestresult_p.h
index 898b4f834a..e0e792a072 100644
--- a/src/qmltest/quicktestresult_p.h
+++ b/src/qmltest/quicktestresult_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeaccessibleattached.cpp b/src/qtquick1/graphicsitems/qdeclarativeaccessibleattached.cpp
index 5ddaf8fac4..1a9fe81be8 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeaccessibleattached.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativeaccessibleattached.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeaccessibleattached_p.h b/src/qtquick1/graphicsitems/qdeclarativeaccessibleattached_p.h
index b64ab64600..e06ee475e1 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeaccessibleattached_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeaccessibleattached_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -56,7 +56,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class Q_QTQUICK1_EXPORT QDeclarativeAccessibleAttached : public QObject
{
diff --git a/src/qtquick1/graphicsitems/qdeclarativeanchors.cpp b/src/qtquick1/graphicsitems/qdeclarativeanchors.cpp
index 0daae0e92b..483f15d8e2 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeanchors.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativeanchors.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeanchors_p.h b/src/qtquick1/graphicsitems/qdeclarativeanchors_p.h
index 97649a4ba5..6df910e4e8 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeanchors_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeanchors_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -54,7 +54,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1AnchorsPrivate;
class QDeclarative1AnchorLine;
diff --git a/src/qtquick1/graphicsitems/qdeclarativeanchors_p_p.h b/src/qtquick1/graphicsitems/qdeclarativeanchors_p_p.h
index fcd2341496..cb4ac95166 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeanchors_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeanchors_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeanimatedimage.cpp b/src/qtquick1/graphicsitems/qdeclarativeanimatedimage.cpp
index 4681866769..29a26edc77 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeanimatedimage.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativeanimatedimage.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeanimatedimage_p.h b/src/qtquick1/graphicsitems/qdeclarativeanimatedimage_p.h
index 02c8d5df96..52df01bb0e 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeanimatedimage_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeanimatedimage_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -52,7 +52,6 @@ QT_BEGIN_NAMESPACE
class QMovie;
-QT_MODULE(Declarative)
class QDeclarative1AnimatedImagePrivate;
diff --git a/src/qtquick1/graphicsitems/qdeclarativeanimatedimage_p_p.h b/src/qtquick1/graphicsitems/qdeclarativeanimatedimage_p_p.h
index 1d29f76499..2972a8899f 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeanimatedimage_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeanimatedimage_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeborderimage.cpp b/src/qtquick1/graphicsitems/qdeclarativeborderimage.cpp
index 9802e14987..4e27ea4807 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeborderimage.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativeborderimage.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeborderimage_p.h b/src/qtquick1/graphicsitems/qdeclarativeborderimage_p.h
index fdc60e4489..0f6fd075d5 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeborderimage_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeborderimage_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -49,7 +49,6 @@
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1ScaleGrid;
class QDeclarative1GridScaledImage;
diff --git a/src/qtquick1/graphicsitems/qdeclarativeborderimage_p_p.h b/src/qtquick1/graphicsitems/qdeclarativeborderimage_p_p.h
index ce73b73d0c..0bd69c17af 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeborderimage_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeborderimage_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeevents.cpp b/src/qtquick1/graphicsitems/qdeclarativeevents.cpp
index 59d7094ef6..b554ae7dee 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeevents.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativeevents.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeevents_p_p.h b/src/qtquick1/graphicsitems/qdeclarativeevents_p_p.h
index 746749d3ef..48241700e2 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeevents_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeevents_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeflickable.cpp b/src/qtquick1/graphicsitems/qdeclarativeflickable.cpp
index e9f5d663cb..a3b39bd866 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativeflickable.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeflickable_p.h b/src/qtquick1/graphicsitems/qdeclarativeflickable_p.h
index a0c1941438..ee2925e6ed 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeflickable_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeflickable_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1FlickablePrivate;
class QDeclarative1FlickableVisibleArea;
diff --git a/src/qtquick1/graphicsitems/qdeclarativeflickable_p_p.h b/src/qtquick1/graphicsitems/qdeclarativeflickable_p_p.h
index 4d608d2a4a..445fd4d8fe 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeflickable_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeflickable_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeflipable.cpp b/src/qtquick1/graphicsitems/qdeclarativeflipable.cpp
index 41a9ca9ae7..d376925b2f 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeflipable.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativeflipable.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeflipable_p.h b/src/qtquick1/graphicsitems/qdeclarativeflipable_p.h
index 525f3da4c5..00cace41a8 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeflipable_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeflipable_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -52,7 +52,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1FlipablePrivate;
class Q_AUTOTEST_EXPORT QDeclarative1Flipable : public QDeclarativeItem
diff --git a/src/qtquick1/graphicsitems/qdeclarativefocuspanel.cpp b/src/qtquick1/graphicsitems/qdeclarativefocuspanel.cpp
index 15c5ccf728..c1d201fdfe 100644
--- a/src/qtquick1/graphicsitems/qdeclarativefocuspanel.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativefocuspanel.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativefocuspanel_p.h b/src/qtquick1/graphicsitems/qdeclarativefocuspanel_p.h
index fdcb1cdb51..cbe99bbf2c 100644
--- a/src/qtquick1/graphicsitems/qdeclarativefocuspanel_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativefocuspanel_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class Q_AUTOTEST_EXPORT QDeclarative1FocusPanel : public QDeclarativeItem
{
diff --git a/src/qtquick1/graphicsitems/qdeclarativefocusscope.cpp b/src/qtquick1/graphicsitems/qdeclarativefocusscope.cpp
index efcc783759..75d18383cc 100644
--- a/src/qtquick1/graphicsitems/qdeclarativefocusscope.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativefocusscope.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativefocusscope_p.h b/src/qtquick1/graphicsitems/qdeclarativefocusscope_p.h
index c8b778b25f..68fa28ce8d 100644
--- a/src/qtquick1/graphicsitems/qdeclarativefocusscope_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativefocusscope_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
//### set component root as focusscope
class Q_AUTOTEST_EXPORT QDeclarative1FocusScope : public QDeclarativeItem
diff --git a/src/qtquick1/graphicsitems/qdeclarativegraphicswidget.cpp b/src/qtquick1/graphicsitems/qdeclarativegraphicswidget.cpp
index 0bac7e944e..99072dcab0 100644
--- a/src/qtquick1/graphicsitems/qdeclarativegraphicswidget.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativegraphicswidget.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativegraphicswidget_p.h b/src/qtquick1/graphicsitems/qdeclarativegraphicswidget_p.h
index c12ec7b4c3..f6fcd179cb 100644
--- a/src/qtquick1/graphicsitems/qdeclarativegraphicswidget_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativegraphicswidget_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -49,7 +49,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QGraphicsObject;
class QDeclarative1AnchorLine;
diff --git a/src/qtquick1/graphicsitems/qdeclarativegridview.cpp b/src/qtquick1/graphicsitems/qdeclarativegridview.cpp
index ba2a7e9d6d..1bba3b194a 100644
--- a/src/qtquick1/graphicsitems/qdeclarativegridview.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativegridview.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativegridview_p.h b/src/qtquick1/graphicsitems/qdeclarativegridview_p.h
index ce78dab8c5..27acf8eefc 100644
--- a/src/qtquick1/graphicsitems/qdeclarativegridview_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativegridview_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -49,7 +49,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1VisualModel;
class QDeclarative1GridViewAttached;
class QDeclarative1GridViewPrivate;
diff --git a/src/qtquick1/graphicsitems/qdeclarativeimage.cpp b/src/qtquick1/graphicsitems/qdeclarativeimage.cpp
index 59cf5e0aec..809d373f56 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeimage.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativeimage.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeimage_p.h b/src/qtquick1/graphicsitems/qdeclarativeimage_p.h
index 1e37b1c3ee..ab40ba757e 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeimage_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeimage_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -49,7 +49,6 @@
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1ImagePrivate;
class Q_AUTOTEST_EXPORT QDeclarative1Image : public QDeclarative1ImageBase
diff --git a/src/qtquick1/graphicsitems/qdeclarativeimage_p_p.h b/src/qtquick1/graphicsitems/qdeclarativeimage_p_p.h
index 6ad56ec465..943bad7a63 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeimage_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeimage_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeimagebase.cpp b/src/qtquick1/graphicsitems/qdeclarativeimagebase.cpp
index 323a3b581f..441d51ceb4 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeimagebase.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativeimagebase.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeimagebase_p.h b/src/qtquick1/graphicsitems/qdeclarativeimagebase_p.h
index 923ba29667..aefcc12f9d 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeimagebase_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeimagebase_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeimagebase_p_p.h b/src/qtquick1/graphicsitems/qdeclarativeimagebase_p_p.h
index 98143819fb..34864382c2 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeimagebase_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeimagebase_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeimplicitsizeitem.cpp b/src/qtquick1/graphicsitems/qdeclarativeimplicitsizeitem.cpp
index eecd60ecb7..0a7e3e5758 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeimplicitsizeitem.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativeimplicitsizeitem.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeimplicitsizeitem_p.h b/src/qtquick1/graphicsitems/qdeclarativeimplicitsizeitem_p.h
index 200931ea48..854cd539f2 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeimplicitsizeitem_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeimplicitsizeitem_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeimplicitsizeitem_p_p.h b/src/qtquick1/graphicsitems/qdeclarativeimplicitsizeitem_p_p.h
index 65f842b199..6de2ae4474 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeimplicitsizeitem_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeimplicitsizeitem_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeitem.cpp b/src/qtquick1/graphicsitems/qdeclarativeitem.cpp
index 75baccfe32..a87f4de285 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeitem.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativeitem.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeitem.h b/src/qtquick1/graphicsitems/qdeclarativeitem.h
index e372c9c8ad..e94f675c55 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeitem.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeitem.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -49,6 +49,7 @@
#include <QtCore/QList>
#include <QtGui/qfont.h>
#include <QtWidgets/qgraphicsitem.h>
+#include <QtWidgets/qgraphicswidget.h>
#include <QtWidgets/qgraphicstransform.h>
#include <QtGui/qaccessible.h>
#include <QtWidgets/qaction.h>
@@ -57,7 +58,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1State;
class QDeclarative1AnchorLine;
diff --git a/src/qtquick1/graphicsitems/qdeclarativeitem_p.h b/src/qtquick1/graphicsitems/qdeclarativeitem_p.h
index 376ca791d9..e3f98e86c2 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeitem_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeitem_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeitemchangelistener_p.h b/src/qtquick1/graphicsitems/qdeclarativeitemchangelistener_p.h
index 6533f7f315..6b80f32700 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeitemchangelistener_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeitemchangelistener_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeitemsmodule.cpp b/src/qtquick1/graphicsitems/qdeclarativeitemsmodule.cpp
index 24ab4df4e2..54f7bc8f88 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeitemsmodule.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativeitemsmodule.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeitemsmodule_p.h b/src/qtquick1/graphicsitems/qdeclarativeitemsmodule_p.h
index 0dad3c110d..0cbf77938f 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeitemsmodule_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeitemsmodule_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -49,7 +49,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1ItemModule
{
diff --git a/src/qtquick1/graphicsitems/qdeclarativelayoutitem.cpp b/src/qtquick1/graphicsitems/qdeclarativelayoutitem.cpp
index bbc3940373..6bc7fd02a0 100644
--- a/src/qtquick1/graphicsitems/qdeclarativelayoutitem.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativelayoutitem.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativelayoutitem_p.h b/src/qtquick1/graphicsitems/qdeclarativelayoutitem_p.h
index 646d5e081f..d56f471665 100644
--- a/src/qtquick1/graphicsitems/qdeclarativelayoutitem_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativelayoutitem_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -50,7 +50,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1LayoutItem : public QDeclarativeItem, public QGraphicsLayoutItem
{
diff --git a/src/qtquick1/graphicsitems/qdeclarativelistview.cpp b/src/qtquick1/graphicsitems/qdeclarativelistview.cpp
index 2867caacfb..17b5bdf031 100644
--- a/src/qtquick1/graphicsitems/qdeclarativelistview.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativelistview.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativelistview_p.h b/src/qtquick1/graphicsitems/qdeclarativelistview_p.h
index 6497def455..ccf9cfa799 100644
--- a/src/qtquick1/graphicsitems/qdeclarativelistview_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativelistview_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -49,7 +49,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class Q_AUTOTEST_EXPORT QDeclarative1ViewSection : public QObject
{
diff --git a/src/qtquick1/graphicsitems/qdeclarativeloader.cpp b/src/qtquick1/graphicsitems/qdeclarativeloader.cpp
index ee9559a78c..598d0b3e7a 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeloader.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativeloader.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativeloader_p.h b/src/qtquick1/graphicsitems/qdeclarativeloader_p.h
index 8cb4803839..aef32fa39f 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeloader_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeloader_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1LoaderPrivate;
class Q_AUTOTEST_EXPORT QDeclarative1Loader : public QDeclarative1ImplicitSizeItem
diff --git a/src/qtquick1/graphicsitems/qdeclarativeloader_p_p.h b/src/qtquick1/graphicsitems/qdeclarativeloader_p_p.h
index 37e13aca42..7d762bad7a 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeloader_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativeloader_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativemousearea.cpp b/src/qtquick1/graphicsitems/qdeclarativemousearea.cpp
index 30c692904d..171b3e9a01 100644
--- a/src/qtquick1/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativemousearea.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -684,10 +684,7 @@ void QDeclarative1MouseArea::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
void QDeclarative1MouseArea::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
{
bool acceptsContextMenuButton;
-#if defined(Q_OS_SYMBIAN)
- // In Symbian a Long Tap on the screen will trigger. See QSymbianControl::HandleLongTapEventL().
- acceptsContextMenuButton = acceptedButtons() & Qt::LeftButton;
-#elif defined(Q_WS_WINCE)
+#if defined(Q_WS_WINCE)
// ### WinCE can trigger context menu event with a gesture in the left button or a
// click with the right button. Since we have no way here to differentiate them when
// event happens, accepting either of the them will block the event.
diff --git a/src/qtquick1/graphicsitems/qdeclarativemousearea_p.h b/src/qtquick1/graphicsitems/qdeclarativemousearea_p.h
index 80b27d6b1e..dc2548a3b8 100644
--- a/src/qtquick1/graphicsitems/qdeclarativemousearea_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativemousearea_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class Q_AUTOTEST_EXPORT QDeclarative1Drag : public QObject
{
diff --git a/src/qtquick1/graphicsitems/qdeclarativemousearea_p_p.h b/src/qtquick1/graphicsitems/qdeclarativemousearea_p_p.h
index 4fda1d285c..1366b985e8 100644
--- a/src/qtquick1/graphicsitems/qdeclarativemousearea_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativemousearea_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativepainteditem.cpp b/src/qtquick1/graphicsitems/qdeclarativepainteditem.cpp
index 6ca530ec38..752acf2f64 100644
--- a/src/qtquick1/graphicsitems/qdeclarativepainteditem.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativepainteditem.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativepainteditem_p.h b/src/qtquick1/graphicsitems/qdeclarativepainteditem_p.h
index cca0197e97..3767624bf1 100644
--- a/src/qtquick1/graphicsitems/qdeclarativepainteditem_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativepainteditem_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1PaintedItemPrivate;
class Q_AUTOTEST_EXPORT QDeclarative1PaintedItem : public QDeclarativeItem
diff --git a/src/qtquick1/graphicsitems/qdeclarativepainteditem_p_p.h b/src/qtquick1/graphicsitems/qdeclarativepainteditem_p_p.h
index e95ba27572..34ffdd7be3 100644
--- a/src/qtquick1/graphicsitems/qdeclarativepainteditem_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativepainteditem_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativepath.cpp b/src/qtquick1/graphicsitems/qdeclarativepath.cpp
index 9c7b79f277..cd33115cc1 100644
--- a/src/qtquick1/graphicsitems/qdeclarativepath.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativepath.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativepath_p.h b/src/qtquick1/graphicsitems/qdeclarativepath_p.h
index ea535cc96c..38e40e02f2 100644
--- a/src/qtquick1/graphicsitems/qdeclarativepath_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativepath_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -53,7 +53,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class Q_AUTOTEST_EXPORT QDeclarative1PathElement : public QObject
{
Q_OBJECT
diff --git a/src/qtquick1/graphicsitems/qdeclarativepath_p_p.h b/src/qtquick1/graphicsitems/qdeclarativepath_p_p.h
index e6a800aac4..0a960e24d6 100644
--- a/src/qtquick1/graphicsitems/qdeclarativepath_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativepath_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativepathview.cpp b/src/qtquick1/graphicsitems/qdeclarativepathview.cpp
index 1acdefe206..791d32a612 100644
--- a/src/qtquick1/graphicsitems/qdeclarativepathview.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativepathview.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativepathview_p.h b/src/qtquick1/graphicsitems/qdeclarativepathview_p.h
index 81e644aaa8..83e8950298 100644
--- a/src/qtquick1/graphicsitems/qdeclarativepathview_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativepathview_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -49,7 +49,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1PathViewPrivate;
class QDeclarative1PathViewAttached;
diff --git a/src/qtquick1/graphicsitems/qdeclarativepathview_p_p.h b/src/qtquick1/graphicsitems/qdeclarativepathview_p_p.h
index 2caa7895ec..bf0ac85542 100644
--- a/src/qtquick1/graphicsitems/qdeclarativepathview_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativepathview_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativepincharea.cpp b/src/qtquick1/graphicsitems/qdeclarativepincharea.cpp
index a1633ad31b..26c92a94ac 100644
--- a/src/qtquick1/graphicsitems/qdeclarativepincharea.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativepincharea.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativepincharea_p.h b/src/qtquick1/graphicsitems/qdeclarativepincharea_p.h
index eed2d7e537..7adc4347ec 100644
--- a/src/qtquick1/graphicsitems/qdeclarativepincharea_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativepincharea_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class Q_AUTOTEST_EXPORT QDeclarative1Pinch : public QObject
{
diff --git a/src/qtquick1/graphicsitems/qdeclarativepincharea_p_p.h b/src/qtquick1/graphicsitems/qdeclarativepincharea_p_p.h
index 55eae98b41..d4e94143c2 100644
--- a/src/qtquick1/graphicsitems/qdeclarativepincharea_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativepincharea_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativepositioners.cpp b/src/qtquick1/graphicsitems/qdeclarativepositioners.cpp
index 98b4d11dc6..3537e662d8 100644
--- a/src/qtquick1/graphicsitems/qdeclarativepositioners.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativepositioners.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativepositioners_p.h b/src/qtquick1/graphicsitems/qdeclarativepositioners_p.h
index 521fcefac8..e2a7463275 100644
--- a/src/qtquick1/graphicsitems/qdeclarativepositioners_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativepositioners_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -54,7 +54,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1BasePositionerPrivate;
class Q_QTQUICK1_EXPORT QDeclarative1BasePositioner : public QDeclarative1ImplicitSizeItem
diff --git a/src/qtquick1/graphicsitems/qdeclarativepositioners_p_p.h b/src/qtquick1/graphicsitems/qdeclarativepositioners_p_p.h
index a62636456b..6de5001359 100644
--- a/src/qtquick1/graphicsitems/qdeclarativepositioners_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativepositioners_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativerectangle.cpp b/src/qtquick1/graphicsitems/qdeclarativerectangle.cpp
index 54571d736e..30c7a396c7 100644
--- a/src/qtquick1/graphicsitems/qdeclarativerectangle.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativerectangle.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativerectangle_p.h b/src/qtquick1/graphicsitems/qdeclarativerectangle_p.h
index aac748edd4..3aba8cdfe8 100644
--- a/src/qtquick1/graphicsitems/qdeclarativerectangle_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativerectangle_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -52,7 +52,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class Q_QTQUICK1_EXPORT QDeclarative1Pen : public QObject
{
Q_OBJECT
diff --git a/src/qtquick1/graphicsitems/qdeclarativerectangle_p_p.h b/src/qtquick1/graphicsitems/qdeclarativerectangle_p_p.h
index 4fb10264c8..4722ab9aa1 100644
--- a/src/qtquick1/graphicsitems/qdeclarativerectangle_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativerectangle_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativerepeater.cpp b/src/qtquick1/graphicsitems/qdeclarativerepeater.cpp
index b6d2cb10bc..6290602287 100644
--- a/src/qtquick1/graphicsitems/qdeclarativerepeater.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativerepeater.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativerepeater_p.h b/src/qtquick1/graphicsitems/qdeclarativerepeater_p.h
index 17a33c8ad2..8f9142ed8d 100644
--- a/src/qtquick1/graphicsitems/qdeclarativerepeater_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativerepeater_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1RepeaterPrivate;
class Q_AUTOTEST_EXPORT QDeclarative1Repeater : public QDeclarativeItem
diff --git a/src/qtquick1/graphicsitems/qdeclarativerepeater_p_p.h b/src/qtquick1/graphicsitems/qdeclarativerepeater_p_p.h
index a0fd90599d..c633116f4f 100644
--- a/src/qtquick1/graphicsitems/qdeclarativerepeater_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativerepeater_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativescalegrid.cpp b/src/qtquick1/graphicsitems/qdeclarativescalegrid.cpp
index db879e4497..c52756240b 100644
--- a/src/qtquick1/graphicsitems/qdeclarativescalegrid.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativescalegrid.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativescalegrid_p_p.h b/src/qtquick1/graphicsitems/qdeclarativescalegrid_p_p.h
index f856b53abc..dadca88917 100644
--- a/src/qtquick1/graphicsitems/qdeclarativescalegrid_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativescalegrid_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -55,7 +55,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class Q_QTQUICK1_EXPORT QDeclarative1ScaleGrid : public QObject
{
diff --git a/src/qtquick1/graphicsitems/qdeclarativetext.cpp b/src/qtquick1/graphicsitems/qdeclarativetext.cpp
index 4434cf89bd..8382b03935 100644
--- a/src/qtquick1/graphicsitems/qdeclarativetext.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativetext.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativetext_p.h b/src/qtquick1/graphicsitems/qdeclarativetext_p.h
index 55d1cbe8a0..e0ed20becd 100644
--- a/src/qtquick1/graphicsitems/qdeclarativetext_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativetext_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -51,7 +51,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1TextPrivate;
class Q_QTQUICK1_EXPORT QDeclarative1Text : public QDeclarative1ImplicitSizeItem
{
diff --git a/src/qtquick1/graphicsitems/qdeclarativetext_p_p.h b/src/qtquick1/graphicsitems/qdeclarativetext_p_p.h
index a85a289c96..c3f84f78d8 100644
--- a/src/qtquick1/graphicsitems/qdeclarativetext_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativetext_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativetextedit.cpp b/src/qtquick1/graphicsitems/qdeclarativetextedit.cpp
index 2dd97359c7..2d3bf4bbf8 100644
--- a/src/qtquick1/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativetextedit.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -1769,9 +1769,8 @@ void QDeclarative1TextEditPrivate::updateDefaultTextOption()
customizing when you want the input keyboard to be shown and hidden in
your application.
- By default the opening of input panels follows the platform style. On Symbian^1 and
- Symbian^3 -based devices the panels are opened by clicking TextEdit. On other platforms
- the panels are automatically opened when TextEdit element gains active focus. Input panels are
+ By default the opening of input panels follows the platform style.
+ The panels are automatically opened when TextEdit element gains active focus. Input panels are
always closed if no editor has active focus.
You can disable the automatic behavior by setting the property \c activeFocusOnPress to false
@@ -1819,9 +1818,8 @@ void QDeclarative1TextEdit::openSoftwareInputPanel()
for customizing when you want the input keyboard to be shown and hidden in
your application.
- By default the opening of input panels follows the platform style. On Symbian^1 and
- Symbian^3 -based devices the panels are opened by clicking TextEdit. On other platforms
- the panels are automatically opened when TextEdit element gains active focus. Input panels are
+ By default the opening of input panels follows the platform style.
+ The panels are automatically opened when TextEdit element gains active focus. Input panels are
always closed if no editor has active focus.
You can disable the automatic behavior by setting the property \c activeFocusOnPress to false
diff --git a/src/qtquick1/graphicsitems/qdeclarativetextedit_p.h b/src/qtquick1/graphicsitems/qdeclarativetextedit_p.h
index b9db53e324..77a47f4aec 100644
--- a/src/qtquick1/graphicsitems/qdeclarativetextedit_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativetextedit_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -54,7 +54,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1TextEditPrivate;
diff --git a/src/qtquick1/graphicsitems/qdeclarativetextedit_p_p.h b/src/qtquick1/graphicsitems/qdeclarativetextedit_p_p.h
index 983709050b..711b94c7e1 100644
--- a/src/qtquick1/graphicsitems/qdeclarativetextedit_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativetextedit_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -77,11 +77,6 @@ public:
mouseSelectionMode(QDeclarative1TextEdit::SelectCharacters), lineCount(0), selectByMouse(false), canPaste(false),
yoff(0)
{
-#ifdef Q_OS_SYMBIAN
- if (QSysInfo::symbianVersion() == QSysInfo::SV_SF_1 || QSysInfo::symbianVersion() == QSysInfo::SV_SF_3) {
- showInputPanelOnFocus = false;
- }
-#endif
}
void init();
diff --git a/src/qtquick1/graphicsitems/qdeclarativetextinput.cpp b/src/qtquick1/graphicsitems/qdeclarativetextinput.cpp
index cff87fae5f..e4960da17f 100644
--- a/src/qtquick1/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativetextinput.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -1731,9 +1731,8 @@ void QDeclarative1TextInput::moveCursorSelection(int pos, SelectionMode mode)
customizing when you want the input keyboard to be shown and hidden in
your application.
- By default the opening of input panels follows the platform style. On Symbian^1 and
- Symbian^3 -based devices the panels are opened by clicking TextInput. On other platforms
- the panels are automatically opened when TextInput element gains active focus. Input panels are
+ By default the opening of input panels follows the platform style.
+ The panels are automatically opened when TextInput element gains active focus. Input panels are
always closed if no editor has active focus.
. You can disable the automatic behavior by setting the property \c activeFocusOnPress to false
@@ -1781,9 +1780,8 @@ void QDeclarative1TextInput::openSoftwareInputPanel()
for customizing when you want the input keyboard to be shown and hidden in
your application.
- By default the opening of input panels follows the platform style. On Symbian^1 and
- Symbian^3 -based devices the panels are opened by clicking TextInput. On other platforms
- the panels are automatically opened when TextInput element gains active focus. Input panels are
+ By default the opening of input panels follows the platform style.
+ The panels are automatically opened when TextInput element gains active focus. Input panels are
always closed if no editor has active focus.
. You can disable the automatic behavior by setting the property \c activeFocusOnPress to false
diff --git a/src/qtquick1/graphicsitems/qdeclarativetextinput_p.h b/src/qtquick1/graphicsitems/qdeclarativetextinput_p.h
index 95fe4b9ee8..acf5accae8 100644
--- a/src/qtquick1/graphicsitems/qdeclarativetextinput_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativetextinput_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -54,7 +54,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QValidator;
class QDeclarative1TextInputPrivate;
diff --git a/src/qtquick1/graphicsitems/qdeclarativetextinput_p_p.h b/src/qtquick1/graphicsitems/qdeclarativetextinput_p_p.h
index 3c1656ada8..05c99fe994 100644
--- a/src/qtquick1/graphicsitems/qdeclarativetextinput_p_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativetextinput_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -79,11 +79,6 @@ public:
autoScroll(true), selectByMouse(false), canPaste(false), hAlignImplicit(true),
selectPressed(false)
{
-#ifdef Q_OS_SYMBIAN
- if (QSysInfo::symbianVersion() == QSysInfo::SV_SF_1 || QSysInfo::symbianVersion() == QSysInfo::SV_SF_3) {
- showInputPanelOnFocus = false;
- }
-#endif
}
~QDeclarative1TextInputPrivate()
diff --git a/src/qtquick1/graphicsitems/qdeclarativetextlayout.cpp b/src/qtquick1/graphicsitems/qdeclarativetextlayout.cpp
index fb79a1915d..6009d1b626 100644
--- a/src/qtquick1/graphicsitems/qdeclarativetextlayout.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativetextlayout.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativetextlayout_p.h b/src/qtquick1/graphicsitems/qdeclarativetextlayout_p.h
index 76d11781aa..4dfcae6362 100644
--- a/src/qtquick1/graphicsitems/qdeclarativetextlayout_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativetextlayout_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1TextLayoutPrivate;
class QDeclarative1TextLayout : public QTextLayout
diff --git a/src/qtquick1/graphicsitems/qdeclarativetranslate.cpp b/src/qtquick1/graphicsitems/qdeclarativetranslate.cpp
index 535af7f7f5..c3d0de44c0 100644
--- a/src/qtquick1/graphicsitems/qdeclarativetranslate.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativetranslate.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativetranslate_p.h b/src/qtquick1/graphicsitems/qdeclarativetranslate_p.h
index 1484c6399f..72e04ad99c 100644
--- a/src/qtquick1/graphicsitems/qdeclarativetranslate_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativetranslate_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1TranslatePrivate;
diff --git a/src/qtquick1/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/qtquick1/graphicsitems/qdeclarativevisualitemmodel.cpp
index 0ecf38b171..6af9060412 100644
--- a/src/qtquick1/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/graphicsitems/qdeclarativevisualitemmodel_p.h b/src/qtquick1/graphicsitems/qdeclarativevisualitemmodel_p.h
index 0f973acf64..b85f48dd5d 100644
--- a/src/qtquick1/graphicsitems/qdeclarativevisualitemmodel_p.h
+++ b/src/qtquick1/graphicsitems/qdeclarativevisualitemmodel_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -53,7 +53,6 @@ Q_DECLARE_METATYPE(QModelIndex)
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeComponent;
class QDeclarativeItem;
diff --git a/src/qtquick1/qtquick1.cpp b/src/qtquick1/qtquick1.cpp
index d7dda061b9..d8b5f6d5de 100644
--- a/src/qtquick1/qtquick1.cpp
+++ b/src/qtquick1/qtquick1.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/qtquick1.pro b/src/qtquick1/qtquick1.pro
index c59f1af07d..529e3a0ae3 100644
--- a/src/qtquick1/qtquick1.pro
+++ b/src/qtquick1/qtquick1.pro
@@ -20,16 +20,6 @@ INSTALLS += feature
win32-msvc*:DEFINES *= _CRT_SECURE_NO_WARNINGS
-symbian {
- DEFINES += QT_MAKEDLL
- CONFIG += epocallowdlldata
- contains(QT_EDITION, OpenSource) {
- TARGET.CAPABILITY = LocalServices NetworkServices ReadUserData UserEnvironment WriteUserData
- } else {
- TARGET.CAPABILITY = All -Tcb
- }
-}
-
#INCLUDEPATH += $$PWD/QtQuick1
#INCLUDEPATH += $$PWD
diff --git a/src/qtquick1/qtquick1_p.h b/src/qtquick1/qtquick1_p.h
index e35691d471..0fa9f677bc 100644
--- a/src/qtquick1/qtquick1_p.h
+++ b/src/qtquick1/qtquick1_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class Q_QTQUICK1_EXPORT QDeclarativeQtQuick1Module
{
diff --git a/src/qtquick1/util/qdeclarativeanimation.cpp b/src/qtquick1/util/qdeclarativeanimation.cpp
index 88b318c33b..fb0a9ef4b6 100644
--- a/src/qtquick1/util/qdeclarativeanimation.cpp
+++ b/src/qtquick1/util/qdeclarativeanimation.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -830,7 +830,7 @@ void QDeclarative1ScriptActionPrivate::execute()
QDeclarativeExpression expr(scriptStr.context(), scriptStr.scopeObject(), str);
QDeclarativeData *ddata = QDeclarativeData::get(q);
if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty())
- expr.setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber);
+ expr.setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber, ddata->columnNumber);
expr.evaluate();
if (expr.hasError())
qmlInfo(q) << expr.error();
diff --git a/src/qtquick1/util/qdeclarativeanimation_p.h b/src/qtquick1/util/qdeclarativeanimation_p.h
index bd2935f672..bde5501368 100644
--- a/src/qtquick1/util/qdeclarativeanimation_p.h
+++ b/src/qtquick1/util/qdeclarativeanimation_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -59,7 +59,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeItem;
class QDeclarative1AbstractAnimationPrivate;
diff --git a/src/qtquick1/util/qdeclarativeanimation_p_p.h b/src/qtquick1/util/qdeclarativeanimation_p_p.h
index f65f9c1f7c..9fc3d52de2 100644
--- a/src/qtquick1/util/qdeclarativeanimation_p_p.h
+++ b/src/qtquick1/util/qdeclarativeanimation_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativeapplication.cpp b/src/qtquick1/util/qdeclarativeapplication.cpp
index 5b2960076f..a3ab09ec0a 100644
--- a/src/qtquick1/util/qdeclarativeapplication.cpp
+++ b/src/qtquick1/util/qdeclarativeapplication.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativeapplication_p.h b/src/qtquick1/util/qdeclarativeapplication_p.h
index 1148fe6a61..fae6b14628 100644
--- a/src/qtquick1/util/qdeclarativeapplication_p.h
+++ b/src/qtquick1/util/qdeclarativeapplication_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -50,7 +50,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1ApplicationPrivate;
class Q_QTQUICK1_EXPORT QDeclarative1Application : public QObject
diff --git a/src/qtquick1/util/qdeclarativebehavior.cpp b/src/qtquick1/util/qdeclarativebehavior.cpp
index 3b184a5d54..1962ca5371 100644
--- a/src/qtquick1/util/qdeclarativebehavior.cpp
+++ b/src/qtquick1/util/qdeclarativebehavior.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativebehavior_p.h b/src/qtquick1/util/qdeclarativebehavior_p.h
index d31ff7eb3a..3bbac1448e 100644
--- a/src/qtquick1/util/qdeclarativebehavior_p.h
+++ b/src/qtquick1/util/qdeclarativebehavior_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -53,7 +53,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1AbstractAnimation;
class QDeclarative1BehaviorPrivate;
diff --git a/src/qtquick1/util/qdeclarativebind.cpp b/src/qtquick1/util/qdeclarativebind.cpp
index 44dc8503f4..5fbdad22dc 100644
--- a/src/qtquick1/util/qdeclarativebind.cpp
+++ b/src/qtquick1/util/qdeclarativebind.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativebind_p.h b/src/qtquick1/util/qdeclarativebind_p.h
index 31ddcb2862..6ed24bcf9c 100644
--- a/src/qtquick1/util/qdeclarativebind_p.h
+++ b/src/qtquick1/util/qdeclarativebind_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -50,7 +50,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1BindPrivate;
class Q_AUTOTEST_EXPORT QDeclarative1Bind : public QObject, public QDeclarativeParserStatus
diff --git a/src/qtquick1/util/qdeclarativeconnections.cpp b/src/qtquick1/util/qdeclarativeconnections.cpp
index 5aa6a6f3d4..ae2fea9270 100644
--- a/src/qtquick1/util/qdeclarativeconnections.cpp
+++ b/src/qtquick1/util/qdeclarativeconnections.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -266,7 +266,7 @@ void QDeclarative1Connections::connectSignals()
QDeclarativeExpression *expression = new QDeclarativeExpression(qmlContext(this), 0, script);
QDeclarativeData *ddata = QDeclarativeData::get(this);
if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty())
- expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber);
+ expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber, ddata->columnNumber);
signal->setExpression(expression);
d->boundsignals += signal;
} else {
diff --git a/src/qtquick1/util/qdeclarativeconnections_p.h b/src/qtquick1/util/qdeclarativeconnections_p.h
index b08f467426..7ba5234e42 100644
--- a/src/qtquick1/util/qdeclarativeconnections_p.h
+++ b/src/qtquick1/util/qdeclarativeconnections_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -53,7 +53,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeBoundSignal;
class QDeclarativeContext;
diff --git a/src/qtquick1/util/qdeclarativefontloader.cpp b/src/qtquick1/util/qdeclarativefontloader.cpp
index 09bbbaf11c..d89e64c955 100644
--- a/src/qtquick1/util/qdeclarativefontloader.cpp
+++ b/src/qtquick1/util/qdeclarativefontloader.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativefontloader_p.h b/src/qtquick1/util/qdeclarativefontloader_p.h
index 644418c4b9..48bcc690a0 100644
--- a/src/qtquick1/util/qdeclarativefontloader_p.h
+++ b/src/qtquick1/util/qdeclarativefontloader_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -51,7 +51,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1FontLoaderPrivate;
class Q_AUTOTEST_EXPORT QDeclarative1FontLoader : public QObject
diff --git a/src/qtquick1/util/qdeclarativelistaccessor.cpp b/src/qtquick1/util/qdeclarativelistaccessor.cpp
index 407641279d..1715ee550b 100644
--- a/src/qtquick1/util/qdeclarativelistaccessor.cpp
+++ b/src/qtquick1/util/qdeclarativelistaccessor.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativelistaccessor_p.h b/src/qtquick1/util/qdeclarativelistaccessor_p.h
index 85bade5201..99dc6c854d 100644
--- a/src/qtquick1/util/qdeclarativelistaccessor_p.h
+++ b/src/qtquick1/util/qdeclarativelistaccessor_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -50,7 +50,6 @@ QT_BEGIN_NAMESPACE
class QDeclarativeEngine;
-QT_MODULE(Declarative)
class Q_AUTOTEST_EXPORT QDeclarative1ListAccessor
{
diff --git a/src/qtquick1/util/qdeclarativelistmodel.cpp b/src/qtquick1/util/qdeclarativelistmodel.cpp
index 59d18ea428..5415504054 100644
--- a/src/qtquick1/util/qdeclarativelistmodel.cpp
+++ b/src/qtquick1/util/qdeclarativelistmodel.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativelistmodel_p.h b/src/qtquick1/util/qdeclarativelistmodel_p.h
index aaf15d68b2..e9f8ca13ef 100644
--- a/src/qtquick1/util/qdeclarativelistmodel_p.h
+++ b/src/qtquick1/util/qdeclarativelistmodel_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -56,7 +56,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class FlatListModel_1;
class NestedListModel_1;
diff --git a/src/qtquick1/util/qdeclarativelistmodel_p_p.h b/src/qtquick1/util/qdeclarativelistmodel_p_p.h
index 137e94cd87..68bb3ecb80 100644
--- a/src/qtquick1/util/qdeclarativelistmodel_p_p.h
+++ b/src/qtquick1/util/qdeclarativelistmodel_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -66,7 +66,6 @@ QT_BEGIN_NAMESPACE
class QScriptEngine;
-QT_MODULE(Declarative)
class QDeclarative1OpenMetaObject;
class QDeclarative1ListModelWorkerAgent;
diff --git a/src/qtquick1/util/qdeclarativelistmodelworkeragent.cpp b/src/qtquick1/util/qdeclarativelistmodelworkeragent.cpp
index d3f66801c7..70ec7079df 100644
--- a/src/qtquick1/util/qdeclarativelistmodelworkeragent.cpp
+++ b/src/qtquick1/util/qdeclarativelistmodelworkeragent.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativelistmodelworkeragent_p.h b/src/qtquick1/util/qdeclarativelistmodelworkeragent_p.h
index 48e12a4348..2d783f3b04 100644
--- a/src/qtquick1/util/qdeclarativelistmodelworkeragent_p.h
+++ b/src/qtquick1/util/qdeclarativelistmodelworkeragent_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -63,7 +63,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1ListModel;
class FlatListScriptClass_1;
diff --git a/src/qtquick1/util/qdeclarativeopenmetaobject.cpp b/src/qtquick1/util/qdeclarativeopenmetaobject.cpp
index 39583cfe2d..c2c7b11d75 100644
--- a/src/qtquick1/util/qdeclarativeopenmetaobject.cpp
+++ b/src/qtquick1/util/qdeclarativeopenmetaobject.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativeopenmetaobject_p.h b/src/qtquick1/util/qdeclarativeopenmetaobject_p.h
index bb9d4bd851..610694f9b5 100644
--- a/src/qtquick1/util/qdeclarativeopenmetaobject_p.h
+++ b/src/qtquick1/util/qdeclarativeopenmetaobject_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -56,7 +56,6 @@ QT_BEGIN_NAMESPACE
class QDeclarativeEngine;
class QMetaPropertyBuilder;
-QT_MODULE(Declarative)
class QDeclarative1OpenMetaObjectTypePrivate;
class Q_QTQUICK1_EXPORT QDeclarative1OpenMetaObjectType : public QDeclarativeRefCount
diff --git a/src/qtquick1/util/qdeclarativepackage.cpp b/src/qtquick1/util/qdeclarativepackage.cpp
index f0a755e383..9c355c41f8 100644
--- a/src/qtquick1/util/qdeclarativepackage.cpp
+++ b/src/qtquick1/util/qdeclarativepackage.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativepackage_p.h b/src/qtquick1/util/qdeclarativepackage_p.h
index f2b6dfe689..ad4f877a80 100644
--- a/src/qtquick1/util/qdeclarativepackage_p.h
+++ b/src/qtquick1/util/qdeclarativepackage_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1PackagePrivate;
class QDeclarative1PackageAttached;
diff --git a/src/qtquick1/util/qdeclarativepixmapcache.cpp b/src/qtquick1/util/qdeclarativepixmapcache.cpp
index 7dfeedeeba..e6b6da6365 100644
--- a/src/qtquick1/util/qdeclarativepixmapcache.cpp
+++ b/src/qtquick1/util/qdeclarativepixmapcache.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativepixmapcache_p.h b/src/qtquick1/util/qdeclarativepixmapcache_p.h
index 207ae69712..332a1b20c3 100644
--- a/src/qtquick1/util/qdeclarativepixmapcache_p.h
+++ b/src/qtquick1/util/qdeclarativepixmapcache_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -53,7 +53,6 @@ QT_BEGIN_NAMESPACE
class QDeclarativeEngine;
-QT_MODULE(Declarative)
class QDeclarative1PixmapData;
class Q_QTQUICK1_EXPORT QDeclarative1Pixmap
diff --git a/src/qtquick1/util/qdeclarativepropertychanges.cpp b/src/qtquick1/util/qdeclarativepropertychanges.cpp
index d728c25c57..983b9a30c6 100644
--- a/src/qtquick1/util/qdeclarativepropertychanges.cpp
+++ b/src/qtquick1/util/qdeclarativepropertychanges.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -340,7 +340,7 @@ void QDeclarative1PropertyChangesPrivate::decode()
QDeclarativeExpression *expression = new QDeclarativeExpression(qmlContext(q), object, data.toString());
QDeclarativeData *ddata = QDeclarativeData::get(q);
if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty())
- expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber);
+ expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber, ddata->columnNumber);
QDeclarative1ReplaceSignalHandler *handler = new QDeclarative1ReplaceSignalHandler;
handler->property = prop;
handler->expression = expression;
@@ -349,7 +349,7 @@ void QDeclarative1PropertyChangesPrivate::decode()
QDeclarativeExpression *expression = new QDeclarativeExpression(qmlContext(q), object, data.toString());
QDeclarativeData *ddata = QDeclarativeData::get(q);
if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty())
- expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber);
+ expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber, ddata->columnNumber);
expressions << ExpressionChange(name, id, expression);
} else {
properties << qMakePair(name, data);
@@ -483,7 +483,7 @@ QDeclarative1PropertyChanges::ActionList QDeclarative1PropertyChanges::actions()
QDeclarativeBinding *newBinding = id != QDeclarativeBinding::Invalid ? QDeclarativeBinding::createBinding(id, object(), qmlContext(this), e->sourceFile(), e->lineNumber()) : 0;
if (!newBinding) {
newBinding = new QDeclarativeBinding(e->expression(), object(), qmlContext(this));
- newBinding->setSourceLocation(e->sourceFile(), e->lineNumber());
+ newBinding->setSourceLocation(e->sourceFile(), e->lineNumber(), e->columnNumber());
}
newBinding->setTarget(prop);
a.toBinding = newBinding;
diff --git a/src/qtquick1/util/qdeclarativepropertychanges_p.h b/src/qtquick1/util/qdeclarativepropertychanges_p.h
index 9d822cfa6c..29a43e5639 100644
--- a/src/qtquick1/util/qdeclarativepropertychanges_p.h
+++ b/src/qtquick1/util/qdeclarativepropertychanges_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -49,7 +49,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1PropertyChangesPrivate;
class Q_QTQUICK1_EXPORT QDeclarative1PropertyChanges : public QDeclarative1StateOperation
diff --git a/src/qtquick1/util/qdeclarativesmoothedanimation.cpp b/src/qtquick1/util/qdeclarativesmoothedanimation.cpp
index 29aebed245..4ade94f193 100644
--- a/src/qtquick1/util/qdeclarativesmoothedanimation.cpp
+++ b/src/qtquick1/util/qdeclarativesmoothedanimation.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativesmoothedanimation_p.h b/src/qtquick1/util/qdeclarativesmoothedanimation_p.h
index 6163c75b65..c7223ee5f7 100644
--- a/src/qtquick1/util/qdeclarativesmoothedanimation_p.h
+++ b/src/qtquick1/util/qdeclarativesmoothedanimation_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -53,7 +53,6 @@ QT_BEGIN_NAMESPACE
class QDeclarativeProperty;
-QT_MODULE(Declarative)
class QDeclarative1SmoothedAnimationPrivate;
class Q_AUTOTEST_EXPORT QDeclarative1SmoothedAnimation : public QDeclarative1NumberAnimation
diff --git a/src/qtquick1/util/qdeclarativesmoothedanimation_p_p.h b/src/qtquick1/util/qdeclarativesmoothedanimation_p_p.h
index 2b8036f617..0c1e2a823f 100644
--- a/src/qtquick1/util/qdeclarativesmoothedanimation_p_p.h
+++ b/src/qtquick1/util/qdeclarativesmoothedanimation_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativespringanimation.cpp b/src/qtquick1/util/qdeclarativespringanimation.cpp
index 37952d0ed8..d950962a16 100644
--- a/src/qtquick1/util/qdeclarativespringanimation.cpp
+++ b/src/qtquick1/util/qdeclarativespringanimation.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativespringanimation_p.h b/src/qtquick1/util/qdeclarativespringanimation_p.h
index 3490a5d7a2..38d94c410b 100644
--- a/src/qtquick1/util/qdeclarativespringanimation_p.h
+++ b/src/qtquick1/util/qdeclarativespringanimation_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -51,7 +51,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1SpringAnimationPrivate;
class Q_AUTOTEST_EXPORT QDeclarative1SpringAnimation : public QDeclarative1NumberAnimation
diff --git a/src/qtquick1/util/qdeclarativestate.cpp b/src/qtquick1/util/qdeclarativestate.cpp
index c52c44c0bd..26278236a6 100644
--- a/src/qtquick1/util/qdeclarativestate.cpp
+++ b/src/qtquick1/util/qdeclarativestate.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativestate_p.h b/src/qtquick1/util/qdeclarativestate_p.h
index 6c1fd06f6d..c6f3e22120 100644
--- a/src/qtquick1/util/qdeclarativestate_p.h
+++ b/src/qtquick1/util/qdeclarativestate_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -56,7 +56,6 @@ class QDeclarativeAbstractBinding;
class QDeclarativeBinding;
class QDeclarativeExpression;
-QT_MODULE(Declarative)
class QDeclarative1ActionEvent;
class Q_QTQUICK1_EXPORT QDeclarative1Action
diff --git a/src/qtquick1/util/qdeclarativestate_p_p.h b/src/qtquick1/util/qdeclarativestate_p_p.h
index 865d3f1315..10e2de2a6a 100644
--- a/src/qtquick1/util/qdeclarativestate_p_p.h
+++ b/src/qtquick1/util/qdeclarativestate_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativestategroup.cpp b/src/qtquick1/util/qdeclarativestategroup.cpp
index 50ab231095..b6d63eec35 100644
--- a/src/qtquick1/util/qdeclarativestategroup.cpp
+++ b/src/qtquick1/util/qdeclarativestategroup.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativestategroup_p.h b/src/qtquick1/util/qdeclarativestategroup_p.h
index dc83975349..a508a082a2 100644
--- a/src/qtquick1/util/qdeclarativestategroup_p.h
+++ b/src/qtquick1/util/qdeclarativestategroup_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -49,7 +49,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1StateGroupPrivate;
class Q_QTQUICK1_EXPORT QDeclarative1StateGroup : public QObject, public QDeclarativeParserStatus
diff --git a/src/qtquick1/util/qdeclarativestateoperations.cpp b/src/qtquick1/util/qdeclarativestateoperations.cpp
index e4edad6828..fc2066021e 100644
--- a/src/qtquick1/util/qdeclarativestateoperations.cpp
+++ b/src/qtquick1/util/qdeclarativestateoperations.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -667,7 +667,7 @@ void QDeclarative1StateChangeScript::execute(Reason)
QDeclarativeExpression expr(d->script.context(), d->script.scopeObject(), script);
QDeclarativeData *ddata = QDeclarativeData::get(this);
if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty())
- expr.setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber);
+ expr.setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber, ddata->columnNumber);
expr.evaluate();
if (expr.hasError())
qmlInfo(this, expr.error());
diff --git a/src/qtquick1/util/qdeclarativestateoperations_p.h b/src/qtquick1/util/qdeclarativestateoperations_p.h
index 1cf9b73698..774ee2cf35 100644
--- a/src/qtquick1/util/qdeclarativestateoperations_p.h
+++ b/src/qtquick1/util/qdeclarativestateoperations_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -52,7 +52,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1ParentChangePrivate;
class Q_AUTOTEST_EXPORT QDeclarative1ParentChange : public QDeclarative1StateOperation, public QDeclarative1ActionEvent
diff --git a/src/qtquick1/util/qdeclarativestyledtext.cpp b/src/qtquick1/util/qdeclarativestyledtext.cpp
index 077eba04e9..d81b667eda 100644
--- a/src/qtquick1/util/qdeclarativestyledtext.cpp
+++ b/src/qtquick1/util/qdeclarativestyledtext.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativestyledtext_p.h b/src/qtquick1/util/qdeclarativestyledtext_p.h
index 3202ef9b34..4985516fba 100644
--- a/src/qtquick1/util/qdeclarativestyledtext_p.h
+++ b/src/qtquick1/util/qdeclarativestyledtext_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativesystempalette.cpp b/src/qtquick1/util/qdeclarativesystempalette.cpp
index d168096478..7fd8dc9e6e 100644
--- a/src/qtquick1/util/qdeclarativesystempalette.cpp
+++ b/src/qtquick1/util/qdeclarativesystempalette.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativesystempalette_p.h b/src/qtquick1/util/qdeclarativesystempalette_p.h
index 713e5238ab..05222c1872 100644
--- a/src/qtquick1/util/qdeclarativesystempalette_p.h
+++ b/src/qtquick1/util/qdeclarativesystempalette_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -51,7 +51,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1SystemPalettePrivate;
class Q_AUTOTEST_EXPORT QDeclarative1SystemPalette : public QObject
diff --git a/src/qtquick1/util/qdeclarativetimeline.cpp b/src/qtquick1/util/qdeclarativetimeline.cpp
index 30443c2fed..1bf872fea6 100644
--- a/src/qtquick1/util/qdeclarativetimeline.cpp
+++ b/src/qtquick1/util/qdeclarativetimeline.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativetimeline_p_p.h b/src/qtquick1/util/qdeclarativetimeline_p_p.h
index bfc05a9e82..d661d2436b 100644
--- a/src/qtquick1/util/qdeclarativetimeline_p_p.h
+++ b/src/qtquick1/util/qdeclarativetimeline_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativetimer.cpp b/src/qtquick1/util/qdeclarativetimer.cpp
index e1012f7d05..44559d9a5c 100644
--- a/src/qtquick1/util/qdeclarativetimer.cpp
+++ b/src/qtquick1/util/qdeclarativetimer.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativetimer_p.h b/src/qtquick1/util/qdeclarativetimer_p.h
index 62dec292eb..3ea4fba8c7 100644
--- a/src/qtquick1/util/qdeclarativetimer_p.h
+++ b/src/qtquick1/util/qdeclarativetimer_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -57,7 +57,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1TimerPrivate;
class Q_QTQUICK1_EXPORT QDeclarative1Timer : public QObject, public QDeclarativeParserStatus
diff --git a/src/qtquick1/util/qdeclarativetransition.cpp b/src/qtquick1/util/qdeclarativetransition.cpp
index f9a262aa03..5b0fe99d4a 100644
--- a/src/qtquick1/util/qdeclarativetransition.cpp
+++ b/src/qtquick1/util/qdeclarativetransition.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativetransition_p.h b/src/qtquick1/util/qdeclarativetransition_p.h
index f58c36e0ba..55f0a7947b 100644
--- a/src/qtquick1/util/qdeclarativetransition_p.h
+++ b/src/qtquick1/util/qdeclarativetransition_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -52,7 +52,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1AbstractAnimation;
class QDeclarative1TransitionPrivate;
diff --git a/src/qtquick1/util/qdeclarativetransitionmanager.cpp b/src/qtquick1/util/qdeclarativetransitionmanager.cpp
index 9933ad967b..378a4b8a54 100644
--- a/src/qtquick1/util/qdeclarativetransitionmanager.cpp
+++ b/src/qtquick1/util/qdeclarativetransitionmanager.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativetransitionmanager_p_p.h b/src/qtquick1/util/qdeclarativetransitionmanager_p_p.h
index 72f2c3dfaf..2ec27ae65f 100644
--- a/src/qtquick1/util/qdeclarativetransitionmanager_p_p.h
+++ b/src/qtquick1/util/qdeclarativetransitionmanager_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativeutilmodule.cpp b/src/qtquick1/util/qdeclarativeutilmodule.cpp
index 5d9603bb44..f5e3f73a96 100644
--- a/src/qtquick1/util/qdeclarativeutilmodule.cpp
+++ b/src/qtquick1/util/qdeclarativeutilmodule.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativeutilmodule_p.h b/src/qtquick1/util/qdeclarativeutilmodule_p.h
index 8063fb198c..668f7252b9 100644
--- a/src/qtquick1/util/qdeclarativeutilmodule_p.h
+++ b/src/qtquick1/util/qdeclarativeutilmodule_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -49,7 +49,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarative1UtilModule
{
diff --git a/src/qtquick1/util/qdeclarativeview.cpp b/src/qtquick1/util/qdeclarativeview.cpp
index c19a522b42..eb9d335d01 100644
--- a/src/qtquick1/util/qdeclarativeview.cpp
+++ b/src/qtquick1/util/qdeclarativeview.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativeview.h b/src/qtquick1/util/qdeclarativeview.h
index a6dac8062c..bc156f3307 100644
--- a/src/qtquick1/util/qdeclarativeview.h
+++ b/src/qtquick1/util/qdeclarativeview.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -59,7 +59,6 @@ class QDeclarativeContext;
class QDeclarativeError;
class QDeclarativeItem;
-QT_MODULE(Declarative)
class QDeclarativeViewPrivate;
class Q_QTQUICK1_EXPORT QDeclarativeView : public QGraphicsView
diff --git a/src/qtquick1/util/qdeclarativexmllistmodel.cpp b/src/qtquick1/util/qdeclarativexmllistmodel.cpp
index 664323c92e..c01734be9d 100644
--- a/src/qtquick1/util/qdeclarativexmllistmodel.cpp
+++ b/src/qtquick1/util/qdeclarativexmllistmodel.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/qtquick1/util/qdeclarativexmllistmodel_p.h b/src/qtquick1/util/qdeclarativexmllistmodel_p.h
index 2b344b2c23..c841716206 100644
--- a/src/qtquick1/util/qdeclarativexmllistmodel_p.h
+++ b/src/qtquick1/util/qdeclarativexmllistmodel_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -55,7 +55,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeContext;
class QDeclarative1XmlListModelRole;
diff --git a/src/quick/designer/designersupport.cpp b/src/quick/designer/designersupport.cpp
index 4ffd3fedff..a5ddc6dcc7 100644
--- a/src/quick/designer/designersupport.cpp
+++ b/src/quick/designer/designersupport.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/designer/designersupport.h b/src/quick/designer/designersupport.h
index 69463fdbe0..25ea8372ce 100644
--- a/src/quick/designer/designersupport.h
+++ b/src/quick/designer/designersupport.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/checksync.pl b/src/quick/items/checksync.pl
index 94855fcadf..42065b5400 100755
--- a/src/quick/items/checksync.pl
+++ b/src/quick/items/checksync.pl
@@ -3,7 +3,7 @@
##
## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
-## Contact: Nokia Corporation (qt-info@nokia.com)
+## Contact: http://www.qt-project.org/
##
## This file is part of the Declarative module of the Qt Toolkit.
##
diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp
index e8decdc4ed..c8f9553129 100644
--- a/src/quick/items/context2d/qquickcanvasitem.cpp
+++ b/src/quick/items/context2d/qquickcanvasitem.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/context2d/qquickcanvasitem_p.h b/src/quick/items/context2d/qquickcanvasitem_p.h
index 70ca475c96..de303d4e7e 100644
--- a/src/quick/items/context2d/qquickcanvasitem_p.h
+++ b/src/quick/items/context2d/qquickcanvasitem_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp
index d5d57132bf..5493ba9331 100644
--- a/src/quick/items/context2d/qquickcontext2d.cpp
+++ b/src/quick/items/context2d/qquickcontext2d.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/context2d/qquickcontext2d_p.h b/src/quick/items/context2d/qquickcontext2d_p.h
index 0f320d9a7f..2f3b3309d3 100644
--- a/src/quick/items/context2d/qquickcontext2d_p.h
+++ b/src/quick/items/context2d/qquickcontext2d_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp
index 476e7e2cf8..c77ff236be 100644
--- a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp
+++ b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h b/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h
index 2029198648..b9cf03081d 100644
--- a/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h
+++ b/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/context2d/qquickcontext2dnode.cpp b/src/quick/items/context2d/qquickcontext2dnode.cpp
index 445cde8964..d2508bd996 100644
--- a/src/quick/items/context2d/qquickcontext2dnode.cpp
+++ b/src/quick/items/context2d/qquickcontext2dnode.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/context2d/qquickcontext2dnode_p.h b/src/quick/items/context2d/qquickcontext2dnode_p.h
index a00c939896..c98077cff2 100644
--- a/src/quick/items/context2d/qquickcontext2dnode_p.h
+++ b/src/quick/items/context2d/qquickcontext2dnode_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/context2d/qquickcontext2dtexture.cpp b/src/quick/items/context2d/qquickcontext2dtexture.cpp
index bcbb9b7c29..1b3b13dd48 100644
--- a/src/quick/items/context2d/qquickcontext2dtexture.cpp
+++ b/src/quick/items/context2d/qquickcontext2dtexture.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/context2d/qquickcontext2dtexture_p.h b/src/quick/items/context2d/qquickcontext2dtexture_p.h
index d055db7c06..fdcac0f2d9 100644
--- a/src/quick/items/context2d/qquickcontext2dtexture_p.h
+++ b/src/quick/items/context2d/qquickcontext2dtexture_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/context2d/qquickcontext2dtile.cpp b/src/quick/items/context2d/qquickcontext2dtile.cpp
index 6217c66094..a04f00591b 100644
--- a/src/quick/items/context2d/qquickcontext2dtile.cpp
+++ b/src/quick/items/context2d/qquickcontext2dtile.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/context2d/qquickcontext2dtile_p.h b/src/quick/items/context2d/qquickcontext2dtile_p.h
index a38384d3c7..75c2558db0 100644
--- a/src/quick/items/context2d/qquickcontext2dtile_p.h
+++ b/src/quick/items/context2d/qquickcontext2dtile_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickaccessibleattached.cpp b/src/quick/items/qquickaccessibleattached.cpp
index 6b83dbc5b2..b328583676 100644
--- a/src/quick/items/qquickaccessibleattached.cpp
+++ b/src/quick/items/qquickaccessibleattached.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickaccessibleattached_p.h b/src/quick/items/qquickaccessibleattached_p.h
index cb9892b34c..d87cdfc238 100644
--- a/src/quick/items/qquickaccessibleattached_p.h
+++ b/src/quick/items/qquickaccessibleattached_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -56,7 +56,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class Q_QUICK_PRIVATE_EXPORT QQuickAccessibleAttached : public QObject
{
diff --git a/src/quick/items/qquickanchors.cpp b/src/quick/items/qquickanchors.cpp
index 36369ba262..f139821d92 100644
--- a/src/quick/items/qquickanchors.cpp
+++ b/src/quick/items/qquickanchors.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickanchors_p.h b/src/quick/items/qquickanchors_p.h
index fb9dccd4cc..0a1d899fd9 100644
--- a/src/quick/items/qquickanchors_p.h
+++ b/src/quick/items/qquickanchors_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickanchors_p_p.h b/src/quick/items/qquickanchors_p_p.h
index 1373aecd60..dbd6bac931 100644
--- a/src/quick/items/qquickanchors_p_p.h
+++ b/src/quick/items/qquickanchors_p_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickanimatedimage.cpp b/src/quick/items/qquickanimatedimage.cpp
index b07106d4f1..753dd01acf 100644
--- a/src/quick/items/qquickanimatedimage.cpp
+++ b/src/quick/items/qquickanimatedimage.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickanimatedimage_p.h b/src/quick/items/qquickanimatedimage_p.h
index d4160605aa..485c3026f2 100644
--- a/src/quick/items/qquickanimatedimage_p.h
+++ b/src/quick/items/qquickanimatedimage_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickanimatedimage_p_p.h b/src/quick/items/qquickanimatedimage_p_p.h
index 2f9ba6a7f1..335ff9ad89 100644
--- a/src/quick/items/qquickanimatedimage_p_p.h
+++ b/src/quick/items/qquickanimatedimage_p_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickanimation.cpp b/src/quick/items/qquickanimation.cpp
index 0aa0acdc0a..517b504640 100644
--- a/src/quick/items/qquickanimation.cpp
+++ b/src/quick/items/qquickanimation.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickanimation_p.h b/src/quick/items/qquickanimation_p.h
index cf2e41f7bb..f6de6da9fb 100644
--- a/src/quick/items/qquickanimation_p.h
+++ b/src/quick/items/qquickanimation_p.h
@@ -1,9 +1,9 @@
// Commit: e39a2e39451bf106a9845f8a60fc571faaa4dde5
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickanimation_p_p.h b/src/quick/items/qquickanimation_p_p.h
index c15dce91fe..6bab7780db 100644
--- a/src/quick/items/qquickanimation_p_p.h
+++ b/src/quick/items/qquickanimation_p_p.h
@@ -1,9 +1,9 @@
// Commit: 0ade09152067324f74678f2de4d447b6e0280600
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickborderimage.cpp b/src/quick/items/qquickborderimage.cpp
index c867f90763..72457a3fc4 100644
--- a/src/quick/items/qquickborderimage.cpp
+++ b/src/quick/items/qquickborderimage.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickborderimage_p.h b/src/quick/items/qquickborderimage_p.h
index 88fb28081d..d7a48333a2 100644
--- a/src/quick/items/qquickborderimage_p.h
+++ b/src/quick/items/qquickborderimage_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickborderimage_p_p.h b/src/quick/items/qquickborderimage_p_p.h
index d2fa799a24..e551cd2d9d 100644
--- a/src/quick/items/qquickborderimage_p_p.h
+++ b/src/quick/items/qquickborderimage_p_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickcanvas.cpp b/src/quick/items/qquickcanvas.cpp
index 9967e853ea..8866ec5436 100644
--- a/src/quick/items/qquickcanvas.cpp
+++ b/src/quick/items/qquickcanvas.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -718,9 +718,8 @@ bool QQuickCanvas::event(QEvent *e)
QTouchEvent *touch = static_cast<QTouchEvent *>(e);
d->translateTouchEvent(touch);
d->deliverTouchEvent(touch);
- if (!touch->isAccepted())
- return false;
- break;
+
+ return touch->isAccepted();
}
case QEvent::Leave:
d->clearHover();
diff --git a/src/quick/items/qquickcanvas.h b/src/quick/items/qquickcanvas.h
index de82e8386e..46d2702dc4 100644
--- a/src/quick/items/qquickcanvas.h
+++ b/src/quick/items/qquickcanvas.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickcanvas_p.h b/src/quick/items/qquickcanvas_p.h
index 6632324380..b75e5c92c8 100644
--- a/src/quick/items/qquickcanvas_p.h
+++ b/src/quick/items/qquickcanvas_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickclipnode.cpp b/src/quick/items/qquickclipnode.cpp
index 4aeb2dcf69..29d05ef05c 100644
--- a/src/quick/items/qquickclipnode.cpp
+++ b/src/quick/items/qquickclipnode.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickclipnode_p.h b/src/quick/items/qquickclipnode_p.h
index ee85409c9d..fa5e47b253 100644
--- a/src/quick/items/qquickclipnode_p.h
+++ b/src/quick/items/qquickclipnode_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickdrag.cpp b/src/quick/items/qquickdrag.cpp
index b80a8fb6fa..507ae4b489 100644
--- a/src/quick/items/qquickdrag.cpp
+++ b/src/quick/items/qquickdrag.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickdrag_p.h b/src/quick/items/qquickdrag_p.h
index 1971de827f..cfcba51064 100644
--- a/src/quick/items/qquickdrag_p.h
+++ b/src/quick/items/qquickdrag_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickdroparea.cpp b/src/quick/items/qquickdroparea.cpp
index d45d85a889..a811d01865 100644
--- a/src/quick/items/qquickdroparea.cpp
+++ b/src/quick/items/qquickdroparea.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickdroparea_p.h b/src/quick/items/qquickdroparea_p.h
index 066329958d..3572f13c5d 100644
--- a/src/quick/items/qquickdroparea_p.h
+++ b/src/quick/items/qquickdroparea_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp
index 4b39855a53..469409eeed 100644
--- a/src/quick/items/qquickevents.cpp
+++ b/src/quick/items/qquickevents.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h
index 3d1e4826d5..c54d5c7eff 100644
--- a/src/quick/items/qquickevents_p_p.h
+++ b/src/quick/items/qquickevents_p_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index 6df84f3d97..5ac189889c 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickflickable_p.h b/src/quick/items/qquickflickable_p.h
index 2c8e24365a..e215e4d118 100644
--- a/src/quick/items/qquickflickable_p.h
+++ b/src/quick/items/qquickflickable_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickflickable_p_p.h b/src/quick/items/qquickflickable_p_p.h
index b1375ddc69..d5f410786d 100644
--- a/src/quick/items/qquickflickable_p_p.h
+++ b/src/quick/items/qquickflickable_p_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickflipable.cpp b/src/quick/items/qquickflipable.cpp
index b2e5da1218..c48f358392 100644
--- a/src/quick/items/qquickflipable.cpp
+++ b/src/quick/items/qquickflipable.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickflipable_p.h b/src/quick/items/qquickflipable_p.h
index 7fa616ca9f..0c392e0466 100644
--- a/src/quick/items/qquickflipable_p.h
+++ b/src/quick/items/qquickflipable_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickfocusscope.cpp b/src/quick/items/qquickfocusscope.cpp
index 0c2678d6c2..8cf1750c24 100644
--- a/src/quick/items/qquickfocusscope.cpp
+++ b/src/quick/items/qquickfocusscope.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickfocusscope_p.h b/src/quick/items/qquickfocusscope_p.h
index 7910c2be35..c69bd420c2 100644
--- a/src/quick/items/qquickfocusscope_p.h
+++ b/src/quick/items/qquickfocusscope_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickgridview.cpp b/src/quick/items/qquickgridview.cpp
index 0484c60a9d..f25f2f8196 100644
--- a/src/quick/items/qquickgridview.cpp
+++ b/src/quick/items/qquickgridview.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -59,6 +59,8 @@ QT_BEGIN_NAMESPACE
#define QML_FLICK_SNAPONETHRESHOLD 30
#endif
+//#define DEBUG_DELEGATE_LIFECYCLE
+
//----------------------------------------------------------------------------
class FxGridItemSG : public FxViewItem
@@ -171,17 +173,16 @@ public:
virtual FxViewItem *newViewItem(int index, QQuickItem *item);
virtual void repositionPackageItemAt(QQuickItem *item, int index);
- virtual void resetItemPosition(FxViewItem *item, FxViewItem *toItem);
- virtual void resetFirstItemPosition();
- virtual void adjustFirstItem(qreal forwards, qreal backwards);
+ virtual void resetFirstItemPosition(qreal pos = 0.0);
+ virtual void adjustFirstItem(qreal forwards, qreal backwards, int changeBeforeVisible);
virtual void createHighlight();
virtual void updateHighlight();
virtual void resetHighlightPosition();
virtual void setPosition(qreal pos);
- virtual void layoutVisibleItems();
- virtual bool applyInsertionChange(const QDeclarativeChangeSet::Insert &insert, ChangeResult *changeResult, bool *newVisibleItemsFirst, QList<FxViewItem *> *addedItems);
+ virtual void layoutVisibleItems(int fromModelIndex = 0);
+ virtual bool applyInsertionChange(const QDeclarativeChangeSet::Insert &insert, ChangeResult *changeResult, QList<FxViewItem *> *addedItems);
virtual bool needsRefillForAddedOrRemovedIndex(int index) const;
virtual qreal headerSize() const;
@@ -195,7 +196,6 @@ public:
virtual void initializeCurrentItem();
virtual void updateViewport();
- virtual void itemGeometryChanged(QQuickItem *item, const QRectF &newGeometry, const QRectF &oldGeometry);
virtual void fixupPosition();
virtual void fixup(AxisData &data, qreal minExtent, qreal maxExtent);
virtual void flick(QQuickItemViewPrivate::AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize,
@@ -449,7 +449,9 @@ bool QQuickGridViewPrivate::addVisibleItems(qreal fillFrom, qreal fillTo, bool d
bool changed = false;
while (modelIndex < model->count() && rowPos <= fillTo + rowSize()*(columns - colNum)/(columns+1)) {
-// qDebug() << "refill: append item" << modelIndex << colPos << rowPos;
+#ifdef DEBUG_DELEGATE_LIFECYCLE
+ qDebug() << "refill: append item" << modelIndex << colPos << rowPos;
+#endif
if (!(item = static_cast<FxGridItemSG*>(createItem(modelIndex, doBuffer))))
break;
item->setPosition(colPos, rowPos);
@@ -464,6 +466,9 @@ bool QQuickGridViewPrivate::addVisibleItems(qreal fillFrom, qreal fillTo, bool d
changed = true;
}
+ if (doBuffer && requestedIndex != -1) // already waiting for an item
+ return changed;
+
// Find first column
if (visibleItems.count()) {
FxGridItemSG *firstItem = static_cast<FxGridItemSG*>(visibleItems.first());
@@ -480,7 +485,9 @@ bool QQuickGridViewPrivate::addVisibleItems(qreal fillFrom, qreal fillTo, bool d
// Prepend
colPos = colNum * colSize();
while (visibleIndex > 0 && rowPos + rowSize() - 1 >= fillFrom - rowSize()*(colNum+1)/(columns+1)){
-// qDebug() << "refill: prepend item" << visibleIndex-1 << "top pos" << rowPos << colPos;
+#ifdef DEBUG_DELEGATE_LIFECYCLE
+ qDebug() << "refill: prepend item" << visibleIndex-1 << "top pos" << rowPos << colPos;
+#endif
if (!(item = static_cast<FxGridItemSG*>(createItem(visibleIndex-1, doBuffer))))
break;
--visibleIndex;
@@ -508,7 +515,9 @@ bool QQuickGridViewPrivate::removeNonVisibleItems(qreal bufferFrom, qreal buffer
&& item->rowPos()+rowSize()-1 < bufferFrom - rowSize()*(item->colPos()/colSize()+1)/(columns+1)) {
if (item->attached->delayRemove())
break;
-// qDebug() << "refill: remove first" << visibleIndex << "top end pos" << item->endRowPos();
+#ifdef DEBUG_DELEGATE_LIFECYCLE
+ qDebug() << "refill: remove first" << visibleIndex << "top end pos" << item->endRowPos();
+#endif
if (item->index != -1)
visibleIndex++;
visibleItems.removeFirst();
@@ -520,7 +529,9 @@ bool QQuickGridViewPrivate::removeNonVisibleItems(qreal bufferFrom, qreal buffer
&& item->rowPos() > bufferTo + rowSize()*(columns - item->colPos()/colSize())/(columns+1)) {
if (item->attached->delayRemove())
break;
-// qDebug() << "refill: remove last" << visibleIndex+visibleItems.count()-1;
+#ifdef DEBUG_DELEGATE_LIFECYCLE
+ qDebug() << "refill: remove last" << visibleIndex+visibleItems.count()-1;
+#endif
visibleItems.removeLast();
releaseItem(item);
changed = true;
@@ -544,7 +555,7 @@ void QQuickGridViewPrivate::updateViewport()
QQuickItemViewPrivate::updateViewport();
}
-void QQuickGridViewPrivate::layoutVisibleItems()
+void QQuickGridViewPrivate::layoutVisibleItems(int fromModelIndex)
{
if (visibleItems.count()) {
const qreal from = isContentFlowReversed() ? -position() - size() : position();
@@ -566,8 +577,10 @@ void QQuickGridViewPrivate::layoutVisibleItems()
rowPos += rowSize();
}
colPos = col * colSize();
- item->setPosition(colPos, rowPos);
- item->item->setVisible(rowPos + rowSize() >= from && rowPos <= to);
+ if (item->index >= fromModelIndex) {
+ item->setPosition(colPos, rowPos);
+ item->item->setVisible(rowPos + rowSize() >= from && rowPos <= to);
+ }
}
}
}
@@ -589,26 +602,21 @@ void QQuickGridViewPrivate::repositionPackageItemAt(QQuickItem *item, int index)
}
}
-void QQuickGridViewPrivate::resetItemPosition(FxViewItem *item, FxViewItem *toItem)
-{
- if (item == toItem)
- return;
- FxGridItemSG *toGridItem = static_cast<FxGridItemSG*>(toItem);
- static_cast<FxGridItemSG*>(item)->setPosition(toGridItem->colPos(), toGridItem->rowPos());
-}
-
-void QQuickGridViewPrivate::resetFirstItemPosition()
+void QQuickGridViewPrivate::resetFirstItemPosition(qreal pos)
{
FxGridItemSG *item = static_cast<FxGridItemSG*>(visibleItems.first());
- item->setPosition(0, 0);
+ item->setPosition(0, pos);
}
-void QQuickGridViewPrivate::adjustFirstItem(qreal forwards, qreal backwards)
+void QQuickGridViewPrivate::adjustFirstItem(qreal forwards, qreal backwards, int changeBeforeVisible)
{
if (!visibleItems.count())
return;
- int moveCount = (forwards / rowSize()) - (backwards / rowSize());
+ int moveCount = (forwards - backwards) / rowSize();
+
+ if (changeBeforeVisible)
+ moveCount += (changeBeforeVisible%columns) - (columns - 1);
FxGridItemSG *gridItem = static_cast<FxGridItemSG*>(visibleItems.first());
gridItem->setPosition(gridItem->colPos(), gridItem->rowPos() + ((moveCount / columns) * rowSize()));
@@ -795,21 +803,6 @@ void QQuickGridViewPrivate::initializeCurrentItem()
}
}
-void QQuickGridViewPrivate::itemGeometryChanged(QQuickItem *item, const QRectF &newGeometry, const QRectF &oldGeometry)
-{
- Q_Q(QQuickGridView);
- QQuickItemViewPrivate::itemGeometryChanged(item, newGeometry, oldGeometry);
- if (!q->isComponentComplete())
- return;
- if (item == q) {
- if (newGeometry.height() != oldGeometry.height() || newGeometry.width() != oldGeometry.width()) {
- updateViewport();
- forceLayout = true;
- q->polish();
- }
- }
-}
-
void QQuickGridViewPrivate::fixupPosition()
{
moveReason = Other;
@@ -1447,7 +1440,7 @@ void QQuickGridView::setCellWidth(qreal cellWidth)
d->updateViewport();
emit cellWidthChanged();
d->forceLayout = true;
- d->layout();
+ polish();
}
}
@@ -1465,7 +1458,7 @@ void QQuickGridView::setCellHeight(qreal cellHeight)
d->updateViewport();
emit cellHeightChanged();
d->forceLayout = true;
- d->layout();
+ polish();
}
}
/*!
@@ -1549,14 +1542,6 @@ void QQuickGridView::viewportMoved()
return;
d->inViewportMoved = true;
- // Set visibility of items to eliminate cost of items outside the visible area.
- qreal from = d->isContentFlowReversed() ? -d->position()-d->size() : d->position();
- qreal to = d->isContentFlowReversed() ? -d->position() : d->position()+d->size();
- for (int i = 0; i < d->visibleItems.count(); ++i) {
- FxGridItemSG *item = static_cast<FxGridItemSG*>(d->visibleItems.at(i));
- item->item->setVisible(item->rowPos() + d->rowSize() >= from && item->rowPos() <= to);
- }
-
if (yflick())
d->bufferMode = d->vData.smoothVelocity < 0 ? QQuickItemViewPrivate::BufferBefore : QQuickItemViewPrivate::BufferAfter;
else if (d->isRightToLeftTopToBottom())
@@ -1565,6 +1550,15 @@ void QQuickGridView::viewportMoved()
d->bufferMode = d->hData.smoothVelocity < 0 ? QQuickItemViewPrivate::BufferBefore : QQuickItemViewPrivate::BufferAfter;
d->refill();
+
+ // Set visibility of items to eliminate cost of items outside the visible area.
+ qreal from = d->isContentFlowReversed() ? -d->position()-d->size() : d->position();
+ qreal to = d->isContentFlowReversed() ? -d->position() : d->position()+d->size();
+ for (int i = 0; i < d->visibleItems.count(); ++i) {
+ FxGridItemSG *item = static_cast<FxGridItemSG*>(d->visibleItems.at(i));
+ item->item->setVisible(item->rowPos() + d->rowSize() >= from && item->rowPos() <= to);
+ }
+
if (d->hData.flicking || d->vData.flicking || d->hData.moving || d->vData.moving)
d->moveReason = QQuickGridViewPrivate::Mouse;
if (d->moveReason != QQuickGridViewPrivate::SetIndex) {
@@ -1775,7 +1769,7 @@ void QQuickGridView::moveCurrentIndexRight()
}
}
-bool QQuickGridViewPrivate::applyInsertionChange(const QDeclarativeChangeSet::Insert &change, ChangeResult *insertResult, bool *newVisibleItemsFirst, QList<FxViewItem *> *addedItems)
+bool QQuickGridViewPrivate::applyInsertionChange(const QDeclarativeChangeSet::Insert &change, ChangeResult *insertResult, QList<FxViewItem *> *addedItems)
{
Q_Q(QQuickGridView);
@@ -1845,7 +1839,7 @@ bool QQuickGridViewPrivate::applyInsertionChange(const QDeclarativeChangeSet::In
while (i >= 0) {
if (rowPos > from && insertionIdx < visibleIndex) {
// item won't be visible, just note the size for repositioning
- insertResult->sizeChangesBeforeVisiblePos += rowSize();
+ insertResult->changeBeforeVisible++;
} else {
// item is before first visible e.g. in cache buffer
FxViewItem *item = 0;
@@ -1874,7 +1868,7 @@ bool QQuickGridViewPrivate::applyInsertionChange(const QDeclarativeChangeSet::In
} else {
int i = 0;
int to = buffer+tempPos+size()-1;
- while (i < count && rowPos <= to + rowSize()*(columns - (colPos/colSize()))/qreal(columns)) {
+ while (i < count && rowPos <= to + rowSize()*(columns - colNum)/qreal(columns+1)) {
FxViewItem *item = 0;
if (change.isMove() && (item = currentChanges.removedItems.take(change.moveKey(modelIndex + i))))
item->index = modelIndex + i;
@@ -1886,7 +1880,7 @@ bool QQuickGridViewPrivate::applyInsertionChange(const QDeclarativeChangeSet::In
item->item->setVisible(true);
visibleItems.insert(index, item);
if (index == 0)
- *newVisibleItemsFirst = true;
+ insertResult->changedFirstItem = true;
if (!change.isMove())
addedItems->append(item);
insertResult->sizeChangesAfterVisiblePos += rowSize();
diff --git a/src/quick/items/qquickgridview_p.h b/src/quick/items/qquickgridview_p.h
index c9b2f66829..0f86acf3ea 100644
--- a/src/quick/items/qquickgridview_p.h
+++ b/src/quick/items/qquickgridview_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickimage.cpp b/src/quick/items/qquickimage.cpp
index 37a99a93b6..71712ec616 100644
--- a/src/quick/items/qquickimage.cpp
+++ b/src/quick/items/qquickimage.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickimage_p.h b/src/quick/items/qquickimage_p.h
index e6d6a72020..98bafadf3f 100644
--- a/src/quick/items/qquickimage_p.h
+++ b/src/quick/items/qquickimage_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickimage_p_p.h b/src/quick/items/qquickimage_p_p.h
index 98c68b939f..5fae36a53b 100644
--- a/src/quick/items/qquickimage_p_p.h
+++ b/src/quick/items/qquickimage_p_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickimagebase.cpp b/src/quick/items/qquickimagebase.cpp
index 1d303b870b..1f12dc5a7e 100644
--- a/src/quick/items/qquickimagebase.cpp
+++ b/src/quick/items/qquickimagebase.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickimagebase_p.h b/src/quick/items/qquickimagebase_p.h
index 5ccb3f904d..e8f00844a6 100644
--- a/src/quick/items/qquickimagebase_p.h
+++ b/src/quick/items/qquickimagebase_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickimagebase_p_p.h b/src/quick/items/qquickimagebase_p_p.h
index 972fefae0b..e629ee5322 100644
--- a/src/quick/items/qquickimagebase_p_p.h
+++ b/src/quick/items/qquickimagebase_p_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickimplicitsizeitem.cpp b/src/quick/items/qquickimplicitsizeitem.cpp
index 15604decf3..d70ddfc752 100644
--- a/src/quick/items/qquickimplicitsizeitem.cpp
+++ b/src/quick/items/qquickimplicitsizeitem.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickimplicitsizeitem_p.h b/src/quick/items/qquickimplicitsizeitem_p.h
index 2e254a18ba..1cad5823a1 100644
--- a/src/quick/items/qquickimplicitsizeitem_p.h
+++ b/src/quick/items/qquickimplicitsizeitem_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickimplicitsizeitem_p_p.h b/src/quick/items/qquickimplicitsizeitem_p_p.h
index 214fb28bf4..1dc0114ac3 100644
--- a/src/quick/items/qquickimplicitsizeitem_p_p.h
+++ b/src/quick/items/qquickimplicitsizeitem_p_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index ebdb980f30..49084639d5 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -2919,7 +2919,6 @@ void QQuickItem::updatePolish()
void QQuickItem::sendAccessibilityUpdate()
{
- Q_D(QQuickItem);
}
void QQuickItemPrivate::removeItemChangeListener(QQuickItemChangeListener *listener, ChangeTypes types)
@@ -5654,6 +5653,7 @@ void QQuickItemLayer::setWrapMode(QQuickShaderEffectSource::WrapMode mode)
void QQuickItemLayer::itemOpacityChanged(QQuickItem *item)
{
+ Q_UNUSED(item)
updateOpacity();
}
@@ -5664,6 +5664,7 @@ void QQuickItemLayer::itemGeometryChanged(QQuickItem *, const QRectF &, const QR
void QQuickItemLayer::itemParentChanged(QQuickItem *item, QQuickItem *parent)
{
+ Q_UNUSED(item)
if (parent == m_effectSource || parent == m_effect)
return;
diff --git a/src/quick/items/qquickitem.h b/src/quick/items/qquickitem.h
index 0f68910c18..0dd896af3d 100644
--- a/src/quick/items/qquickitem.h
+++ b/src/quick/items/qquickitem.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h
index 50a9bb97d2..f0b1a9f4d9 100644
--- a/src/quick/items/qquickitem_p.h
+++ b/src/quick/items/qquickitem_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickitemchangelistener_p.h b/src/quick/items/qquickitemchangelistener_p.h
index d83f446092..0ca9a2681a 100644
--- a/src/quick/items/qquickitemchangelistener_p.h
+++ b/src/quick/items/qquickitemchangelistener_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickitemsmodule.cpp b/src/quick/items/qquickitemsmodule.cpp
index 0d7f1e1b1f..b82a90d6f5 100644
--- a/src/quick/items/qquickitemsmodule.cpp
+++ b/src/quick/items/qquickitemsmodule.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickitemsmodule_p.h b/src/quick/items/qquickitemsmodule_p.h
index 08c05806e8..b3b64cfd59 100644
--- a/src/quick/items/qquickitemsmodule_p.h
+++ b/src/quick/items/qquickitemsmodule_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp
index 8f46661078..ce4cb9ffaf 100644
--- a/src/quick/items/qquickitemview.cpp
+++ b/src/quick/items/qquickitemview.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -775,7 +775,7 @@ void QQuickItemView::destroyRemoved()
// Correct the positioning of the items
d->updateSections();
d->forceLayout = true;
- d->layout();
+ polish();
}
void QQuickItemView::modelUpdated(const QDeclarativeChangeSet &changeSet, bool reset)
@@ -878,6 +878,10 @@ void QQuickItemView::geometryChanged(const QRectF &newGeometry, const QRectF &ol
{
Q_D(QQuickItemView);
d->markExtentsDirty();
+ if (isComponentComplete() && d->isValid()) {
+ d->forceLayout = true;
+ polish();
+ }
QQuickFlickable::geometryChanged(newGeometry, oldGeometry);
}
@@ -1110,7 +1114,7 @@ QQuickItemViewPrivate::QQuickItemViewPrivate()
, highlightMoveDuration(150)
, headerComponent(0), header(0), footerComponent(0), footer(0)
, minExtent(0), maxExtent(0)
- , ownModel(false), wrap(false), deferredRelease(false)
+ , ownModel(false), wrap(false)
, inApplyModelChanges(false), inViewportMoved(false), forceLayout(false), currentIndexCleared(false)
, haveHighlightRange(false), autoHighlight(true), highlightRangeStartValid(false), highlightRangeEndValid(false)
, fillCacheBuffer(false), inRequest(false), requestedAsync(false)
@@ -1212,7 +1216,6 @@ void QQuickItemViewPrivate::init()
Q_Q(QQuickItemView);
QQuickItemPrivate::get(contentItem)->childrenDoNotOverlap = true;
q->setFlag(QQuickItem::ItemIsFocusScope);
- addItemChangeListener(this, Geometry);
QObject::connect(q, SIGNAL(movementEnded()), q, SLOT(animStopped()));
q->setFlickableDirection(QQuickFlickable::VerticalFlick);
}
@@ -1291,13 +1294,14 @@ void QQuickItemViewPrivate::mirrorChange()
void QQuickItemViewPrivate::refill()
{
+ qreal s = qMax(size(), qreal(0.));
if (isContentFlowReversed())
- refill(-position()-size(), -position());
+ refill(-position()-s, -position());
else
- refill(position(), position()+size());
+ refill(position(), position()+s);
}
-void QQuickItemViewPrivate::refill(qreal from, qreal to, bool doBuffer)
+void QQuickItemViewPrivate::refill(qreal from, qreal to)
{
Q_Q(QQuickItemView);
if (!isValid() || !q->isComponentComplete())
@@ -1311,35 +1315,22 @@ void QQuickItemViewPrivate::refill(qreal from, qreal to, bool doBuffer)
qreal bufferTo = to + buffer;
qreal fillFrom = from;
qreal fillTo = to;
- if (doBuffer && (bufferMode & BufferAfter))
- fillTo = bufferTo;
- if (doBuffer && (bufferMode & BufferBefore))
- fillFrom = bufferFrom;
- // Item creation and release is staggered in order to avoid
- // creating/releasing multiple items in one frame
- // while flicking (as much as possible).
+ bool added = addVisibleItems(fillFrom, fillTo, false);
+ bool removed = removeNonVisibleItems(bufferFrom, bufferTo);
- bool changed = addVisibleItems(fillFrom, fillTo, doBuffer);
-
- if (!changed || deferredRelease) { // avoid destroying items in the same frame that we create
- if (removeNonVisibleItems(bufferFrom, bufferTo))
- changed = true;
- deferredRelease = false;
- } else {
- deferredRelease = true;
+ if (buffer && bufferMode != NoBuffer) {
+ if (bufferMode & BufferAfter)
+ fillTo = bufferTo;
+ if (bufferMode & BufferBefore)
+ fillFrom = bufferFrom;
+ added |= addVisibleItems(fillFrom, fillTo, true);
}
- if (changed) {
+ if (added || removed) {
markExtentsDirty();
+ updateBeginningEnd();
visibleItemsChanged();
- } else if (!doBuffer && buffer && bufferMode != NoBuffer) {
- refill(from, to, true);
- }
-
- if (!q->isMoving() && changed) {
- fillCacheBuffer = true;
- q->polish();
}
if (prevCount != itemCount)
@@ -1389,8 +1380,10 @@ void QQuickItemViewPrivate::layout()
}
if (!applyModelChanges() && !forceLayout) {
- if (fillCacheBuffer)
+ if (fillCacheBuffer) {
+ fillCacheBuffer = false;
refill();
+ }
return;
}
forceLayout = false;
@@ -1432,12 +1425,16 @@ bool QQuickItemViewPrivate::applyModelChanges()
|| !currentChanges.pendingChanges.inserts().isEmpty();
FxViewItem *prevFirstVisible = firstVisibleItem();
- QDeclarativeNullableValue<qreal> prevFirstVisiblePos;
+ QDeclarativeNullableValue<qreal> prevViewPos;
if (prevFirstVisible)
- prevFirstVisiblePos = prevFirstVisible->position();
+ prevViewPos = prevFirstVisible->position();
+ qreal prevVisibleItemsFirstPos = visibleItems.count() ? visibleItems.first()->position() : 0.0;
const QVector<QDeclarativeChangeSet::Remove> &removals = currentChanges.pendingChanges.removes();
- ChangeResult removalResult(prevFirstVisiblePos);
+ const QVector<QDeclarativeChangeSet::Insert> &insertions = currentChanges.pendingChanges.inserts();
+ ChangeResult removalResult(prevViewPos);
+ ChangeResult insertionResult(prevViewPos);
+
int removedCount = 0;
for (int i=0; i<removals.count(); i++) {
itemCount -= removals[i].count;
@@ -1446,53 +1443,40 @@ bool QQuickItemViewPrivate::applyModelChanges()
if (!visibleAffected && needsRefillForAddedOrRemovedIndex(removals[i].index))
visibleAffected = true;
}
- if (!removals.isEmpty())
+ if (!removals.isEmpty()) {
updateVisibleIndex();
- const QVector<QDeclarativeChangeSet::Insert> &insertions = currentChanges.pendingChanges.inserts();
- ChangeResult insertionResult(prevFirstVisiblePos);
- bool newVisibleItemsFirst = false;
+ // set positions correctly for the next insertion
+ if (!insertions.isEmpty()) {
+ repositionFirstItem(prevVisibleItemsFirst, prevVisibleItemsFirstPos, prevFirstVisible, &insertionResult, &removalResult);
+ layoutVisibleItems(removals.first().index);
+ }
+ }
+
QList<FxViewItem *> newItems;
for (int i=0; i<insertions.count(); i++) {
bool wasEmpty = visibleItems.isEmpty();
- if (applyInsertionChange(insertions[i], &insertionResult, &newVisibleItemsFirst, &newItems))
+ if (applyInsertionChange(insertions[i], &insertionResult, &newItems))
visibleAffected = true;
if (!visibleAffected && needsRefillForAddedOrRemovedIndex(insertions[i].index))
visibleAffected = true;
if (wasEmpty && !visibleItems.isEmpty())
resetFirstItemPosition();
+
+ // set positions correctly for the next insertion
+ if (i < insertions.count() - 1) {
+ repositionFirstItem(prevVisibleItemsFirst, prevVisibleItemsFirstPos, prevFirstVisible, &insertionResult, &removalResult);
+ layoutVisibleItems(insertions[i].index);
+ }
+
itemCount += insertions[i].count;
}
for (int i=0; i<newItems.count(); i++)
newItems.at(i)->attached->emitAdd();
// reposition visibleItems.first() correctly so that the content y doesn't jump
- if (visibleItems.count() && removedCount != prevVisibleItemsCount) {
- if (newVisibleItemsFirst && prevVisibleItemsFirst)
- resetItemPosition(visibleItems.first(), prevVisibleItemsFirst);
-
- if (prevFirstVisible && prevVisibleItemsFirst == prevFirstVisible
- && prevFirstVisible != visibleItems.first()) {
- // the previous visibleItems.first() was also the first visible item, and it has been
- // moved/removed, so move the new visibleItems.first() to the pos of the previous one
- if (!newVisibleItemsFirst)
- resetItemPosition(visibleItems.first(), prevFirstVisible);
-
- } else if (prevFirstVisiblePos.isValid()) {
- qreal moveForwardsBy = 0;
- qreal moveBackwardsBy = 0;
-
- // shift visibleItems.first() relative to the number of added/removed items
- if (visibleItems.first()->position() > prevFirstVisiblePos) {
- moveForwardsBy = insertionResult.sizeChangesAfterVisiblePos;
- moveBackwardsBy = removalResult.sizeChangesAfterVisiblePos;
- } else if (visibleItems.first()->position() < prevFirstVisiblePos) {
- moveForwardsBy = removalResult.sizeChangesBeforeVisiblePos;
- moveBackwardsBy = insertionResult.sizeChangesBeforeVisiblePos;
- }
- adjustFirstItem(moveForwardsBy, moveBackwardsBy);
- }
- }
+ if (removedCount != prevVisibleItemsCount)
+ repositionFirstItem(prevVisibleItemsFirst, prevVisibleItemsFirstPos, prevFirstVisible, &insertionResult, &removalResult);
// Whatever removed/moved items remain are no longer visible items.
for (QHash<QDeclarativeChangeSet::MoveKey, FxViewItem *>::Iterator it = currentChanges.removedItems.begin();
@@ -1525,7 +1509,7 @@ bool QQuickItemViewPrivate::applyModelChanges()
return visibleAffected;
}
-bool QQuickItemViewPrivate::applyRemovalChange(const QDeclarativeChangeSet::Remove &removal, ChangeResult *insertResult, int *removedCount)
+bool QQuickItemViewPrivate::applyRemovalChange(const QDeclarativeChangeSet::Remove &removal, ChangeResult *removeResult, int *removedCount)
{
Q_Q(QQuickItemView);
bool visibleAffected = false;
@@ -1553,15 +1537,11 @@ bool QQuickItemViewPrivate::applyRemovalChange(const QDeclarativeChangeSet::Remo
QObject::connect(item->attached, SIGNAL(delayRemoveChanged()), q, SLOT(destroyRemoved()), Qt::QueuedConnection);
++it;
} else {
- if (insertResult->visiblePos.isValid()) {
- if (item->position() < insertResult->visiblePos) {
- // sizeRemovedBeforeFirstVisible measures the size between the visibleItems.first()
- // and the firstVisible, so don't count it if removing visibleItems.first()
- if (item != visibleItems.first())
- insertResult->sizeChangesBeforeVisiblePos += item->size();
- } else {
- insertResult->sizeChangesAfterVisiblePos += item->size();
- }
+ if (removeResult->visiblePos.isValid()) {
+ if (item->position() < removeResult->visiblePos)
+ removeResult->sizeChangesBeforeVisiblePos += item->size();
+ else
+ removeResult->sizeChangesAfterVisiblePos += item->size();
}
if (removal.isMove()) {
currentChanges.removedItems.insert(removal.moveKey(item->index), item);
@@ -1570,13 +1550,58 @@ bool QQuickItemViewPrivate::applyRemovalChange(const QDeclarativeChangeSet::Remo
currentChanges.removedItems.insertMulti(QDeclarativeChangeSet::MoveKey(), item);
(*removedCount)++;
}
+ if (!removeResult->changedFirstItem && item == visibleItems.first())
+ removeResult->changedFirstItem = true;
it = visibleItems.erase(it);
}
}
}
+
+ if (removal.index + removal.count < visibleIndex)
+ removeResult->changeBeforeVisible -= removal.count;
+
return visibleAffected;
}
+void QQuickItemViewPrivate::repositionFirstItem(FxViewItem *prevVisibleItemsFirst,
+ qreal prevVisibleItemsFirstPos,
+ FxViewItem *prevFirstVisible,
+ ChangeResult *insertionResult,
+ ChangeResult *removalResult)
+{
+ const QDeclarativeNullableValue<qreal> prevViewPos = insertionResult->visiblePos;
+
+ // reposition visibleItems.first() correctly so that the content y doesn't jump
+ if (visibleItems.count()) {
+ if (prevVisibleItemsFirst && insertionResult->changedFirstItem)
+ resetFirstItemPosition(prevVisibleItemsFirstPos);
+
+ if (prevFirstVisible && prevVisibleItemsFirst == prevFirstVisible
+ && prevFirstVisible != *visibleItems.constBegin()) {
+ // the previous visibleItems.first() was also the first visible item, and it has been
+ // moved/removed, so move the new visibleItems.first() to the pos of the previous one
+ if (!insertionResult->changedFirstItem)
+ resetFirstItemPosition(prevVisibleItemsFirstPos);
+
+ } else if (prevViewPos.isValid()) {
+ qreal moveForwardsBy = 0;
+ qreal moveBackwardsBy = 0;
+
+ // shift visibleItems.first() relative to the number of added/removed items
+ if (visibleItems.first()->position() > prevViewPos) {
+ moveForwardsBy = insertionResult->sizeChangesAfterVisiblePos;
+ moveBackwardsBy = removalResult->sizeChangesAfterVisiblePos;
+ } else if (visibleItems.first()->position() < prevViewPos) {
+ moveForwardsBy = removalResult->sizeChangesBeforeVisiblePos;
+ moveBackwardsBy = insertionResult->sizeChangesBeforeVisiblePos;
+ }
+ adjustFirstItem(moveForwardsBy, moveBackwardsBy, insertionResult->changeBeforeVisible + removalResult->changeBeforeVisible);
+ }
+ insertionResult->reset();
+ removalResult->reset();
+ }
+}
+
/*
This may return 0 if the item is being created asynchronously.
When the item becomes available, refill() will be called and the item
@@ -1589,6 +1614,8 @@ FxViewItem *QQuickItemViewPrivate::createItem(int modelIndex, bool asynchronous)
return 0;
if (requestedIndex != -1 && requestedIndex != modelIndex) {
+ if (requestedItem && requestedItem->item)
+ requestedItem->item->setParentItem(0);
delete requestedItem;
requestedItem = 0;
}
@@ -1601,7 +1628,6 @@ FxViewItem *QQuickItemViewPrivate::createItem(int modelIndex, bool asynchronous)
item->setParentItem(q->contentItem());
QDeclarative_setParent_noEvent(item, q->contentItem());
requestedIndex = -1;
- fillCacheBuffer = false;
FxViewItem *viewItem = requestedItem;
if (!viewItem)
viewItem = newViewItem(modelIndex, item); // already in cache, so viewItem not initialized in initItem()
@@ -1635,9 +1661,6 @@ void QQuickItemView::createdItem(int index, QQuickItem *item)
if (index == d->currentIndex)
d->updateCurrent(index);
d->refill();
- } else {
- d->fillCacheBuffer = true;
- polish();
}
}
}
diff --git a/src/quick/items/qquickitemview_p.h b/src/quick/items/qquickitemview_p.h
index c659893091..f426f0dcdf 100644
--- a/src/quick/items/qquickitemview_p.h
+++ b/src/quick/items/qquickitemview_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickitemview_p_p.h b/src/quick/items/qquickitemview_p_p.h
index a81aa6f54d..4883ee0fc3 100644
--- a/src/quick/items/qquickitemview_p_p.h
+++ b/src/quick/items/qquickitemview_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -103,9 +103,19 @@ public:
QDeclarativeNullableValue<qreal> visiblePos;
qreal sizeChangesBeforeVisiblePos;
qreal sizeChangesAfterVisiblePos;
+ bool changedFirstItem;
+ int changeBeforeVisible;
ChangeResult(const QDeclarativeNullableValue<qreal> &p)
- : visiblePos(p), sizeChangesBeforeVisiblePos(0), sizeChangesAfterVisiblePos(0) {}
+ : visiblePos(p), sizeChangesBeforeVisiblePos(0), sizeChangesAfterVisiblePos(0),
+ changedFirstItem(false), changeBeforeVisible(0) {}
+
+ void reset() {
+ sizeChangesBeforeVisiblePos = 0.0;
+ sizeChangesAfterVisiblePos = 0.0;
+ changedFirstItem = false;
+ changeBeforeVisible = 0;
+ }
};
enum BufferMode { NoBuffer = 0x00, BufferBefore = 0x01, BufferAfter = 0x02 };
@@ -129,7 +139,7 @@ public:
void regenerate();
void layout();
void refill();
- void refill(qreal from, qreal to, bool doBuffer = false);
+ void refill(qreal from, qreal to);
void mirrorChange();
FxViewItem *createItem(int modelIndex, bool asynchronous = false);
@@ -147,6 +157,8 @@ public:
void applyPendingChanges();
bool applyModelChanges();
bool applyRemovalChange(const QDeclarativeChangeSet::Remove &removal, ChangeResult *changeResult, int *removedCount);
+ void repositionFirstItem(FxViewItem *prevVisibleItemsFirst, qreal prevVisibleItemsFirstPos,
+ FxViewItem *prevFirstVisible, ChangeResult *insertionResult, ChangeResult *removalResult);
void checkVisible() const;
@@ -194,7 +206,6 @@ public:
bool ownModel : 1;
bool wrap : 1;
- bool deferredRelease : 1;
bool inApplyModelChanges : 1;
bool inViewportMoved : 1;
bool forceLayout : 1;
@@ -236,13 +247,12 @@ protected:
virtual FxViewItem *newViewItem(int index, QQuickItem *item) = 0;
virtual void repositionPackageItemAt(QQuickItem *item, int index) = 0;
- virtual void resetItemPosition(FxViewItem *item, FxViewItem *toItem) = 0;
- virtual void resetFirstItemPosition() = 0;
- virtual void adjustFirstItem(qreal forwards, qreal backwards) = 0;
+ virtual void resetFirstItemPosition(qreal pos = 0.0) = 0;
+ virtual void adjustFirstItem(qreal forwards, qreal backwards, int changeBeforeVisible) = 0;
- virtual void layoutVisibleItems() = 0;
+ virtual void layoutVisibleItems(int fromModelIndex = 0) = 0;
virtual void changedVisibleIndex(int newIndex) = 0;
- virtual bool applyInsertionChange(const QDeclarativeChangeSet::Insert &insert, ChangeResult *changeResult, bool *newVisibleItemsFirst, QList<FxViewItem *> *newItems) = 0;
+ virtual bool applyInsertionChange(const QDeclarativeChangeSet::Insert &insert, ChangeResult *changeResult, QList<FxViewItem *> *newItems) = 0;
virtual bool needsRefillForAddedOrRemovedIndex(int) const { return false; }
diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp
index 8852b4195f..38b157b07b 100644
--- a/src/quick/items/qquicklistview.cpp
+++ b/src/quick/items/qquicklistview.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -60,6 +60,8 @@ QT_BEGIN_NAMESPACE
#define QML_FLICK_SNAPONETHRESHOLD 30
#endif
+//#define DEBUG_DELEGATE_LIFECYCLE
+
class FxListItemSG;
class QQuickListViewPrivate : public QQuickItemViewPrivate
@@ -93,17 +95,16 @@ public:
virtual void initializeViewItem(FxViewItem *item);
virtual void releaseItem(FxViewItem *item);
virtual void repositionPackageItemAt(QQuickItem *item, int index);
- virtual void resetItemPosition(FxViewItem *item, FxViewItem *toItem);
- virtual void resetFirstItemPosition();
- virtual void adjustFirstItem(qreal forwards, qreal backwards);
+ virtual void resetFirstItemPosition(qreal pos = 0.0);
+ virtual void adjustFirstItem(qreal forwards, qreal backwards, int);
virtual void createHighlight();
virtual void updateHighlight();
virtual void resetHighlightPosition();
virtual void setPosition(qreal pos);
- virtual void layoutVisibleItems();
- virtual bool applyInsertionChange(const QDeclarativeChangeSet::Insert &insert, ChangeResult *changeResult, bool *newVisibleItemsFirst, QList<FxViewItem *> *addedItems);
+ virtual void layoutVisibleItems(int fromModelIndex = 0);
+ virtual bool applyInsertionChange(const QDeclarativeChangeSet::Insert &insert, ChangeResult *changeResult, QList<FxViewItem *> *addedItems);
virtual void updateSections();
QQuickItem *getSectionItem(const QString &section);
@@ -606,7 +607,9 @@ bool QQuickListViewPrivate::addVisibleItems(qreal fillFrom, qreal fillTo, bool d
FxListItemSG *item = 0;
qreal pos = itemEnd;
while (modelIndex < model->count() && pos <= fillTo) {
-// qDebug() << "refill: append item" << modelIndex << "pos" << pos;
+#ifdef DEBUG_DELEGATE_LIFECYCLE
+ qDebug() << "refill: append item" << modelIndex << "pos" << pos;
+#endif
if (!(item = static_cast<FxListItemSG*>(createItem(modelIndex, doBuffer))))
break;
item->setPosition(pos);
@@ -616,8 +619,14 @@ bool QQuickListViewPrivate::addVisibleItems(qreal fillFrom, qreal fillTo, bool d
++modelIndex;
changed = true;
}
+
+ if (doBuffer && requestedIndex != -1) // already waiting for an item
+ return changed;
+
while (visibleIndex > 0 && visibleIndex <= model->count() && visiblePos > fillFrom) {
-// qDebug() << "refill: prepend item" << visibleIndex-1 << "current top pos" << visiblePos;
+#ifdef DEBUG_DELEGATE_LIFECYCLE
+ qDebug() << "refill: prepend item" << visibleIndex-1 << "current top pos" << visiblePos;
+#endif
if (!(item = static_cast<FxListItemSG*>(createItem(visibleIndex-1, doBuffer))))
break;
--visibleIndex;
@@ -646,8 +655,9 @@ bool QQuickListViewPrivate::removeNonVisibleItems(qreal bufferFrom, qreal buffer
if (item->attached->delayRemove())
break;
if (item->size() > 0) {
-// qDebug() << "refill: remove first" << visibleIndex << "top end pos" << item->endPosition();
-
+#ifdef DEBUG_DELEGATE_LIFECYCLE
+ qDebug() << "refill: remove first" << visibleIndex << "top end pos" << item->endPosition();
+#endif
// remove this item and all zero-sized items before it
while (item) {
if (item->index != -1)
@@ -667,7 +677,9 @@ bool QQuickListViewPrivate::removeNonVisibleItems(qreal bufferFrom, qreal buffer
while (visibleItems.count() > 1 && (item = visibleItems.last()) && item->position() > bufferTo) {
if (item->attached->delayRemove())
break;
-// qDebug() << "refill: remove last" << visibleIndex+visibleItems.count()-1 << item->position();
+#ifdef DEBUG_DELEGATE_LIFECYCLE
+ qDebug() << "refill: remove last" << visibleIndex+visibleItems.count()-1 << item->position();
+#endif
visibleItems.removeLast();
releaseItem(item);
changed = true;
@@ -693,7 +705,7 @@ void QQuickListViewPrivate::visibleItemsChanged()
updateUnrequestedPositions();
}
-void QQuickListViewPrivate::layoutVisibleItems()
+void QQuickListViewPrivate::layoutVisibleItems(int fromModelIndex)
{
if (!visibleItems.isEmpty()) {
const qreal from = isContentFlowReversed() ? -position() - size() : position();
@@ -706,8 +718,10 @@ void QQuickListViewPrivate::layoutVisibleItems()
firstItem->item->setVisible(firstItem->endPosition() >= from && firstItem->position() <= to);
for (int i=1; i < visibleItems.count(); ++i) {
FxListItemSG *item = static_cast<FxListItemSG*>(visibleItems.at(i));
- item->setPosition(pos);
- item->item->setVisible(item->endPosition() >= from && item->position() <= to);
+ if (item->index >= fromModelIndex) {
+ item->setPosition(pos);
+ item->item->setVisible(item->endPosition() >= from && item->position() <= to);
+ }
pos += item->size() + spacing;
sum += item->size();
fixedCurrent = fixedCurrent || (currentItem && item->item == currentItem->item);
@@ -738,20 +752,13 @@ void QQuickListViewPrivate::repositionPackageItemAt(QQuickItem *item, int index)
}
}
-void QQuickListViewPrivate::resetItemPosition(FxViewItem *item, FxViewItem *toItem)
-{
- if (item == toItem)
- return;
- static_cast<FxListItemSG*>(item)->setPosition(toItem->position());
-}
-
-void QQuickListViewPrivate::resetFirstItemPosition()
+void QQuickListViewPrivate::resetFirstItemPosition(qreal pos)
{
FxListItemSG *item = static_cast<FxListItemSG*>(visibleItems.first());
- item->setPosition(0);
+ item->setPosition(pos);
}
-void QQuickListViewPrivate::adjustFirstItem(qreal forwards, qreal backwards)
+void QQuickListViewPrivate::adjustFirstItem(qreal forwards, qreal backwards, int)
{
if (!visibleItems.count())
return;
@@ -1832,7 +1839,7 @@ void QQuickListView::setSpacing(qreal spacing)
if (spacing != d->spacing) {
d->spacing = spacing;
d->forceLayout = true;
- d->layout();
+ polish();
emit spacingChanged();
}
}
@@ -2198,14 +2205,6 @@ void QQuickListView::viewportMoved()
return;
d->inViewportMoved = true;
- // Set visibility of items to eliminate cost of items outside the visible area.
- qreal from = d->isContentFlowReversed() ? -d->position()-d->size() : d->position();
- qreal to = d->isContentFlowReversed() ? -d->position() : d->position()+d->size();
- for (int i = 0; i < d->visibleItems.count(); ++i) {
- FxViewItem *item = static_cast<FxListItemSG*>(d->visibleItems.at(i));
- item->item->setVisible(item->endPosition() >= from && item->position() <= to);
- }
-
if (yflick())
d->bufferMode = d->vData.smoothVelocity < 0 ? QQuickListViewPrivate::BufferBefore : QQuickListViewPrivate::BufferAfter;
else if (d->isRightToLeft())
@@ -2214,6 +2213,15 @@ void QQuickListView::viewportMoved()
d->bufferMode = d->hData.smoothVelocity < 0 ? QQuickListViewPrivate::BufferBefore : QQuickListViewPrivate::BufferAfter;
d->refill();
+
+ // Set visibility of items to eliminate cost of items outside the visible area.
+ qreal from = d->isContentFlowReversed() ? -d->position()-d->size() : d->position();
+ qreal to = d->isContentFlowReversed() ? -d->position() : d->position()+d->size();
+ for (int i = 0; i < d->visibleItems.count(); ++i) {
+ FxViewItem *item = static_cast<FxListItemSG*>(d->visibleItems.at(i));
+ item->item->setVisible(item->endPosition() >= from && item->position() <= to);
+ }
+
if (d->hData.flicking || d->vData.flicking || d->hData.moving || d->vData.moving)
d->moveReason = QQuickListViewPrivate::Mouse;
if (d->moveReason != QQuickListViewPrivate::SetIndex) {
@@ -2375,12 +2383,12 @@ void QQuickListView::updateSections()
d->updateSections();
if (d->itemCount) {
d->forceLayout = true;
- d->layout();
+ polish();
}
}
}
-bool QQuickListViewPrivate::applyInsertionChange(const QDeclarativeChangeSet::Insert &change, ChangeResult *insertResult, bool *newVisibleItemsFirst, QList<FxViewItem *> *addedItems)
+bool QQuickListViewPrivate::applyInsertionChange(const QDeclarativeChangeSet::Insert &change, ChangeResult *insertResult, QList<FxViewItem *> *addedItems)
{
int modelIndex = change.index;
int count = change.count;
@@ -2444,7 +2452,7 @@ bool QQuickListViewPrivate::applyInsertionChange(const QDeclarativeChangeSet::In
visibleItems.insert(insertionIdx, item);
if (insertionIdx == 0)
- *newVisibleItemsFirst = true;
+ insertResult->changedFirstItem = true;
if (!change.isMove())
addedItems->append(item);
insertResult->sizeChangesBeforeVisiblePos += item->size() + spacing;
@@ -2466,7 +2474,7 @@ bool QQuickListViewPrivate::applyInsertionChange(const QDeclarativeChangeSet::In
visibleItems.insert(index, item);
if (index == 0)
- *newVisibleItemsFirst = true;
+ insertResult->changedFirstItem = true;
if (!change.isMove())
addedItems->append(item);
insertResult->sizeChangesAfterVisiblePos += item->size() + spacing;
diff --git a/src/quick/items/qquicklistview_p.h b/src/quick/items/qquicklistview_p.h
index 984506eeaa..6802b49e88 100644
--- a/src/quick/items/qquicklistview_p.h
+++ b/src/quick/items/qquicklistview_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickloader.cpp b/src/quick/items/qquickloader.cpp
index 197420c301..f203f57473 100644
--- a/src/quick/items/qquickloader.cpp
+++ b/src/quick/items/qquickloader.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickloader_p.h b/src/quick/items/qquickloader_p.h
index 0c6036e48a..508197dabd 100644
--- a/src/quick/items/qquickloader_p.h
+++ b/src/quick/items/qquickloader_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickloader_p_p.h b/src/quick/items/qquickloader_p_p.h
index c67d9a17a5..4cc5dc8889 100644
--- a/src/quick/items/qquickloader_p_p.h
+++ b/src/quick/items/qquickloader_p_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickmousearea.cpp b/src/quick/items/qquickmousearea.cpp
index 6bedadc052..ac0eae4384 100644
--- a/src/quick/items/qquickmousearea.cpp
+++ b/src/quick/items/qquickmousearea.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickmousearea_p.h b/src/quick/items/qquickmousearea_p.h
index d45f8aa722..710ec7d382 100644
--- a/src/quick/items/qquickmousearea_p.h
+++ b/src/quick/items/qquickmousearea_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickmousearea_p_p.h b/src/quick/items/qquickmousearea_p_p.h
index aca9ad5ad2..15098c4aee 100644
--- a/src/quick/items/qquickmousearea_p_p.h
+++ b/src/quick/items/qquickmousearea_p_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickmultipointtoucharea.cpp b/src/quick/items/qquickmultipointtoucharea.cpp
index d712a89f31..c702c95a94 100644
--- a/src/quick/items/qquickmultipointtoucharea.cpp
+++ b/src/quick/items/qquickmultipointtoucharea.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickmultipointtoucharea_p.h b/src/quick/items/qquickmultipointtoucharea_p.h
index 3a2e9c75ac..306f01f68b 100644
--- a/src/quick/items/qquickmultipointtoucharea_p.h
+++ b/src/quick/items/qquickmultipointtoucharea_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickninepatchnode.cpp b/src/quick/items/qquickninepatchnode.cpp
index 9724d8330e..577fcb8bb5 100644
--- a/src/quick/items/qquickninepatchnode.cpp
+++ b/src/quick/items/qquickninepatchnode.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickninepatchnode_p.h b/src/quick/items/qquickninepatchnode_p.h
index 0cb1c87d54..41fc06f062 100644
--- a/src/quick/items/qquickninepatchnode_p.h
+++ b/src/quick/items/qquickninepatchnode_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickpainteditem.cpp b/src/quick/items/qquickpainteditem.cpp
index cddc04f045..740417a0af 100644
--- a/src/quick/items/qquickpainteditem.cpp
+++ b/src/quick/items/qquickpainteditem.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickpainteditem.h b/src/quick/items/qquickpainteditem.h
index 6d7bb4a3ac..86c40a99d3 100644
--- a/src/quick/items/qquickpainteditem.h
+++ b/src/quick/items/qquickpainteditem.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickpainteditem_p.h b/src/quick/items/qquickpainteditem_p.h
index 8a99dec07c..8152e740af 100644
--- a/src/quick/items/qquickpainteditem_p.h
+++ b/src/quick/items/qquickpainteditem_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp
index ebb96a2556..ec31731bfc 100644
--- a/src/quick/items/qquickpathview.cpp
+++ b/src/quick/items/qquickpathview.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickpathview_p.h b/src/quick/items/qquickpathview_p.h
index 293a14f751..47ce66873c 100644
--- a/src/quick/items/qquickpathview_p.h
+++ b/src/quick/items/qquickpathview_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickpathview_p_p.h b/src/quick/items/qquickpathview_p_p.h
index 46114cf5b5..9caea98499 100644
--- a/src/quick/items/qquickpathview_p_p.h
+++ b/src/quick/items/qquickpathview_p_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickpincharea.cpp b/src/quick/items/qquickpincharea.cpp
index b815101961..1ea909e13a 100644
--- a/src/quick/items/qquickpincharea.cpp
+++ b/src/quick/items/qquickpincharea.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtSG module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickpincharea_p.h b/src/quick/items/qquickpincharea_p.h
index 0aca353b43..bb9cb163ea 100644
--- a/src/quick/items/qquickpincharea_p.h
+++ b/src/quick/items/qquickpincharea_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtSG module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickpincharea_p_p.h b/src/quick/items/qquickpincharea_p_p.h
index 0b1ba877cb..3c7be77e44 100644
--- a/src/quick/items/qquickpincharea_p_p.h
+++ b/src/quick/items/qquickpincharea_p_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtSG module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickpositioners.cpp b/src/quick/items/qquickpositioners.cpp
index 321ff7fd3c..48ec90d402 100644
--- a/src/quick/items/qquickpositioners.cpp
+++ b/src/quick/items/qquickpositioners.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -172,7 +172,6 @@ void QQuickBasePositioner::componentComplete()
QQuickItem::componentComplete();
positionedItems.reserve(childItems().count());
prePositioning();
- reportConflictingAnchors();
}
void QQuickBasePositioner::itemChange(ItemChange change, const ItemChangeData &value)
@@ -239,8 +238,11 @@ void QQuickBasePositioner::prePositioning()
}
}
QSizeF contentSize(0,0);
- doPositioning(&contentSize);
- updateAttachedProperties();
+ reportConflictingAnchors();
+ if (!d->anchorConflict) {
+ doPositioning(&contentSize);
+ updateAttachedProperties();
+ }
if (!d->addActions.isEmpty() || !d->moveActions.isEmpty())
finishApplyTransitions();
d->doingPositioning = false;
@@ -574,7 +576,8 @@ void QQuickColumn::reportConflictingAnchors()
}
}
if (d->anchorConflict) {
- qmlInfo(this) << "Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column";
+ qmlInfo(this) << "Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column."
+ << " Column will not function.";
}
}
/*!
@@ -800,7 +803,8 @@ void QQuickRow::reportConflictingAnchors()
}
}
if (d->anchorConflict)
- qmlInfo(this) << "Cannot specify left, right, horizontalCenter, fill or centerIn anchors for items inside Row";
+ qmlInfo(this) << "Cannot specify left, right, horizontalCenter, fill or centerIn anchors for items inside Row."
+ << " Row will not function.";
}
/*!
@@ -1234,7 +1238,7 @@ void QQuickGrid::reportConflictingAnchors()
}
}
if (d->anchorConflict)
- qmlInfo(this) << "Cannot specify anchors for items inside Grid";
+ qmlInfo(this) << "Cannot specify anchors for items inside Grid." << " Grid will not function.";
}
/*!
@@ -1526,7 +1530,7 @@ void QQuickFlow::reportConflictingAnchors()
}
}
if (d->anchorConflict)
- qmlInfo(this) << "Cannot specify anchors for items inside Flow";
+ qmlInfo(this) << "Cannot specify anchors for items inside Flow." << " Flow will not function.";
}
QT_END_NAMESPACE
diff --git a/src/quick/items/qquickpositioners_p.h b/src/quick/items/qquickpositioners_p.h
index ef2930e6f3..8b23857b70 100644
--- a/src/quick/items/qquickpositioners_p.h
+++ b/src/quick/items/qquickpositioners_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickpositioners_p_p.h b/src/quick/items/qquickpositioners_p_p.h
index e7b88ad7e9..a99ac3c632 100644
--- a/src/quick/items/qquickpositioners_p_p.h
+++ b/src/quick/items/qquickpositioners_p_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickrectangle.cpp b/src/quick/items/qquickrectangle.cpp
index 74349238fe..ab4bd979f8 100644
--- a/src/quick/items/qquickrectangle.cpp
+++ b/src/quick/items/qquickrectangle.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickrectangle_p.h b/src/quick/items/qquickrectangle_p.h
index 67f895a9ef..90d2f304b4 100644
--- a/src/quick/items/qquickrectangle_p.h
+++ b/src/quick/items/qquickrectangle_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickrectangle_p_p.h b/src/quick/items/qquickrectangle_p_p.h
index 9bfcec8958..8abc0121be 100644
--- a/src/quick/items/qquickrectangle_p_p.h
+++ b/src/quick/items/qquickrectangle_p_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickrepeater.cpp b/src/quick/items/qquickrepeater.cpp
index b03ac6eb16..e808aa77be 100644
--- a/src/quick/items/qquickrepeater.cpp
+++ b/src/quick/items/qquickrepeater.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickrepeater_p.h b/src/quick/items/qquickrepeater_p.h
index 21c399d299..58deebced4 100644
--- a/src/quick/items/qquickrepeater_p.h
+++ b/src/quick/items/qquickrepeater_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickrepeater_p_p.h b/src/quick/items/qquickrepeater_p_p.h
index c01d4bdc89..954a64c272 100644
--- a/src/quick/items/qquickrepeater_p_p.h
+++ b/src/quick/items/qquickrepeater_p_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickscalegrid.cpp b/src/quick/items/qquickscalegrid.cpp
index c5e386bff4..3366d878f8 100644
--- a/src/quick/items/qquickscalegrid.cpp
+++ b/src/quick/items/qquickscalegrid.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickscalegrid_p_p.h b/src/quick/items/qquickscalegrid_p_p.h
index cbc23601db..298105aeb7 100644
--- a/src/quick/items/qquickscalegrid_p_p.h
+++ b/src/quick/items/qquickscalegrid_p_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickscreen.cpp b/src/quick/items/qquickscreen.cpp
index 2145aef486..3769f4e809 100644
--- a/src/quick/items/qquickscreen.cpp
+++ b/src/quick/items/qquickscreen.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -74,10 +74,10 @@ QT_BEGIN_NAMESPACE
\qmlattachedproperty Qt::ScreenOrientation QtQuickWindow2::Screen::primaryOrientation
\readonly
- This contains the primary orientation of the screen. This can only change if the screen changes.
+ This contains the primary orientation of the screen.
*/
/*!
- \qmlattachedproperty Qt::ScreenOrientation QtQuickWindow2::Screen::currentOrientation
+ \qmlattachedproperty Qt::ScreenOrientation QtQuickWindow2::Screen::orientation
\readonly
This contains the current orientation of the screen.
@@ -119,20 +119,20 @@ int QQuickScreenAttached::height() const
Qt::ScreenOrientation QQuickScreenAttached::primaryOrientation() const
{
if (!m_screen)
- return Qt::UnknownOrientation;
+ return Qt::PrimaryOrientation;
return m_screen->primaryOrientation();
}
-Qt::ScreenOrientation QQuickScreenAttached::currentOrientation() const
+Qt::ScreenOrientation QQuickScreenAttached::orientation() const
{
if (!m_screen)
- return Qt::UnknownOrientation;
- return m_screen->currentOrientation();
+ return Qt::PrimaryOrientation;
+ return m_screen->orientation();
}
int QQuickScreenAttached::angleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b)
{
- return QScreen::angleBetween(a,b);
+ return m_screen->angleBetween(a,b);
}
void QQuickScreenAttached::canvasChanged(QQuickCanvas* c)//Called by QQuickItemPrivate::initCanvas
@@ -147,8 +147,10 @@ void QQuickScreenAttached::canvasChanged(QQuickCanvas* c)//Called by QQuickItemP
this, SIGNAL(widthChanged()));
disconnect(oldScreen, SIGNAL(sizeChanged(QSize)),
this, SIGNAL(heightChanged()));
- disconnect(oldScreen, SIGNAL(currentOrientationChanged(Qt::ScreenOrientation)),
- this, SIGNAL(currentOrientationChanged()));
+ disconnect(oldScreen, SIGNAL(orientationChanged(Qt::ScreenOrientation)),
+ this, SIGNAL(orientationChanged()));
+ disconnect(oldScreen, SIGNAL(primaryOrientationChanged(Qt::ScreenOrientation)),
+ this, SIGNAL(primaryOrientationChanged()));
}
if (!screen)
@@ -158,8 +160,9 @@ void QQuickScreenAttached::canvasChanged(QQuickCanvas* c)//Called by QQuickItemP
emit widthChanged();
emit heightChanged();
}
- if (!oldScreen || screen->currentOrientation() != oldScreen->currentOrientation())
- emit currentOrientationChanged();
+
+ if (!oldScreen || screen->orientation() != oldScreen->orientation())
+ emit orientationChanged();
if (!oldScreen || screen->primaryOrientation() != oldScreen->primaryOrientation())
emit primaryOrientationChanged();
@@ -168,8 +171,10 @@ void QQuickScreenAttached::canvasChanged(QQuickCanvas* c)//Called by QQuickItemP
this, SIGNAL(widthChanged()));
connect(screen, SIGNAL(sizeChanged(QSize)),
this, SIGNAL(heightChanged()));
- connect(screen, SIGNAL(currentOrientationChanged(Qt::ScreenOrientation)),
- this, SIGNAL(currentOrientationChanged()));
+ connect(screen, SIGNAL(orientationChanged(Qt::ScreenOrientation)),
+ this, SIGNAL(orientationChanged()));
+ connect(screen, SIGNAL(primaryOrientationChanged(Qt::ScreenOrientation)),
+ this, SIGNAL(primaryOrientationChanged()));
}
}
diff --git a/src/quick/items/qquickscreen_p.h b/src/quick/items/qquickscreen_p.h
index b90508a092..672607f7f5 100644
--- a/src/quick/items/qquickscreen_p.h
+++ b/src/quick/items/qquickscreen_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -51,7 +51,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QQuickItem;
class QQuickCanvas;
@@ -64,7 +63,7 @@ class Q_AUTOTEST_EXPORT QQuickScreenAttached : public QObject
Q_PROPERTY(int width READ width NOTIFY widthChanged)
Q_PROPERTY(int height READ height NOTIFY heightChanged)
Q_PROPERTY(Qt::ScreenOrientation primaryOrientation READ primaryOrientation NOTIFY primaryOrientationChanged)
- Q_PROPERTY(Qt::ScreenOrientation currentOrientation READ currentOrientation NOTIFY currentOrientationChanged)
+ Q_PROPERTY(Qt::ScreenOrientation orientation READ orientation NOTIFY orientationChanged)
public:
QQuickScreenAttached(QObject* attachee);
@@ -72,7 +71,7 @@ public:
int width() const;
int height() const;
Qt::ScreenOrientation primaryOrientation() const;
- Qt::ScreenOrientation currentOrientation() const;
+ Qt::ScreenOrientation orientation() const;
Q_INVOKABLE int angleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b);
@@ -82,7 +81,7 @@ Q_SIGNALS:
void widthChanged();
void heightChanged();
void primaryOrientationChanged();
- void currentOrientationChanged();
+ void orientationChanged();
private:
QScreen* m_screen;
diff --git a/src/quick/items/qquickshadereffect.cpp b/src/quick/items/qquickshadereffect.cpp
index be01338c1b..1c82b64163 100644
--- a/src/quick/items/qquickshadereffect.cpp
+++ b/src/quick/items/qquickshadereffect.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -185,6 +185,7 @@ QQuickShaderEffect::QQuickShaderEffect(QQuickItem *parent)
, m_meshResolution(1, 1)
, m_mesh(0)
, m_cullMode(NoCulling)
+ , m_status(Uncompiled)
, m_blending(true)
, m_dirtyData(true)
, m_programDirty(true)
@@ -215,6 +216,10 @@ void QQuickShaderEffect::setFragmentShader(const QByteArray &code)
m_source.fragmentCode = code;
update();
m_complete = false;
+ if (m_status != Uncompiled) {
+ m_status = Uncompiled;
+ emit statusChanged();
+ }
emit fragmentShaderChanged();
}
@@ -234,6 +239,10 @@ void QQuickShaderEffect::setVertexShader(const QByteArray &code)
m_source.vertexCode = code;
update();
m_complete = false;
+ if (m_status != Uncompiled) {
+ m_status = Uncompiled;
+ emit statusChanged();
+ }
emit vertexShaderChanged();
}
@@ -334,6 +343,34 @@ void QQuickShaderEffect::setCullMode(CullMode face)
emit cullModeChanged();
}
+/*!
+ \qmlproperty enumeration QtQuick2::ShaderEffect::status
+
+ This property tells the current status of the OpenGL shader program.
+
+ \list
+ \o ShaderEffect.Compiled - the shader program was successfully compiled and linked.
+ \o ShaderEffect.Uncompiled - the shader program has not yet been compiled.
+ \o ShaderEffect.Error - the shader program failed to compile or link.
+ \endlist
+
+ When setting the fragment or vertex shader source code, the status will become Uncompiled.
+ The first time the ShaderEffect is rendered with new shader source code, the shaders are
+ compiled and linked, and the status is updated to Compiled or Error.
+
+ \sa log
+*/
+
+/*!
+ \qmlproperty string QtQuick2::ShaderEffect::log
+
+ This property holds a log of warnings and errors from the latest attempt at compiling and
+ linking the OpenGL shader program. It is updated at the same time \l status is set to Compiled
+ or Error.
+
+ \sa status
+*/
+
void QQuickShaderEffect::changeSource(int index)
{
Q_ASSERT(index >= 0 && index < m_sources.size());
@@ -353,6 +390,14 @@ void QQuickShaderEffect::updateGeometry()
update();
}
+void QQuickShaderEffect::updateLogAndStatus(const QString &log, int status)
+{
+ m_log = m_parseLog + log;
+ m_status = Status(status);
+ emit logChanged();
+ emit statusChanged();
+}
+
void QQuickShaderEffect::setSource(const QVariant &var, int index)
{
Q_ASSERT(index >= 0 && index < m_sources.size());
@@ -467,7 +512,8 @@ void QQuickShaderEffect::reset()
delete source.mapper;
}
m_sources.clear();
-
+ m_log.clear();
+ m_parseLog.clear();
m_programDirty = true;
m_dirtyMesh = true;
}
@@ -494,14 +540,22 @@ void QQuickShaderEffect::updateProperties()
lookThroughShaderCode(m_source.fragmentCode);
}
- if (!m_mesh && !m_source.attributeNames.contains(qt_position_attribute_name))
- qWarning("QQuickShaderEffect: Missing reference to \'%s\'.", qt_position_attribute_name);
- if (!m_mesh && !m_source.attributeNames.contains(qt_texcoord_attribute_name))
- qWarning("QQuickShaderEffect: Missing reference to \'%s\'.", qt_texcoord_attribute_name);
- if (!m_source.respectsMatrix)
- qWarning("QQuickShaderEffect: Missing reference to \'qt_Matrix\'.");
- if (!m_source.respectsOpacity)
- qWarning("QQuickShaderEffect: Missing reference to \'qt_Opacity\'.");
+ if (!m_mesh && !m_source.attributeNames.contains(qt_position_attribute_name)) {
+ m_parseLog += QLatin1String("Warning: Missing reference to \'");
+ m_parseLog += QLatin1String(qt_position_attribute_name);
+ m_parseLog += QLatin1String("\'.\n");
+ }
+ if (!m_mesh && !m_source.attributeNames.contains(qt_texcoord_attribute_name)) {
+ m_parseLog += QLatin1String("Warning: Missing reference to \'");
+ m_parseLog += QLatin1String(qt_texcoord_attribute_name);
+ m_parseLog += QLatin1String("\'.\n");
+ }
+ if (!m_source.respectsMatrix) {
+ m_parseLog += QLatin1String("Warning: Missing reference to \'qt_Matrix\'.\n");
+ }
+ if (!m_source.respectsOpacity) {
+ m_parseLog += QLatin1String("Warning: Missing reference to \'qt_Opacity\'.\n");
+ }
for (int i = 0; i < m_sources.size(); ++i) {
QVariant v = property(m_sources.at(i).name);
@@ -688,6 +742,7 @@ QSGNode *QQuickShaderEffect::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeDa
m_programDirty = true;
m_dirtyData = true;
m_dirtyGeometry = true;
+ connect(node, SIGNAL(logAndStatusChanged(QString,int)), this, SLOT(updateLogAndStatus(QString,int)));
}
QQuickShaderEffectMaterial *material = node->shaderMaterial();
@@ -706,6 +761,15 @@ QSGNode *QQuickShaderEffect::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeDa
geometry = mesh->updateGeometry(geometry, m_source.attributeNames, rect);
if (!geometry) {
+ QString log = mesh->log();
+ if (!log.isNull()) {
+ m_log = m_parseLog;
+ m_log += QLatin1String("*** Mesh ***\n");
+ m_log += log;
+ m_status = Error;
+ emit logChanged();
+ emit statusChanged();
+ }
delete node;
return 0;
}
diff --git a/src/quick/items/qquickshadereffect_p.h b/src/quick/items/qquickshadereffect_p.h
index 7536b42a73..46882217e6 100644
--- a/src/quick/items/qquickshadereffect_p.h
+++ b/src/quick/items/qquickshadereffect_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -70,7 +70,10 @@ class Q_AUTOTEST_EXPORT QQuickShaderEffect : public QQuickItem
Q_PROPERTY(bool blending READ blending WRITE setBlending NOTIFY blendingChanged)
Q_PROPERTY(QVariant mesh READ mesh WRITE setMesh NOTIFY meshChanged)
Q_PROPERTY(CullMode culling READ cullMode WRITE setCullMode NOTIFY cullModeChanged)
+ Q_PROPERTY(QString log READ log NOTIFY logChanged)
+ Q_PROPERTY(Status status READ status NOTIFY statusChanged)
Q_ENUMS(CullMode)
+ Q_ENUMS(Status)
public:
enum CullMode
@@ -80,6 +83,13 @@ public:
FrontFaceCulling = QQuickShaderEffectMaterial::FrontFaceCulling
};
+ enum Status
+ {
+ Compiled,
+ Uncompiled,
+ Error
+ };
+
QQuickShaderEffect(QQuickItem *parent = 0);
~QQuickShaderEffect();
@@ -98,7 +108,11 @@ public:
CullMode cullMode() const { return m_cullMode; }
void setCullMode(CullMode face);
+ QString log() const { return m_log; }
+ Status status() const { return m_status; }
+
void ensureCompleted();
+ QString parseLog() { return m_parseLog; }
Q_SIGNALS:
void fragmentShaderChanged();
@@ -106,6 +120,8 @@ Q_SIGNALS:
void blendingChanged();
void meshChanged();
void cullModeChanged();
+ void logChanged();
+ void statusChanged();
protected:
virtual void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry);
@@ -116,6 +132,7 @@ private Q_SLOTS:
void changeSource(int index);
void updateData();
void updateGeometry();
+ void updateLogAndStatus(const QString &log, int status);
private:
friend class QQuickCustomMaterialShader;
@@ -133,6 +150,8 @@ private:
QQuickShaderEffectMesh *m_mesh;
QQuickGridMesh m_defaultMesh;
CullMode m_cullMode;
+ QString m_log;
+ Status m_status;
struct SourceData
{
@@ -141,6 +160,7 @@ private:
QByteArray name;
};
QVector<SourceData> m_sources;
+ QString m_parseLog;
uint m_blending : 1;
uint m_dirtyData : 1;
diff --git a/src/quick/items/qquickshadereffectmesh.cpp b/src/quick/items/qquickshadereffectmesh.cpp
index 3154ac7cfd..e170a61d99 100644
--- a/src/quick/items/qquickshadereffectmesh.cpp
+++ b/src/quick/items/qquickshadereffectmesh.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -68,40 +68,47 @@ QQuickGridMesh::QQuickGridMesh(QObject *parent)
connect(this, SIGNAL(resolutionChanged()), this, SIGNAL(geometryChanged()));
}
-QSGGeometry *QQuickGridMesh::updateGeometry(QSGGeometry *geometry, const QVector<QByteArray> &attributes, const QRectF &dstRect) const
+QSGGeometry *QQuickGridMesh::updateGeometry(QSGGeometry *geometry, const QVector<QByteArray> &attributes, const QRectF &dstRect)
{
int vmesh = m_resolution.height();
int hmesh = m_resolution.width();
int attrCount = attributes.count();
+ int positionIndex = attributes.indexOf(qtPositionAttributeName());
+ int texCoordIndex = attributes.indexOf(qtTexCoordAttributeName());
+
if (!geometry) {
- bool error = true;
- Q_UNUSED(error)
switch (attrCount) {
case 0:
- qWarning("QQuickGridMesh:: No attributes specified.");
- break;
+ m_log = QLatin1String("Error: No attributes specified.");
+ return 0;
case 1:
- if (attributes.at(0) == qtPositionAttributeName()) {
- error = false;
- break;
+ if (positionIndex != 0) {
+ m_log = QLatin1String("Error: Missing \'");
+ m_log += QLatin1String(qtPositionAttributeName());
+ m_log += QLatin1String("\' attribute.\n");
+ return 0;
}
- qWarning("QQuickGridMesh:: Missing \'%s\' attribute.",
- qtPositionAttributeName());
break;
case 2:
- if (attributes.contains(qtPositionAttributeName())
- && attributes.contains(qtTexCoordAttributeName()))
- {
- error = false;
- break;
+ if (positionIndex == -1 || texCoordIndex == -1) {
+ m_log.clear();
+ if (positionIndex == -1) {
+ m_log = QLatin1String("Error: Missing \'");
+ m_log += QLatin1String(qtPositionAttributeName());
+ m_log += QLatin1String("\' attribute.\n");
+ }
+ if (texCoordIndex == -1) {
+ m_log += QLatin1String("Error: Missing \'");
+ m_log += QLatin1String(qtTexCoordAttributeName());
+ m_log += QLatin1String("\' attribute.\n");
+ }
+ return 0;
}
- qWarning("QQuickGridMesh:: Missing \'%s\' or \'%s\' attribute.",
- qtPositionAttributeName(), qtTexCoordAttributeName());
break;
default:
- qWarning("QQuickGridMesh:: Too many attributes specified.");
- break;
+ m_log = QLatin1String("Error: Too many attributes specified.");
+ return 0;
}
geometry = new QSGGeometry(attrCount == 1
@@ -116,8 +123,6 @@ QSGGeometry *QQuickGridMesh::updateGeometry(QSGGeometry *geometry, const QVector
QSGGeometry::Point2D *vdata = static_cast<QSGGeometry::Point2D *>(geometry->vertexData());
- bool positionFirst = attributes.at(0) == qtPositionAttributeName();
-
QRectF srcRect(0, 0, 1, 1);
for (int iy = 0; iy <= vmesh; ++iy) {
float fy = iy / float(vmesh);
@@ -126,7 +131,7 @@ QSGGeometry *QQuickGridMesh::updateGeometry(QSGGeometry *geometry, const QVector
for (int ix = 0; ix <= hmesh; ++ix) {
float fx = ix / float(hmesh);
for (int ia = 0; ia < attrCount; ++ia) {
- if (positionFirst == (ia == 0)) {
+ if (ia == positionIndex) {
vdata->x = float(dstRect.left()) + fx * float(dstRect.width());
vdata->y = y;
++vdata;
diff --git a/src/quick/items/qquickshadereffectmesh_p.h b/src/quick/items/qquickshadereffectmesh_p.h
index 1671fd53f9..5f5eccccd6 100644
--- a/src/quick/items/qquickshadereffectmesh_p.h
+++ b/src/quick/items/qquickshadereffectmesh_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -64,7 +64,9 @@ class Q_QUICK_EXPORT QQuickShaderEffectMesh : public QObject
public:
QQuickShaderEffectMesh(QObject *parent = 0);
// If 'geometry' != 0, 'attributes' is the same as last time the function was called.
- virtual QSGGeometry *updateGeometry(QSGGeometry *geometry, const QVector<QByteArray> &attributes, const QRectF &rect) const = 0;
+ virtual QSGGeometry *updateGeometry(QSGGeometry *geometry, const QVector<QByteArray> &attributes, const QRectF &rect) = 0;
+ // If updateGeometry() fails, the reason should appear in the log.
+ virtual QString log() const { return QString(); }
Q_SIGNALS:
// Emitted when the geometry needs to be updated.
@@ -77,7 +79,8 @@ class QQuickGridMesh : public QQuickShaderEffectMesh
Q_PROPERTY(QSize resolution READ resolution WRITE setResolution NOTIFY resolutionChanged)
public:
QQuickGridMesh(QObject *parent = 0);
- virtual QSGGeometry *updateGeometry(QSGGeometry *geometry, const QVector<QByteArray> &attributes, const QRectF &rect) const;
+ virtual QSGGeometry *updateGeometry(QSGGeometry *geometry, const QVector<QByteArray> &attributes, const QRectF &rect);
+ virtual QString log() const { return m_log; }
void setResolution(const QSize &res);
QSize resolution() const;
@@ -87,6 +90,7 @@ Q_SIGNALS:
private:
QSize m_resolution;
+ QString m_log;
};
inline QColor qt_premultiply_color(const QColor &c)
diff --git a/src/quick/items/qquickshadereffectnode.cpp b/src/quick/items/qquickshadereffectnode.cpp
index 968982bb88..2fdd69c9e6 100644
--- a/src/quick/items/qquickshadereffectnode.cpp
+++ b/src/quick/items/qquickshadereffectnode.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -42,6 +42,7 @@
#include <private/qquickshadereffectnode_p.h>
#include "qquickshadereffectmesh_p.h"
+#include "qquickshadereffect_p.h"
#include <QtQuick/qsgtextureprovider.h>
#include <QtQuick/private/qsgrenderer_p.h>
@@ -58,6 +59,7 @@ public:
protected:
friend class QQuickShaderEffectNode;
+ virtual void compile();
virtual void initialize();
virtual const char *vertexShader() const;
virtual const char *fragmentShader() const;
@@ -65,6 +67,8 @@ protected:
const QQuickShaderEffectMaterialKey m_key;
QVector<const char *> m_attributeNames;
const QVector<QByteArray> m_attributes;
+ QString m_log;
+ bool m_compiled;
QVector<int> m_uniformLocs;
int m_opacityLoc;
@@ -75,6 +79,7 @@ protected:
QQuickCustomMaterialShader::QQuickCustomMaterialShader(const QQuickShaderEffectMaterialKey &key, const QVector<QByteArray> &attributes)
: m_key(key)
, m_attributes(attributes)
+ , m_compiled(false)
, m_textureIndicesSet(false)
{
for (int i = 0; i < attributes.count(); ++i)
@@ -92,7 +97,12 @@ void QQuickCustomMaterialShader::updateState(const RenderState &state, QSGMateri
{
Q_ASSERT(newEffect != 0);
- const QQuickShaderEffectMaterial *material = static_cast<const QQuickShaderEffectMaterial *>(newEffect);
+ QQuickShaderEffectMaterial *material = static_cast<QQuickShaderEffectMaterial *>(newEffect);
+ if (!material->m_emittedLogChanged && material->m_node) {
+ material->m_emittedLogChanged = true;
+ emit material->m_node->logAndStatusChanged(m_log, m_compiled ? QQuickShaderEffect::Compiled
+ : QQuickShaderEffect::Error);
+ }
if (!m_textureIndicesSet) {
for (int i = 0; i < material->m_textures.size(); ++i)
@@ -192,6 +202,78 @@ char const *const *QQuickCustomMaterialShader::attributeNames() const
return m_attributeNames.constData();
}
+void QQuickCustomMaterialShader::compile()
+{
+ Q_ASSERT_X(!program()->isLinked(), "QQuickCustomMaterialShader::compile()", "Compile called multiple times!");
+
+ m_log.clear();
+ m_compiled = true;
+ if (!program()->addShaderFromSourceCode(QOpenGLShader::Vertex, vertexShader())) {
+ m_log += QLatin1String("*** Vertex shader ***\n");
+ m_log += program()->log();
+ m_compiled = false;
+ }
+ if (!program()->addShaderFromSourceCode(QOpenGLShader::Fragment, fragmentShader())) {
+ m_log += QLatin1String("*** Fragment shader ***\n");
+ m_log += program()->log();
+ m_compiled = false;
+ }
+
+ char const *const *attr = attributeNames();
+#ifndef QT_NO_DEBUG
+ int maxVertexAttribs = 0;
+ glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs);
+ int attrCount = 0;
+ while (attrCount < maxVertexAttribs && attr[attrCount])
+ ++attrCount;
+ if (attr[attrCount]) {
+ qWarning("List of attribute names is too long.\n"
+ "Maximum number of attributes on this hardware is %i.\n"
+ "Vertex shader:\n%s\n"
+ "Fragment shader:\n%s\n",
+ maxVertexAttribs, vertexShader(), fragmentShader());
+ }
+#endif
+
+ if (m_compiled) {
+#ifndef QT_NO_DEBUG
+ for (int i = 0; i < attrCount; ++i) {
+#else
+ for (int i = 0; attr[i]; ++i) {
+#endif
+ if (*attr[i])
+ program()->bindAttributeLocation(attr[i], i);
+ }
+ m_compiled = program()->link();
+ m_log += program()->log();
+ }
+
+ static const char *fallbackVertexShader =
+ "uniform highp mat4 qt_Matrix;"
+ "attribute highp vec4 v;"
+ "void main() { gl_Position = qt_Matrix * v; }";
+ static const char *fallbackFragmentShader =
+ "void main() { gl_FragColor = vec4(1., 0., 1., 1.); }";
+
+ if (!m_compiled) {
+ qWarning("QQuickCustomMaterialShader: Shader compilation failed:");
+ qWarning() << program()->log();
+
+ program()->removeAllShaders();
+ program()->addShaderFromSourceCode(QOpenGLShader::Vertex, fallbackVertexShader);
+ program()->addShaderFromSourceCode(QOpenGLShader::Fragment, fallbackFragmentShader);
+#ifndef QT_NO_DEBUG
+ for (int i = 0; i < attrCount; ++i) {
+#else
+ for (int i = 0; attr[i]; ++i) {
+#endif
+ if (qstrcmp(attr[i], qtPositionAttributeName()) == 0)
+ program()->bindAttributeLocation("v", i);
+ }
+ program()->link();
+ }
+}
+
void QQuickCustomMaterialShader::initialize()
{
m_opacityLoc = program()->uniformLocation("qt_Opacity");
@@ -222,10 +304,12 @@ uint qHash(const QQuickShaderEffectMaterialKey &key)
QHash<QQuickShaderEffectMaterialKey, QSharedPointer<QSGMaterialType> > QQuickShaderEffectMaterial::materialMap;
-QQuickShaderEffectMaterial::QQuickShaderEffectMaterial()
+QQuickShaderEffectMaterial::QQuickShaderEffectMaterial(QQuickShaderEffectNode *node)
: m_cullMode(NoCulling)
+ , m_node(node)
+ , m_emittedLogChanged(false)
{
- setFlag(Blending, true);
+ setFlag(Blending | RequiresFullMatrix, true);
}
QSGMaterialType *QQuickShaderEffectMaterial::type() const
@@ -256,6 +340,7 @@ QQuickShaderEffectMaterial::CullMode QQuickShaderEffectMaterial::cullMode() cons
void QQuickShaderEffectMaterial::setProgramSource(const QQuickShaderEffectProgram &source)
{
m_source = source;
+ m_emittedLogChanged = false;
m_type = materialMap.value(m_source);
if (m_type.isNull()) {
m_type = QSharedPointer<QSGMaterialType>(new QSGMaterialType);
@@ -290,6 +375,7 @@ void QQuickShaderEffectMaterial::updateTextures() const
QQuickShaderEffectNode::QQuickShaderEffectNode()
+ : m_material(this)
{
QSGNode::setFlag(UsePreprocess, true);
setMaterial(&m_material);
diff --git a/src/quick/items/qquickshadereffectnode_p.h b/src/quick/items/qquickshadereffectnode_p.h
index 5f90e71cab..5a680f129c 100644
--- a/src/quick/items/qquickshadereffectnode_p.h
+++ b/src/quick/items/qquickshadereffectnode_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -78,6 +78,7 @@ struct QQuickShaderEffectProgram : public QQuickShaderEffectMaterialKey
class QQuickCustomMaterialShader;
+class QQuickShaderEffectNode;
class QQuickShaderEffectMaterial : public QSGMaterial
{
public:
@@ -88,7 +89,7 @@ public:
FrontFaceCulling
};
- QQuickShaderEffectMaterial();
+ explicit QQuickShaderEffectMaterial(QQuickShaderEffectNode *node = 0);
virtual QSGMaterialType *type() const;
virtual QSGMaterialShader *createShader() const;
virtual int compare(const QSGMaterial *other) const;
@@ -117,6 +118,8 @@ protected:
QVector<QPair<QByteArray, QVariant> > m_uniformValues;
QVector<QPair<QByteArray, QSGTextureProvider *> > m_textures;
CullMode m_cullMode;
+ QQuickShaderEffectNode *m_node;
+ bool m_emittedLogChanged;
static QHash<QQuickShaderEffectMaterialKey, QSharedPointer<QSGMaterialType> > materialMap;
};
@@ -135,6 +138,9 @@ public:
QQuickShaderEffectMaterial *shaderMaterial() { return &m_material; }
+Q_SIGNALS:
+ void logAndStatusChanged(const QString &, int status);
+
private Q_SLOTS:
void markDirtyTexture();
diff --git a/src/quick/items/qquickshadereffectsource.cpp b/src/quick/items/qquickshadereffectsource.cpp
index c57d749153..af9456f1d0 100644
--- a/src/quick/items/qquickshadereffectsource.cpp
+++ b/src/quick/items/qquickshadereffectsource.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickshadereffectsource_p.h b/src/quick/items/qquickshadereffectsource_p.h
index d66d80bd56..e3327698c5 100644
--- a/src/quick/items/qquickshadereffectsource_p.h
+++ b/src/quick/items/qquickshadereffectsource_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquicksprite.cpp b/src/quick/items/qquicksprite.cpp
index 8d7930a232..4c7dafafbb 100644
--- a/src/quick/items/qquicksprite.cpp
+++ b/src/quick/items/qquicksprite.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
@@ -53,12 +53,13 @@ QT_BEGIN_NAMESPACE
/*!
\qmlproperty int QtQuick2::Sprite::duration
- Time between frames.
+ Time between frames. Use -1 to indicate one sprite frame per rendered frame.
*/
/*!
\qmlproperty int QtQuick2::Sprite::durationVariation
- The time between frames can vary by up to this amount.
+ The time between frames can vary by up to this amount. Variation will never decrease the time
+ between frames to less than 0.
Default is 0.
*/
@@ -105,17 +106,6 @@ QT_BEGIN_NAMESPACE
If frameHeight and frameWidth are not specified, it is assumed to be a single long row of square frames.
Otherwise, it can be multiple contiguous rows or rectangluar frames, when one row runs out the next will be used.
*/
- Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged)
- Q_PROPERTY(int durationVariation READ durationVariance WRITE setDurationVariance NOTIFY durationVarianceChanged)
- Q_PROPERTY(QVariantMap to READ to WRITE setTo NOTIFY toChanged)
- Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
- Q_PROPERTY(qreal speedModifiesDuration READ speedModifer WRITE setSpeedModifier NOTIFY speedModifierChanged)
- Q_PROPERTY(int frames READ frames WRITE setFrames NOTIFY framesChanged)
- Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
- //If frame height or width is not specified, it is assumed to be a single long row of square frames.
- //Otherwise, it can be multiple contiguous rows, when one row runs out the next will be used.
- Q_PROPERTY(int frameHeight READ frameHeight WRITE setFrameHeight NOTIFY frameHeightChanged)
- Q_PROPERTY(int frameWidth READ frameWidth WRITE setFrameWidth NOTIFY frameWidthChanged)
QQuickSprite::QQuickSprite(QObject *parent) :
QQuickStochasticState(parent)
diff --git a/src/quick/items/qquicksprite_p.h b/src/quick/items/qquicksprite_p.h
index 8d0934f910..e8a033caa8 100644
--- a/src/quick/items/qquicksprite_p.h
+++ b/src/quick/items/qquicksprite_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickspriteengine.cpp b/src/quick/items/qquickspriteengine.cpp
index 43223f8fe6..38be93f1ce 100644
--- a/src/quick/items/qquickspriteengine.cpp
+++ b/src/quick/items/qquickspriteengine.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
@@ -48,25 +48,50 @@
QT_BEGIN_NAMESPACE
+/*
+ \internal Stochastic/Sprite engine implementation docs
+
+ Nomenclature: 'thing' refers to an instance of a running sprite or state. It could be renamed.
+ States and Transitions are referred to in the state machine sense here, NOT in the QML sense.
+
+ The Stochastic State engine takes states with stochastic state transitions defined and transitions them.
+ When a state is started, it's added to a list of pending updates sorted by their time they want to update.
+ An external driver calls the update function with an elapsed time, which becomes the new time offset.
+ The pending update stack is popped until all entries are past the current time, which simulates all intervening time.
+
+ The Sprite Engine subclass has two major differences. Firstly all states are sprites (and there's a new vector with them
+ cast to sprite). Secondly, it chops up images and states to fit a texture friendly format.
+ Before the Sprite Engine starts running, its user requests a texture assembled from all the sprite images. This
+ texture is made by pasting the sprites into one image, with one sprite animation per row (in the future it is planned to have
+ arbitrary X/Y start ends, but they will still be assembled and recorded here and still have to be contiguous lines).
+ This cut-up allows the users to calcuate frame positions with a texture percentage width and elapsed time.
+ It also means that large sprites cover multiple lines to fit inside the texture memory limit (which is a square).
+
+ Large sprites covering multiple lines breaks this simple interface for the users, so each line is treated as a pseudostate
+ and it's mostly hidden from the spriteengine users (except that they'll get advanced signals where the state is the same
+ but the visual parameters changed). These are not real states because that would get very complex with bindings. Instead,
+ when sprite attributes are requested from a sprite that has multiple pseudostates, it returns the values for the psuedostate
+ it is in. State advancement is intercepted and hollow for pseudostates, except the last one. The last one transitions as the
+ state normally does.
+*/
+
/* TODO:
make sharable?
solve the state data initialization/transfer issue so as to not need to make friends
*/
QQuickStochasticEngine::QQuickStochasticEngine(QObject *parent) :
- QObject(parent), m_timeOffset(0)
+ QObject(parent), m_timeOffset(0), m_addAdvance(false)
{
//Default size 1
setCount(1);
- m_advanceTime.start();
}
QQuickStochasticEngine::QQuickStochasticEngine(QList<QQuickStochasticState*> states, QObject *parent) :
- QObject(parent), m_states(states), m_timeOffset(0)
+ QObject(parent), m_states(states), m_timeOffset(0), m_addAdvance(false)
{
//Default size 1
setCount(1);
- m_advanceTime.start();
}
QQuickStochasticEngine::~QQuickStochasticEngine()
@@ -102,24 +127,39 @@ int QQuickSpriteEngine::maxFrames()
TODO: All these calculations should be pre-calculated and cached during initialization for a significant performance boost
TODO: Above idea needs to have the varying duration offset added to it
*/
+//TODO: Should these be adding advanceTime as well?
+/*
+ To get these working with duration=-1, m_startTimes will be messed with should duration=-1
+ m_startTimes will be set in advance/restart to 0->(m_framesPerRow-1) and can be used directly as extra.
+ This makes it 'frame' instead, but is more memory efficient than two arrays and less hideous than a vector of unions.
+*/
int QQuickSpriteEngine::spriteState(int sprite)
{
int state = m_things[sprite];
if (!m_sprites[state]->m_generatedCount)
return state;
- int rowDuration = m_duration[sprite] * m_sprites[state]->m_framesPerRow;
- int extra = (m_timeOffset - m_startTimes[sprite])/rowDuration;
+ int extra;
+ if (m_sprites[state]->duration() < 0) {
+ extra = m_startTimes[sprite];
+ } else {
+ if (!m_duration[sprite])
+ return state;
+ int rowDuration = m_duration[sprite] * m_sprites[state]->m_framesPerRow;
+ extra = (m_timeOffset - m_startTimes[sprite])/rowDuration;
+ }
return state + extra;
}
int QQuickSpriteEngine::spriteStart(int sprite)
{
+ if (!m_duration[sprite])
+ return m_timeOffset;
int state = m_things[sprite];
if (!m_sprites[state]->m_generatedCount)
return m_startTimes[sprite];
int rowDuration = m_duration[sprite] * m_sprites[state]->m_framesPerRow;
int extra = (m_timeOffset - m_startTimes[sprite])/rowDuration;
- return state + extra*rowDuration;
+ return m_startTimes[sprite] + extra*rowDuration;
}
int QQuickSpriteEngine::spriteFrames(int sprite)
@@ -127,19 +167,28 @@ int QQuickSpriteEngine::spriteFrames(int sprite)
int state = m_things[sprite];
if (!m_sprites[state]->m_generatedCount)
return m_sprites[state]->frames();
- int rowDuration = m_duration[sprite] * m_sprites[state]->m_framesPerRow;
- int extra = (m_timeOffset - m_startTimes[sprite])/rowDuration;
+ int extra;
+ if (m_sprites[state]->duration() < 0) {
+ extra = m_startTimes[sprite];
+ } else {
+ if (!m_duration[sprite])
+ return state;
+ int rowDuration = m_duration[sprite] * m_sprites[state]->m_framesPerRow;
+ extra = (m_timeOffset - m_startTimes[sprite])/rowDuration;
+ }
if (extra == m_sprites[state]->m_generatedCount - 1)//last state
return m_sprites[state]->frames() % m_sprites[state]->m_framesPerRow;
else
return m_sprites[state]->m_framesPerRow;
}
-int QQuickSpriteEngine::spriteDuration(int sprite)
+int QQuickSpriteEngine::spriteDuration(int sprite)//Full duration, not per frame
{
+ if (!m_duration[sprite])
+ return m_duration[sprite];
int state = m_things[sprite];
if (!m_sprites[state]->m_generatedCount)
- return m_duration[sprite];
+ return m_duration[sprite] * m_sprites[state]->frames();
int rowDuration = m_duration[sprite] * m_sprites[state]->m_framesPerRow;
int extra = (m_timeOffset - m_startTimes[sprite])/rowDuration;
if (extra == m_sprites[state]->m_generatedCount - 1)//last state
@@ -153,8 +202,15 @@ int QQuickSpriteEngine::spriteY(int sprite)
int state = m_things[sprite];
if (!m_sprites[state]->m_generatedCount)
return m_sprites[state]->m_rowY;
- int rowDuration = m_duration[sprite] * m_sprites[state]->m_framesPerRow;
- int extra = (m_timeOffset - m_startTimes[sprite])/rowDuration;
+ int extra;
+ if (m_sprites[state]->duration() < 0) {
+ extra = m_startTimes[sprite];
+ } else {
+ if (!m_duration[sprite])
+ return state;
+ int rowDuration = m_duration[sprite] * m_sprites[state]->m_framesPerRow;
+ extra = (m_timeOffset - m_startTimes[sprite])/rowDuration;
+ }
return m_sprites[state]->m_rowY + m_sprites[state]->m_frameHeight * extra;
}
@@ -205,6 +261,7 @@ QImage QQuickSpriteEngine::assembledImage()
int maxSize = 0;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxSize);
+ //qDebug() << "MAX TEXTURE SIZE" << maxSize;
foreach (QQuickStochasticState* s, m_states){
QQuickSprite* sprite = qobject_cast<QQuickSprite*>(s);
if (sprite)
@@ -235,8 +292,11 @@ QImage QQuickSpriteEngine::assembledImage()
static int divRoundUp(int a, int b){return (a+b-1)/b;}
};
int rowsNeeded = helper::divRoundUp(state->frames(), (maxSize / state->frameWidth()));
- if (rowsNeeded * state->frameHeight() > maxSize){
- qWarning() << "SpriteEngine: Animation too large to fit in one texture..." << state->source().toLocalFile();
+ if (h + rowsNeeded * state->frameHeight() > maxSize){
+ if (rowsNeeded * state->frameHeight() > maxSize)
+ qWarning() << "SpriteEngine: Animation too large to fit in one texture:" << state->source().toLocalFile();
+ else
+ qWarning() << "SpriteEngine: Animations too large to fit in one texture, pushed over the edge by:" << state->source().toLocalFile();
qWarning() << "SpriteEngine: Your texture max size today is " << maxSize;
}
state->m_generatedCount = rowsNeeded;
@@ -273,7 +333,6 @@ QImage QQuickSpriteEngine::assembledImage()
while (framesLeft > 0){
if (image.width() - x + curX <= img.width()){//finish a row in image (dest)
int copied = image.width() - x;
- Q_ASSERT(!(copied % frameWidth));//XXX: Just checking
framesLeft -= copied/frameWidth;
p.drawImage(x,y,img.copy(curX,curY,copied,frameHeight));
y += frameHeight;
@@ -285,7 +344,6 @@ QImage QQuickSpriteEngine::assembledImage()
}
}else{//finish a row in img (src)
int copied = img.width() - curX;
- Q_ASSERT(!(copied % frameWidth));//XXX: Just checking
framesLeft -= copied/frameWidth;
p.drawImage(x,y,img.copy(curX,curY,copied,frameHeight));
curY += frameHeight;
@@ -306,6 +364,7 @@ QImage QQuickSpriteEngine::assembledImage()
return image;
}
+//TODO: Add a reset() function, for completeness in the case of a SpriteEngine being restarted from 0
void QQuickStochasticEngine::setCount(int c)
{
m_things.resize(c);
@@ -335,71 +394,121 @@ void QQuickStochasticEngine::stop(int index)
void QQuickStochasticEngine::restart(int index)
{
- m_startTimes[index] = m_timeOffset + m_advanceTime.elapsed();
+ m_startTimes[index] = m_timeOffset;
+ if (m_addAdvance)
+ m_startTimes[index] += m_advanceTime.elapsed();
int time = m_duration[index] * m_states[m_things[index]]->frames() + m_startTimes[index];
for (int i=0; i<m_stateUpdates.count(); i++)
m_stateUpdates[i].second.removeAll(index);
- addToUpdateList(time, index);
+ if (m_duration[index] >= 0)
+ addToUpdateList(time, index);
}
-uint QQuickStochasticEngine::updateSprites(uint time)//### would returning a list of changed idxs be faster than signals?
+void QQuickSpriteEngine::restart(int index) //Reimplemented to recognize and handle pseudostates
{
- //Sprite State Update;
- QSet<int> changedIndexes;
- while (!m_stateUpdates.isEmpty() && time >= m_stateUpdates.first().first){
- foreach (int idx, m_stateUpdates.first().second){
- if (idx >= m_things.count())
- continue;//TODO: Proper fix(because this does happen and I'm just ignoring it)
- int stateIdx = m_things[idx];
- int nextIdx = -1;
- int goalPath = goalSeek(stateIdx, idx);
- if (goalPath == -1){//Random
- qreal r =(qreal) qrand() / (qreal) RAND_MAX;
- qreal total = 0.0;
- for (QVariantMap::const_iterator iter=m_states[stateIdx]->m_to.constBegin();
- iter!=m_states[stateIdx]->m_to.constEnd(); iter++)
- total += (*iter).toReal();
- r*=total;
- for (QVariantMap::const_iterator iter= m_states[stateIdx]->m_to.constBegin();
- iter!=m_states[stateIdx]->m_to.constEnd(); iter++){
- if (r < (*iter).toReal()){
- bool superBreak = false;
- for (int i=0; i<m_states.count(); i++){
- if (m_states[i]->name() == iter.key()){
- nextIdx = i;
- superBreak = true;
- break;
- }
- }
- if (superBreak)
- break;
+ if (m_sprites[m_things[index]]->duration() < 0) {//Manually advanced
+ m_startTimes[index] = 0;
+ } else {
+ m_startTimes[index] = m_timeOffset;
+ if (m_addAdvance)
+ m_startTimes[index] += m_advanceTime.elapsed();
+ int time = spriteDuration(index) + m_startTimes[index];
+ for (int i=0; i<m_stateUpdates.count(); i++)
+ m_stateUpdates[i].second.removeAll(index);
+ addToUpdateList(time, index);
+ }
+}
+
+void QQuickStochasticEngine::advance(int idx)
+{
+ if (idx >= m_things.count())
+ return;//TODO: Proper fix(because this has happened and I just ignored it)
+ int nextIdx = nextState(m_things[idx],idx);
+ m_things[idx] = nextIdx;
+ m_duration[idx] = m_states[nextIdx]->variedDuration();
+ restart(idx);
+ emit m_states[nextIdx]->entered();
+ emit stateChanged(idx);
+}
+
+void QQuickSpriteEngine::advance(int idx) //Reimplemented to recognize and handle pseudostates
+{
+ if (idx >= m_things.count())
+ return;//TODO: Proper fix(because this has happened and I just ignored it)
+ if (m_duration[idx] == 0) {
+ if (m_sprites[m_things[idx]]->duration() < 0) {
+ //Manually called, advance inner substate count
+ m_startTimes[idx]++;
+ if (m_startTimes[idx] < m_sprites[m_things[idx]]->m_generatedCount) {
+ //only a pseudostate ended
+ emit stateChanged(idx);
+ return;
+ }
+ }
+ //just go past the pseudostate logic
+ } else if (m_startTimes[idx] + m_duration[idx] * m_states[m_things[idx]]->frames()
+ > m_timeOffset + (m_addAdvance ? m_advanceTime.elapsed() : 0)) {
+ //only a pseduostate ended
+ emit stateChanged(idx);
+ addToUpdateList(m_timeOffset + spriteDuration(idx), idx);
+ return;
+ }
+ int nextIdx = nextState(m_things[idx],idx);
+ m_things[idx] = nextIdx;
+ m_duration[idx] = m_states[nextIdx]->variedDuration();
+ restart(idx);
+ emit m_states[nextIdx]->entered();
+ emit stateChanged(idx);
+}
+
+int QQuickStochasticEngine::nextState(int curState, int curThing)
+{
+ int nextIdx = -1;
+ int goalPath = goalSeek(curState, curThing);
+ if (goalPath == -1){//Random
+ qreal r =(qreal) qrand() / (qreal) RAND_MAX;
+ qreal total = 0.0;
+ for (QVariantMap::const_iterator iter=m_states[curState]->m_to.constBegin();
+ iter!=m_states[curState]->m_to.constEnd(); iter++)
+ total += (*iter).toReal();
+ r*=total;
+ for (QVariantMap::const_iterator iter= m_states[curState]->m_to.constBegin();
+ iter!=m_states[curState]->m_to.constEnd(); iter++){
+ if (r < (*iter).toReal()){
+ bool superBreak = false;
+ for (int i=0; i<m_states.count(); i++){
+ if (m_states[i]->name() == iter.key()){
+ nextIdx = i;
+ superBreak = true;
+ break;
}
- r -= (*iter).toReal();
}
- }else{//Random out of shortest paths to goal
- nextIdx = goalPath;
+ if (superBreak)
+ break;
}
- if (nextIdx == -1)//No to states means stay here
- nextIdx = stateIdx;
-
- m_things[idx] = nextIdx;
- m_duration[idx] = m_states[nextIdx]->variedDuration();
- m_startTimes[idx] = time;
- if (nextIdx != stateIdx){
- changedIndexes << idx;
- emit m_states[nextIdx]->entered();
- }
- addToUpdateList((m_duration[idx] * m_states[nextIdx]->frames()) + time, idx);
+ r -= (*iter).toReal();
}
- m_stateUpdates.pop_front();
+ }else{//Random out of shortest paths to goal
+ nextIdx = goalPath;
}
+ if (nextIdx == -1)//No 'to' states means stay here
+ nextIdx = curState;
+ return nextIdx;
+}
+uint QQuickStochasticEngine::updateSprites(uint time)//### would returning a list of changed idxs be faster than signals?
+{
+ //Sprite State Update;
m_timeOffset = time;
- m_advanceTime.start();
- //TODO: emit this when a psuedostate changes too
- foreach (int idx, changedIndexes){//Batched so that update list doesn't change midway
- emit stateChanged(idx);
+ m_addAdvance = false;
+ while (!m_stateUpdates.isEmpty() && time >= m_stateUpdates.first().first){
+ foreach (int idx, m_stateUpdates.first().second)
+ advance(idx);
+ m_stateUpdates.pop_front();
}
+
+ m_advanceTime.start();
+ m_addAdvance = true;
if (m_stateUpdates.isEmpty())
return -1;
return m_stateUpdates.first().first;
diff --git a/src/quick/items/qquickspriteengine_p.h b/src/quick/items/qquickspriteengine_p.h
index 86f8aadc8c..48ef6c305e 100644
--- a/src/quick/items/qquickspriteengine_p.h
+++ b/src/quick/items/qquickspriteengine_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
@@ -102,9 +102,9 @@ public:
int variedDuration() const
{
- return m_duration
+ return qMax(qreal(0.0) , m_duration
+ (m_durationVariance * ((qreal)qrand()/RAND_MAX) * 2)
- - m_durationVariance;
+ - m_durationVariance);
}
int frames() const
@@ -212,6 +212,8 @@ public:
void setGoal(int state, int sprite=0, bool jump=false);
void start(int index=0, int state=0);
+ virtual void restart(int index=0);
+ virtual void advance(int index=0);//Sends state to the next chosen state, unlike goal.
void stop(int index=0);
int curState(int index=0) {return m_things[index];}
@@ -244,8 +246,8 @@ public slots:
protected:
friend class QQuickParticleSystem;
- void restart(int index);
void addToUpdateList(uint t, int idx);
+ int nextState(int curState, int idx=0);
int goalSeek(int curState, int idx, int dist=-1);
QList<QQuickStochasticState*> m_states;
//### Consider struct or class for the four data variables?
@@ -260,6 +262,7 @@ protected:
QString m_globalGoal;
int m_maxFrames;
int m_imageStateCount;
+ bool m_addAdvance;
};
class QQuickSpriteEngine : public QQuickStochasticEngine
@@ -279,14 +282,18 @@ public:
int spriteState(int sprite=0);
int spriteStart(int sprite=0);
int spriteFrames(int sprite=0);
- int spriteDuration(int sprite=0);
+ int spriteDuration(int sprite=0);//Full duration, not per frame
int spriteX(int /* sprite */ = 0) { return 0; }//Currently all rows are 0 aligned, if we get more space efficient we might change this
int spriteY(int sprite=0);
int spriteWidth(int sprite=0);
int spriteHeight(int sprite=0);
- int spriteCount();//Like state count, but for the image states
+ int spriteCount();//Like state count
int maxFrames();
+ QString realName(int sprite=0);//Gives the parent sprite name for pseudosprites
QImage assembledImage();
+
+ virtual void restart(int index=0);
+ virtual void advance(int index=0);
private:
QList<QQuickSprite*> m_sprites;
};
diff --git a/src/quick/items/qquickspriteimage.cpp b/src/quick/items/qquickspriteimage.cpp
index 6b39f73ae2..1819decf10 100644
--- a/src/quick/items/qquickspriteimage.cpp
+++ b/src/quick/items/qquickspriteimage.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
@@ -58,32 +58,24 @@ QT_BEGIN_NAMESPACE
static const char vertexShaderCode[] =
"attribute highp vec2 vTex;\n"
- "uniform highp vec4 animData;// interpolate(bool), duration, frameCount (this anim), timestamp (this anim)\n"
- "uniform highp vec4 animPos;//sheet x,y, width/height of this anim\n"
- "uniform highp vec4 animSheetSize; //width/height of whole sheet, width/height of element\n"
+ "uniform highp vec3 animData;// w,h(premultiplied of anim), interpolation progress\n"
+ "uniform highp vec4 animPos;//x,y, x,y (two frames for interpolation)\n"
+ "uniform highp vec2 size;//w,h of element\n"
"\n"
"uniform highp mat4 qt_Matrix;\n"
- "uniform highp float timestamp;\n"
"\n"
"varying highp vec4 fTexS;\n"
"varying lowp float progress;\n"
"\n"
"\n"
"void main() {\n"
+ " progress = animData.z;\n"
" //Calculate frame location in texture\n"
- " highp float frameIndex = mod((((timestamp - animData.w)*1000.)/animData.y),animData.z);\n"
- " progress = mod((timestamp - animData.w)*1000., animData.y) / animData.y;\n"
- "\n"
- " frameIndex = floor(frameIndex);\n"
- " fTexS.xy = vec2(((frameIndex + vTex.x) * animPos.z / animSheetSize.x), ((animPos.y + vTex.y * animPos.w) / animSheetSize.y));\n"
- "\n"
+ " fTexS.xy = animPos.xy + vTex.xy * animData.xy;\n"
" //Next frame is also passed, for interpolation\n"
- " //### Should the next anim be precalculated to allow for interpolation there?\n"
- " if (animData.x == 1.0 && frameIndex != animData.z - 1.)//Can't do it for the last frame though, this anim may not loop\n"
- " frameIndex = mod(frameIndex+1., animData.z);\n"
- " fTexS.zw = vec2(((frameIndex + vTex.x) * animPos.z / animSheetSize.x), ((animPos.y + vTex.y * animPos.w) / animSheetSize.y));\n"
+ " fTexS.zw = animPos.zw + vTex.xy * animData.xy;\n"
"\n"
- " gl_Position = qt_Matrix * vec4(animSheetSize.z * vTex.x, animSheetSize.w * vTex.y, 0, 1);\n"
+ " gl_Position = qt_Matrix * vec4(size.x * vTex.x, size.y * vTex.y, 0, 1);\n"
"}\n";
static const char fragmentShaderCode[] =
@@ -111,33 +103,25 @@ public:
QSGTexture *texture;
- qreal timestamp;
- float interpolate;
- float frameDuration;
- float frameCount;
float animT;
- float animX;
- float animY;
- float animWidth;
- float animHeight;
- float sheetWidth;
- float sheetHeight;
+ float animX1;
+ float animY1;
+ float animX2;
+ float animY2;
+ float animW;
+ float animH;
float elementWidth;
float elementHeight;
};
QQuickSpriteMaterial::QQuickSpriteMaterial()
- : timestamp(0)
- , interpolate(1.0f)
- , frameDuration(1.0f)
- , frameCount(1.0f)
- , animT(0.0f)
- , animX(0.0f)
- , animY(0.0f)
- , animWidth(1.0f)
- , animHeight(1.0f)
- , sheetWidth(1.0f)
- , sheetHeight(1.0f)
+ : animT(0.0f)
+ , animX1(0.0f)
+ , animY1(0.0f)
+ , animX2(0.0f)
+ , animY2(0.0f)
+ , animW(1.0f)
+ , animH(1.0f)
, elementWidth(1.0f)
, elementHeight(1.0f)
{
@@ -170,10 +154,9 @@ public:
m->texture->bind();
program()->setUniformValue(m_opacity_id, state.opacity());
- program()->setUniformValue(m_timestamp_id, (float) m->timestamp);
- program()->setUniformValue(m_animData_id, m->interpolate, m->frameDuration, m->frameCount, m->animT);
- program()->setUniformValue(m_animPos_id, m->animX, m->animY, m->animWidth, m->animHeight);
- program()->setUniformValue(m_animSheetSize_id, m->sheetWidth, m->sheetHeight, m->elementWidth, m->elementHeight);
+ program()->setUniformValue(m_animData_id, m->animW, m->animH, m->animT);
+ program()->setUniformValue(m_animPos_id, m->animX1, m->animY1, m->animX2, m->animY2);
+ program()->setUniformValue(m_size_id, m->elementWidth, m->elementHeight);
if (state.isMatrixDirty())
program()->setUniformValue(m_matrix_id, state.combinedMatrix());
@@ -182,10 +165,9 @@ public:
virtual void initialize() {
m_matrix_id = program()->uniformLocation("qt_Matrix");
m_opacity_id = program()->uniformLocation("qt_Opacity");
- m_timestamp_id = program()->uniformLocation("timestamp");
m_animData_id = program()->uniformLocation("animData");
m_animPos_id = program()->uniformLocation("animPos");
- m_animSheetSize_id = program()->uniformLocation("animSheetSize");
+ m_size_id = program()->uniformLocation("size");
}
virtual const char *vertexShader() const { return vertexShaderCode; }
@@ -201,10 +183,9 @@ public:
int m_matrix_id;
int m_opacity_id;
- int m_timestamp_id;
int m_animData_id;
int m_animPos_id;
- int m_animSheetSize_id;
+ int m_size_id;
static float chunkOfBytes[1024];
};
@@ -285,9 +266,11 @@ QQuickSpriteImage::QQuickSpriteImage(QQuickItem *parent) :
, m_node(0)
, m_material(0)
, m_spriteEngine(0)
+ , m_curFrame(0)
, m_pleaseReset(false)
, m_running(true)
, m_interpolate(true)
+ , m_curStateIdx(0)
{
setFlag(ItemHasContents);
connect(this, SIGNAL(runningChanged(bool)),
@@ -350,19 +333,17 @@ QSGGeometryNode* QQuickSpriteImage::buildNode()
QImage image = m_spriteEngine->assembledImage();
if (image.isNull())
return 0;
+ m_sheetSize = QSizeF(image.size());
m_material->texture = canvas()->createTextureFromImage(image);
m_material->texture->setFiltering(QSGTexture::Linear);
m_spriteEngine->start(0);
- m_material->interpolate = m_interpolate ? 1.0 : 0.0;
- m_material->frameCount = m_spriteEngine->spriteFrames();
- m_material->frameDuration = m_spriteEngine->spriteDuration();
m_material->animT = 0;
- m_material->animX = m_spriteEngine->spriteX();
- m_material->animY = m_spriteEngine->spriteY();
- m_material->animWidth = m_spriteEngine->spriteWidth();
- m_material->animHeight = m_spriteEngine->spriteHeight();
- m_material->sheetWidth = image.width();
- m_material->sheetHeight = image.height();
+ m_material->animX1 = m_spriteEngine->spriteX() / m_sheetSize.width();
+ m_material->animY1 = m_spriteEngine->spriteY() / m_sheetSize.height();
+ m_material->animX2 = m_material->animX1;
+ m_material->animY2 = m_material->animY1;
+ m_material->animW = m_spriteEngine->spriteWidth() / m_sheetSize.width();
+ m_material->animH = m_spriteEngine->spriteHeight() / m_sheetSize.height();
m_material->elementWidth = width();
m_material->elementHeight = height();
m_curState = m_spriteEngine->state(m_spriteEngine->curState())->name();
@@ -440,25 +421,53 @@ void QQuickSpriteImage::prepareNextFrame()
uint timeInt = m_timestamp.elapsed();
qreal time = timeInt / 1000.;
- m_material->timestamp = time;
m_material->elementHeight = height();
m_material->elementWidth = width();
- m_material->interpolate = m_interpolate;
//Advance State
m_spriteEngine->updateSprites(timeInt);
- int curY = m_spriteEngine->spriteY();
- if (curY != m_material->animY){
- m_material->animT = m_spriteEngine->spriteStart()/1000.0;
- m_material->frameCount = m_spriteEngine->spriteFrames();
- m_material->frameDuration = m_spriteEngine->spriteDuration();
- m_material->animX = m_spriteEngine->spriteX();
- m_material->animY = m_spriteEngine->spriteY();
- m_material->animWidth = m_spriteEngine->spriteWidth();
- m_material->animHeight = m_spriteEngine->spriteHeight();
+ if (m_curStateIdx != m_spriteEngine->curState()) {
+ m_curStateIdx = m_spriteEngine->curState();
m_curState = m_spriteEngine->state(m_spriteEngine->curState())->name();
emit currentSpriteChanged(m_curState);
+ m_curFrame= -1;
+ }
+
+ //Advance Sprite
+ qreal animT = m_spriteEngine->spriteStart()/1000.0;
+ qreal frameCount = m_spriteEngine->spriteFrames();
+ qreal frameDuration = m_spriteEngine->spriteDuration()/frameCount;
+ double frameAt;
+ qreal progress;
+ if (frameDuration > 0) {
+ qreal frame = (time - animT)/(frameDuration / 1000.0);
+ frame = qBound(qreal(0.0), frame, frameCount - qreal(1.0));//Stop at count-1 frames until we have between anim interpolation
+ progress = modf(frame,&frameAt);
+ } else {
+ m_curFrame++;
+ if (m_curFrame >= frameCount){
+ m_curFrame = 0;
+ m_spriteEngine->advance();
+ }
+ frameAt = m_curFrame;
+ progress = 0;
}
+ qreal y = m_spriteEngine->spriteY() / m_sheetSize.height();
+ qreal w = m_spriteEngine->spriteWidth() / m_sheetSize.width();
+ qreal h = m_spriteEngine->spriteHeight() / m_sheetSize.height();
+ qreal x1 = m_spriteEngine->spriteX() / m_sheetSize.width();
+ x1 += frameAt * w;
+ qreal x2 = x1;
+ if (frameAt < (frameCount-1))
+ x2 += w;
+
+ m_material->animX1 = x1;
+ m_material->animY1 = y;
+ m_material->animX2 = x2;
+ m_material->animY2 = y;
+ m_material->animW = w;
+ m_material->animH = h;
+ m_material->animT = m_interpolate ? progress : 0.0;
}
QT_END_NAMESPACE
diff --git a/src/quick/items/qquickspriteimage_p.h b/src/quick/items/qquickspriteimage_p.h
index c5513031f5..cd0796be1a 100644
--- a/src/quick/items/qquickspriteimage_p.h
+++ b/src/quick/items/qquickspriteimage_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
@@ -131,12 +131,14 @@ private:
QList<QQuickSprite*> m_sprites;
QQuickSpriteEngine* m_spriteEngine;
QTime m_timestamp;
- int m_maxFrames;
+ int m_curFrame;
bool m_pleaseReset;
bool m_running;
bool m_interpolate;
QString m_goalState;
QString m_curState;
+ int m_curStateIdx;
+ QSizeF m_sheetSize;
};
QT_END_NAMESPACE
diff --git a/src/quick/items/qquickstateoperations.cpp b/src/quick/items/qquickstateoperations.cpp
index a8ebc88e7e..7548ec9bde 100644
--- a/src/quick/items/qquickstateoperations.cpp
+++ b/src/quick/items/qquickstateoperations.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickstateoperations_p.h b/src/quick/items/qquickstateoperations_p.h
index 3454ac1e11..1e8704d672 100644
--- a/src/quick/items/qquickstateoperations_p.h
+++ b/src/quick/items/qquickstateoperations_p.h
@@ -1,9 +1,9 @@
// Commit: 84c47bbb133304d7ef35642fa1fbb17619d4a43d
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp
index e8eb555dde..82232ab0ea 100644
--- a/src/quick/items/qquicktext.cpp
+++ b/src/quick/items/qquicktext.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -85,7 +85,7 @@ QQuickTextPrivate::QQuickTextPrivate()
disableDistanceField(false), internalWidthUpdate(false),
requireImplicitWidth(false), truncated(false), hAlignImplicit(true), rightToLeftText(false),
layoutTextElided(false), richTextAsImage(false), textureImageCacheDirty(false), textHasChanged(true),
- naturalWidth(0), doc(0), elipsisLayout(0), textLine(0), nodeType(NodeIsNull)
+ naturalWidth(0), doc(0), elipsisLayout(0), textLine(0), nodeType(NodeIsNull), updateType(UpdatePaintNode)
#if defined(Q_OS_MAC)
, layoutThread(0), paintingThread(0)
@@ -107,6 +107,7 @@ QQuickTextDocumentWithImageResources::QQuickTextDocumentWithImageResources(QQuic
: QTextDocument(parent), outstanding(0)
{
setUndoRedoEnabled(false);
+ documentLayout()->registerHandler(QTextFormat::ImageObject, this);
}
QQuickTextDocumentWithImageResources::~QQuickTextDocumentWithImageResources()
@@ -118,30 +119,11 @@ QQuickTextDocumentWithImageResources::~QQuickTextDocumentWithImageResources()
QVariant QQuickTextDocumentWithImageResources::loadResource(int type, const QUrl &name)
{
QDeclarativeContext *context = qmlContext(parent());
- QUrl url = context->resolvedUrl(name);
+ QUrl url = m_baseUrl.resolved(name);
if (type == QTextDocument::ImageResource) {
- QHash<QUrl, QDeclarativePixmap *>::Iterator iter = m_resources.find(url);
-
- if (iter == m_resources.end()) {
- QDeclarativePixmap *p = new QDeclarativePixmap(context->engine(), url);
- iter = m_resources.insert(url, p);
-
- if (p->isLoading()) {
- p->connectFinished(this, SLOT(requestFinished()));
- outstanding++;
- }
- }
-
- QDeclarativePixmap *p = *iter;
- if (p->isReady()) {
- return p->image();
- } else if (p->isError()) {
- if (!errors.contains(url)) {
- errors.insert(url);
- qmlInfo(parent()) << p->error();
- }
- }
+ QDeclarativePixmap *p = loadPixmap(context, url);
+ return p->image();
}
return QTextDocument::loadResource(type,url); // The *resolved* URL
@@ -152,9 +134,7 @@ void QQuickTextDocumentWithImageResources::requestFinished()
outstanding--;
if (outstanding == 0) {
markContentsDirty(0, characterCount());
-
- if (QQuickText *item = qobject_cast<QQuickText *>(parent()))
- QQuickTextPrivate::get(item)->updateLayout();
+ emit imagesLoaded();
}
}
@@ -165,6 +145,100 @@ void QQuickTextDocumentWithImageResources::clear()
QTextDocument::clear();
}
+
+QSizeF QQuickTextDocumentWithImageResources::intrinsicSize(
+ QTextDocument *, int, const QTextFormat &format)
+{
+ if (format.isImageFormat()) {
+ QTextImageFormat imageFormat = format.toImageFormat();
+
+ const bool hasWidth = imageFormat.hasProperty(QTextFormat::ImageWidth);
+ const int width = qRound(imageFormat.width());
+ const bool hasHeight = imageFormat.hasProperty(QTextFormat::ImageHeight);
+ const int height = qRound(imageFormat.height());
+
+ QSizeF size(width, height);
+ if (!hasWidth || !hasHeight) {
+ QDeclarativeContext *context = qmlContext(parent());
+ QUrl url = m_baseUrl.resolved(QUrl(imageFormat.name()));
+
+ QDeclarativePixmap *p = loadPixmap(context, url);
+ if (!p->isReady()) {
+ if (!hasWidth)
+ size.setWidth(16);
+ if (!hasHeight)
+ size.setHeight(16);
+ return size;
+ }
+ QSize implicitSize = p->implicitSize();
+
+ if (!hasWidth) {
+ if (!hasHeight)
+ size.setWidth(implicitSize.width());
+ else
+ size.setWidth(qRound(height * (implicitSize.width() / (qreal) implicitSize.height())));
+ }
+ if (!hasHeight) {
+ if (!hasWidth)
+ size.setHeight(implicitSize.height());
+ else
+ size.setHeight(qRound(width * (implicitSize.height() / (qreal) implicitSize.width())));
+ }
+ }
+ return size;
+ }
+ return QSizeF();
+}
+
+void QQuickTextDocumentWithImageResources::drawObject(
+ QPainter *, const QRectF &, QTextDocument *, int, const QTextFormat &)
+{
+}
+
+QImage QQuickTextDocumentWithImageResources::image(const QTextImageFormat &format)
+{
+ QDeclarativeContext *context = qmlContext(parent());
+ QUrl url = m_baseUrl.resolved(QUrl(format.name()));
+
+ QDeclarativePixmap *p = loadPixmap(context, url);
+ return p->image();
+}
+
+void QQuickTextDocumentWithImageResources::setBaseUrl(const QUrl &url, bool clear)
+{
+ m_baseUrl = url;
+ if (clear) {
+ clearResources();
+ markContentsDirty(0, characterCount());
+ }
+}
+
+QDeclarativePixmap *QQuickTextDocumentWithImageResources::loadPixmap(
+ QDeclarativeContext *context, const QUrl &url)
+{
+
+ QHash<QUrl, QDeclarativePixmap *>::Iterator iter = m_resources.find(url);
+
+ if (iter == m_resources.end()) {
+ QDeclarativePixmap *p = new QDeclarativePixmap(context->engine(), url);
+ iter = m_resources.insert(url, p);
+
+ if (p->isLoading()) {
+ p->connectFinished(this, SLOT(requestFinished()));
+ outstanding++;
+ }
+ }
+
+ QDeclarativePixmap *p = *iter;
+ if (p->isError()) {
+ if (!errors.contains(url)) {
+ errors.insert(url);
+ qmlInfo(parent()) << p->error();
+ }
+ }
+ return p;
+}
+
void QQuickTextDocumentWithImageResources::clearResources()
{
foreach (QDeclarativePixmap *pixmap, m_resources)
@@ -206,6 +280,12 @@ qreal QQuickTextPrivate::getImplicitWidth() const
return implicitWidth;
}
+void QQuickText::q_imagesLoaded()
+{
+ Q_D(QQuickText);
+ d->updateLayout();
+}
+
void QQuickTextPrivate::updateLayout()
{
Q_Q(QQuickText);
@@ -291,6 +371,7 @@ void QQuickTextPrivate::updateSize()
q->setImplicitSize(0, fontHeight);
paintedSize = QSize(0, fontHeight);
emit q->paintedSizeChanged();
+ updateType = UpdatePaintNode;
q->update();
return;
}
@@ -365,6 +446,7 @@ void QQuickTextPrivate::updateSize()
paintedSize = size;
emit q->paintedSizeChanged();
}
+ updateType = UpdatePaintNode;
q->update();
}
@@ -818,6 +900,7 @@ void QQuickTextPrivate::checkImageCache()
imageCacheDirty = false;
textureImageCacheDirty = true;
+ updateType = UpdatePaintNode;
q->update();
}
@@ -830,6 +913,8 @@ void QQuickTextPrivate::ensureDoc()
Q_Q(QQuickText);
doc = new QQuickTextDocumentWithImageResources(q);
doc->setDocumentMargin(0);
+ doc->setBaseUrl(q->baseUrl());
+ FAST_CONNECT(doc, SIGNAL(imagesLoaded()), q, SLOT(q_imagesLoaded()));
}
}
@@ -1243,8 +1328,10 @@ void QQuickText::setStyle(QQuickText::TextStyle style)
return;
// changing to/from Normal requires the boundingRect() to change
- if (isComponentComplete() && (d->style == Normal || style == Normal))
+ if (isComponentComplete() && (d->style == Normal || style == Normal)) {
+ d->updateType = QQuickTextPrivate::UpdatePaintNode;
update();
+ }
d->style = style;
d->markDirty();
emit styleChanged(d->style);
@@ -1645,6 +1732,45 @@ void QQuickText::setElideMode(QQuickText::TextElideMode mode)
emit elideModeChanged(d->elideMode);
}
+/*!
+ \qmlproperty url QtQuick2::Text::baseUrl
+
+ This property specifies a base URL which is used to resolve relative URLs
+ within the text.
+
+ By default is the url of the Text element.
+*/
+
+QUrl QQuickText::baseUrl() const
+{
+ Q_D(const QQuickText);
+ if (d->baseUrl.isEmpty()) {
+ if (QDeclarativeContext *context = qmlContext(this))
+ const_cast<QQuickTextPrivate *>(d)->baseUrl = context->baseUrl();
+ }
+ return d->baseUrl;
+}
+
+void QQuickText::setBaseUrl(const QUrl &url)
+{
+ Q_D(QQuickText);
+ if (baseUrl() != url) {
+ d->baseUrl = url;
+
+ if (d->doc)
+ d->doc->setBaseUrl(url);
+ emit baseUrlChanged();
+ }
+}
+
+void QQuickText::resetBaseUrl()
+{
+ if (QDeclarativeContext *context = qmlContext(this))
+ setBaseUrl(context->baseUrl());
+ else
+ setBaseUrl(QUrl());
+}
+
/*! \internal */
QRectF QQuickText::boundingRect() const
{
@@ -1721,6 +1847,14 @@ geomChangeDone:
QQuickItem::geometryChanged(newGeometry, oldGeometry);
}
+void QQuickText::triggerPreprocess()
+{
+ Q_D(QQuickText);
+ if (d->updateType == QQuickTextPrivate::UpdateNone)
+ d->updateType = QQuickTextPrivate::UpdatePreprocess;
+ update();
+}
+
QSGNode *QQuickText::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data)
{
Q_UNUSED(data);
@@ -1731,6 +1865,14 @@ QSGNode *QQuickText::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data
return 0;
}
+ if (!d->updateType != QQuickTextPrivate::UpdatePaintNode && oldNode != 0) {
+ // Update done in preprocess() in the nodes
+ d->updateType = QQuickTextPrivate::UpdateNone;
+ return oldNode;
+ }
+
+ d->updateType = QQuickTextPrivate::UpdateNone;
+
QRectF bounds = boundingRect();
// We need to make sure the layout is done in the current thread
@@ -1781,7 +1923,7 @@ QSGNode *QQuickText::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data
QQuickTextNode *node = 0;
if (!oldNode || d->nodeType != QQuickTextPrivate::NodeIsText) {
delete oldNode;
- node = new QQuickTextNode(QQuickItemPrivate::get(this)->sceneGraphContext());
+ node = new QQuickTextNode(QQuickItemPrivate::get(this)->sceneGraphContext(), this);
d->nodeType = QQuickTextPrivate::NodeIsText;
} else {
node = static_cast<QQuickTextNode *>(oldNode);
diff --git a/src/quick/items/qquicktext_p.h b/src/quick/items/qquicktext_p.h
index 2292ea5f4d..46197258c8 100644
--- a/src/quick/items/qquicktext_p.h
+++ b/src/quick/items/qquicktext_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -85,6 +85,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickText : public QQuickImplicitSizeItem
Q_PROPERTY(qreal paintedHeight READ paintedHeight NOTIFY paintedSizeChanged)
Q_PROPERTY(qreal lineHeight READ lineHeight WRITE setLineHeight NOTIFY lineHeightChanged)
Q_PROPERTY(LineHeightMode lineHeightMode READ lineHeightMode WRITE setLineHeightMode NOTIFY lineHeightModeChanged)
+ Q_PROPERTY(QUrl baseUrl READ baseUrl WRITE setBaseUrl RESET resetBaseUrl NOTIFY baseUrlChanged)
public:
QQuickText(QQuickItem *parent=0);
@@ -164,6 +165,10 @@ public:
LineHeightMode lineHeightMode() const;
void setLineHeightMode(LineHeightMode);
+ QUrl baseUrl() const;
+ void setBaseUrl(const QUrl &url);
+ void resetBaseUrl();
+
virtual void componentComplete();
int resourcesLoading() const; // mainly for testing
@@ -194,6 +199,7 @@ Q_SIGNALS:
void lineHeightModeChanged(LineHeightMode mode);
void effectiveHorizontalAlignmentChanged();
void lineLaidOut(QQuickTextLine *line);
+ void baseUrlChanged();
protected:
void mousePressEvent(QMouseEvent *event);
@@ -203,6 +209,10 @@ protected:
virtual QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *);
virtual bool event(QEvent *);
+private Q_SLOTS:
+ void q_imagesLoaded();
+ void triggerPreprocess();
+
private:
Q_DISABLE_COPY(QQuickText)
Q_DECLARE_PRIVATE(QQuickText)
diff --git a/src/quick/items/qquicktext_p_p.h b/src/quick/items/qquicktext_p_p.h
index fe25a02759..dda24a0a68 100644
--- a/src/quick/items/qquicktext_p_p.h
+++ b/src/quick/items/qquicktext_p_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -58,6 +58,7 @@
#include "qquickimplicitsizeitem_p_p.h"
#include <QtDeclarative/qdeclarative.h>
+#include <QtGui/qabstracttextdocumentlayout.h>
#include <QtGui/qtextlayout.h>
QT_BEGIN_NAMESPACE
@@ -83,6 +84,7 @@ public:
bool isLineLaidOutConnected();
QString text;
+ QUrl baseUrl;
QFont font;
QFont sourceFont;
QColor color;
@@ -159,6 +161,13 @@ public:
};
NodeType nodeType;
+ enum UpdateType {
+ UpdateNone,
+ UpdatePreprocess,
+ UpdatePaintNode
+ };
+ UpdateType updateType;
+
#if defined(Q_OS_MAC)
QList<QRectF> linesRects;
QThread *layoutThread;
@@ -167,9 +176,10 @@ public:
};
class QDeclarativePixmap;
-class QQuickTextDocumentWithImageResources : public QTextDocument {
+class QQuickTextDocumentWithImageResources : public QTextDocument, public QTextObjectInterface
+{
Q_OBJECT
-
+ Q_INTERFACES(QTextObjectInterface)
public:
QQuickTextDocumentWithImageResources(QQuickItem *parent);
virtual ~QQuickTextDocumentWithImageResources();
@@ -181,14 +191,27 @@ public:
void clear();
+ QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format);
+ void drawObject(QPainter *p, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format);
+
+ QImage image(const QTextImageFormat &format);
+
+ void setBaseUrl(const QUrl &url, bool clear = true);
+
+Q_SIGNALS:
+ void imagesLoaded();
+
protected:
QVariant loadResource(int type, const QUrl &name);
+ QDeclarativePixmap *loadPixmap(QDeclarativeContext *context, const QUrl &name);
+
private slots:
void requestFinished();
private:
QHash<QUrl, QDeclarativePixmap *> m_resources;
+ QUrl m_baseUrl;
int outstanding;
static QSet<QUrl> errors;
diff --git a/src/quick/items/qquicktextcontrol.cpp b/src/quick/items/qquicktextcontrol.cpp
index 4f9475f583..b1accb3781 100644
--- a/src/quick/items/qquicktextcontrol.cpp
+++ b/src/quick/items/qquicktextcontrol.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -624,7 +624,7 @@ QQuickTextControl::QQuickTextControl(QTextDocument *doc, QObject *parent)
: QObject(*new QQuickTextControlPrivate, parent)
{
Q_D(QQuickTextControl);
- d->init(Qt::RichText, QString(), doc);
+ d->init(Qt::PlainText, QString(), doc);
}
QQuickTextControl::~QQuickTextControl()
diff --git a/src/quick/items/qquicktextcontrol_p.h b/src/quick/items/qquicktextcontrol_p.h
index 0ea21169c9..6159826f34 100644
--- a/src/quick/items/qquicktextcontrol_p.h
+++ b/src/quick/items/qquicktextcontrol_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -67,7 +67,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QStyleSheet;
class QTextDocument;
diff --git a/src/quick/items/qquicktextcontrol_p_p.h b/src/quick/items/qquicktextcontrol_p_p.h
index 9ba600aae4..59da1a8f52 100644
--- a/src/quick/items/qquicktextcontrol_p_p.h
+++ b/src/quick/items/qquicktextcontrol_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp
index e971ef7b5e..37c76c09a3 100644
--- a/src/quick/items/qquicktextedit.cpp
+++ b/src/quick/items/qquicktextedit.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -127,13 +127,17 @@ QQuickTextEdit::QQuickTextEdit(QQuickItem *parent)
QString QQuickTextEdit::text() const
{
Q_D(const QQuickTextEdit);
-
+ if (!d->textCached) {
+ QQuickTextEditPrivate *d = const_cast<QQuickTextEditPrivate *>(d_func());
#ifndef QT_NO_TEXTHTMLPARSER
- if (d->richText)
- return d->control->toHtml();
- else
+ if (d->richText)
+ d->text = d->control->toHtml();
+ else
#endif
- return d->control->toPlainText();
+ d->text = d->control->toPlainText();
+ d->textCached = true;
+ }
+ return d->text;
}
/*!
@@ -320,21 +324,21 @@ void QQuickTextEdit::setTextFormat(TextFormat format)
Q_D(QQuickTextEdit);
if (format == d->format)
return;
+
bool wasRich = d->richText;
- d->richText = format == RichText || (format == AutoText && Qt::mightBeRichText(d->text));
+ d->richText = format == RichText || (format == AutoText && (wasRich || Qt::mightBeRichText(text())));
+#ifndef QT_NO_TEXTHTMLPARSER
if (wasRich && !d->richText) {
- d->control->setPlainText(d->text);
+ d->control->setPlainText(!d->textCached ? d->control->toHtml() : d->text);
updateSize();
} else if (!wasRich && d->richText) {
-#ifndef QT_NO_TEXTHTMLPARSER
- d->control->setHtml(d->text);
-#else
- d->control->setPlainText(d->text);
-#endif
+ d->control->setHtml(!d->textCached ? d->control->toPlainText() : d->text);
updateSize();
d->useImageFallback = qmlEnableImageCache();
}
+#endif
+
d->format = format;
d->control->setAcceptRichText(d->format != PlainText);
emit textFormatChanged(d->format);
@@ -553,7 +557,7 @@ bool QQuickTextEditPrivate::determineHorizontalAlignment()
Q_Q(QQuickTextEdit);
if (hAlignImplicit && q->isComponentComplete()) {
bool alignToRight;
- if (text.isEmpty()) {
+ if (document->isEmpty()) {
const QString preeditText = control->textCursor().block().layout()->preeditAreaText();
alignToRight = preeditText.isEmpty()
? qApp->inputPanel()->inputDirection() == Qt::RightToLeft
@@ -682,6 +686,44 @@ qreal QQuickTextEdit::paintedHeight() const
}
/*!
+ \qmlproperty url QtQuick2::TextEdit::baseUrl
+
+ This property specifies a base URL which is used to resolve relative URLs
+ within the text.
+
+ By default is the url of the TextEdit element.
+*/
+
+QUrl QQuickTextEdit::baseUrl() const
+{
+ Q_D(const QQuickTextEdit);
+ if (d->baseUrl.isEmpty()) {
+ if (QDeclarativeContext *context = qmlContext(this))
+ const_cast<QQuickTextEditPrivate *>(d)->baseUrl = context->baseUrl();
+ }
+ return d->baseUrl;
+}
+
+void QQuickTextEdit::setBaseUrl(const QUrl &url)
+{
+ Q_D(QQuickTextEdit);
+ if (baseUrl() != url) {
+ d->baseUrl = url;
+
+ d->document->setBaseUrl(url, d->richText);
+ emit baseUrlChanged();
+ }
+}
+
+void QQuickTextEdit::resetBaseUrl()
+{
+ if (QDeclarativeContext *context = qmlContext(this))
+ setBaseUrl(context->baseUrl());
+ else
+ setBaseUrl(QUrl());
+}
+
+/*!
\qmlmethod rectangle QtQuick2::TextEdit::positionToRectangle(position)
Returns the rectangle at the given \a position in the text. The x, y,
@@ -864,7 +906,7 @@ int QQuickTextEdit::cursorPosition() const
void QQuickTextEdit::setCursorPosition(int pos)
{
Q_D(QQuickTextEdit);
- if (pos < 0 || pos > d->text.length())
+ if (pos < 0 || pos >= d->document->characterCount()) // characterCount includes the terminating null.
return;
QTextCursor cursor = d->control->textCursor();
if (cursor.position() == pos && cursor.anchor() == pos)
@@ -1112,6 +1154,7 @@ void QQuickTextEdit::componentComplete()
Q_D(QQuickTextEdit);
QQuickImplicitSizeItem::componentComplete();
+ d->document->setBaseUrl(baseUrl(), d->richText);
if (d->richText)
d->useImageFallback = qmlEnableImageCache();
@@ -1338,7 +1381,7 @@ void QQuickTextEdit::selectWord()
void QQuickTextEdit::select(int start, int end)
{
Q_D(QQuickTextEdit);
- if (start < 0 || end < 0 || start > d->text.length() || end > d->text.length())
+ if (start < 0 || end < 0 || start >= d->document->characterCount() || end >= d->document->characterCount())
return;
QTextCursor cursor = d->control->textCursor();
cursor.beginEditBlock();
@@ -1359,12 +1402,11 @@ void QQuickTextEdit::select(int start, int end)
*/
bool QQuickTextEdit::isRightToLeft(int start, int end)
{
- Q_D(QQuickTextEdit);
if (start > end) {
qmlInfo(this) << "isRightToLeft(start, end) called with the end property being smaller than the start.";
return false;
} else {
- return d->text.mid(start, end - start).isRightToLeft();
+ return getText(start, end).isRightToLeft();
}
}
@@ -1499,6 +1541,15 @@ void QQuickTextEdit::itemChange(ItemChange change, const ItemChangeData &value)
{
if (change == ItemActiveFocusHasChanged) {
setCursorVisible(value.boolValue); // ### refactor: focus handling && d->canvas && d->canvas->hasFocus());
+
+ if (value.boolValue) {
+ q_updateAlignment();
+ connect(qApp->inputPanel(), SIGNAL(inputDirectionChanged(Qt::LayoutDirection)),
+ this, SLOT(q_updateAlignment()));
+ } else {
+ disconnect(qApp->inputPanel(), SIGNAL(inputDirectionChanged(Qt::LayoutDirection)),
+ this, SLOT(q_updateAlignment()));
+ }
}
QQuickItem::itemChange(change, value);
}
@@ -1558,11 +1609,27 @@ void QQuickTextEdit::updateImageCache(const QRectF &)
}
+void QQuickTextEdit::triggerPreprocess()
+{
+ Q_D(QQuickTextEdit);
+ if (d->updateType == QQuickTextEditPrivate::UpdateNone)
+ d->updateType = QQuickTextEditPrivate::UpdateOnlyPreprocess;
+ update();
+}
+
QSGNode *QQuickTextEdit::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData)
{
Q_UNUSED(updatePaintNodeData);
Q_D(QQuickTextEdit);
+ if (d->updateType != QQuickTextEditPrivate::UpdatePaintNode && oldNode != 0) {
+ // Update done in preprocess() in the nodes
+ d->updateType = QQuickTextEditPrivate::UpdateNone;
+ return oldNode;
+ }
+
+ d->updateType = QQuickTextEditPrivate::UpdateNone;
+
QSGNode *currentNode = oldNode;
if (d->richText && d->useImageFallback) {
QSGImageNode *node = 0;
@@ -1600,7 +1667,7 @@ QSGNode *QQuickTextEdit::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *
QQuickTextNode *node = 0;
if (oldNode == 0 || d->nodeType != QQuickTextEditPrivate::NodeIsText) {
delete oldNode;
- node = new QQuickTextNode(QQuickItemPrivate::get(this)->sceneGraphContext());
+ node = new QQuickTextNode(QQuickItemPrivate::get(this)->sceneGraphContext(), this);
d->nodeType = QQuickTextEditPrivate::NodeIsText;
currentNode = node;
} else {
@@ -1761,6 +1828,7 @@ void QQuickTextEditPrivate::init()
#endif
FAST_CONNECT(document, SIGNAL(undoAvailable(bool)), q, SIGNAL(canUndoChanged()));
FAST_CONNECT(document, SIGNAL(redoAvailable(bool)), q, SIGNAL(canRedoChanged()));
+ FAST_CONNECT(document, SIGNAL(imagesLoaded()), q, SLOT(updateSize()));
document->setDefaultFont(font);
document->setDocumentMargin(textMargin);
@@ -1772,13 +1840,13 @@ void QQuickTextEditPrivate::init()
void QQuickTextEdit::q_textChanged()
{
Q_D(QQuickTextEdit);
- d->text = text();
+ d->textCached = false;
d->rightToLeftText = d->document->begin().layout()->engine()->isRightToLeft();
d->determineHorizontalAlignment();
d->updateDefaultTextOption();
updateSize();
updateTotalLines();
- emit textChanged(d->text);
+ emit textChanged();
}
void QQuickTextEdit::moveCursorDelegate()
@@ -1910,6 +1978,7 @@ void QQuickTextEdit::updateDocument()
if (isComponentComplete()) {
updateImageCache();
+ d->updateType = QQuickTextEditPrivate::UpdatePaintNode;
update();
}
}
@@ -1919,10 +1988,20 @@ void QQuickTextEdit::updateCursor()
Q_D(QQuickTextEdit);
if (isComponentComplete()) {
updateImageCache(d->control->cursorRect());
+ d->updateType = QQuickTextEditPrivate::UpdatePaintNode;
update();
}
}
+void QQuickTextEdit::q_updateAlignment()
+{
+ Q_D(QQuickTextEdit);
+ if (d->determineHorizontalAlignment()) {
+ d->updateDefaultTextOption();
+ moveCursorDelegate();
+ }
+}
+
void QQuickTextEdit::updateTotalLines()
{
Q_D(QQuickTextEdit);
diff --git a/src/quick/items/qquicktextedit_p.h b/src/quick/items/qquicktextedit_p.h
index f37b7cd8ff..8d268ea6f8 100644
--- a/src/quick/items/qquicktextedit_p.h
+++ b/src/quick/items/qquicktextedit_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -93,6 +93,7 @@ class Q_AUTOTEST_EXPORT QQuickTextEdit : public QQuickImplicitSizeItem
Q_PROPERTY(bool canUndo READ canUndo NOTIFY canUndoChanged)
Q_PROPERTY(bool canRedo READ canRedo NOTIFY canRedoChanged)
Q_PROPERTY(bool inputMethodComposing READ isInputMethodComposing NOTIFY inputMethodComposingChanged)
+ Q_PROPERTY(QUrl baseUrl READ baseUrl WRITE setBaseUrl RESET resetBaseUrl NOTIFY baseUrlChanged)
public:
QQuickTextEdit(QQuickItem *parent=0);
@@ -214,6 +215,10 @@ public:
qreal paintedWidth() const;
qreal paintedHeight() const;
+ QUrl baseUrl() const;
+ void setBaseUrl(const QUrl &url);
+ void resetBaseUrl();
+
Q_INVOKABLE QRectF positionToRectangle(int) const;
Q_INVOKABLE int positionAt(int x, int y) const;
Q_INVOKABLE void moveCursorSelection(int pos);
@@ -227,7 +232,7 @@ public:
Q_INVOKABLE QString getFormattedText(int start, int end) const;
Q_SIGNALS:
- void textChanged(const QString &);
+ void textChanged();
void paintedSizeChanged();
void cursorPositionChanged();
void cursorRectangleChanged();
@@ -257,6 +262,7 @@ Q_SIGNALS:
void canRedoChanged();
void inputMethodComposingChanged();
void effectiveHorizontalAlignmentChanged();
+ void baseUrlChanged();
public Q_SLOTS:
void selectAll();
@@ -282,9 +288,11 @@ private Q_SLOTS:
void q_canPasteChanged();
void updateDocument();
void updateCursor();
+ void q_updateAlignment();
+ void updateSize();
+ void triggerPreprocess();
private:
- void updateSize();
void updateTotalLines();
void updateImageCache(const QRectF &rect = QRectF());
diff --git a/src/quick/items/qquicktextedit_p_p.h b/src/quick/items/qquicktextedit_p_p.h
index fe2172def6..f8996c95ee 100644
--- a/src/quick/items/qquicktextedit_p_p.h
+++ b/src/quick/items/qquicktextedit_p_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -74,13 +74,17 @@ public:
documentDirty(true), dirty(false), richText(false), cursorVisible(false), focusOnPress(true),
persistentSelection(true), requireImplicitWidth(false), selectByMouse(false), canPaste(false),
canPasteValid(false), hAlignImplicit(true), rightToLeftText(false), useImageFallback(false),
+ textCached(false),
textMargin(0.0), lastSelectionStart(0), lastSelectionEnd(0), cursorComponent(0), cursor(0),
format(QQuickTextEdit::PlainText), document(0), wrapMode(QQuickTextEdit::NoWrap),
mouseSelectionMode(QQuickTextEdit::SelectCharacters),
- lineCount(0), yoff(0), nodeType(NodeIsNull), texture(0)
+ lineCount(0), yoff(0), nodeType(NodeIsNull), texture(0), updateType(UpdatePaintNode)
{
}
+ static QQuickTextEditPrivate *get(QQuickTextEdit *item) {
+ return static_cast<QQuickTextEditPrivate *>(QObjectPrivate::get(item)); }
+
void init();
void updateDefaultTextOption();
@@ -91,6 +95,7 @@ public:
qreal getImplicitWidth() const;
QString text;
+ QUrl baseUrl;
QFont font;
QFont sourceFont;
QColor color;
@@ -114,6 +119,7 @@ public:
bool hAlignImplicit:1;
bool rightToLeftText:1;
bool useImageFallback:1;
+ bool textCached:1;
qreal textMargin;
int lastSelectionStart;
@@ -137,6 +143,13 @@ public:
NodeType nodeType;
QSGTexture *texture;
QPixmap pixmapCache;
+
+ enum UpdateType {
+ UpdateNone,
+ UpdateOnlyPreprocess,
+ UpdatePaintNode
+ };
+ UpdateType updateType;
};
QT_END_NAMESPACE
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp
index e569581163..237db3537d 100644
--- a/src/quick/items/qquicktextinput.cpp
+++ b/src/quick/items/qquicktextinput.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -102,6 +102,7 @@ void QQuickTextInput::componentComplete()
QQuickImplicitSizeItem::componentComplete();
+ d->checkIsValid();
d->updateLayout();
updateCursorRectangle();
if (d->cursorComponent && d->cursorComponent->isReady())
@@ -327,6 +328,7 @@ void QQuickTextInput::setColor(const QColor &c)
if (c != d->color) {
d->color = c;
d->textLayoutDirty = true;
+ d->updateType = QQuickTextInputPrivate::UpdatePaintNode;
update();
emit colorChanged(c);
}
@@ -354,6 +356,7 @@ void QQuickTextInput::setSelectionColor(const QColor &color)
d->m_palette.setColor(QPalette::Highlight, d->selectionColor);
if (d->hasSelectedText()) {
d->textLayoutDirty = true;
+ d->updateType = QQuickTextInputPrivate::UpdatePaintNode;
update();
}
emit selectionColorChanged(color);
@@ -379,6 +382,7 @@ void QQuickTextInput::setSelectedTextColor(const QColor &color)
d->m_palette.setColor(QPalette::HighlightedText, d->selectedTextColor);
if (d->hasSelectedText()) {
d->textLayoutDirty = true;
+ d->updateType = QQuickTextInputPrivate::UpdatePaintNode;
update();
}
emit selectedTextColorChanged(color);
@@ -403,8 +407,8 @@ void QQuickTextInput::setSelectedTextColor(const QColor &color)
The valid values for \c horizontalAlignment are \c TextInput.AlignLeft, \c TextInput.AlignRight and
\c TextInput.AlignHCenter.
- Valid values for \c verticalAlignment are \c TextEdit.AlignTop (default),
- \c TextEdit.AlignBottom \c TextEdit.AlignVCenter.
+ Valid values for \c verticalAlignment are \c TextInput.AlignTop (default),
+ \c TextInput.AlignBottom \c TextInput.AlignVCenter.
When using the attached property LayoutMirroring::enabled to mirror application
layouts, the horizontal alignment of text will also be mirrored. However, the property
@@ -506,7 +510,7 @@ void QQuickTextInput::setVAlign(QQuickTextInput::VAlignment alignment)
/*!
\qmlproperty enumeration QtQuick2::TextInput::wrapMode
- Set this property to wrap the text to the TextEdit item's width.
+ Set this property to wrap the text to the TextInput item's width.
The text will only wrap if an explicit width has been set.
\list
@@ -641,6 +645,7 @@ void QQuickTextInput::setCursorVisible(bool on)
return;
d->cursorVisible = on;
d->setCursorBlinkPeriod(on ? qApp->styleHints()->cursorFlashTime() : 0);
+ d->updateType = QQuickTextInputPrivate::UpdatePaintNode;
update();
emit cursorVisibleChanged(d->cursorVisible);
}
@@ -842,6 +847,23 @@ void QQuickTextInput::setAutoScroll(bool b)
\ingroup qml-basic-visual-elements
This element provides a validator for non-integer numbers.
+
+ Input is accepted if it contains a double that is within the valid range
+ and is in the correct format.
+
+ Input is accepected but invalid if it contains a double that is outside
+ the range or is in the wrong format; e.g. with too many digits after the
+ decimal point or is empty.
+
+ Input is rejected if it is not a double.
+
+ Note: If the valid range consists of just positive doubles (e.g. 0.0 to
+ 100.0) and input is a negative double then it is rejected. If \l notation
+ is set to DoubleValidator.StandardNotation, and the input contains more
+ digits before the decimal point than a double in the valid range may have,
+ it is also rejected. If \l notation is DoubleValidator.ScientificNotation,
+ and the input is not in the valid range, it is accecpted but invalid. The
+ value may yet become valid by changing the exponent.
*/
/*!
@@ -931,20 +953,32 @@ void QQuickTextInput::setValidator(QValidator* v)
return;
d->m_validator = v;
- if (!d->hasAcceptableInput(d->m_text)) {
- if (d->m_validInput) {
- d->m_validInput = false;
- emit acceptableInputChanged();
- }
- } else if (!d->m_validInput) {
- d->m_validInput = true;
- emit acceptableInputChanged();
- }
+
+ if (isComponentComplete())
+ d->checkIsValid();
emit validatorChanged();
}
+
#endif // QT_NO_VALIDATOR
+void QQuickTextInputPrivate::checkIsValid()
+{
+ Q_Q(QQuickTextInput);
+
+ ValidatorState state = hasAcceptableInput(m_text);
+ m_validInput = state != InvalidInput;
+ if (state != AcceptableInput) {
+ if (m_acceptableInput) {
+ m_acceptableInput = false;
+ emit q->acceptableInputChanged();
+ }
+ } else if (!m_acceptableInput) {
+ m_acceptableInput = true;
+ emit q->acceptableInputChanged();
+ }
+}
+
/*!
\qmlproperty string QtQuick2::TextInput::inputMask
@@ -981,7 +1015,7 @@ void QQuickTextInput::setInputMask(const QString &im)
bool QQuickTextInput::hasAcceptableInput() const
{
Q_D(const QQuickTextInput);
- return d->hasAcceptableInput(d->m_text);
+ return d->hasAcceptableInput(d->m_text) == QQuickTextInputPrivate::AcceptableInput;
}
/*!
@@ -1591,14 +1625,30 @@ void QQuickTextInputPrivate::updateVerticalScroll()
textLayoutDirty = true;
}
+void QQuickTextInput::triggerPreprocess()
+{
+ Q_D(QQuickTextInput);
+ if (d->updateType == QQuickTextInputPrivate::UpdateNone)
+ d->updateType = QQuickTextInputPrivate::UpdateOnlyPreprocess;
+ update();
+}
+
QSGNode *QQuickTextInput::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data)
{
Q_UNUSED(data);
Q_D(QQuickTextInput);
+ if (d->updateType != QQuickTextInputPrivate::UpdatePaintNode && oldNode != 0) {
+ // Update done in preprocess() in the nodes
+ d->updateType = QQuickTextInputPrivate::UpdateNone;
+ return oldNode;
+ }
+
+ d->updateType = QQuickTextInputPrivate::UpdateNone;
+
QQuickTextNode *node = static_cast<QQuickTextNode *>(oldNode);
if (node == 0)
- node = new QQuickTextNode(QQuickItemPrivate::get(this)->sceneGraphContext());
+ node = new QQuickTextNode(QQuickItemPrivate::get(this)->sceneGraphContext(), this);
d->textNode = node;
if (!d->textLayoutDirty) {
@@ -2065,7 +2115,7 @@ void QQuickTextInput::setMouseSelectionMode(SelectionMode mode)
\qmlproperty bool QtQuick2::TextInput::canPaste
Returns true if the TextInput is writable and the content of the clipboard is
- suitable for pasting into the TextEdit.
+ suitable for pasting into the TextInput.
*/
bool QQuickTextInput::canPaste() const
{
@@ -2125,9 +2175,9 @@ void QQuickTextInput::moveCursorSelection(int position)
basis. If not specified the selection mode will default to TextInput.SelectCharacters.
\list
- \o TextEdit.SelectCharacters - Sets either the selectionStart or selectionEnd (whichever was at
+ \o TextInput.SelectCharacters - Sets either the selectionStart or selectionEnd (whichever was at
the previous cursor position) to the specified position.
- \o TextEdit.SelectWords - Sets the selectionStart and selectionEnd to include all
+ \o TextInput.SelectWords - Sets the selectionStart and selectionEnd to include all
words between the specified position and the previous cursor position. Words partially in the
range are included.
\endlist
@@ -2316,6 +2366,12 @@ void QQuickTextInput::itemChange(ItemChange change, const ItemChangeData &value)
if (!hasFocus) {
d->commitPreedit();
d->deselect();
+ disconnect(qApp->inputPanel(), SIGNAL(inputDirectionChanged(Qt::LayoutDirection)),
+ this, SLOT(q_updateAlignment()));
+ } else {
+ q_updateAlignment();
+ connect(qApp->inputPanel(), SIGNAL(inputDirectionChanged(Qt::LayoutDirection)),
+ this, SLOT(q_updateAlignment()));
}
}
QQuickItem::itemChange(change, value);
@@ -2372,6 +2428,7 @@ void QQuickTextInput::updateCursorRectangle()
d->updateHorizontalScroll();
d->updateVerticalScroll();
+ d->updateType = QQuickTextInputPrivate::UpdatePaintNode;
update();
emit cursorRectangleChanged();
if (d->cursorItem) {
@@ -2385,6 +2442,7 @@ void QQuickTextInput::selectionChanged()
{
Q_D(QQuickTextInput);
d->textLayoutDirty = true; //TODO: Only update rect in selection
+ d->updateType = QQuickTextInputPrivate::UpdatePaintNode;
update();
emit selectedTextChanged();
@@ -2444,6 +2502,15 @@ void QQuickTextInput::q_canPasteChanged()
}
+void QQuickTextInput::q_updateAlignment()
+{
+ Q_D(QQuickTextInput);
+ if (d->determineHorizontalAlignment()) {
+ d->updateLayout();
+ updateCursorRectangle();
+ }
+}
+
// ### these should come from QStyleHints
const int textCursorWidth = 1;
const bool fullWidthSelection = true;
@@ -2510,7 +2577,7 @@ void QQuickTextInputPrivate::updateLayout()
return;
QTextOption option = m_textLayout.textOption();
- option.setTextDirection(m_layoutDirection);
+ option.setTextDirection(layoutDirection());
option.setFlags(QTextOption::IncludeTrailingSpaces);
option.setWrapMode(QTextOption::WrapMode(wrapMode));
option.setAlignment(Qt::Alignment(q->effectiveHAlign()));
@@ -2539,6 +2606,7 @@ void QQuickTextInputPrivate::updateLayout()
m_ascent = qRound(firstLine.ascent());
textLayoutDirty = true;
+ updateType = UpdatePaintNode;
q->update();
q->setImplicitSize(qCeil(boundingRect.width()), qCeil(boundingRect.height()));
@@ -2984,16 +3052,21 @@ bool QQuickTextInputPrivate::finishChange(int validateFromState, bool update, bo
Q_UNUSED(update)
bool notifyInputPanel = m_textDirty || m_selDirty;
+ bool alignmentChanged = false;
if (m_textDirty) {
// do validation
bool wasValidInput = m_validInput;
+ bool wasAcceptable = m_acceptableInput;
m_validInput = true;
+ m_acceptableInput = true;
#ifndef QT_NO_VALIDATOR
if (m_validator) {
QString textCopy = m_text;
int cursorCopy = m_cursor;
- m_validInput = (m_validator->validate(textCopy, cursorCopy) != QValidator::Invalid);
+ QValidator::State state = m_validator->validate(textCopy, cursorCopy);
+ m_validInput = state != QValidator::Invalid;
+ m_acceptableInput = state == QValidator::Acceptable;
if (m_validInput) {
if (m_text != textCopy) {
internalSetText(textCopy, cursorCopy);
@@ -3020,24 +3093,28 @@ bool QQuickTextInputPrivate::finishChange(int validateFromState, bool update, bo
if (m_modifiedState > m_undoState)
m_modifiedState = -1;
m_validInput = true;
+ m_acceptableInput = wasAcceptable;
m_textDirty = false;
}
if (m_textDirty) {
m_textDirty = false;
m_preeditDirty = false;
- determineHorizontalAlignment();
+ alignmentChanged = determineHorizontalAlignment();
emit q->textChanged();
}
- updateDisplayText();
+ updateDisplayText(alignmentChanged);
- if (m_validInput != wasValidInput)
+ if (m_acceptableInput != wasAcceptable)
emit q->acceptableInputChanged();
}
if (m_preeditDirty) {
m_preeditDirty = false;
- determineHorizontalAlignment();
+ if (determineHorizontalAlignment()) {
+ alignmentChanged = true;
+ updateLayout();
+ }
}
if (m_selDirty) {
@@ -3049,7 +3126,9 @@ bool QQuickTextInputPrivate::finishChange(int validateFromState, bool update, bo
if (notifyInputPanel)
q->updateMicroFocus();
emitUndoRedoChanged();
- emitCursorPositionChanged();
+
+ if (!emitCursorPositionChanged() && alignmentChanged)
+ q->updateCursorRectangle();
return true;
}
@@ -3399,32 +3478,34 @@ bool QQuickTextInputPrivate::isValidInput(QChar key, QChar mask) const
Otherwise returns false
*/
-bool QQuickTextInputPrivate::hasAcceptableInput(const QString &str) const
+QQuickTextInputPrivate::ValidatorState QQuickTextInputPrivate::hasAcceptableInput(const QString &str) const
{
#ifndef QT_NO_VALIDATOR
QString textCopy = str;
int cursorCopy = m_cursor;
- if (m_validator && m_validator->validate(textCopy, cursorCopy)
- != QValidator::Acceptable)
- return false;
+ if (m_validator) {
+ QValidator::State state = m_validator->validate(textCopy, cursorCopy);
+ if (state != QValidator::Acceptable)
+ return ValidatorState(state);
+ }
#endif
if (!m_maskData)
- return true;
+ return AcceptableInput;
if (str.length() != m_maxLength)
- return false;
+ return InvalidInput;
for (int i=0; i < m_maxLength; ++i) {
if (m_maskData[i].separator) {
if (str.at(i) != m_maskData[i].maskChar)
- return false;
+ return InvalidInput;
} else {
if (!isValidInput(str.at(i), m_maskData[i].maskChar))
- return false;
+ return InvalidInput;
}
}
- return true;
+ return AcceptableInput;
}
/*!
@@ -3683,7 +3764,7 @@ void QQuickTextInputPrivate::emitUndoRedoChanged()
If the current cursor position differs from the last emitted cursor
position, emits cursorPositionChanged().
*/
-void QQuickTextInputPrivate::emitCursorPositionChanged()
+bool QQuickTextInputPrivate::emitCursorPositionChanged()
{
Q_Q(QQuickTextInput);
if (m_cursor != m_lastCursorPos) {
@@ -3710,7 +3791,10 @@ void QQuickTextInputPrivate::emitCursorPositionChanged()
#ifndef QT_NO_ACCESSIBILITY
QAccessible::updateAccessibility(q, 0, QAccessible::TextCaretMoved);
#endif
+
+ return true;
}
+ return false;
}
@@ -3727,8 +3811,10 @@ void QQuickTextInputPrivate::setCursorBlinkPeriod(int msec)
m_blinkStatus = 1;
} else {
m_blinkTimer = 0;
- if (m_blinkStatus == 1)
+ if (m_blinkStatus == 1) {
+ updateType = UpdatePaintNode;
q->update();
+ }
}
m_blinkPeriod = msec;
}
@@ -3748,6 +3834,7 @@ void QQuickTextInput::timerEvent(QTimerEvent *event)
Q_D(QQuickTextInput);
if (event->timerId() == d->m_blinkTimer) {
d->m_blinkStatus = !d->m_blinkStatus;
+ d->updateType = QQuickTextInputPrivate::UpdatePaintNode;
update();
} else if (event->timerId() == d->m_deleteAllTimer) {
killTimer(d->m_deleteAllTimer);
diff --git a/src/quick/items/qquicktextinput_p.h b/src/quick/items/qquicktextinput_p.h
index 535b1af266..92d09c3efd 100644
--- a/src/quick/items/qquicktextinput_p.h
+++ b/src/quick/items/qquicktextinput_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -323,6 +323,8 @@ private Q_SLOTS:
void createCursor();
void updateCursorRectangle();
void q_canPasteChanged();
+ void q_updateAlignment();
+ void triggerPreprocess();
private:
Q_DECLARE_PRIVATE(QQuickTextInput)
diff --git a/src/quick/items/qquicktextinput_p_p.h b/src/quick/items/qquicktextinput_p_p.h
index 3f28c4aefd..1fc55658e6 100644
--- a/src/quick/items/qquicktextinput_p_p.h
+++ b/src/quick/items/qquicktextinput_p_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -125,8 +125,10 @@ public:
, m_preeditDirty(0)
, m_selDirty(0)
, m_validInput(1)
+ , m_acceptableInput(1)
, m_blinkStatus(0)
, m_passwordEchoEditing(false)
+ , updateType(UpdatePaintNode)
{
}
@@ -251,9 +253,17 @@ public:
uint m_preeditDirty : 1;
uint m_selDirty : 1;
uint m_validInput : 1;
+ uint m_acceptableInput : 1;
uint m_blinkStatus : 1;
uint m_passwordEchoEditing;
+ enum UpdateType {
+ UpdateNone,
+ UpdateOnlyPreprocess,
+ UpdatePaintNode
+ };
+ UpdateType updateType;
+
static inline QQuickTextInputPrivate *get(QQuickTextInput *t) {
return t->d_func();
}
@@ -424,7 +434,7 @@ private:
void internalRedo();
void emitUndoRedoChanged();
- void emitCursorPositionChanged();
+ bool emitCursorPositionChanged();
bool finishChange(int validateFromState = -1, bool update = false, bool edited = true);
@@ -432,10 +442,23 @@ private:
inline void separate() { m_separator = true; }
+ enum ValidatorState {
+#ifndef QT_NO_VALIDATOR
+ InvalidInput = QValidator::Invalid,
+ IntermediateInput = QValidator::Intermediate,
+ AcceptableInput = QValidator::Acceptable
+#else
+ Invalid,
+ Intermediate,
+ Acceptable
+#endif
+ };
+
// masking
void parseInputMask(const QString &maskFields);
bool isValidInput(QChar key, QChar mask) const;
- bool hasAcceptableInput(const QString &text) const;
+ ValidatorState hasAcceptableInput(const QString &text) const;
+ void checkIsValid();
QString maskString(uint pos, const QString &str, bool clear = false) const;
QString clearString(uint pos, uint len) const;
QString stripString(const QString &str) const;
diff --git a/src/quick/items/qquicktextnode.cpp b/src/quick/items/qquicktextnode.cpp
index fcb1c855ec..2f72b0c8fe 100644
--- a/src/quick/items/qquicktextnode.cpp
+++ b/src/quick/items/qquicktextnode.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -56,6 +56,7 @@
#include <qtexttable.h>
#include <qtextlist.h>
#include <private/qdeclarativestyledtext_p.h>
+#include <private/qquicktext_p_p.h>
#include <private/qfont_p.h>
#include <private/qfontengine_p.h>
#include <private/qrawfont_p.h>
@@ -68,8 +69,8 @@ QT_BEGIN_NAMESPACE
/*!
Creates an empty QQuickTextNode
*/
-QQuickTextNode::QQuickTextNode(QSGContext *context)
- : m_context(context), m_cursorNode(0)
+QQuickTextNode::QQuickTextNode(QSGContext *context, QQuickItem *ownerElement)
+ : m_context(context), m_cursorNode(0), m_ownerElement(ownerElement)
{
#if defined(QML_RUNTIME_TESTING)
description = QLatin1String("text");
@@ -130,6 +131,7 @@ QSGGlyphNode *QQuickTextNode::addGlyphs(const QPointF &position, const QGlyphRun
QSGNode *parentNode)
{
QSGGlyphNode *node = m_context->createGlyphNode();
+ node->setOwnerElement(m_ownerElement);
node->setGlyphs(position + QPointF(0, glyphs.rawFont().ascent()), glyphs);
node->setStyle(style);
node->setStyleColor(styleColor);
@@ -329,6 +331,12 @@ namespace {
void addImage(const QRectF &rect, const QImage &image, qreal ascent,
BinaryTreeNode::SelectionState selectionState,
QTextFrameFormat::Position layoutPosition);
+ int addText(const QTextBlock &block,
+ const QTextCharFormat &charFormat,
+ const QColor &textColor,
+ const QVarLengthArray<QTextLayout::FormatRange> &colorChanges,
+ int textPos, int fragmentEnd,
+ int selectionStart, int selectionEnd);
void addTextObject(const QPointF &position, const QTextCharFormat &format,
BinaryTreeNode::SelectionState selectionState,
QTextDocument *textDocument, int pos,
@@ -407,6 +415,45 @@ namespace {
QList<QPair<QRectF, QImage> > m_images;
};
+ int SelectionEngine::addText(const QTextBlock &block,
+ const QTextCharFormat &charFormat,
+ const QColor &textColor,
+ const QVarLengthArray<QTextLayout::FormatRange> &colorChanges,
+ int textPos, int fragmentEnd,
+ int selectionStart, int selectionEnd)
+ {
+ if (charFormat.foreground().style() != Qt::NoBrush)
+ setTextColor(charFormat.foreground().color());
+ else
+ setTextColor(textColor);
+
+ while (textPos < fragmentEnd) {
+ int blockRelativePosition = textPos - block.position();
+ QTextLine line = block.layout()->lineForTextPosition(blockRelativePosition);
+ if (!currentLine().isValid()
+ || line.lineNumber() != currentLine().lineNumber()) {
+ setCurrentLine(line);
+ }
+
+ Q_ASSERT(line.textLength() > 0);
+ int lineEnd = line.textStart() + block.position() + line.textLength();
+
+ int len = qMin(lineEnd - textPos, fragmentEnd - textPos);
+ Q_ASSERT(len > 0);
+
+ int currentStepEnd = textPos + len;
+
+ addGlyphsForRanges(colorChanges,
+ textPos - block.position(),
+ currentStepEnd - block.position(),
+ selectionStart - block.position(),
+ selectionEnd - block.position());
+
+ textPos = currentStepEnd;
+ }
+ return textPos;
+ }
+
void SelectionEngine::addTextDecorations(const QVarLengthArray<TextDecoration> &textDecorations,
qreal offset, qreal thickness)
{
@@ -657,8 +704,15 @@ namespace {
if (format.objectType() == QTextFormat::ImageObject) {
QTextImageFormat imageFormat = format.toImageFormat();
- QTextImageHandler *imageHandler = static_cast<QTextImageHandler *>(handler);
- image = imageHandler->image(textDocument, imageFormat);
+ if (QQuickTextDocumentWithImageResources *imageDoc = qobject_cast<QQuickTextDocumentWithImageResources *>(textDocument)) {
+ image = imageDoc->image(imageFormat);
+
+ if (image.isNull())
+ return;
+ } else {
+ QTextImageHandler *imageHandler = static_cast<QTextImageHandler *>(handler);
+ image = imageHandler->image(textDocument, imageFormat);
+ }
}
if (image.isNull()) {
@@ -1155,6 +1209,13 @@ void QQuickTextNode::addTextDocument(const QPointF &, QTextDocument *textDocumen
int textPos = block.position();
QTextBlock::iterator blockIterator = block.begin();
+ if (blockIterator.atEnd() && preeditLength) {
+ engine.setPosition(blockPosition);
+ textPos = engine.addText(block, block.charFormat(), textColor, colorChanges,
+ textPos, textPos + preeditLength,
+ selectionStart, selectionEnd);
+ }
+
while (!blockIterator.atEnd()) {
QTextFragment fragment = blockIterator.fragment();
QString text = fragment.text();
@@ -1183,42 +1244,15 @@ void QQuickTextNode::addTextDocument(const QPointF &, QTextDocument *textDocumen
}
textPos += text.length();
} else {
- if (charFormat.foreground().style() != Qt::NoBrush)
- engine.setTextColor(charFormat.foreground().color());
- else
- engine.setTextColor(textColor);
-
int fragmentEnd = textPos + fragment.length();
if (preeditPosition >= 0
&& preeditPosition >= textPos
- && preeditPosition < fragmentEnd) {
+ && preeditPosition <= fragmentEnd) {
fragmentEnd += preeditLength;
}
- while (textPos < fragmentEnd) {
- int blockRelativePosition = textPos - block.position();
- QTextLine line = block.layout()->lineForTextPosition(blockRelativePosition);
- if (!engine.currentLine().isValid()
- || line.lineNumber() != engine.currentLine().lineNumber()) {
- engine.setCurrentLine(line);
- }
-
- Q_ASSERT(line.textLength() > 0);
- int lineEnd = line.textStart() + block.position() + line.textLength();
-
- int len = qMin(lineEnd - textPos, fragmentEnd - textPos);
- Q_ASSERT(len > 0);
-
- int currentStepEnd = textPos + len;
-
- engine.addGlyphsForRanges(colorChanges,
- textPos - block.position(),
- currentStepEnd - block.position(),
- selectionStart - block.position(),
- selectionEnd - block.position());
-
- textPos = currentStepEnd;
- }
+ engine.addText(block, charFormat, textColor, colorChanges, textPos, fragmentEnd,
+ selectionStart, selectionEnd);
}
++blockIterator;
diff --git a/src/quick/items/qquicktextnode_p.h b/src/quick/items/qquicktextnode_p.h
index a519322160..f64933b09f 100644
--- a/src/quick/items/qquicktextnode_p.h
+++ b/src/quick/items/qquicktextnode_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -74,7 +74,7 @@ public:
};
Q_DECLARE_FLAGS(Decorations, Decoration)
- QQuickTextNode(QSGContext *);
+ QQuickTextNode(QSGContext *, QQuickItem *ownerElement);
~QQuickTextNode();
static bool isComplexRichText(QTextDocument *);
@@ -103,6 +103,7 @@ private:
QSGContext *m_context;
QSGSimpleRectNode *m_cursorNode;
QList<QSGTexture *> m_textures;
+ QQuickItem *m_ownerElement;
};
QT_END_NAMESPACE
diff --git a/src/quick/items/qquicktranslate.cpp b/src/quick/items/qquicktranslate.cpp
index c1b00d4653..887159f9bc 100644
--- a/src/quick/items/qquicktranslate.cpp
+++ b/src/quick/items/qquicktranslate.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquicktranslate_p.h b/src/quick/items/qquicktranslate_p.h
index 1a7a56e49b..7f29870c36 100644
--- a/src/quick/items/qquicktranslate_p.h
+++ b/src/quick/items/qquicktranslate_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickview.cpp b/src/quick/items/qquickview.cpp
index 8c7db60195..638cbb7ff3 100644
--- a/src/quick/items/qquickview.cpp
+++ b/src/quick/items/qquickview.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickview.h b/src/quick/items/qquickview.h
index 3c637689d3..871105c143 100644
--- a/src/quick/items/qquickview.h
+++ b/src/quick/items/qquickview.h
@@ -1,9 +1,9 @@
// Commit: 0b83a2161261be525f01359397ab1c8c34827749
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickview_p.h b/src/quick/items/qquickview_p.h
index 585269ad2e..d4f2449069 100644
--- a/src/quick/items/qquickview_p.h
+++ b/src/quick/items/qquickview_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickvisualadaptormodel.cpp b/src/quick/items/qquickvisualadaptormodel.cpp
index 66c26ddf44..01590ca86b 100644
--- a/src/quick/items/qquickvisualadaptormodel.cpp
+++ b/src/quick/items/qquickvisualadaptormodel.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickvisualadaptormodel_p.h b/src/quick/items/qquickvisualadaptormodel_p.h
index cfc5a6903d..49dfae8fc3 100644
--- a/src/quick/items/qquickvisualadaptormodel_p.h
+++ b/src/quick/items/qquickvisualadaptormodel_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickvisualdatamodel.cpp b/src/quick/items/qquickvisualdatamodel.cpp
index 3de1e91f7f..698c4f29da 100644
--- a/src/quick/items/qquickvisualdatamodel.cpp
+++ b/src/quick/items/qquickvisualdatamodel.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -425,6 +425,10 @@ QQuickVisualDataModel::ReleaseFlags QQuickVisualDataModelPrivate::release(QObjec
if (QQuickItem *item = qobject_cast<QQuickItem *>(object))
emitDestroyingItem(item);
cacheItem->object = 0;
+ if (cacheItem->incubationTask) {
+ releaseIncubator(cacheItem->incubationTask);
+ cacheItem->incubationTask = 0;
+ }
stat |= QQuickVisualModel::Destroyed;
} else {
stat |= QQuickVisualDataModel::Referenced;
diff --git a/src/quick/items/qquickvisualdatamodel_p.h b/src/quick/items/qquickvisualdatamodel_p.h
index 2a87e5ed15..df45a94211 100644
--- a/src/quick/items/qquickvisualdatamodel_p.h
+++ b/src/quick/items/qquickvisualdatamodel_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickvisualdatamodel_p_p.h b/src/quick/items/qquickvisualdatamodel_p_p.h
index 6a943806b2..b840ca8ff6 100644
--- a/src/quick/items/qquickvisualdatamodel_p_p.h
+++ b/src/quick/items/qquickvisualdatamodel_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickvisualitemmodel.cpp b/src/quick/items/qquickvisualitemmodel.cpp
index 947c1755b3..59726c96db 100644
--- a/src/quick/items/qquickvisualitemmodel.cpp
+++ b/src/quick/items/qquickvisualitemmodel.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickvisualitemmodel_p.h b/src/quick/items/qquickvisualitemmodel_p.h
index 3471e1a0cc..cf0fcce082 100644
--- a/src/quick/items/qquickvisualitemmodel_p.h
+++ b/src/quick/items/qquickvisualitemmodel_p.h
@@ -3,7 +3,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickwindowmanager.cpp b/src/quick/items/qquickwindowmanager.cpp
index 87867c8ddf..a07efeaeb3 100644
--- a/src/quick/items/qquickwindowmanager.cpp
+++ b/src/quick/items/qquickwindowmanager.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickwindowmanager_p.h b/src/quick/items/qquickwindowmanager_p.h
index 8a5073effd..5078048fc3 100644
--- a/src/quick/items/qquickwindowmanager_p.h
+++ b/src/quick/items/qquickwindowmanager_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickwindowmodule.cpp b/src/quick/items/qquickwindowmodule.cpp
index 172ab91477..1ff1df3145 100644
--- a/src/quick/items/qquickwindowmodule.cpp
+++ b/src/quick/items/qquickwindowmodule.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/items/qquickwindowmodule_p.h b/src/quick/items/qquickwindowmodule_p.h
index c111a74955..d556b63131 100644
--- a/src/quick/items/qquickwindowmodule_p.h
+++ b/src/quick/items/qquickwindowmodule_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QQuickWindowModule
{
diff --git a/src/quick/particles/qquickage.cpp b/src/quick/particles/qquickage.cpp
index c6c59f88aa..6c4318180f 100644
--- a/src/quick/particles/qquickage.cpp
+++ b/src/quick/particles/qquickage.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickage_p.h b/src/quick/particles/qquickage_p.h
index 9844455968..ac1a02ff17 100644
--- a/src/quick/particles/qquickage_p.h
+++ b/src/quick/particles/qquickage_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickangledirection.cpp b/src/quick/particles/qquickangledirection.cpp
index e272d082ee..3c44162f2e 100644
--- a/src/quick/particles/qquickangledirection.cpp
+++ b/src/quick/particles/qquickangledirection.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickangledirection_p.h b/src/quick/particles/qquickangledirection_p.h
index ddf6666417..0fdba4c7d1 100644
--- a/src/quick/particles/qquickangledirection_p.h
+++ b/src/quick/particles/qquickangledirection_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickcumulativedirection.cpp b/src/quick/particles/qquickcumulativedirection.cpp
index 985152aee9..8ce07e50dd 100644
--- a/src/quick/particles/qquickcumulativedirection.cpp
+++ b/src/quick/particles/qquickcumulativedirection.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickcumulativedirection_p.h b/src/quick/particles/qquickcumulativedirection_p.h
index cc5ad4cc6d..6cd245dbfe 100644
--- a/src/quick/particles/qquickcumulativedirection_p.h
+++ b/src/quick/particles/qquickcumulativedirection_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickcustomaffector.cpp b/src/quick/particles/qquickcustomaffector.cpp
index 279b2a76c0..23e706cabb 100644
--- a/src/quick/particles/qquickcustomaffector.cpp
+++ b/src/quick/particles/qquickcustomaffector.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickcustomaffector_p.h b/src/quick/particles/qquickcustomaffector_p.h
index 2bcabebd13..8d1023d2a1 100644
--- a/src/quick/particles/qquickcustomaffector_p.h
+++ b/src/quick/particles/qquickcustomaffector_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickcustomparticle.cpp b/src/quick/particles/qquickcustomparticle.cpp
index e6f50c0ff6..86ba41ef68 100644
--- a/src/quick/particles/qquickcustomparticle.cpp
+++ b/src/quick/particles/qquickcustomparticle.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickcustomparticle_p.h b/src/quick/particles/qquickcustomparticle_p.h
index 583e61fa39..fa962a3495 100644
--- a/src/quick/particles/qquickcustomparticle_p.h
+++ b/src/quick/particles/qquickcustomparticle_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickdirection.cpp b/src/quick/particles/qquickdirection.cpp
index 3ee8cba89c..bcd4e2227c 100644
--- a/src/quick/particles/qquickdirection.cpp
+++ b/src/quick/particles/qquickdirection.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickdirection_p.h b/src/quick/particles/qquickdirection_p.h
index 70b255fd79..f2d1cea9a2 100644
--- a/src/quick/particles/qquickdirection_p.h
+++ b/src/quick/particles/qquickdirection_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickellipseextruder.cpp b/src/quick/particles/qquickellipseextruder.cpp
index d3deeeb340..daebad0c3e 100644
--- a/src/quick/particles/qquickellipseextruder.cpp
+++ b/src/quick/particles/qquickellipseextruder.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickellipseextruder_p.h b/src/quick/particles/qquickellipseextruder_p.h
index b167a517cb..29ac806289 100644
--- a/src/quick/particles/qquickellipseextruder_p.h
+++ b/src/quick/particles/qquickellipseextruder_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickfriction.cpp b/src/quick/particles/qquickfriction.cpp
index eccc6e6677..93c8efc64b 100644
--- a/src/quick/particles/qquickfriction.cpp
+++ b/src/quick/particles/qquickfriction.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickfriction_p.h b/src/quick/particles/qquickfriction_p.h
index aa0a6752b7..c5cf28a24d 100644
--- a/src/quick/particles/qquickfriction_p.h
+++ b/src/quick/particles/qquickfriction_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickgravity.cpp b/src/quick/particles/qquickgravity.cpp
index 9a402205a0..744cd76a88 100644
--- a/src/quick/particles/qquickgravity.cpp
+++ b/src/quick/particles/qquickgravity.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickgravity_p.h b/src/quick/particles/qquickgravity_p.h
index 568d62afb8..8119001c66 100644
--- a/src/quick/particles/qquickgravity_p.h
+++ b/src/quick/particles/qquickgravity_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickgroupgoal.cpp b/src/quick/particles/qquickgroupgoal.cpp
index f5c40eb213..d471396303 100644
--- a/src/quick/particles/qquickgroupgoal.cpp
+++ b/src/quick/particles/qquickgroupgoal.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickgroupgoal_p.h b/src/quick/particles/qquickgroupgoal_p.h
index 3643159c79..b6ab84c103 100644
--- a/src/quick/particles/qquickgroupgoal_p.h
+++ b/src/quick/particles/qquickgroupgoal_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickimageparticle.cpp b/src/quick/particles/qquickimageparticle.cpp
index 5ca7d80925..b8b05f2330 100644
--- a/src/quick/particles/qquickimageparticle.cpp
+++ b/src/quick/particles/qquickimageparticle.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
@@ -53,10 +53,9 @@
#include <QtQuick/qsgengine.h>
#include <QtQuick/private/qsgtexture_p.h>
#include <private/qdeclarativeglobal_p.h>
+#include <cmath>
QT_BEGIN_NAMESPACE
-//###Switch to define later, for now user-friendly (no compilation) debugging is worth it
-DEFINE_BOOL_CONFIG_OPTION(qmlParticlesDebug, QML_PARTICLES_DEBUG)
#ifndef QT_OPENGL_ES_2
#define SHADER_DEFINES "#version 120\n"
@@ -84,9 +83,8 @@ static const char vertexShaderCode[] =
"attribute highp vec3 vRotation; //x = radians of rotation, y=rotation speed, z= bool autoRotate\n"
"#endif\n"
"#if defined(SPRITE)\n"
- "attribute highp vec4 vAnimData;// interpolate(bool), duration, frameCount (this anim), timestamp (this anim)\n"
- "attribute highp vec4 vAnimPos;//sheet x,y, width/height of this anim\n"
- "uniform highp vec2 animSheetSize; //width/height of whole sheet\n"
+ "attribute highp vec3 vAnimData;// w,h(premultiplied of anim), interpolation progress\n"
+ "attribute highp vec4 vAnimPos;//x,y, x,y (two frames for interpolation)\n"
"#endif\n"
"\n"
"uniform highp mat4 qt_Matrix;\n"
@@ -119,18 +117,12 @@ static const char vertexShaderCode[] =
"#endif\n"
" } else {\n"
"#if defined(SPRITE)\n"
+ " tt.y = vAnimData.z;\n"
" //Calculate frame location in texture\n"
- " highp float frameIndex = mod((((timestamp - vAnimData.w)*1000.)/vAnimData.y),vAnimData.z);\n"
- " tt.y = mod((timestamp - vAnimData.w)*1000., vAnimData.y) / vAnimData.y;\n"
- "\n"
- " frameIndex = floor(frameIndex);\n"
- " fTexS.xy = vec2(((frameIndex + vPosTex.z) * vAnimPos.z / animSheetSize.x), ((vAnimPos.y + vPosTex.w * vAnimPos.w) / animSheetSize.y));\n"
- "\n"
+ " fTexS.xy = vAnimPos.xy + vPosTex.zw * vAnimData.xy;\n"
" //Next frame is also passed, for interpolation\n"
- " //### Should the next anim be precalculated to allow for interpolation there?\n"
- " if (vAnimData.x == 1.0 && frameIndex != vAnimData.z - 1.)//Can't do it for the last frame though, this anim may not loop\n"
- " frameIndex = mod(frameIndex+1., vAnimData.z);\n"
- " fTexS.zw = vec2(((frameIndex + vPosTex.z) * vAnimPos.z / animSheetSize.x), ((vAnimPos.y + vPosTex.w * vAnimPos.w) / animSheetSize.y));\n"
+ " fTexS.zw = vAnimPos.zw + vPosTex.zw * vAnimData.xy;\n"
+ "\n"
"#elif defined(DEFORM)\n"
" fTex = vPosTex.zw;\n"
"#endif\n"
@@ -415,8 +407,8 @@ public:
program()->setUniformValue("texture", 0);
program()->setUniformValue("colortable", 1);
glFuncs = QOpenGLContext::currentContext()->functions();
+ //Don't actually expose the animSheetSize in the shader, it's currently only used for CPU calculations.
m_timestamp_id = program()->uniformLocation("timestamp");
- m_animsize_id = program()->uniformLocation("animSheetSize");
m_entry_id = program()->uniformLocation("entry");
m_sizetable_id = program()->uniformLocation("sizetable");
m_opacitytable_id = program()->uniformLocation("opacitytable");
@@ -431,14 +423,12 @@ public:
d->texture->bind();
program()->setUniformValue(m_timestamp_id, (float) d->timestamp);
- program()->setUniformValue(m_animsize_id, d->animSheetSize);
program()->setUniformValue(m_entry_id, (float) d->entry);
program()->setUniformValueArray(m_sizetable_id, (float*) d->sizeTable, 64, 1);
program()->setUniformValueArray(m_opacitytable_id, (float*) d->opacityTable, UNIFORM_ARRAY_SIZE, 1);
}
int m_timestamp_id;
- int m_animsize_id;
int m_entry_id;
int m_sizetable_id;
int m_opacitytable_id;
@@ -825,7 +815,6 @@ QQuickImageParticle::QQuickImageParticle(QQuickItem* parent)
, m_entryEffect(Fade)
{
setFlag(ItemHasContents);
- m_debugMode = qmlParticlesDebug();
}
QQuickImageParticle::~QQuickImageParticle()
@@ -1115,7 +1104,7 @@ void QQuickImageParticle::createEngine()
if (m_sprites.count()) {
m_spriteEngine = new QQuickSpriteEngine(m_sprites, this);
connect(m_spriteEngine, SIGNAL(stateChanged(int)),
- this, SLOT(spriteAdvance(int)));
+ this, SLOT(spriteAdvance(int)), Qt::DirectConnection);
m_explicitAnimation = true;
} else {
m_spriteEngine = 0;
@@ -1174,14 +1163,14 @@ static QSGGeometry::Attribute SpriteParticle_Attributes[] = {
QSGGeometry::Attribute::create(3, 4, GL_UNSIGNED_BYTE), // Colors
QSGGeometry::Attribute::create(4, 4, GL_FLOAT), // DeformationVectors
QSGGeometry::Attribute::create(5, 3, GL_FLOAT), // Rotation
- QSGGeometry::Attribute::create(6, 4, GL_FLOAT), // Anim Data
+ QSGGeometry::Attribute::create(6, 3, GL_FLOAT), // Anim Data
QSGGeometry::Attribute::create(7, 4, GL_FLOAT) // Anim Pos
};
static QSGGeometry::AttributeSet SpriteParticle_AttributeSet =
{
8, // Attribute Count
- (4 + 4 + 4 + 4 + 4 + 4 + 3) * sizeof(float) + 4 * sizeof(uchar),
+ (4 + 4 + 4 + 4 + 3 + 3 + 4) * sizeof(float) + 4 * sizeof(uchar),
SpriteParticle_Attributes
};
@@ -1222,6 +1211,8 @@ QSGGeometryNode* QQuickImageParticle::buildParticleNodes()
if (count() <= 0)
return 0;
+ m_debugMode = m_system->m_debugMode;
+
if (m_sprites.count() || m_bypassOptimizations) {
perfLevel = Sprites;
} else if (!m_colortable_name.isEmpty() || !m_sizetable_name.isEmpty()
@@ -1387,9 +1378,11 @@ QSGGeometryNode* QQuickImageParticle::buildParticleNodes()
indices += 6;
}
}
-
}
+ if (perfLevel == Sprites)
+ spritesUpdate();//Gives all vertexes the initial sprite data, then maintained per frame
+
foreach (QSGGeometryNode* node, m_nodes){
if (node == *(m_nodes.begin()))
node->setFlag(QSGGeometryNode::OwnsMaterial);//Root node owns the material for memory management purposes
@@ -1455,7 +1448,8 @@ void QQuickImageParticle::prepareNextFrame()
case Sprites:
//Advance State
if (m_spriteEngine)
- m_spriteEngine->updateSprites(timeStamp);
+ m_spriteEngine->updateSprites(timeStamp);//fires signals if anim changed
+ spritesUpdate(time);
case Tabled:
case Deformable:
case Colored:
@@ -1468,6 +1462,67 @@ void QQuickImageParticle::prepareNextFrame()
node->markDirty(QSGNode::DirtyMaterial);
}
+void QQuickImageParticle::spritesUpdate(qreal time)
+{
+ // Sprite progression handled CPU side, so as to have per-frame control.
+ foreach (const QString &str, m_groups) {
+ int gIdx = m_system->groupIds[str];
+ foreach (QQuickParticleData* mainDatum, m_system->groupData[gIdx]->data) {
+ QSGGeometryNode *node = m_nodes[gIdx];
+ if (!node)
+ continue;
+ //TODO: Interpolate between two different animations if it's going to transition next frame
+ // This is particularly important for cut-up sprites.
+ QQuickParticleData* datum = (mainDatum->animationOwner == this ? mainDatum : getShadowDatum(mainDatum));
+ double frameAt;
+ qreal progress = 0;
+ if (datum->frameDuration > 0) {
+ qreal frame = (time - datum->animT)/(datum->frameDuration / 1000.0);
+ frame = qBound((qreal)0.0, frame, (qreal)((qreal)datum->frameCount - 1.0));//Stop at count-1 frames until we have between anim interpolation
+ if (m_spritesInterpolate)
+ progress = modf(frame,&frameAt);
+ else
+ modf(frame,&frameAt);
+ } else {
+ datum->frameAt++;
+ if (datum->frameAt >= datum->frameCount){
+ datum->frameAt = 0;
+ for (int i = 0; i<m_startsIdx.count(); i++) {
+ if (m_startsIdx[i].second == gIdx){
+ m_spriteEngine->advance(m_startsIdx[i].first + datum->index);
+ break;
+ }
+ }
+ }
+ frameAt = datum->frameAt;
+ }
+ QSizeF sheetSize = getState<ImageMaterialData>(m_material)->animSheetSize;
+ qreal y = datum->animY / sheetSize.height();
+ qreal w = datum->animWidth / sheetSize.width();
+ qreal h = datum->animHeight / sheetSize.height();
+ qreal x1 = datum->animX / sheetSize.width();
+ x1 += frameAt * w;
+ qreal x2 = x1;
+ if (frameAt < (datum->frameCount-1))
+ x2 += w;
+
+ node->setFlag(QSGNode::OwnsGeometry, false);
+ SpriteVertex *spriteVertices = (SpriteVertex *) node->geometry()->vertexData();
+ spriteVertices += datum->index*4;
+ for (int i=0; i<4; i++) {
+ spriteVertices[i].animX1 = x1;
+ spriteVertices[i].animY1 = y;
+ spriteVertices[i].animX2 = x2;
+ spriteVertices[i].animY2 = y;
+ spriteVertices[i].animW = w;
+ spriteVertices[i].animH = h;
+ spriteVertices[i].animProgress = progress;
+ }
+ node->setFlag(QSGNode::OwnsGeometry, true);
+ }
+ }
+}
+
void QQuickImageParticle::spriteAdvance(int spriteIdx)
{
if (!m_startsIdx.count())//Probably overly defensive
@@ -1485,19 +1540,17 @@ void QQuickImageParticle::spriteAdvance(int spriteIdx)
gIdx = m_startsIdx[i-1].second;
int pIdx = spriteIdx - m_startsIdx[i-1].first;
- QQuickParticleData* datum = m_system->groupData[gIdx]->data[pIdx];
- QQuickParticleData* d = (datum->animationOwner == this ? datum : getShadowDatum(datum));
-
- d->animIdx = m_spriteEngine->spriteState(spriteIdx);
- Vertices<SpriteVertex>* particles = (Vertices<SpriteVertex> *) m_nodes[gIdx]->geometry()->vertexData();
- Vertices<SpriteVertex> &p = particles[pIdx];
- d->animT = p.v1.animT = p.v2.animT = p.v3.animT = p.v4.animT = m_spriteEngine->spriteStart(spriteIdx)/1000.0;
- d->frameCount = p.v1.frameCount = p.v2.frameCount = p.v3.frameCount = p.v4.frameCount = m_spriteEngine->spriteFrames(spriteIdx);
- d->frameDuration = p.v1.frameDuration = p.v2.frameDuration = p.v3.frameDuration = p.v4.frameDuration = m_spriteEngine->spriteDuration(spriteIdx);
- d->animX = p.v1.animX = p.v2.animX = p.v3.animX = p.v4.animX = m_spriteEngine->spriteX(spriteIdx);
- d->animY = p.v1.animY = p.v2.animY = p.v3.animY = p.v4.animY = m_spriteEngine->spriteY(spriteIdx);
- d->animWidth = p.v1.animWidth = p.v2.animWidth = p.v3.animWidth = p.v4.animWidth = m_spriteEngine->spriteWidth(spriteIdx);
- d->animHeight = p.v1.animHeight = p.v2.animHeight = p.v3.animHeight = p.v4.animHeight = m_spriteEngine->spriteHeight(spriteIdx);
+ QQuickParticleData* mainDatum = m_system->groupData[gIdx]->data[pIdx];
+ QQuickParticleData* datum = (mainDatum->animationOwner == this ? mainDatum : getShadowDatum(mainDatum));
+
+ datum->animIdx = m_spriteEngine->spriteState(spriteIdx);
+ datum->animT = m_spriteEngine->spriteStart(spriteIdx)/1000.0;
+ datum->frameCount = m_spriteEngine->spriteFrames(spriteIdx);
+ datum->frameDuration = m_spriteEngine->spriteDuration(spriteIdx) / datum->frameCount;
+ datum->animX = m_spriteEngine->spriteX(spriteIdx);
+ datum->animY = m_spriteEngine->spriteY(spriteIdx);
+ datum->animWidth = m_spriteEngine->spriteWidth(spriteIdx);
+ datum->animHeight = m_spriteEngine->spriteHeight(spriteIdx);
}
void QQuickImageParticle::reloadColor(const Color4ub &c, QQuickParticleData* d)
@@ -1535,8 +1588,9 @@ void QQuickImageParticle::initialize(int gIdx, int pIdx)
if (m_spriteEngine){
m_spriteEngine->start(spriteIdx);
writeTo->frameCount = m_spriteEngine->spriteFrames(spriteIdx);
- writeTo->frameDuration = m_spriteEngine->spriteDuration(spriteIdx);
+ writeTo->frameDuration = m_spriteEngine->spriteDuration(spriteIdx) / writeTo->frameCount;
writeTo->animIdx = 0;//Always starts at 0
+ writeTo->frameAt = -1;
writeTo->animX = m_spriteEngine->spriteX(spriteIdx);
writeTo->animY = m_spriteEngine->spriteY(spriteIdx);
writeTo->animWidth = m_spriteEngine->spriteWidth(spriteIdx);
@@ -1547,6 +1601,7 @@ void QQuickImageParticle::initialize(int gIdx, int pIdx)
writeTo->animT = datum->t;
writeTo->frameCount = 1;
writeTo->frameDuration = 60000000.0;
+ writeTo->frameAt = -1;
writeTo->animIdx = 0;
writeTo->animT = 0;
writeTo->animX = writeTo->animY = 0;
@@ -1668,25 +1723,7 @@ void QQuickImageParticle::commit(int gIdx, int pIdx)
spriteVertices[i].rotationSpeed = datum->rotationSpeed;
spriteVertices[i].autoRotate = datum->autoRotate;
}
- spriteVertices[i].animInterpolate = m_spriteEngine ? (m_spritesInterpolate ? 1.0 : 0.0) : 0.0;//### Shadow? In particleData? Or uniform?
- if (!m_spriteEngine || (m_explicitAnimation && datum->animationOwner != this)) {
- QQuickParticleData* shadow = getShadowDatum(datum);
- spriteVertices[i].frameDuration = shadow->frameDuration;
- spriteVertices[i].frameCount = shadow->frameCount;
- spriteVertices[i].animT = shadow->animT;
- spriteVertices[i].animX = shadow->animX;
- spriteVertices[i].animY = shadow->animY;
- spriteVertices[i].animWidth = shadow->animWidth;
- spriteVertices[i].animHeight = shadow->animHeight;
- } else {
- spriteVertices[i].frameDuration = datum->frameDuration;
- spriteVertices[i].frameCount = datum->frameCount;
- spriteVertices[i].animT = datum->animT;
- spriteVertices[i].animX = datum->animX;
- spriteVertices[i].animY = datum->animY;
- spriteVertices[i].animWidth = datum->animWidth;
- spriteVertices[i].animHeight = datum->animHeight;
- }
+ //Sprite-related vertices updated per-frame in spritesUpdate(), not on demand
if (m_explicitColor && datum->colorOwner != this) {
QQuickParticleData* shadow = getShadowDatum(datum);
spriteVertices[i].color.r = shadow->color.r;
diff --git a/src/quick/particles/qquickimageparticle_p.h b/src/quick/particles/qquickimageparticle_p.h
index 0ca3183daa..3e50a5fefe 100644
--- a/src/quick/particles/qquickimageparticle_p.h
+++ b/src/quick/particles/qquickimageparticle_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
@@ -128,14 +128,13 @@ struct SpriteVertex {
float rotation;
float rotationSpeed;
float autoRotate;//Assumed that GPUs prefer floats to bools
- float animInterpolate;
- float frameDuration;
- float frameCount;
- float animT;
- float animX;
- float animY;
- float animWidth;
- float animHeight;
+ float animW;
+ float animH;
+ float animProgress;
+ float animX1;
+ float animY1;
+ float animX2;
+ float animY2;
};
template <typename Vertex>
@@ -343,6 +342,7 @@ private slots:
void createEngine(); //### method invoked by sprite list changing (in engine.h) - pretty nasty
void spriteAdvance(int spriteIndex);
+ void spritesUpdate(qreal time = 0 );
private:
QUrl m_image_name;
QUrl m_colortable_name;
diff --git a/src/quick/particles/qquickitemparticle.cpp b/src/quick/particles/qquickitemparticle.cpp
index b775984a2e..7024a45c68 100644
--- a/src/quick/particles/qquickitemparticle.cpp
+++ b/src/quick/particles/qquickitemparticle.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickitemparticle_p.h b/src/quick/particles/qquickitemparticle_p.h
index 130d9aff55..0581039f99 100644
--- a/src/quick/particles/qquickitemparticle_p.h
+++ b/src/quick/particles/qquickitemparticle_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquicklineextruder.cpp b/src/quick/particles/qquicklineextruder.cpp
index af42910e85..e57c38d5a0 100644
--- a/src/quick/particles/qquicklineextruder.cpp
+++ b/src/quick/particles/qquicklineextruder.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquicklineextruder_p.h b/src/quick/particles/qquicklineextruder_p.h
index a4f73759ab..61a60e1663 100644
--- a/src/quick/particles/qquicklineextruder_p.h
+++ b/src/quick/particles/qquicklineextruder_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickmaskextruder.cpp b/src/quick/particles/qquickmaskextruder.cpp
index daaddf9edb..4051ed13fe 100644
--- a/src/quick/particles/qquickmaskextruder.cpp
+++ b/src/quick/particles/qquickmaskextruder.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickmaskextruder_p.h b/src/quick/particles/qquickmaskextruder_p.h
index 19ea269732..a1f70c72c0 100644
--- a/src/quick/particles/qquickmaskextruder_p.h
+++ b/src/quick/particles/qquickmaskextruder_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickparticleaffector.cpp b/src/quick/particles/qquickparticleaffector.cpp
index 9a6df32719..0413f1d517 100644
--- a/src/quick/particles/qquickparticleaffector.cpp
+++ b/src/quick/particles/qquickparticleaffector.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickparticleaffector_p.h b/src/quick/particles/qquickparticleaffector_p.h
index e4f33af28c..4884c61bbd 100644
--- a/src/quick/particles/qquickparticleaffector_p.h
+++ b/src/quick/particles/qquickparticleaffector_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickparticleemitter.cpp b/src/quick/particles/qquickparticleemitter.cpp
index 926b61e5e7..448e655416 100644
--- a/src/quick/particles/qquickparticleemitter.cpp
+++ b/src/quick/particles/qquickparticleemitter.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickparticleemitter_p.h b/src/quick/particles/qquickparticleemitter_p.h
index b863b2a097..2322265f4f 100644
--- a/src/quick/particles/qquickparticleemitter_p.h
+++ b/src/quick/particles/qquickparticleemitter_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickparticleextruder.cpp b/src/quick/particles/qquickparticleextruder.cpp
index f2266e7c90..e764186c2a 100644
--- a/src/quick/particles/qquickparticleextruder.cpp
+++ b/src/quick/particles/qquickparticleextruder.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickparticleextruder_p.h b/src/quick/particles/qquickparticleextruder_p.h
index 7a8d16a0f7..27dbc3da26 100644
--- a/src/quick/particles/qquickparticleextruder_p.h
+++ b/src/quick/particles/qquickparticleextruder_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickparticlegroup.cpp b/src/quick/particles/qquickparticlegroup.cpp
index 21d77d176c..d9666bf264 100644
--- a/src/quick/particles/qquickparticlegroup.cpp
+++ b/src/quick/particles/qquickparticlegroup.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickparticlegroup_p.h b/src/quick/particles/qquickparticlegroup_p.h
index ce9830441b..8f1397ed07 100644
--- a/src/quick/particles/qquickparticlegroup_p.h
+++ b/src/quick/particles/qquickparticlegroup_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickparticlepainter.cpp b/src/quick/particles/qquickparticlepainter.cpp
index 2eade8d77a..fd74860f1e 100644
--- a/src/quick/particles/qquickparticlepainter.cpp
+++ b/src/quick/particles/qquickparticlepainter.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickparticlepainter_p.h b/src/quick/particles/qquickparticlepainter_p.h
index 787668ef18..35f1ddbda7 100644
--- a/src/quick/particles/qquickparticlepainter_p.h
+++ b/src/quick/particles/qquickparticlepainter_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickparticlesmodule.cpp b/src/quick/particles/qquickparticlesmodule.cpp
index 0c7c6965f2..0ca48b8f61 100644
--- a/src/quick/particles/qquickparticlesmodule.cpp
+++ b/src/quick/particles/qquickparticlesmodule.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickparticlesmodule_p.h b/src/quick/particles/qquickparticlesmodule_p.h
index 2ba30a8cc6..d9710a2bc7 100644
--- a/src/quick/particles/qquickparticlesmodule_p.h
+++ b/src/quick/particles/qquickparticlesmodule_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickparticlesystem.cpp b/src/quick/particles/qquickparticlesystem.cpp
index 32b5fb4cea..924a2d0102 100644
--- a/src/quick/particles/qquickparticlesystem.cpp
+++ b/src/quick/particles/qquickparticlesystem.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
@@ -57,6 +57,48 @@
QT_BEGIN_NAMESPACE
//###Switch to define later, for now user-friendly (no compilation) debugging is worth it
DEFINE_BOOL_CONFIG_OPTION(qmlParticlesDebug, QML_PARTICLES_DEBUG)
+
+
+/* \internal ParticleSystem internals documentation
+
+ Affectors, Painters, Emitters and Groups all register themselves on construction as a callback
+ from their setSystem (or componentComplete if they have a system from a parent).
+
+ Particle data is stored by group, They have a group index (used by the particle system almost
+ everywhere) and a global index (used by the Stochastic state engine powering stochastic group
+ transitions). Each group has a recycling list/heap that stores the particle data.
+
+ The recycling list/heap is a heap of particle data sorted by when they're expected to die. If
+ they die prematurely then they are marked as reusable (and will probably still be alive when
+ they exit the heap). If they have their life extended, then they aren't dead when expected.
+ If this happens, they go back in the heap with the new estimate. If they have died on schedule,
+ then the indexes are marked as reusable. If no indexes are reusable when new particles are
+ requested, then the list is extended. This relatively complex datastructure is because memory
+ allocation and deallocation on this scale proved to be a significant performance cost. In order
+ to reuse the indexes validly (even when particles can have their life extended or cut short
+ dynamically, or particle counts grow) this seemed to be the most efficient option for keeping
+ track of which indices could be reused.
+
+ When a new particle is emitted, the emitter gets a new datum from the group (through the
+ system), and sets properties on it. Then it's passed back to the group briefly so that it can
+ now guess when the particle will die. Then the painters get a change to initialize properties
+ as well, since particle data includes shared data from painters as well as logical particle
+ data.
+
+ Every animation advance, the simulation advances by running all emitters for the elapsed
+ duration, then running all affectors, then telling all particle painters to update changed
+ particles. The ParticlePainter superclass stores these changes, and they are implemented
+ when the painter is called to paint in the render thread.
+
+ Particle group changes move the particle from one group to another by killing the old particle
+ and then creating a new one with the same data in the new group.
+
+ Note that currently groups only grow. Given that data is stored in vectors, it is non-trivial
+ to pluck out the unused indexes when the count goes down. Given the dynamic nature of the
+ system, it is difficult to tell if those unused data instances will be used again. Still,
+ some form of garbage collection is on the long term plan.
+*/
+
/*!
\qmlclass ParticleSystem QQuickParticleSystem
\inqmlmodule QtQuick.Particles 2
@@ -420,6 +462,7 @@ QQuickParticleData::QQuickParticleData(QQuickParticleSystem* sys)
autoRotate = 0;
animIdx = 0;
frameDuration = 1;
+ frameAt = -1;
frameCount = 1;
animT = -1;
animX = 0;
diff --git a/src/quick/particles/qquickparticlesystem_p.h b/src/quick/particles/qquickparticlesystem_p.h
index 7a16b77df3..277dda1771 100644
--- a/src/quick/particles/qquickparticlesystem_p.h
+++ b/src/quick/particles/qquickparticlesystem_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
@@ -200,6 +200,7 @@ public:
float autoRotate;//Assume that GPUs prefer floats to bools
float animIdx;
float frameDuration;
+ float frameAt;//Used for duration -1
float frameCount;
float animT;
float animX;
@@ -302,6 +303,7 @@ public:
void updateCurrentTime( int currentTime );
QQuickParticleSystemAnimation* m_animation;
bool m_running;
+ bool m_debugMode;
int timeInt;
bool initialized;
@@ -340,7 +342,6 @@ private:
QSignalMapper m_painterMapper;
QSignalMapper m_emitterMapper;
bool m_paused;
- bool m_debugMode;
bool m_allDead;
bool m_empty;
};
diff --git a/src/quick/particles/qquickpointattractor.cpp b/src/quick/particles/qquickpointattractor.cpp
index a676908019..9697753b42 100644
--- a/src/quick/particles/qquickpointattractor.cpp
+++ b/src/quick/particles/qquickpointattractor.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickpointattractor_p.h b/src/quick/particles/qquickpointattractor_p.h
index ee44591394..4b05dc6cd7 100644
--- a/src/quick/particles/qquickpointattractor_p.h
+++ b/src/quick/particles/qquickpointattractor_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickpointdirection.cpp b/src/quick/particles/qquickpointdirection.cpp
index cbf526598a..8e0ff744b9 100644
--- a/src/quick/particles/qquickpointdirection.cpp
+++ b/src/quick/particles/qquickpointdirection.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickpointdirection_p.h b/src/quick/particles/qquickpointdirection_p.h
index 71237d31ff..a7478d4cf0 100644
--- a/src/quick/particles/qquickpointdirection_p.h
+++ b/src/quick/particles/qquickpointdirection_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickrectangleextruder.cpp b/src/quick/particles/qquickrectangleextruder.cpp
index 22f989042f..03e6cead89 100644
--- a/src/quick/particles/qquickrectangleextruder.cpp
+++ b/src/quick/particles/qquickrectangleextruder.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickrectangleextruder_p.h b/src/quick/particles/qquickrectangleextruder_p.h
index 60fac132eb..886f1a510d 100644
--- a/src/quick/particles/qquickrectangleextruder_p.h
+++ b/src/quick/particles/qquickrectangleextruder_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickspritegoal.cpp b/src/quick/particles/qquickspritegoal.cpp
index f5ed82e0b8..b923b8450c 100644
--- a/src/quick/particles/qquickspritegoal.cpp
+++ b/src/quick/particles/qquickspritegoal.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickspritegoal_p.h b/src/quick/particles/qquickspritegoal_p.h
index a73d67b7fa..db8fbf460f 100644
--- a/src/quick/particles/qquickspritegoal_p.h
+++ b/src/quick/particles/qquickspritegoal_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquicktargetdirection.cpp b/src/quick/particles/qquicktargetdirection.cpp
index 1fb0d49644..5043563b40 100644
--- a/src/quick/particles/qquicktargetdirection.cpp
+++ b/src/quick/particles/qquicktargetdirection.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquicktargetdirection_p.h b/src/quick/particles/qquicktargetdirection_p.h
index bf80d12433..74bd162b33 100644
--- a/src/quick/particles/qquicktargetdirection_p.h
+++ b/src/quick/particles/qquicktargetdirection_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquicktrailemitter.cpp b/src/quick/particles/qquicktrailemitter.cpp
index 3ed6aa8543..31b05451b2 100644
--- a/src/quick/particles/qquicktrailemitter.cpp
+++ b/src/quick/particles/qquicktrailemitter.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquicktrailemitter_p.h b/src/quick/particles/qquicktrailemitter_p.h
index 22d8529ed0..cc5a0b8967 100644
--- a/src/quick/particles/qquicktrailemitter_p.h
+++ b/src/quick/particles/qquicktrailemitter_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickturbulence.cpp b/src/quick/particles/qquickturbulence.cpp
index 2ac53219ed..6674cd564d 100644
--- a/src/quick/particles/qquickturbulence.cpp
+++ b/src/quick/particles/qquickturbulence.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickturbulence_p.h b/src/quick/particles/qquickturbulence_p.h
index 59957ee896..f21fcd6242 100644
--- a/src/quick/particles/qquickturbulence_p.h
+++ b/src/quick/particles/qquickturbulence_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickv8particledata.cpp b/src/quick/particles/qquickv8particledata.cpp
index 870c3f254a..caf32b6fbc 100644
--- a/src/quick/particles/qquickv8particledata.cpp
+++ b/src/quick/particles/qquickv8particledata.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
@@ -411,6 +411,7 @@ FLOAT_GETTER_AND_SETTER(rotation)
FLOAT_GETTER_AND_SETTER(rotationSpeed)
FLOAT_GETTER_AND_SETTER(animIdx)
FLOAT_GETTER_AND_SETTER(frameDuration)
+FLOAT_GETTER_AND_SETTER(frameAt)
FLOAT_GETTER_AND_SETTER(frameCount)
FLOAT_GETTER_AND_SETTER(animT)
FLOAT_GETTER_AND_SETTER(r)
@@ -450,6 +451,7 @@ QV8ParticleDataDeletable::QV8ParticleDataDeletable(QV8Engine *engine)
REGISTER_ACCESSOR(ft, engine, autoRotate, autoRotate);
REGISTER_ACCESSOR(ft, engine, animIdx, animationIndex);
REGISTER_ACCESSOR(ft, engine, frameDuration, frameDuration);
+ REGISTER_ACCESSOR(ft, engine, frameAt, frameAt);
REGISTER_ACCESSOR(ft, engine, frameCount, frameCount);
REGISTER_ACCESSOR(ft, engine, animT, animationT);
REGISTER_ACCESSOR(ft, engine, r, r);
diff --git a/src/quick/particles/qquickv8particledata_p.h b/src/quick/particles/qquickv8particledata_p.h
index 176eb0d0d8..d61efadabe 100644
--- a/src/quick/particles/qquickv8particledata_p.h
+++ b/src/quick/particles/qquickv8particledata_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickwander.cpp b/src/quick/particles/qquickwander.cpp
index b36af8e39c..7f0c5d2cf2 100644
--- a/src/quick/particles/qquickwander.cpp
+++ b/src/quick/particles/qquickwander.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/particles/qquickwander_p.h b/src/quick/particles/qquickwander_p.h
index 0aa74cdb76..12952e91cc 100644
--- a/src/quick/particles/qquickwander_p.h
+++ b/src/quick/particles/qquickwander_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Declarative module of the Qt Toolkit.
**
diff --git a/src/quick/qtquick2.cpp b/src/quick/qtquick2.cpp
index 8614589557..8c855d5a4a 100644
--- a/src/quick/qtquick2.cpp
+++ b/src/quick/qtquick2.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -67,7 +67,7 @@ public:
virtual void updateBinding(QDeclarativeContext *context,
const QDeclarativeProperty &property,
const QVariant &expression, bool isLiteralValue,
- const QString &fileName, int line,
+ const QString &fileName, int line, int column,
bool *isBaseState);
virtual bool setBindingForInvalidProperty(QObject *object,
const QString &propertyName,
@@ -122,7 +122,7 @@ void QDeclarativeQtQuick2DebugStatesDelegate::buildStatesList(QObject *obj)
void QDeclarativeQtQuick2DebugStatesDelegate::updateBinding(QDeclarativeContext *context,
const QDeclarativeProperty &property,
const QVariant &expression, bool isLiteralValue,
- const QString &fileName, int line,
+ const QString &fileName, int line, int column,
bool *inBaseState)
{
QObject *object = property.object();
@@ -138,7 +138,7 @@ void QDeclarativeQtQuick2DebugStatesDelegate::updateBinding(QDeclarativeContext
newBinding = new QDeclarativeBinding(expression.toString(), object, context);
newBinding->setTarget(property);
newBinding->setNotifyOnValueChanged(true);
- newBinding->setSourceLocation(fileName, line);
+ newBinding->setSourceLocation(fileName, line, column);
}
state->changeBindingInRevertList(object, propertyName, newBinding);
diff --git a/src/quick/qtquick2_p.h b/src/quick/qtquick2_p.h
index 53fd4c1270..b88f845b43 100644
--- a/src/quick/qtquick2_p.h
+++ b/src/quick/qtquick2_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/qtquickglobal.h b/src/quick/qtquickglobal.h
index eb9428c3da..b80e1ed117 100644
--- a/src/quick/qtquickglobal.h
+++ b/src/quick/qtquickglobal.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -44,7 +44,7 @@
#include <QtCore/qglobal.h>
-#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_WIN)
# if defined(QT_MAKEDLL) /* create a Qt DLL library */
# if defined(QT_BUILD_QUICK_LIB)
# define Q_QUICK_EXPORT Q_DECL_EXPORT
diff --git a/src/quick/qtquickglobal_p.h b/src/quick/qtquickglobal_p.h
index 9e680fec24..d0387417b7 100644
--- a/src/quick/qtquickglobal_p.h
+++ b/src/quick/qtquickglobal_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/coreapi/qsgdefaultrenderer.cpp b/src/quick/scenegraph/coreapi/qsgdefaultrenderer.cpp
index 0bed1b8683..a7faf653fd 100644
--- a/src/quick/scenegraph/coreapi/qsgdefaultrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgdefaultrenderer.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/coreapi/qsgdefaultrenderer_p.h b/src/quick/scenegraph/coreapi/qsgdefaultrenderer_p.h
index 7bbac40f84..df7ae8ea36 100644
--- a/src/quick/scenegraph/coreapi/qsgdefaultrenderer_p.h
+++ b/src/quick/scenegraph/coreapi/qsgdefaultrenderer_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/coreapi/qsggeometry.cpp b/src/quick/scenegraph/coreapi/qsggeometry.cpp
index 311ee9b3fe..3de69ae2b8 100644
--- a/src/quick/scenegraph/coreapi/qsggeometry.cpp
+++ b/src/quick/scenegraph/coreapi/qsggeometry.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Qt scene graph research project.
**
diff --git a/src/quick/scenegraph/coreapi/qsggeometry.h b/src/quick/scenegraph/coreapi/qsggeometry.h
index 85f48814ed..3420b83e7d 100644
--- a/src/quick/scenegraph/coreapi/qsggeometry.h
+++ b/src/quick/scenegraph/coreapi/qsggeometry.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the Qt scene graph research project.
**
diff --git a/src/quick/scenegraph/coreapi/qsggeometry_p.h b/src/quick/scenegraph/coreapi/qsggeometry_p.h
index a7a1330d47..47cc0930d5 100644
--- a/src/quick/scenegraph/coreapi/qsggeometry_p.h
+++ b/src/quick/scenegraph/coreapi/qsggeometry_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/coreapi/qsgmaterial.cpp b/src/quick/scenegraph/coreapi/qsgmaterial.cpp
index 36b50e89b6..cabe425525 100644
--- a/src/quick/scenegraph/coreapi/qsgmaterial.cpp
+++ b/src/quick/scenegraph/coreapi/qsgmaterial.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -471,6 +471,12 @@ QSGMaterial::~QSGMaterial()
\value Blending Set this flag to true if the material requires GL_BLEND to be
enabled during rendering.
+
+ \value RequiresDeterminant Set this flag to true if the material relies on
+ the determinant of the matrix of the geometry nodes for rendering.
+
+ \value RequiresFullMatrix Set this flag to true if the material relies on
+ the full matrix of the geometry nodes for rendering.
*/
diff --git a/src/quick/scenegraph/coreapi/qsgmaterial.h b/src/quick/scenegraph/coreapi/qsgmaterial.h
index d8411b4d88..6c4108c19e 100644
--- a/src/quick/scenegraph/coreapi/qsgmaterial.h
+++ b/src/quick/scenegraph/coreapi/qsgmaterial.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -113,7 +113,9 @@ class Q_QUICK_EXPORT QSGMaterial
{
public:
enum Flag {
- Blending = 0x0001
+ Blending = 0x0001,
+ RequiresDeterminant = 0x0002,
+ RequiresFullMatrix = 0x0004 | RequiresDeterminant
};
Q_DECLARE_FLAGS(Flags, Flag)
diff --git a/src/quick/scenegraph/coreapi/qsgnode.cpp b/src/quick/scenegraph/coreapi/qsgnode.cpp
index bc83a81b48..fe0e637e1a 100644
--- a/src/quick/scenegraph/coreapi/qsgnode.cpp
+++ b/src/quick/scenegraph/coreapi/qsgnode.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/coreapi/qsgnode.h b/src/quick/scenegraph/coreapi/qsgnode.h
index 54e50e48be..d8dc87112b 100644
--- a/src/quick/scenegraph/coreapi/qsgnode.h
+++ b/src/quick/scenegraph/coreapi/qsgnode.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/coreapi/qsgnodeupdater.cpp b/src/quick/scenegraph/coreapi/qsgnodeupdater.cpp
index c5fa656c71..1c50a4aa30 100644
--- a/src/quick/scenegraph/coreapi/qsgnodeupdater.cpp
+++ b/src/quick/scenegraph/coreapi/qsgnodeupdater.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -97,15 +97,13 @@ void QSGNodeUpdater::updateStates(QSGNode *n)
bool QSGNodeUpdater::isNodeBlocked(QSGNode *node, QSGNode *root) const
{
qreal opacity = 1;
- while (node != root) {
+ while (node != root && node != 0) {
if (node->type() == QSGNode::OpacityNodeType) {
opacity *= static_cast<QSGOpacityNode *>(node)->opacity();
if (opacity < 0.001)
return true;
}
node = node->parent();
-
- Q_ASSERT_X(node, "QSGNodeUpdater::isNodeBlocked", "node is not in the subtree of root");
}
return false;
diff --git a/src/quick/scenegraph/coreapi/qsgnodeupdater_p.h b/src/quick/scenegraph/coreapi/qsgnodeupdater_p.h
index 446bdefdc5..ad0da66420 100644
--- a/src/quick/scenegraph/coreapi/qsgnodeupdater_p.h
+++ b/src/quick/scenegraph/coreapi/qsgnodeupdater_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/coreapi/qsgrenderer.cpp b/src/quick/scenegraph/coreapi/qsgrenderer.cpp
index a7aac5f42c..317deee0c5 100644
--- a/src/quick/scenegraph/coreapi/qsgrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgrenderer.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/coreapi/qsgrenderer_p.h b/src/quick/scenegraph/coreapi/qsgrenderer_p.h
index 5217bee205..4fde0e26c8 100644
--- a/src/quick/scenegraph/coreapi/qsgrenderer_p.h
+++ b/src/quick/scenegraph/coreapi/qsgrenderer_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/qsgadaptationlayer.cpp b/src/quick/scenegraph/qsgadaptationlayer.cpp
index 73ac81fd5b..574c1218bb 100644
--- a/src/quick/scenegraph/qsgadaptationlayer.cpp
+++ b/src/quick/scenegraph/qsgadaptationlayer.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -267,6 +267,21 @@ void QSGDistanceFieldGlyphCache::setGlyphsPosition(const QList<GlyphPosition> &g
}
}
+void QSGDistanceFieldGlyphCache::registerOwnerElement(QQuickItem *ownerElement)
+{
+ Q_UNUSED(ownerElement);
+}
+
+void QSGDistanceFieldGlyphCache::unregisterOwnerElement(QQuickItem *ownerElement)
+{
+ Q_UNUSED(ownerElement);
+}
+
+void QSGDistanceFieldGlyphCache::processPendingGlyphs()
+{
+ /* Intentionally empty */
+}
+
void QSGDistanceFieldGlyphCache::setGlyphsTexture(const QVector<glyph_t> &glyphs, const Texture &tex)
{
int i = m_cacheData->textures.indexOf(tex);
diff --git a/src/quick/scenegraph/qsgadaptationlayer_p.h b/src/quick/scenegraph/qsgadaptationlayer_p.h
index c4851c326b..2d82ca30ba 100644
--- a/src/quick/scenegraph/qsgadaptationlayer_p.h
+++ b/src/quick/scenegraph/qsgadaptationlayer_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -110,6 +110,8 @@ public:
HighQualitySubPixelAntialiasing
};
+ QSGGlyphNode() : m_ownerElement(0) {}
+
virtual void setGlyphs(const QPointF &position, const QGlyphRun &glyphs) = 0;
virtual void setColor(const QColor &color) = 0;
virtual void setStyle(QQuickText::TextStyle style) = 0;
@@ -123,8 +125,12 @@ public:
virtual void update() = 0;
+ void setOwnerElement(QQuickItem *ownerElement) { m_ownerElement = ownerElement; }
+ QQuickItem *ownerElement() const { return m_ownerElement; }
+
protected:
QRectF m_bounding_rect;
+ QQuickItem *m_ownerElement;
};
class Q_QUICK_EXPORT QSGDistanceFieldGlyphCache
@@ -185,6 +191,10 @@ public:
void registerGlyphNode(QSGDistanceFieldGlyphNode *node);
void unregisterGlyphNode(QSGDistanceFieldGlyphNode *node);
+ virtual void registerOwnerElement(QQuickItem *ownerElement);
+ virtual void unregisterOwnerElement(QQuickItem *ownerElement);
+ virtual void processPendingGlyphs();
+
protected:
struct GlyphPosition {
glyph_t glyph;
@@ -204,6 +214,7 @@ protected:
void updateTexture(GLuint oldTex, GLuint newTex, const QSize &newTexSize);
bool containsGlyph(glyph_t glyph) const;
+ GLuint textureIdForGlyph(glyph_t glyph) const;
QOpenGLContext *ctx;
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index cad2cb09c8..834f336394 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -47,6 +47,8 @@
#include <QtQuick/private/qsgdefaultimagenode_p.h>
#include <QtQuick/private/qsgdefaultglyphnode_p.h>
#include <QtQuick/private/qsgdistancefieldglyphnode_p.h>
+#include <QtQuick/private/qsgshareddistancefieldglyphcache_p.h>
+
#include <QtQuick/private/qsgtexture_p.h>
#include <QtQuick/private/qdeclarativepixmapcache_p.h>
@@ -56,6 +58,11 @@
#include <QDeclarativeImageProvider>
#include <private/qdeclarativeglobal_p.h>
+#include <QtQuick/private/qsgtexture_p.h>
+#include <QtGui/private/qguiapplication_p.h>
+
+#include <QtGui/qplatformsharedgraphicscache_qpa.h>
+
#include <private/qobject_p.h>
#include <qmutex.h>
@@ -247,6 +254,35 @@ QSGImageNode *QSGContext::createImageNode()
QSGDistanceFieldGlyphCache *QSGContext::createDistanceFieldGlyphCache(const QRawFont &font)
{
Q_D(QSGContext);
+
+ QPlatformIntegration *platformIntegration = QGuiApplicationPrivate::platformIntegration();
+ if (platformIntegration != 0
+ && platformIntegration->hasCapability(QPlatformIntegration::SharedGraphicsCache)) {
+ QFontEngine *fe = QRawFontPrivate::get(font)->fontEngine;
+ if (!fe->faceId().filename.isEmpty()) {
+ QByteArray keyName = fe->faceId().filename;
+ if (font.style() != QFont::StyleNormal)
+ keyName += QByteArray(" I");
+ if (font.weight() != QFont::Normal)
+ keyName += " " + QByteArray::number(font.weight());
+ keyName += QByteArray(" DF");
+ QPlatformSharedGraphicsCache *sharedGraphicsCache =
+ platformIntegration->createPlatformSharedGraphicsCache(keyName);
+
+ if (sharedGraphicsCache != 0) {
+ sharedGraphicsCache->ensureCacheInitialized(keyName,
+ QPlatformSharedGraphicsCache::OpenGLTexture,
+ QPlatformSharedGraphicsCache::Alpha8);
+
+ return new QSGSharedDistanceFieldGlyphCache(keyName,
+ sharedGraphicsCache,
+ d->distanceFieldCacheManager,
+ glContext(),
+ font);
+ }
+ }
+ }
+
return new QSGDefaultDistanceFieldGlyphCache(d->distanceFieldCacheManager, glContext(), font);
}
diff --git a/src/quick/scenegraph/qsgcontext_p.h b/src/quick/scenegraph/qsgcontext_p.h
index ea1db19e29..cc7060f553 100644
--- a/src/quick/scenegraph/qsgcontext_p.h
+++ b/src/quick/scenegraph/qsgcontext_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -56,7 +56,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QSGContextPrivate;
class QSGRectangleNode;
diff --git a/src/quick/scenegraph/qsgcontextplugin.cpp b/src/quick/scenegraph/qsgcontextplugin.cpp
index 6bf6ac90e7..7467448dbd 100644
--- a/src/quick/scenegraph/qsgcontextplugin.cpp
+++ b/src/quick/scenegraph/qsgcontextplugin.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/qsgcontextplugin_p.h b/src/quick/scenegraph/qsgcontextplugin_p.h
index 21924c90ac..6cd689e1bd 100644
--- a/src/quick/scenegraph/qsgcontextplugin_p.h
+++ b/src/quick/scenegraph/qsgcontextplugin_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp
index 57a9a8741c..0227791d72 100644
--- a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp
+++ b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h
index 06f9283bcc..b701f2ef3d 100644
--- a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h
+++ b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/qsgdefaultglyphnode.cpp b/src/quick/scenegraph/qsgdefaultglyphnode.cpp
index f41fbe486a..7ad8b0590c 100644
--- a/src/quick/scenegraph/qsgdefaultglyphnode.cpp
+++ b/src/quick/scenegraph/qsgdefaultglyphnode.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
index 36efe9b570..d99ea2bfba 100644
--- a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
+++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -195,7 +195,7 @@ void QSGTextMaskMaterial::populate(const QPointF &p,
fixedPointPositions.data());
cache->fillInPendingGlyphs();
- int margin = cache->glyphMargin();
+ int margin = fontD->fontEngine->glyphMargin(cache->cacheType());
Q_ASSERT(geometry->indexType() == GL_UNSIGNED_SHORT);
geometry->allocate(glyphIndexes.size() * 4, glyphIndexes.size() * 6);
diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.h b/src/quick/scenegraph/qsgdefaultglyphnode_p.h
index cc14d33a30..307deaaa15 100644
--- a/src/quick/scenegraph/qsgdefaultglyphnode_p.h
+++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h b/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h
index 2378178a1b..2da3434a44 100644
--- a/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h
+++ b/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/qsgdefaultimagenode.cpp b/src/quick/scenegraph/qsgdefaultimagenode.cpp
index 072a309206..e7c8502302 100644
--- a/src/quick/scenegraph/qsgdefaultimagenode.cpp
+++ b/src/quick/scenegraph/qsgdefaultimagenode.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/qsgdefaultimagenode_p.h b/src/quick/scenegraph/qsgdefaultimagenode_p.h
index f1b416d69c..6bc102bae9 100644
--- a/src/quick/scenegraph/qsgdefaultimagenode_p.h
+++ b/src/quick/scenegraph/qsgdefaultimagenode_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/qsgdefaultrectanglenode.cpp b/src/quick/scenegraph/qsgdefaultrectanglenode.cpp
index bb89b4a9f8..d633ad7652 100644
--- a/src/quick/scenegraph/qsgdefaultrectanglenode.cpp
+++ b/src/quick/scenegraph/qsgdefaultrectanglenode.cpp
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/qsgdefaultrectanglenode_p.h b/src/quick/scenegraph/qsgdefaultrectanglenode_p.h
index b491913428..a6d787c840 100644
--- a/src/quick/scenegraph/qsgdefaultrectanglenode_p.h
+++ b/src/quick/scenegraph/qsgdefaultrectanglenode_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp b/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp
index f192573624..eb1c1eb22d 100644
--- a/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp
+++ b/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -57,10 +57,10 @@ QSGDistanceFieldGlyphNode::QSGDistanceFieldGlyphNode(QSGDistanceFieldGlyphCacheM
, m_dirtyGeometry(false)
, m_dirtyMaterial(false)
{
- setFlag(UsePreprocess);
m_geometry.setDrawingMode(GL_TRIANGLES);
setGeometry(&m_geometry);
setPreferredAntialiasingMode(cacheManager->defaultAntialiasingMode());
+ setFlag(UsePreprocess);
#ifdef QML_RUNTIME_TESTING
description = QLatin1String("glyphs");
#endif
@@ -112,9 +112,13 @@ void QSGDistanceFieldGlyphNode::setGlyphs(const QPointF &position, const QGlyphR
QSGDistanceFieldGlyphCache *oldCache = m_glyph_cache;
m_glyph_cache = m_glyph_cacheManager->cache(m_glyphs.rawFont());
if (m_glyph_cache != oldCache) {
- if (oldCache)
+ Q_ASSERT(ownerElement() != 0);
+ if (oldCache) {
oldCache->unregisterGlyphNode(this);
+ oldCache->unregisterOwnerElement(ownerElement());
+ }
m_glyph_cache->registerGlyphNode(this);
+ m_glyph_cache->registerOwnerElement(ownerElement());
}
m_glyph_cache->populate(glyphs.glyphIndexes());
@@ -158,12 +162,13 @@ void QSGDistanceFieldGlyphNode::preprocess()
{
Q_ASSERT(m_glyph_cache);
- m_glyph_cache->update();
-
for (int i = 0; i < m_nodesToDelete.count(); ++i)
delete m_nodesToDelete.at(i);
m_nodesToDelete.clear();
+ m_glyph_cache->processPendingGlyphs();
+ m_glyph_cache->update();
+
if (m_dirtyGeometry)
updateGeometry();
}
@@ -285,6 +290,7 @@ void QSGDistanceFieldGlyphNode::updateGeometry()
QHash<const QSGDistanceFieldGlyphCache::Texture *, QSGDistanceFieldGlyphNode *>::iterator subIt = m_subNodes.find(ite.key());
if (subIt == m_subNodes.end()) {
QSGDistanceFieldGlyphNode *subNode = new QSGDistanceFieldGlyphNode(m_glyph_cacheManager);
+ subNode->setOwnerElement(m_ownerElement);
subNode->setColor(m_color);
subNode->setStyle(m_style);
subNode->setStyleColor(m_styleColor);
diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp
index 938fe9b42d..6a220c9fe5 100644
--- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp
+++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -90,8 +90,8 @@ const char *QSGDistanceFieldTextMaterialShader::fragmentShader() const {
"varying highp vec2 sampleCoord; \n"
"uniform sampler2D texture; \n"
"uniform lowp vec4 color; \n"
- "uniform lowp float alphaMin; \n"
- "uniform lowp float alphaMax; \n"
+ "uniform mediump float alphaMin; \n"
+ "uniform mediump float alphaMax; \n"
"void main() { \n"
" gl_FragColor = color * smoothstep(alphaMin, \n"
" alphaMax, \n"
@@ -189,7 +189,7 @@ QSGDistanceFieldTextMaterial::QSGDistanceFieldTextMaterial()
: m_glyph_cache(0)
, m_texture(0)
{
- setFlag(Blending, true);
+ setFlag(Blending | RequiresDeterminant, true);
}
QSGDistanceFieldTextMaterial::~QSGDistanceFieldTextMaterial()
@@ -324,10 +324,10 @@ const char *DistanceFieldOutlineTextMaterialShader::fragmentShader() const {
"uniform sampler2D texture; \n"
"uniform lowp vec4 color; \n"
"uniform lowp vec4 styleColor; \n"
- "uniform lowp float alphaMin; \n"
- "uniform lowp float alphaMax; \n"
- "uniform lowp float outlineAlphaMax0; \n"
- "uniform lowp float outlineAlphaMax1; \n"
+ "uniform mediump float alphaMin; \n"
+ "uniform mediump float alphaMax; \n"
+ "uniform mediump float outlineAlphaMax0; \n"
+ "uniform mediump float outlineAlphaMax1; \n"
"void main() { \n"
" mediump float d = texture2D(texture, sampleCoord).a; \n"
" gl_FragColor = mix(styleColor, color, smoothstep(alphaMin, alphaMax, d)) \n"
@@ -468,8 +468,8 @@ const char *DistanceFieldShiftedStyleTextMaterialShader::fragmentShader() const
"uniform sampler2D texture; \n"
"uniform lowp vec4 color; \n"
"uniform lowp vec4 styleColor; \n"
- "uniform lowp float alphaMin; \n"
- "uniform lowp float alphaMax; \n"
+ "uniform mediump float alphaMin; \n"
+ "uniform mediump float alphaMax; \n"
"void main() { \n"
" highp float a = smoothstep(alphaMin, alphaMax, texture2D(texture, sampleCoord).a);\n"
" highp vec4 shifted = styleColor * smoothstep(alphaMin, \n"
@@ -558,8 +558,8 @@ const char *QSGHiQSubPixelDistanceFieldTextMaterialShader::fragmentShader() cons
"varying highp vec3 sampleFarRight; \n"
"uniform sampler2D texture; \n"
"uniform lowp vec4 color; \n"
- "uniform lowp float alphaMin; \n"
- "uniform lowp float alphaMax; \n"
+ "uniform mediump float alphaMin; \n"
+ "uniform mediump float alphaMax; \n"
"void main() { \n"
" highp vec4 n; \n"
" n.x = texture2DProj(texture, sampleFarLeft).a; \n"
@@ -697,8 +697,8 @@ const char *QSGLoQSubPixelDistanceFieldTextMaterialShader::fragmentShader() cons
"varying highp vec3 sampleNearRight; \n"
"uniform sampler2D texture; \n"
"uniform lowp vec4 color; \n"
- "uniform lowp float alphaMin; \n"
- "uniform lowp float alphaMax; \n"
+ "uniform mediump float alphaMin; \n"
+ "uniform mediump float alphaMax; \n"
"void main() { \n"
" highp vec2 n; \n"
" n.x = texture2DProj(texture, sampleNearLeft).a; \n"
diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h
index 79b40ddf3e..a58e0b1eb4 100644
--- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h
+++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -69,7 +69,6 @@ public:
virtual void setStyleColor(const QColor &color);
virtual void update();
-
void preprocess();
void invalidateGlyphs(const QVector<quint32> &glyphs);
diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h b/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h
index d71cc48196..2bffb1ecb6 100644
--- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h
+++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/qsgflashnode.cpp b/src/quick/scenegraph/qsgflashnode.cpp
index 9546e91ee1..92c705cb28 100644
--- a/src/quick/scenegraph/qsgflashnode.cpp
+++ b/src/quick/scenegraph/qsgflashnode.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/qsgflashnode_p.h b/src/quick/scenegraph/qsgflashnode_p.h
index 71ac22d648..0029146503 100644
--- a/src/quick/scenegraph/qsgflashnode_p.h
+++ b/src/quick/scenegraph/qsgflashnode_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/qsgpathsimplifier.cpp b/src/quick/scenegraph/qsgpathsimplifier.cpp
index 4b9f401786..79cd7a290b 100644
--- a/src/quick/scenegraph/qsgpathsimplifier.cpp
+++ b/src/quick/scenegraph/qsgpathsimplifier.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/qsgpathsimplifier_p.h b/src/quick/scenegraph/qsgpathsimplifier_p.h
index 0639c4f622..e3d2e769eb 100644
--- a/src/quick/scenegraph/qsgpathsimplifier_p.h
+++ b/src/quick/scenegraph/qsgpathsimplifier_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/qsgshareddistancefieldglyphcache.cpp b/src/quick/scenegraph/qsgshareddistancefieldglyphcache.cpp
new file mode 100644
index 0000000000..841322e58b
--- /dev/null
+++ b/src/quick/scenegraph/qsgshareddistancefieldglyphcache.cpp
@@ -0,0 +1,621 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#define EGL_EGLEXT_PROTOTYPES
+#define GL_GLEXT_PROTOTYPES
+#if defined(QSGSHAREDDISTANCEFIELDGLYPHCACHE_DEBUG)
+#include <GLES2/gl2.h>
+#include <GLES2/gl2ext.h>
+#endif
+
+#include "qsgshareddistancefieldglyphcache_p.h"
+
+#include <QtCore/qhash.h>
+#include <QtCore/qthread.h>
+#include <QtGui/qplatformsharedgraphicscache_qpa.h>
+
+#include <QtQuick/qquickcanvas.h>
+
+#include <QtOpenGL/qglframebufferobject.h>
+
+// #define QSGSHAREDDISTANCEFIELDGLYPHCACHE_DEBUG
+
+Q_DECLARE_METATYPE(QVector<quint32>)
+Q_DECLARE_METATYPE(QVector<QImage>)
+
+QT_BEGIN_NAMESPACE
+
+QSGSharedDistanceFieldGlyphCache::QSGSharedDistanceFieldGlyphCache(const QByteArray &cacheId,
+ QPlatformSharedGraphicsCache *sharedGraphicsCache,
+ QSGDistanceFieldGlyphCacheManager *man,
+ QOpenGLContext *c,
+ const QRawFont &font)
+ : QSGDistanceFieldGlyphCache(man, c, font)
+ , m_cacheId(cacheId)
+ , m_sharedGraphicsCache(sharedGraphicsCache)
+{
+#if defined(QSGSHAREDDISTANCEFIELDGLYPHCACHE_DEBUG)
+ qDebug("QSGSharedDistanceFieldGlyphCache with id %s created in thread %p",
+ cacheId.constData(), QThread::currentThreadId());
+#endif
+
+ Q_ASSERT(sizeof(glyph_t) == sizeof(quint32));
+ Q_ASSERT(sharedGraphicsCache != 0);
+
+ qRegisterMetaType<QVector<quint32> >();
+ qRegisterMetaType<QVector<QImage> >();
+
+ connect(sharedGraphicsCache, SIGNAL(itemsMissing(QByteArray,QVector<quint32>)),
+ this, SLOT(reportItemsMissing(QByteArray,QVector<quint32>)),
+ Qt::DirectConnection);
+ connect(sharedGraphicsCache, SIGNAL(itemsAvailable(QByteArray,void*,QSize,QVector<quint32>,QVector<QPoint>)),
+ this, SLOT(reportItemsAvailable(QByteArray,void*,QSize,QVector<quint32>,QVector<QPoint>)),
+ Qt::DirectConnection);
+ connect(sharedGraphicsCache, SIGNAL(itemsUpdated(QByteArray,void*,QSize,QVector<quint32>,QVector<QPoint>)),
+ this, SLOT(reportItemsAvailable(QByteArray,void*,QSize,QVector<quint32>,QVector<QPoint>)),
+ Qt::DirectConnection);
+ connect(sharedGraphicsCache, SIGNAL(itemsInvalidated(QByteArray,QVector<quint32>)),
+ this, SLOT(reportItemsInvalidated(QByteArray,QVector<quint32>)),
+ Qt::DirectConnection);
+}
+
+QSGSharedDistanceFieldGlyphCache::~QSGSharedDistanceFieldGlyphCache()
+{
+ {
+ QHash<glyph_t, void *>::const_iterator it = m_bufferForGlyph.constBegin();
+ while (it != m_bufferForGlyph.constEnd()) {
+ m_sharedGraphicsCache->dereferenceBuffer(it.value());
+ ++it;
+ }
+ }
+
+ {
+ QHash<quint32, PendingGlyph>::const_iterator it = m_pendingReadyGlyphs.constBegin();
+ while (it != m_pendingReadyGlyphs.constEnd()) {
+ m_sharedGraphicsCache->dereferenceBuffer(it.value().buffer);
+ ++it;
+ }
+ }
+}
+
+void QSGSharedDistanceFieldGlyphCache::requestGlyphs(const QSet<glyph_t> &glyphs)
+{
+ QMutexLocker locker(&m_pendingGlyphsMutex);
+
+#if defined(QSGSHAREDDISTANCEFIELDGLYPHCACHE_DEBUG)
+ qDebug("QSGSharedDistanceFieldGlyphCache::requestGlyphs() called for %s (%d glyphs)",
+ m_cacheId.constData(), glyphs.size());
+#endif
+
+ m_requestedGlyphsThatHaveNotBeenReturned.unite(glyphs);
+
+ QVector<quint32> glyphsVector;
+ glyphsVector.reserve(glyphs.size());
+
+ QSet<glyph_t>::const_iterator it;
+ for (it = glyphs.constBegin(); it != glyphs.constEnd(); ++it) {
+ Q_ASSERT(!m_bufferForGlyph.contains(*it));
+ glyphsVector.append(*it);
+ }
+
+ // Invoke method on queued connection to make sure it's called asynchronously on the
+ // correct thread (requestGlyphs() is called from the rendering thread.)
+ QMetaObject::invokeMethod(m_sharedGraphicsCache, "requestItems", Qt::QueuedConnection,
+ Q_ARG(QByteArray, m_cacheId),
+ Q_ARG(QVector<quint32>, glyphsVector));
+}
+
+void QSGSharedDistanceFieldGlyphCache::waitForGlyphs()
+{
+ {
+ QMutexLocker locker(&m_pendingGlyphsMutex);
+ while (!m_requestedGlyphsThatHaveNotBeenReturned.isEmpty())
+ m_pendingGlyphsCondition.wait(&m_pendingGlyphsMutex);
+ }
+}
+
+void QSGSharedDistanceFieldGlyphCache::storeGlyphs(const QHash<glyph_t, QImage> &glyphs)
+{
+ {
+ QMutexLocker locker(&m_pendingGlyphsMutex);
+#if defined(QSGSHAREDDISTANCEFIELDGLYPHCACHE_DEBUG)
+ qDebug("QSGSharedDistanceFieldGlyphCache::storeGlyphs() called for %s (%d glyphs)",
+ m_cacheId.constData(), glyphs.size());
+#endif
+
+ int glyphCount = glyphs.size();
+ QVector<quint32> glyphIds(glyphCount);
+ QVector<QImage> images(glyphCount);
+ QHash<glyph_t, QImage>::const_iterator it = glyphs.constBegin();
+ int i=0;
+ while (it != glyphs.constEnd()) {
+ m_requestedGlyphsThatHaveNotBeenReturned.insert(it.key());
+ glyphIds[i] = it.key();
+ images[i] = it.value();
+
+ ++it; ++i;
+ }
+
+ QMetaObject::invokeMethod(m_sharedGraphicsCache, "insertItems", Qt::QueuedConnection,
+ Q_ARG(QByteArray, m_cacheId),
+ Q_ARG(QVector<quint32>, glyphIds),
+ Q_ARG(QVector<QImage>, images));
+ }
+
+ processPendingGlyphs();
+}
+
+void QSGSharedDistanceFieldGlyphCache::referenceGlyphs(const QSet<glyph_t> &glyphs)
+{
+ Q_UNUSED(glyphs);
+
+ // Intentionally empty. Not required in this implementation, since the glyphs are reference
+ // counted outside and releaseGlyphs() will only be called when there are no more references.
+}
+
+void QSGSharedDistanceFieldGlyphCache::releaseGlyphs(const QSet<glyph_t> &glyphs)
+{
+#if defined(QSGSHAREDDISTANCEFIELDGLYPHCACHE_DEBUG)
+ qDebug("QSGSharedDistanceFieldGlyphCache::releaseGlyphs() called for %s (%d glyphs)",
+ m_cacheId.constData(), glyphs.size());
+#endif
+
+ QVector<quint32> glyphsVector;
+ glyphsVector.reserve(glyphs.size());
+
+ QSet<glyph_t>::const_iterator glyphsIt;
+ for (glyphsIt = glyphs.constBegin(); glyphsIt != glyphs.constEnd(); ++glyphsIt) {
+ QHash<glyph_t, void *>::iterator bufferIt = m_bufferForGlyph.find(*glyphsIt);
+ if (bufferIt != m_bufferForGlyph.end()) {
+ void *buffer = bufferIt.value();
+ removeGlyph(*glyphsIt);
+ m_bufferForGlyph.erase(bufferIt);
+ Q_ASSERT(!m_bufferForGlyph.contains(*glyphsIt));
+
+ if (!m_sharedGraphicsCache->dereferenceBuffer(buffer)) {
+#if !defined(QT_NO_DEBUG)
+ bufferIt = m_bufferForGlyph.begin();
+ while (bufferIt != m_bufferForGlyph.end()) {
+ Q_ASSERT(bufferIt.value() != buffer);
+ ++bufferIt;
+ }
+#endif
+ }
+ }
+
+ glyphsVector.append(*glyphsIt);
+ }
+
+ QMetaObject::invokeMethod(m_sharedGraphicsCache, "releaseItems", Qt::QueuedConnection,
+ Q_ARG(QByteArray, m_cacheId),
+ Q_ARG(QVector<quint32>, glyphsVector));
+}
+
+void QSGSharedDistanceFieldGlyphCache::registerOwnerElement(QQuickItem *ownerElement)
+{
+ bool ok = connect(this, SIGNAL(glyphsPending()), ownerElement, SLOT(triggerPreprocess()));
+ Q_ASSERT_X(ok, Q_FUNC_INFO, "QML element that owns a glyph node must have triggerPreprocess() slot");
+ Q_UNUSED(ok);
+}
+
+void QSGSharedDistanceFieldGlyphCache::unregisterOwnerElement(QQuickItem *ownerElement)
+{
+ disconnect(this, SIGNAL(glyphsPending()), ownerElement, SLOT(triggerPreprocess()));
+}
+
+#if defined(QSGSHAREDDISTANCEFIELDGLYPHCACHE_DEBUG_)
+# include <QtOpenGL/private/qglextensions_p.h>
+
+void QSGSharedDistanceFieldGlyphCache::saveTexture(GLuint textureId, int width, int height)
+{
+ GLuint fboId;
+ glGenFramebuffers(1, &fboId);
+
+ GLuint tmpTexture = 0;
+ glGenTextures(1, &tmpTexture);
+ glBindTexture(GL_TEXTURE_2D, tmpTexture);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glBindTexture(GL_TEXTURE_2D, 0);
+
+ glBindFramebuffer(GL_FRAMEBUFFER_EXT, fboId);
+ glFramebufferTexture2D(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D,
+ tmpTexture, 0);
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, textureId);
+
+ glDisable(GL_STENCIL_TEST);
+ glDisable(GL_DEPTH_TEST);
+ glDisable(GL_SCISSOR_TEST);
+ glDisable(GL_BLEND);
+
+ GLfloat textureCoordinateArray[8];
+ textureCoordinateArray[0] = 0.0f;
+ textureCoordinateArray[1] = 0.0f;
+ textureCoordinateArray[2] = 1.0f;
+ textureCoordinateArray[3] = 0.0f;
+ textureCoordinateArray[4] = 1.0f;
+ textureCoordinateArray[5] = 1.0f;
+ textureCoordinateArray[6] = 0.0f;
+ textureCoordinateArray[7] = 1.0f;
+
+ GLfloat vertexCoordinateArray[8];
+ vertexCoordinateArray[0] = -1.0f;
+ vertexCoordinateArray[1] = -1.0f;
+ vertexCoordinateArray[2] = 1.0f;
+ vertexCoordinateArray[3] = -1.0f;
+ vertexCoordinateArray[4] = 1.0f;
+ vertexCoordinateArray[5] = 1.0f;
+ vertexCoordinateArray[6] = -1.0f;
+ vertexCoordinateArray[7] = 1.0f;
+
+ glViewport(0, 0, width, height);
+ glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, vertexCoordinateArray);
+ glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 0, textureCoordinateArray);
+
+ {
+ static const char *vertexShaderSource =
+ "attribute highp vec4 vertexCoordsArray; \n"
+ "attribute highp vec2 textureCoordArray; \n"
+ "varying highp vec2 textureCoords; \n"
+ "void main(void) \n"
+ "{ \n"
+ " gl_Position = vertexCoordsArray; \n"
+ " textureCoords = textureCoordArray; \n"
+ "} \n";
+
+ static const char *fragmentShaderSource =
+ "varying highp vec2 textureCoords; \n"
+ "uniform sampler2D texture; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = texture2D(texture, textureCoords); \n"
+ "} \n";
+
+ GLuint vertexShader = glCreateShader(GL_VERTEX_SHADER);
+ GLuint fragmentShader = glCreateShader(GL_FRAGMENT_SHADER);
+
+ if (vertexShader == 0 || fragmentShader == 0) {
+ GLenum error = glGetError();
+ qWarning("SharedGraphicsCacheServer::setupShaderPrograms: Failed to create shaders. (GL error: %x)",
+ error);
+ return;
+ }
+
+ glShaderSource(vertexShader, 1, &vertexShaderSource, NULL);
+ glShaderSource(fragmentShader, 1, &fragmentShaderSource, NULL);
+ glCompileShader(vertexShader);
+
+ GLint len = 1;
+ glGetShaderiv(vertexShader, GL_INFO_LOG_LENGTH, &len);
+
+ char infoLog[2048];
+ glGetShaderInfoLog(vertexShader, 2048, NULL, infoLog);
+ if (qstrlen(infoLog) > 0) {
+ qWarning("SharedGraphicsCacheServer::setupShaderPrograms, problems compiling vertex shader:\n %s",
+ infoLog);
+ //return;
+ }
+
+ glCompileShader(fragmentShader);
+ glGetShaderInfoLog(fragmentShader, 2048, NULL, infoLog);
+ if (qstrlen(infoLog) > 0) {
+ qWarning("SharedGraphicsCacheServer::setupShaderPrograms, problems compiling fragent shader:\n %s",
+ infoLog);
+ //return;
+ }
+
+ GLuint shaderProgram = glCreateProgram();
+ glAttachShader(shaderProgram, vertexShader);
+ glAttachShader(shaderProgram, fragmentShader);
+
+ glBindAttribLocation(shaderProgram, 0, "vertexCoordsArray");
+ glBindAttribLocation(shaderProgram, 1, "textureCoordArray");
+
+ glLinkProgram(shaderProgram);
+ glGetProgramInfoLog(shaderProgram, 2048, NULL, infoLog);
+ if (qstrlen(infoLog) > 0) {
+ qWarning("SharedGraphicsCacheServer::setupShaderPrograms, problems linking shaders:\n %s",
+ infoLog);
+ //return;
+ }
+
+ glUseProgram(shaderProgram);
+ glEnableVertexAttribArray(0);
+ glEnableVertexAttribArray(1);
+
+ int textureUniformLocation = glGetUniformLocation(shaderProgram, "texture");
+ glUniform1i(textureUniformLocation, 0);
+ }
+
+ glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+
+ {
+ GLenum error = glGetError();
+ if (error != GL_NO_ERROR) {
+ qWarning("SharedGraphicsCacheServer::readBackBuffer: glDrawArrays reported error 0x%x",
+ error);
+ }
+ }
+
+ uchar *data = new uchar[width * height * 4];
+
+ glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data);
+
+ QImage image(width, height, QImage::Format_ARGB32);
+ quint32 *dest = reinterpret_cast<quint32 *>(image.bits());
+ for (int i=0; i<width*height; ++i)
+ dest[i] = qRgba(0xff, 0xff, 0xff, data[i]);
+
+ QByteArray fileName = m_cacheId + " " + QByteArray::number(textureId);
+ fileName = fileName.replace('/', '_').replace(' ', '_') + ".png";
+ image.save(QString::fromLocal8Bit(fileName));
+
+ {
+ GLenum error = glGetError();
+ if (error != GL_NO_ERROR) {
+ qWarning("SharedGraphicsCacheServer::readBackBuffer: glReadPixels reported error 0x%x",
+ error);
+ }
+ }
+
+ glDisableVertexAttribArray(0);
+ glDisableVertexAttribArray(1);
+
+ glDeleteFramebuffers(1, &fboId);
+ glDeleteTextures(1, &tmpTexture);
+
+ delete[] data;
+}
+#endif
+
+namespace {
+ struct TextureContent {
+ QSize size;
+ QVector<glyph_t> glyphs;
+ };
+}
+
+void QSGSharedDistanceFieldGlyphCache::processPendingGlyphs()
+{
+ Q_ASSERT(QThread::currentThread() == thread());
+
+ waitForGlyphs();
+
+ {
+ QMutexLocker locker(&m_pendingGlyphsMutex);
+ if (m_pendingMissingGlyphs.isEmpty()
+ && m_pendingReadyGlyphs.isEmpty()
+ && m_pendingInvalidatedGlyphs.isEmpty()) {
+ return;
+ }
+
+ {
+ QVector<glyph_t> pendingMissingGlyphs;
+ pendingMissingGlyphs.reserve(m_pendingMissingGlyphs.size());
+
+ QSet<glyph_t>::const_iterator it = m_pendingMissingGlyphs.constBegin();
+ while (it != m_pendingMissingGlyphs.constEnd()) {
+ pendingMissingGlyphs.append(*it);
+ ++it;
+ }
+
+ markGlyphsToRender(pendingMissingGlyphs);
+ }
+
+ {
+ QVector<glyph_t> filteredPendingInvalidatedGlyphs;
+ filteredPendingInvalidatedGlyphs.reserve(m_pendingInvalidatedGlyphs.size());
+
+ QSet<glyph_t>::const_iterator it = m_pendingInvalidatedGlyphs.constBegin();
+ while (it != m_pendingInvalidatedGlyphs.constEnd()) {
+ bool rerequestGlyph = false;
+
+ // The glyph was invalidated right after being posted as ready, we throw away
+ // the ready glyph and rerequest it to be certain
+ QHash<quint32, PendingGlyph>::iterator pendingGlyphIt = m_pendingReadyGlyphs.find(*it);
+ if (pendingGlyphIt != m_pendingReadyGlyphs.end()) {
+ m_sharedGraphicsCache->dereferenceBuffer(pendingGlyphIt.value().buffer);
+ pendingGlyphIt = m_pendingReadyGlyphs.erase(pendingGlyphIt);
+ rerequestGlyph = true;
+ }
+
+ void *bufferId = m_bufferForGlyph.value(*it, 0);
+ if (bufferId != 0) {
+ m_sharedGraphicsCache->dereferenceBuffer(bufferId);
+ m_bufferForGlyph.remove(*it);
+ rerequestGlyph = true;
+ }
+
+ if (rerequestGlyph)
+ filteredPendingInvalidatedGlyphs.append(*it);
+
+ ++it;
+ }
+
+ // If this cache is still using the glyphs, reset the texture held by them, and mark them
+ // to be rendered again since they are still needed.
+ if (!filteredPendingInvalidatedGlyphs.isEmpty()) {
+ setGlyphsTexture(filteredPendingInvalidatedGlyphs, Texture());
+ markGlyphsToRender(filteredPendingInvalidatedGlyphs);
+ }
+ }
+
+ {
+ QList<GlyphPosition> glyphPositions;
+
+ QHash<void *, TextureContent> textureContentForBuffer;
+ {
+ QHash<quint32, PendingGlyph>::iterator it = m_pendingReadyGlyphs.begin();
+ while (it != m_pendingReadyGlyphs.end()) {
+ void *currentGlyphBuffer = m_bufferForGlyph.value(it.key(), 0);
+ if (currentGlyphBuffer != 0) {
+ if (!m_sharedGraphicsCache->dereferenceBuffer(currentGlyphBuffer)) {
+ Q_ASSERT(!textureContentForBuffer.contains(currentGlyphBuffer));
+ }
+ }
+
+ PendingGlyph &pendingGlyph = it.value();
+
+ // We don't ref or deref the buffer here, since it was already referenced when
+ // added to the pending ready glyphs
+ m_bufferForGlyph[it.key()] = pendingGlyph.buffer;
+
+ textureContentForBuffer[pendingGlyph.buffer].size = pendingGlyph.bufferSize;
+ textureContentForBuffer[pendingGlyph.buffer].glyphs.append(it.key());
+
+ GlyphPosition glyphPosition;
+ glyphPosition.glyph = it.key();
+ glyphPosition.position = pendingGlyph.position;
+
+ glyphPositions.append(glyphPosition);
+
+ ++it;
+ }
+ }
+
+ setGlyphsPosition(glyphPositions);
+
+ {
+ QHash<void *, TextureContent>::const_iterator it = textureContentForBuffer.constBegin();
+ while (it != textureContentForBuffer.constEnd()) {
+ Texture texture;
+ texture.textureId = m_sharedGraphicsCache->textureIdForBuffer(it.key());
+ texture.size = it.value().size;
+
+#if defined(QSGSHAREDDISTANCEFIELDGLYPHCACHE_DEBUG_)
+ saveTexture(texture.textureId, texture.size.width(), texture.size.height());
+#endif
+ setGlyphsTexture(it.value().glyphs, texture);
+
+ ++it;
+ }
+ }
+ }
+
+ m_pendingMissingGlyphs.clear();
+ m_pendingInvalidatedGlyphs.clear();
+ m_pendingReadyGlyphs.clear();
+ }
+}
+
+void QSGSharedDistanceFieldGlyphCache::reportItemsAvailable(const QByteArray &cacheId,
+ void *bufferId, const QSize &bufferSize,
+ const QVector<quint32> &itemIds,
+ const QVector<QPoint> &positions)
+{
+ {
+ QMutexLocker locker(&m_pendingGlyphsMutex);
+ if (m_cacheId != cacheId)
+ return;
+
+ Q_ASSERT(itemIds.size() == positions.size());
+
+#if defined(QSGSHAREDDISTANCEFIELDGLYPHCACHE_DEBUG)
+ qDebug("QSGSharedDistanceFieldGlyphCache::reportItemsAvailable() called for %s (%d glyphs, bufferSize: %dx%d)",
+ cacheId.constData(), itemIds.size(), bufferSize.width(), bufferSize.height());
+#endif
+
+ for (int i=0; i<itemIds.size(); ++i) {
+ PendingGlyph &pendingGlyph = m_pendingReadyGlyphs[itemIds.at(i)];
+ void *oldBuffer = pendingGlyph.buffer;
+ Q_ASSERT(bufferSize.height() >= pendingGlyph.bufferSize.height());
+
+ pendingGlyph.buffer = bufferId;
+ pendingGlyph.position = positions.at(i);
+ pendingGlyph.bufferSize = bufferSize;
+
+ m_sharedGraphicsCache->referenceBuffer(bufferId);
+ if (oldBuffer != 0)
+ m_sharedGraphicsCache->dereferenceBuffer(oldBuffer);
+
+ m_requestedGlyphsThatHaveNotBeenReturned.remove(itemIds.at(i));
+ }
+ }
+
+ m_pendingGlyphsCondition.wakeAll();
+ emit glyphsPending();
+}
+
+void QSGSharedDistanceFieldGlyphCache::reportItemsInvalidated(const QByteArray &cacheId,
+ const QVector<quint32> &itemIds)
+{
+ {
+ QMutexLocker locker(&m_pendingGlyphsMutex);
+ if (m_cacheId != cacheId)
+ return;
+
+ for (int i=0; i<itemIds.size(); ++i)
+ m_pendingInvalidatedGlyphs.insert(itemIds.at(i));
+ }
+
+ emit glyphsPending();
+}
+
+
+void QSGSharedDistanceFieldGlyphCache::reportItemsMissing(const QByteArray &cacheId,
+ const QVector<quint32> &itemIds)
+{
+ {
+ QMutexLocker locker(&m_pendingGlyphsMutex);
+ if (m_cacheId != cacheId)
+ return;
+
+#if defined(QSGSHAREDDISTANCEFIELDGLYPHCACHE_DEBUG)
+ qDebug("QSGSharedDistanceFieldGlyphCache::reportItemsMissing() called for %s (%d glyphs)",
+ cacheId.constData(), itemIds.size());
+#endif
+
+ for (int i=0; i<itemIds.size(); ++i) {
+ m_pendingMissingGlyphs.insert(itemIds.at(i));
+ m_requestedGlyphsThatHaveNotBeenReturned.remove(itemIds.at(i));
+ }
+ }
+
+ m_pendingGlyphsCondition.wakeAll();
+ emit glyphsPending();
+}
+
+QT_END_NAMESPACE
diff --git a/src/quick/scenegraph/qsgshareddistancefieldglyphcache_p.h b/src/quick/scenegraph/qsgshareddistancefieldglyphcache_p.h
new file mode 100644
index 0000000000..6f5696eabb
--- /dev/null
+++ b/src/quick/scenegraph/qsgshareddistancefieldglyphcache_p.h
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QSGSHAREDDISTANCEFIELDGLYPHCACHE_H
+#define QSGSHAREDDISTANCEFIELDGLYPHCACHE_H
+
+#include <QtCore/qwaitcondition.h>
+#include <private/qsgadaptationlayer_p.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QPlatformSharedGraphicsCache;
+class QSGSharedDistanceFieldGlyphCache : public QObject, public QSGDistanceFieldGlyphCache
+{
+ Q_OBJECT
+public:
+ explicit QSGSharedDistanceFieldGlyphCache(const QByteArray &cacheId,
+ QPlatformSharedGraphicsCache *sharedGraphicsCache,
+ QSGDistanceFieldGlyphCacheManager *man,
+ QOpenGLContext *c,
+ const QRawFont &font);
+ ~QSGSharedDistanceFieldGlyphCache();
+
+ void registerOwnerElement(QQuickItem *ownerElement);
+ void unregisterOwnerElement(QQuickItem *ownerElement);
+ void processPendingGlyphs();
+
+ void requestGlyphs(const QSet<glyph_t> &glyphs);
+ void referenceGlyphs(const QSet<glyph_t> &glyphs);
+ void storeGlyphs(const QHash<glyph_t, QImage> &glyphs);
+ void releaseGlyphs(const QSet<glyph_t> &glyphs);
+
+Q_SIGNALS:
+ void glyphsPending();
+
+private Q_SLOTS:
+ void reportItemsMissing(const QByteArray &cacheId, const QVector<quint32> &itemIds);
+ void reportItemsAvailable(const QByteArray &cacheId,
+ void *bufferId, const QSize &bufferSize,
+ const QVector<quint32> &itemIds, const QVector<QPoint> &positions);
+ void reportItemsInvalidated(const QByteArray &cacheId, const QVector<quint32> &itemIds);
+
+private:
+ void waitForGlyphs();
+ void saveTexture(GLuint textureId, int width, int height);
+
+ QSet<quint32> m_requestedGlyphsThatHaveNotBeenReturned;
+ QWaitCondition m_pendingGlyphsCondition;
+ QByteArray m_cacheId;
+ QPlatformSharedGraphicsCache *m_sharedGraphicsCache;
+ QMutex m_pendingGlyphsMutex;
+
+ QSet<glyph_t> m_pendingInvalidatedGlyphs;
+ QSet<glyph_t> m_pendingMissingGlyphs;
+
+ struct PendingGlyph
+ {
+ PendingGlyph() : buffer(0) {}
+
+ void *buffer;
+ QSize bufferSize;
+ QPoint position;
+ };
+
+ QHash<quint32, PendingGlyph> m_pendingReadyGlyphs;
+ QHash<glyph_t, void *> m_bufferForGlyph;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QSGSHAREDDISTANCEFIELDGLYPHCACHE_H
diff --git a/src/quick/scenegraph/scenegraph.pri b/src/quick/scenegraph/scenegraph.pri
index db57b1e52b..9fc92222ae 100644
--- a/src/quick/scenegraph/scenegraph.pri
+++ b/src/quick/scenegraph/scenegraph.pri
@@ -18,7 +18,6 @@ SOURCES += \
$$PWD/coreapi/qsgnodeupdater.cpp \
$$PWD/coreapi/qsgrenderer.cpp
-
# Util API
HEADERS += \
$$PWD/util/qsgareaallocator_p.h \
@@ -63,7 +62,8 @@ HEADERS += \
$$PWD/qsgdefaultimagenode_p.h \
$$PWD/qsgdefaultrectanglenode_p.h \
$$PWD/qsgflashnode_p.h \
- $$PWD/qsgpathsimplifier_p.h
+ $$PWD/qsgpathsimplifier_p.h \
+ $$PWD/qsgshareddistancefieldglyphcache_p.h
SOURCES += \
$$PWD/qsgadaptationlayer.cpp \
@@ -77,7 +77,8 @@ SOURCES += \
$$PWD/qsgdefaultimagenode.cpp \
$$PWD/qsgdefaultrectanglenode.cpp \
$$PWD/qsgflashnode.cpp \
- $$PWD/qsgpathsimplifier.cpp
+ $$PWD/qsgpathsimplifier.cpp \
+ $$PWD/qsgshareddistancefieldglyphcache.cpp
diff --git a/src/quick/scenegraph/util/qsgareaallocator.cpp b/src/quick/scenegraph/util/qsgareaallocator.cpp
index c5171f1c93..09593e0b44 100644
--- a/src/quick/scenegraph/util/qsgareaallocator.cpp
+++ b/src/quick/scenegraph/util/qsgareaallocator.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgareaallocator_p.h b/src/quick/scenegraph/util/qsgareaallocator_p.h
index be26046865..1f70143902 100644
--- a/src/quick/scenegraph/util/qsgareaallocator_p.h
+++ b/src/quick/scenegraph/util/qsgareaallocator_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgdistancefieldutil.cpp b/src/quick/scenegraph/util/qsgdistancefieldutil.cpp
index d1b0445ee0..843120ae96 100644
--- a/src/quick/scenegraph/util/qsgdistancefieldutil.cpp
+++ b/src/quick/scenegraph/util/qsgdistancefieldutil.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgdistancefieldutil_p.h b/src/quick/scenegraph/util/qsgdistancefieldutil_p.h
index bc28a4d9e1..3e2ce5d47a 100644
--- a/src/quick/scenegraph/util/qsgdistancefieldutil_p.h
+++ b/src/quick/scenegraph/util/qsgdistancefieldutil_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgengine.cpp b/src/quick/scenegraph/util/qsgengine.cpp
index b8c93bab8b..65780278c0 100644
--- a/src/quick/scenegraph/util/qsgengine.cpp
+++ b/src/quick/scenegraph/util/qsgengine.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -78,8 +78,8 @@ QSGEngine::~QSGEngine()
void QSGEngine::setCanvas(QQuickCanvas *canvas)
{
d_func()->canvas = canvas;
- connect(canvas, SIGNAL(afterRendering()), this, SIGNAL(afterRendering()));
- connect(canvas, SIGNAL(beforeRendering()), this, SIGNAL(beforeRendering()));
+ connect(canvas, SIGNAL(afterRendering()), this, SIGNAL(afterRendering()), Qt::DirectConnection);
+ connect(canvas, SIGNAL(beforeRendering()), this, SIGNAL(beforeRendering()), Qt::DirectConnection);
}
void QSGEngine::setClearBeforeRendering(bool enabled)
diff --git a/src/quick/scenegraph/util/qsgengine.h b/src/quick/scenegraph/util/qsgengine.h
index 6b7ceb939f..2457509e7f 100644
--- a/src/quick/scenegraph/util/qsgengine.h
+++ b/src/quick/scenegraph/util/qsgengine.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgflatcolormaterial.cpp b/src/quick/scenegraph/util/qsgflatcolormaterial.cpp
index cf5c7869ea..e14f4d9e7c 100644
--- a/src/quick/scenegraph/util/qsgflatcolormaterial.cpp
+++ b/src/quick/scenegraph/util/qsgflatcolormaterial.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgflatcolormaterial.h b/src/quick/scenegraph/util/qsgflatcolormaterial.h
index d788901b8a..13297eba5a 100644
--- a/src/quick/scenegraph/util/qsgflatcolormaterial.h
+++ b/src/quick/scenegraph/util/qsgflatcolormaterial.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgpainternode.cpp b/src/quick/scenegraph/util/qsgpainternode.cpp
index 2ce42fcc4d..876c27e97d 100644
--- a/src/quick/scenegraph/util/qsgpainternode.cpp
+++ b/src/quick/scenegraph/util/qsgpainternode.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgpainternode_p.h b/src/quick/scenegraph/util/qsgpainternode_p.h
index 85f26f6056..8fc757a713 100644
--- a/src/quick/scenegraph/util/qsgpainternode_p.h
+++ b/src/quick/scenegraph/util/qsgpainternode_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgsimplematerial.h b/src/quick/scenegraph/util/qsgsimplematerial.h
index 44beb135f7..2bca97cf17 100644
--- a/src/quick/scenegraph/util/qsgsimplematerial.h
+++ b/src/quick/scenegraph/util/qsgsimplematerial.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgsimplerectnode.cpp b/src/quick/scenegraph/util/qsgsimplerectnode.cpp
index c3dc5354ca..7e8a430592 100644
--- a/src/quick/scenegraph/util/qsgsimplerectnode.cpp
+++ b/src/quick/scenegraph/util/qsgsimplerectnode.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgsimplerectnode.h b/src/quick/scenegraph/util/qsgsimplerectnode.h
index 6519290cfe..0aed02ea6d 100644
--- a/src/quick/scenegraph/util/qsgsimplerectnode.h
+++ b/src/quick/scenegraph/util/qsgsimplerectnode.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgsimpletexturenode.cpp b/src/quick/scenegraph/util/qsgsimpletexturenode.cpp
index 00b240e435..0054f92c3d 100644
--- a/src/quick/scenegraph/util/qsgsimpletexturenode.cpp
+++ b/src/quick/scenegraph/util/qsgsimpletexturenode.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgsimpletexturenode.h b/src/quick/scenegraph/util/qsgsimpletexturenode.h
index 605cae11e4..94f900f2eb 100644
--- a/src/quick/scenegraph/util/qsgsimpletexturenode.h
+++ b/src/quick/scenegraph/util/qsgsimpletexturenode.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgtexture.cpp b/src/quick/scenegraph/util/qsgtexture.cpp
index a732c5ab06..32042b0a3d 100644
--- a/src/quick/scenegraph/util/qsgtexture.cpp
+++ b/src/quick/scenegraph/util/qsgtexture.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgtexture.h b/src/quick/scenegraph/util/qsgtexture.h
index 6fdab9f401..df07382d10 100644
--- a/src/quick/scenegraph/util/qsgtexture.h
+++ b/src/quick/scenegraph/util/qsgtexture.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgtexture_p.h b/src/quick/scenegraph/util/qsgtexture_p.h
index e1d6dd0e32..4186995afd 100644
--- a/src/quick/scenegraph/util/qsgtexture_p.h
+++ b/src/quick/scenegraph/util/qsgtexture_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgtexturematerial.cpp b/src/quick/scenegraph/util/qsgtexturematerial.cpp
index 0bee81993c..893993db6c 100644
--- a/src/quick/scenegraph/util/qsgtexturematerial.cpp
+++ b/src/quick/scenegraph/util/qsgtexturematerial.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgtexturematerial.h b/src/quick/scenegraph/util/qsgtexturematerial.h
index b2b3ce6374..fa34e9f31e 100644
--- a/src/quick/scenegraph/util/qsgtexturematerial.h
+++ b/src/quick/scenegraph/util/qsgtexturematerial.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgtexturematerial_p.h b/src/quick/scenegraph/util/qsgtexturematerial_p.h
index 0ab552f4e9..7ffe15e85a 100644
--- a/src/quick/scenegraph/util/qsgtexturematerial_p.h
+++ b/src/quick/scenegraph/util/qsgtexturematerial_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgtextureprovider.cpp b/src/quick/scenegraph/util/qsgtextureprovider.cpp
index 62b2819dab..984733513a 100644
--- a/src/quick/scenegraph/util/qsgtextureprovider.cpp
+++ b/src/quick/scenegraph/util/qsgtextureprovider.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgtextureprovider.h b/src/quick/scenegraph/util/qsgtextureprovider.h
index bc4ffec03d..87755d852d 100644
--- a/src/quick/scenegraph/util/qsgtextureprovider.h
+++ b/src/quick/scenegraph/util/qsgtextureprovider.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp b/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp
index 8c6996642b..ef1fecae90 100644
--- a/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp
+++ b/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/scenegraph/util/qsgvertexcolormaterial.h b/src/quick/scenegraph/util/qsgvertexcolormaterial.h
index 1d3b5a82e0..e6b075415d 100644
--- a/src/quick/scenegraph/util/qsgvertexcolormaterial.h
+++ b/src/quick/scenegraph/util/qsgvertexcolormaterial.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativeanimation.cpp b/src/quick/util/qdeclarativeanimation.cpp
index 1fc31ae8ad..7f632e3cf0 100644
--- a/src/quick/util/qdeclarativeanimation.cpp
+++ b/src/quick/util/qdeclarativeanimation.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativeanimation_p.h b/src/quick/util/qdeclarativeanimation_p.h
index 6c9e2646d9..35ae57628e 100644
--- a/src/quick/util/qdeclarativeanimation_p.h
+++ b/src/quick/util/qdeclarativeanimation_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativeanimation_p_p.h b/src/quick/util/qdeclarativeanimation_p_p.h
index bf596a7c99..ac75875ae5 100644
--- a/src/quick/util/qdeclarativeanimation_p_p.h
+++ b/src/quick/util/qdeclarativeanimation_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativebehavior.cpp b/src/quick/util/qdeclarativebehavior.cpp
index 1c3fb63521..9d5376548c 100644
--- a/src/quick/util/qdeclarativebehavior.cpp
+++ b/src/quick/util/qdeclarativebehavior.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativebehavior_p.h b/src/quick/util/qdeclarativebehavior_p.h
index fc0af764f4..5927b1e8c4 100644
--- a/src/quick/util/qdeclarativebehavior_p.h
+++ b/src/quick/util/qdeclarativebehavior_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativebind.cpp b/src/quick/util/qdeclarativebind.cpp
index 7d576858bb..b490a41a83 100644
--- a/src/quick/util/qdeclarativebind.cpp
+++ b/src/quick/util/qdeclarativebind.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativebind_p.h b/src/quick/util/qdeclarativebind_p.h
index 8dc6a941fa..1bbcc0baed 100644
--- a/src/quick/util/qdeclarativebind_p.h
+++ b/src/quick/util/qdeclarativebind_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativechangeset.cpp b/src/quick/util/qdeclarativechangeset.cpp
index 680b40e11a..c23247e664 100644
--- a/src/quick/util/qdeclarativechangeset.cpp
+++ b/src/quick/util/qdeclarativechangeset.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativechangeset_p.h b/src/quick/util/qdeclarativechangeset_p.h
index 0a4b7bcc83..86c24e8cb0 100644
--- a/src/quick/util/qdeclarativechangeset_p.h
+++ b/src/quick/util/qdeclarativechangeset_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativeconnections.cpp b/src/quick/util/qdeclarativeconnections.cpp
index 92bb1ffa0f..09c0daf013 100644
--- a/src/quick/util/qdeclarativeconnections.cpp
+++ b/src/quick/util/qdeclarativeconnections.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -204,6 +204,7 @@ QDeclarativeConnectionsParser::compile(const QList<QDeclarativeCustomParserPrope
{
QString propName = props.at(ii).name();
int propLine = props.at(ii).location().line;
+ int propColumn = props.at(ii).location().column;
if (!propName.startsWith(QLatin1String("on")) || !propName.at(2).isUpper()) {
error(props.at(ii), QDeclarativeConnections::tr("Cannot assign to non-existent property \"%1\"").arg(propName));
@@ -227,6 +228,7 @@ QDeclarativeConnectionsParser::compile(const QList<QDeclarativeCustomParserPrope
ds << propName;
ds << rewriteSignalHandler(v.asScript(), propName);
ds << propLine;
+ ds << propColumn;
} else {
error(props.at(ii), QDeclarativeConnections::tr("Connections: script expected"));
return QByteArray();
@@ -261,6 +263,9 @@ void QDeclarativeConnections::connectSignals()
ds >> script;
int line;
ds >> line;
+ int column;
+ ds >> column;
+
QDeclarativeProperty prop(target(), propName);
if (prop.isValid() && (prop.type() & QDeclarativeProperty::SignalProperty)) {
QDeclarativeBoundSignal *signal =
@@ -276,7 +281,7 @@ void QDeclarativeConnections::connectSignals()
}
QDeclarativeExpression *expression = ctxtdata ?
- QDeclarativeExpressionPrivate::create(ctxtdata, 0, script, true, location, line) : 0;
+ QDeclarativeExpressionPrivate::create(ctxtdata, 0, script, true, location, line, column) : 0;
signal->setExpression(expression);
d->boundsignals += signal;
} else {
diff --git a/src/quick/util/qdeclarativeconnections_p.h b/src/quick/util/qdeclarativeconnections_p.h
index bbde82ea89..011e5a6031 100644
--- a/src/quick/util/qdeclarativeconnections_p.h
+++ b/src/quick/util/qdeclarativeconnections_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativefontloader.cpp b/src/quick/util/qdeclarativefontloader.cpp
index 002723a88a..2e74d6d0a7 100644
--- a/src/quick/util/qdeclarativefontloader.cpp
+++ b/src/quick/util/qdeclarativefontloader.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativefontloader_p.h b/src/quick/util/qdeclarativefontloader_p.h
index ec9984a11b..cb13eb7efc 100644
--- a/src/quick/util/qdeclarativefontloader_p.h
+++ b/src/quick/util/qdeclarativefontloader_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativelistaccessor.cpp b/src/quick/util/qdeclarativelistaccessor.cpp
index ca0ece2325..8af048a06f 100644
--- a/src/quick/util/qdeclarativelistaccessor.cpp
+++ b/src/quick/util/qdeclarativelistaccessor.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativelistaccessor_p.h b/src/quick/util/qdeclarativelistaccessor_p.h
index c463855491..f990312581 100644
--- a/src/quick/util/qdeclarativelistaccessor_p.h
+++ b/src/quick/util/qdeclarativelistaccessor_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativelistcompositor.cpp b/src/quick/util/qdeclarativelistcompositor.cpp
index 15cbab72ea..ba6e23ec03 100644
--- a/src/quick/util/qdeclarativelistcompositor.cpp
+++ b/src/quick/util/qdeclarativelistcompositor.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativelistcompositor_p.h b/src/quick/util/qdeclarativelistcompositor_p.h
index 83467bd1d7..bc1c6a7c19 100644
--- a/src/quick/util/qdeclarativelistcompositor_p.h
+++ b/src/quick/util/qdeclarativelistcompositor_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativepackage.cpp b/src/quick/util/qdeclarativepackage.cpp
index 395ca3657e..cdaa730346 100644
--- a/src/quick/util/qdeclarativepackage.cpp
+++ b/src/quick/util/qdeclarativepackage.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativepackage_p.h b/src/quick/util/qdeclarativepackage_p.h
index 0b79978d49..eb0ff18f80 100644
--- a/src/quick/util/qdeclarativepackage_p.h
+++ b/src/quick/util/qdeclarativepackage_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativepath.cpp b/src/quick/util/qdeclarativepath.cpp
index b21d6119d2..52d0245ee0 100644
--- a/src/quick/util/qdeclarativepath.cpp
+++ b/src/quick/util/qdeclarativepath.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativepath_p.h b/src/quick/util/qdeclarativepath_p.h
index b1bd68395d..fd8be57d6b 100644
--- a/src/quick/util/qdeclarativepath_p.h
+++ b/src/quick/util/qdeclarativepath_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativepath_p_p.h b/src/quick/util/qdeclarativepath_p_p.h
index 5af7a22282..47031bc28c 100644
--- a/src/quick/util/qdeclarativepath_p_p.h
+++ b/src/quick/util/qdeclarativepath_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativepathinterpolator.cpp b/src/quick/util/qdeclarativepathinterpolator.cpp
index b528726ff8..c954c23f6c 100644
--- a/src/quick/util/qdeclarativepathinterpolator.cpp
+++ b/src/quick/util/qdeclarativepathinterpolator.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativepathinterpolator_p.h b/src/quick/util/qdeclarativepathinterpolator_p.h
index 2d2ad42689..fe4c9791d7 100644
--- a/src/quick/util/qdeclarativepathinterpolator_p.h
+++ b/src/quick/util/qdeclarativepathinterpolator_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativepixmapcache.cpp b/src/quick/util/qdeclarativepixmapcache.cpp
index cb29ec649b..236b93ecbd 100644
--- a/src/quick/util/qdeclarativepixmapcache.cpp
+++ b/src/quick/util/qdeclarativepixmapcache.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativepixmapcache_p.h b/src/quick/util/qdeclarativepixmapcache_p.h
index 2e310e13fb..e99d95949c 100644
--- a/src/quick/util/qdeclarativepixmapcache_p.h
+++ b/src/quick/util/qdeclarativepixmapcache_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativepropertychanges.cpp b/src/quick/util/qdeclarativepropertychanges.cpp
index a475c5f879..16293d5649 100644
--- a/src/quick/util/qdeclarativepropertychanges.cpp
+++ b/src/quick/util/qdeclarativepropertychanges.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -337,7 +337,7 @@ void QDeclarativePropertyChangesPrivate::decode()
QDeclarativeExpression *expression = new QDeclarativeExpression(qmlContext(q), object, data.toString());
QDeclarativeData *ddata = QDeclarativeData::get(q);
if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty())
- expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber);
+ expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber, ddata->columnNumber);
QDeclarativeReplaceSignalHandler *handler = new QDeclarativeReplaceSignalHandler;
handler->property = prop;
handler->expression = expression;
@@ -346,7 +346,7 @@ void QDeclarativePropertyChangesPrivate::decode()
QDeclarativeExpression *expression = new QDeclarativeExpression(qmlContext(q), object, data.toString());
QDeclarativeData *ddata = QDeclarativeData::get(q);
if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty())
- expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber);
+ expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber, ddata->columnNumber);
expressions << ExpressionChange(name, id, expression);
} else {
properties << qMakePair(name, data);
@@ -480,7 +480,7 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions()
QDeclarativeBinding *newBinding = id != QDeclarativeBinding::Invalid ? QDeclarativeBinding::createBinding(id, object(), qmlContext(this), e->sourceFile(), e->lineNumber()) : 0;
if (!newBinding) {
newBinding = new QDeclarativeBinding(e->expression(), object(), qmlContext(this));
- newBinding->setSourceLocation(e->sourceFile(), e->lineNumber());
+ newBinding->setSourceLocation(e->sourceFile(), e->lineNumber(), e->columnNumber());
}
newBinding->setTarget(prop);
a.toBinding = newBinding;
diff --git a/src/quick/util/qdeclarativepropertychanges_p.h b/src/quick/util/qdeclarativepropertychanges_p.h
index 1057cf2b72..ca12adcc22 100644
--- a/src/quick/util/qdeclarativepropertychanges_p.h
+++ b/src/quick/util/qdeclarativepropertychanges_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativesmoothedanimation.cpp b/src/quick/util/qdeclarativesmoothedanimation.cpp
index dd277e4ff3..2944c7ace9 100644
--- a/src/quick/util/qdeclarativesmoothedanimation.cpp
+++ b/src/quick/util/qdeclarativesmoothedanimation.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativesmoothedanimation_p.h b/src/quick/util/qdeclarativesmoothedanimation_p.h
index 2bf7dfbf8f..b8f031791b 100644
--- a/src/quick/util/qdeclarativesmoothedanimation_p.h
+++ b/src/quick/util/qdeclarativesmoothedanimation_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativesmoothedanimation_p_p.h b/src/quick/util/qdeclarativesmoothedanimation_p_p.h
index 93b3f1f3bc..c6a48e4369 100644
--- a/src/quick/util/qdeclarativesmoothedanimation_p_p.h
+++ b/src/quick/util/qdeclarativesmoothedanimation_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativespringanimation.cpp b/src/quick/util/qdeclarativespringanimation.cpp
index 84e0b773f4..84bb17f682 100644
--- a/src/quick/util/qdeclarativespringanimation.cpp
+++ b/src/quick/util/qdeclarativespringanimation.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativespringanimation_p.h b/src/quick/util/qdeclarativespringanimation_p.h
index f9ca9f4dca..2ae1743449 100644
--- a/src/quick/util/qdeclarativespringanimation_p.h
+++ b/src/quick/util/qdeclarativespringanimation_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativestate.cpp b/src/quick/util/qdeclarativestate.cpp
index 003ac6b03e..db00652fd9 100644
--- a/src/quick/util/qdeclarativestate.cpp
+++ b/src/quick/util/qdeclarativestate.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativestate_p.h b/src/quick/util/qdeclarativestate_p.h
index e74ef5004f..a7bd36d110 100644
--- a/src/quick/util/qdeclarativestate_p.h
+++ b/src/quick/util/qdeclarativestate_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativestate_p_p.h b/src/quick/util/qdeclarativestate_p_p.h
index 230132434f..42de614763 100644
--- a/src/quick/util/qdeclarativestate_p_p.h
+++ b/src/quick/util/qdeclarativestate_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativestategroup.cpp b/src/quick/util/qdeclarativestategroup.cpp
index 31a95c8192..43397dbf6f 100644
--- a/src/quick/util/qdeclarativestategroup.cpp
+++ b/src/quick/util/qdeclarativestategroup.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativestategroup_p.h b/src/quick/util/qdeclarativestategroup_p.h
index cc0aa39722..58453d1491 100644
--- a/src/quick/util/qdeclarativestategroup_p.h
+++ b/src/quick/util/qdeclarativestategroup_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativestateoperations.cpp b/src/quick/util/qdeclarativestateoperations.cpp
index 31a1f2e65f..796689d770 100644
--- a/src/quick/util/qdeclarativestateoperations.cpp
+++ b/src/quick/util/qdeclarativestateoperations.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativestateoperations_p.h b/src/quick/util/qdeclarativestateoperations_p.h
index 9796b072d5..1876fe39c6 100644
--- a/src/quick/util/qdeclarativestateoperations_p.h
+++ b/src/quick/util/qdeclarativestateoperations_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativestyledtext.cpp b/src/quick/util/qdeclarativestyledtext.cpp
index fb8bf5ddf2..9944b015ca 100644
--- a/src/quick/util/qdeclarativestyledtext.cpp
+++ b/src/quick/util/qdeclarativestyledtext.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativestyledtext_p.h b/src/quick/util/qdeclarativestyledtext_p.h
index da86d4b3c2..a77e848e74 100644
--- a/src/quick/util/qdeclarativestyledtext_p.h
+++ b/src/quick/util/qdeclarativestyledtext_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativesvgparser.cpp b/src/quick/util/qdeclarativesvgparser.cpp
index 5b1d9730e4..cdf575d7fb 100644
--- a/src/quick/util/qdeclarativesvgparser.cpp
+++ b/src/quick/util/qdeclarativesvgparser.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclaractive module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativesvgparser_p.h b/src/quick/util/qdeclarativesvgparser_p.h
index 991dcae0e3..e6e4292b41 100644
--- a/src/quick/util/qdeclarativesvgparser_p.h
+++ b/src/quick/util/qdeclarativesvgparser_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclaractive module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativesystempalette.cpp b/src/quick/util/qdeclarativesystempalette.cpp
index 658694c4fb..efbc97870e 100644
--- a/src/quick/util/qdeclarativesystempalette.cpp
+++ b/src/quick/util/qdeclarativesystempalette.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativesystempalette_p.h b/src/quick/util/qdeclarativesystempalette_p.h
index f882c5e2ec..d8e17a42d6 100644
--- a/src/quick/util/qdeclarativesystempalette_p.h
+++ b/src/quick/util/qdeclarativesystempalette_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativetimeline.cpp b/src/quick/util/qdeclarativetimeline.cpp
index 5cbda211be..0ec4bcf7f7 100644
--- a/src/quick/util/qdeclarativetimeline.cpp
+++ b/src/quick/util/qdeclarativetimeline.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativetimeline_p_p.h b/src/quick/util/qdeclarativetimeline_p_p.h
index d468221fc7..348c82280a 100644
--- a/src/quick/util/qdeclarativetimeline_p_p.h
+++ b/src/quick/util/qdeclarativetimeline_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativetimer.cpp b/src/quick/util/qdeclarativetimer.cpp
index 706afec9fa..6143464f48 100644
--- a/src/quick/util/qdeclarativetimer.cpp
+++ b/src/quick/util/qdeclarativetimer.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativetimer_p.h b/src/quick/util/qdeclarativetimer_p.h
index f3d53bf287..c1991b16be 100644
--- a/src/quick/util/qdeclarativetimer_p.h
+++ b/src/quick/util/qdeclarativetimer_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativetransition.cpp b/src/quick/util/qdeclarativetransition.cpp
index 7ebff8cbca..b1f5bd11ca 100644
--- a/src/quick/util/qdeclarativetransition.cpp
+++ b/src/quick/util/qdeclarativetransition.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativetransition_p.h b/src/quick/util/qdeclarativetransition_p.h
index bc9f04423c..036d7305d1 100644
--- a/src/quick/util/qdeclarativetransition_p.h
+++ b/src/quick/util/qdeclarativetransition_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativetransitionmanager.cpp b/src/quick/util/qdeclarativetransitionmanager.cpp
index b13cc8aa36..0d96cc98f0 100644
--- a/src/quick/util/qdeclarativetransitionmanager.cpp
+++ b/src/quick/util/qdeclarativetransitionmanager.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativetransitionmanager_p_p.h b/src/quick/util/qdeclarativetransitionmanager_p_p.h
index b56e878143..de16908096 100644
--- a/src/quick/util/qdeclarativetransitionmanager_p_p.h
+++ b/src/quick/util/qdeclarativetransitionmanager_p_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativeutilmodule.cpp b/src/quick/util/qdeclarativeutilmodule.cpp
index 94119f1a9c..85c783a13d 100644
--- a/src/quick/util/qdeclarativeutilmodule.cpp
+++ b/src/quick/util/qdeclarativeutilmodule.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
diff --git a/src/quick/util/qdeclarativeutilmodule_p.h b/src/quick/util/qdeclarativeutilmodule_p.h
index 69cdfd37a1..7e4812349e 100644
--- a/src/quick/util/qdeclarativeutilmodule_p.h
+++ b/src/quick/util/qdeclarativeutilmodule_p.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**