From e2ea0a83cc876fb54a2a8bf6f1350dbfa52f596b Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 15 Jan 2014 22:01:15 +0100 Subject: fix whitespace remove trailing spaces and expand tabs Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc Reviewed-by: Simon Hausmann --- examples/qml/dynamicscene/content/PaletteItem.qml | 2 +- .../qml/dynamicscene/content/PerspectiveItem.qml | 4 +- examples/qml/dynamicscene/content/Sun.qml | 2 +- examples/qml/dynamicscene/content/itemCreation.js | 2 +- .../networkaccessmanagerfactory.pro | 2 +- examples/qml/referenceexamples/adding/adding.pro | 2 +- .../qml/referenceexamples/attached/attached.pro | 2 +- examples/qml/referenceexamples/binding/binding.pro | 2 +- .../binding/happybirthdaysong.cpp | 4 +- examples/qml/referenceexamples/binding/main.cpp | 2 +- .../qml/referenceexamples/coercion/coercion.pro | 2 +- examples/qml/referenceexamples/default/default.pro | 2 +- .../qml/referenceexamples/extended/extended.pro | 2 +- .../qml/referenceexamples/extended/lineedit.cpp | 6 +- examples/qml/referenceexamples/grouped/grouped.pro | 2 +- examples/qml/referenceexamples/methods/methods.pro | 2 +- .../referenceexamples/properties/properties.pro | 2 +- examples/qml/referenceexamples/signal/main.cpp | 2 +- examples/qml/referenceexamples/signal/signal.pro | 2 +- .../qml/referenceexamples/valuesource/example.qml | 14 +-- .../valuesource/happybirthdaysong.cpp | 2 +- .../qml/referenceexamples/valuesource/main.cpp | 2 +- .../referenceexamples/valuesource/valuesource.pro | 2 +- .../extending/chapter4-customPropertyTypes/app.qml | 4 +- .../chapter4-customPropertyTypes.pro | 2 +- .../extending/chapter5-listproperties/app.qml | 10 +- .../chapter5-listproperties.pro | 2 +- .../tutorials/extending/chapter6-plugins/app.qml | 10 +- examples/qml/tutorials/extending/extending.pro | 2 +- examples/qmltest/qmltest/tst_basic.qml | 2 +- examples/quick/animation/behaviors/SideRect.qml | 4 +- examples/quick/animation/behaviors/tvtennis.qml | 2 +- examples/quick/animation/states/states.qml | 2 +- examples/quick/animation/states/transitions.qml | 4 +- .../quick/customitems/flipable/content/Card.qml | 2 +- examples/quick/customitems/flipable/flipable.qml | 2 +- examples/quick/customitems/searchbox/SearchBox.qml | 4 +- .../customitems/slideswitch/content/Switch.qml | 2 +- .../quick/demos/tweetsearch/content/FlipBar.qml | 4 +- examples/quick/imageelements/content/ImageCell.qml | 2 +- examples/quick/imageprovider/imageprovider.cpp | 2 +- .../keyinteraction/focus/Core/ContextMenu.qml | 2 +- .../quick/keyinteraction/focus/Core/GridMenu.qml | 2 +- .../quick/keyinteraction/focus/Core/ListMenu.qml | 2 +- .../quick/keyinteraction/focus/Core/TabMenu.qml | 2 +- examples/quick/keyinteraction/focus/focus.qml | 6 +- examples/quick/models/abstractitemmodel/model.h | 2 +- .../models/stringlistmodel/stringlistmodel.pro | 2 +- .../particles/affectors/content/spritegoal.qml | 6 +- .../quick/particles/affectors/content/wander.qml | 2 +- .../customparticle/content/blurparticles.qml | 4 +- .../customparticle/content/fragmentshader.qml | 2 +- .../customparticle/content/imagecolors.qml | 2 +- .../particles/imageparticle/content/allatonce.qml | 2 +- .../particles/itemparticle/content/Delegate2.qml | 2 +- .../itemparticle/content/ExpandingDelegate.qml | 4 +- .../quick/particles/itemparticle/particleview.qml | 2 +- .../quick/positioners/positioners-transitions.qml | 20 ++-- .../quick/text/textselection/textselection.qml | 20 ++-- .../touchinteraction/flickable/corkboards.qml | 4 +- .../tutorials/samegame/samegame1/samegame.qml | 2 +- .../quick/tutorials/samegame/samegame3/Block.qml | 2 +- .../quick/tutorials/samegame/samegame3/samegame.js | 2 +- .../samegame/samegame4/content/samegame.js | 2 +- .../samegame/samegame4/highscores/scores.php | 6 +- .../quick/views/listview/content/RecipesModel.qml | 108 +++++++++--------- examples/quick/views/listview/dynamiclist.qml | 6 +- .../quick/views/listview/expandingdelegates.qml | 2 +- examples/quick/views/listview/highlight.qml | 2 +- examples/quick/views/listview/highlightranges.qml | 4 +- examples/quick/views/listview/sections.qml | 2 +- examples/quick/views/parallax/parallax.qml | 2 +- src/plugins/qmltooling/shared/qpacketprotocol.cpp | 2 +- src/qml/compiler/qv4instr_moth_p.h | 6 +- src/qml/compiler/qv4jsir.cpp | 16 +-- src/qml/debugger/qqmlenginedebugservice.cpp | 12 +- .../visualdatamodel_rootindex/view.qml | 2 +- src/qml/doc/snippets/qml/SelfDestroyingRect.qml | 4 +- src/qml/doc/snippets/qml/createQmlObject.qml | 2 +- .../snippets/qml/listmodel/listmodel-nested.qml | 2 +- .../qml/qml-documents/inline-component.qml | 4 +- .../qml/qml-documents/inline-text-component.qml | 4 +- .../doc/snippets/qml/qml-documents/non-trivial.qml | 4 +- .../snippets/qml/qml-documents/qmldocuments.qml | 2 +- src/qml/doc/snippets/qml/qtobject.qml | 2 +- src/qml/jsruntime/qv4include.cpp | 6 +- src/qml/jsruntime/qv4qobjectwrapper.cpp | 22 ++-- src/qml/jsruntime/qv4serialize.cpp | 8 +- src/qml/parser/qqmljslexer.cpp | 2 +- src/qml/qml/ftw/qbitfield_p.h | 8 +- src/qml/qml/ftw/qfieldlist_p.h | 4 +- src/qml/qml/ftw/qfinitestack_p.h | 8 +- src/qml/qml/ftw/qhashedstring.cpp | 6 +- src/qml/qml/ftw/qhashedstring_p.h | 68 +++++------ src/qml/qml/ftw/qhashfield_p.h | 4 +- src/qml/qml/ftw/qintrusivelist.cpp | 4 +- src/qml/qml/ftw/qintrusivelist_p.h | 82 +++++++------- src/qml/qml/ftw/qqmlpool_p.h | 18 +-- src/qml/qml/ftw/qqmlrefcount_p.h | 32 +++--- src/qml/qml/ftw/qqmlthread.cpp | 20 ++-- src/qml/qml/ftw/qqmlthread_p.h | 2 +- src/qml/qml/ftw/qrecursionwatcher_p.h | 2 +- src/qml/qml/qqml.h | 32 +++--- src/qml/qml/qqmlcleanup.cpp | 4 +- src/qml/qml/qqmlcleanup_p.h | 2 +- src/qml/qml/qqmlcompileddata.cpp | 12 +- src/qml/qml/qqmlcompiler.cpp | 72 ++++++------ src/qml/qml/qqmlcompiler_p.h | 30 ++--- src/qml/qml/qqmlcomponent_p.h | 6 +- src/qml/qml/qqmlcontext.cpp | 6 +- src/qml/qml/qqmlcontext_p.h | 2 +- src/qml/qml/qqmlcustomparser.cpp | 4 +- src/qml/qml/qqmlcustomparser_p.h | 2 +- src/qml/qml/qqmldata_p.h | 6 +- src/qml/qml/qqmlengine.cpp | 2 +- src/qml/qml/qqmlengine_p.h | 50 ++++---- src/qml/qml/qqmlerror.cpp | 4 +- src/qml/qml/qqmlglobal_p.h | 10 +- src/qml/qml/qqmlguard_p.h | 14 +-- src/qml/qml/qqmlimport.cpp | 4 +- src/qml/qml/qqmlincubator.cpp | 68 +++++------ src/qml/qml/qqmlincubator.h | 10 +- src/qml/qml/qqmlinfo.cpp | 4 +- src/qml/qml/qqmlinstruction_p.h | 16 +-- src/qml/qml/qqmllist.cpp | 26 ++--- src/qml/qml/qqmlmetatype.cpp | 20 ++-- src/qml/qml/qqmlmetatype_p.h | 4 +- src/qml/qml/qqmlnotifier.cpp | 2 +- src/qml/qml/qqmlnotifier_p.h | 4 +- src/qml/qml/qqmlnullablevalue_p_p.h | 2 +- src/qml/qml/qqmlopenmetaobject.cpp | 2 +- src/qml/qml/qqmlparserstatus.cpp | 2 +- src/qml/qml/qqmlprivate.h | 8 +- src/qml/qml/qqmlproperty.cpp | 2 +- src/qml/qml/qqmlproperty.h | 2 +- src/qml/qml/qqmlproperty_p.h | 4 +- src/qml/qml/qqmlproxymetaobject.cpp | 4 +- src/qml/qml/qqmlscript.cpp | 94 +++++++-------- src/qml/qml/qqmlscript_p.h | 26 ++--- src/qml/qml/qqmlscriptstring.h | 2 +- src/qml/qml/qqmltypeloader.cpp | 126 ++++++++++----------- src/qml/qml/qqmltypeloader_p.h | 8 +- src/qml/qml/qqmltypenamecache.cpp | 2 +- src/qml/qml/qqmltypewrapper.cpp | 2 +- src/qml/qml/qqmlvaluetype_p.h | 4 +- src/qml/qml/qqmlvme.cpp | 88 +++++++------- src/qml/qml/qqmlvme_p.h | 2 +- src/qml/qml/qqmlvmemetaobject.cpp | 42 +++---- src/qml/qml/qqmlvmemetaobject_p.h | 2 +- src/qml/qml/qqmlxmlhttprequest.cpp | 58 +++++----- src/qml/qml/v8/qv8engine_p.h | 2 +- src/qml/types/qquickworkerscript.cpp | 12 +- src/quick/doc/snippets/qml/animatedimage.qml | 2 +- src/quick/doc/snippets/qml/listview/listview.qml | 2 +- src/quick/doc/snippets/qml/loader/connections.qml | 2 +- src/quick/doc/snippets/qml/loader/simple.qml | 2 +- src/quick/doc/snippets/qml/parentanimation.qml | 4 +- src/quick/doc/snippets/qml/parentchange.qml | 4 +- src/quick/doc/snippets/qml/propertyanimation.qml | 4 +- src/quick/doc/snippets/qml/propertychanges.qml | 4 +- src/quick/doc/snippets/qml/repeaters/repeater.qml | 6 +- src/quick/doc/snippets/qml/rotationanimation.qml | 4 +- src/quick/doc/snippets/qml/row.qml | 2 +- src/quick/doc/snippets/qml/state.qml | 4 +- src/quick/doc/snippets/qml/transition-from-to.qml | 2 +- .../doc/snippets/qml/transition-reversible.qml | 2 +- src/quick/doc/snippets/qml/transition.qml | 4 +- src/quick/util/qquickimageprovider.cpp | 18 +-- src/quick/util/qquickpixmapcache.cpp | 44 +++---- src/quick/util/qquickstate_p_p.h | 2 +- src/quick/util/qquicktimeline.cpp | 24 ++-- src/quick/util/qquicktransitionmanager.cpp | 12 +- src/quick/util/qquicktransitionmanager_p_p.h | 2 +- .../auto/particles/qquickgroupgoal/data/basic.qml | 2 +- .../qpacketprotocol/tst_qpacketprotocol.cpp | 4 +- tests/auto/qml/debugger/shared/qqmldebugclient.cpp | 2 +- tests/auto/qml/parserstress/tests/shell.js | 36 +++--- .../auto/qml/qqmlcomponent/data/incubateObject.qml | 4 +- .../data/aliasBindingsAssignCorrectly.qml | 2 +- .../data/aliasBindingsOverrideTarget.3.qml | 2 +- .../data/aliasPropertyAndBinding.qml | 6 +- .../qml/qqmlecmascript/data/assignBasicTypes.2.qml | 2 +- .../qml/qqmlecmascript/data/assignBasicTypes.qml | 2 +- tests/auto/qml/qqmlecmascript/data/bindingLoop.qml | 20 ++-- .../data/boolPropertiesEvaluateAsBool.1.qml | 4 +- .../data/boolPropertiesEvaluateAsBool.2.qml | 4 +- .../data/constantsOverrideBindings.2.qml | 4 +- .../data/constantsOverrideBindings.4.qml | 2 +- .../auto/qml/qqmlecmascript/data/deletedEngine.qml | 2 +- .../qml/qqmlecmascript/data/dynamicDeletion.2.qml | 2 +- tests/auto/qml/qqmlecmascript/data/eval.qml | 10 +- tests/auto/qml/qqmlecmascript/data/include.qml | 4 +- .../qml/qqmlecmascript/data/include_callback.qml | 4 +- .../auto/qml/qqmlecmascript/data/include_remote.js | 8 +- .../qqmlecmascript/data/include_remote_missing.js | 4 +- .../qml/qqmlecmascript/data/include_shared.qml | 4 +- tests/auto/qml/qqmlecmascript/data/methods.1.qml | 4 +- tests/auto/qml/qqmlecmascript/data/methods.2.qml | 4 +- .../data/outerBindingOverridesInnerBinding.qml | 4 +- .../qml/qqmlecmascript/data/propertySplicing.qml | 2 +- .../auto/qml/qqmlecmascript/data/propertyVar.2.qml | 2 +- .../qqmlecmascript/data/propertyVarOwnership.2.qml | 2 +- .../qqmlecmascript/data/propertyVarOwnership.3.qml | 2 +- .../qqmlecmascript/data/propertyVarOwnership.qml | 2 +- tests/auto/qml/qqmlecmascript/data/scope.2.qml | 2 +- .../qml/qqmlecmascript/data/scriptConnect.1.qml | 4 +- .../qml/qqmlecmascript/data/scriptConnect.2.qml | 4 +- .../qml/qqmlecmascript/data/scriptConnect.3.qml | 4 +- .../qml/qqmlecmascript/data/scriptConnect.4.qml | 2 +- .../qml/qqmlecmascript/data/scriptConnect.5.qml | 2 +- .../qml/qqmlecmascript/data/scriptConnect.6.qml | 4 +- .../qml/qqmlecmascript/data/scriptDisconnect.1.qml | 4 +- .../qml/qqmlecmascript/data/scriptDisconnect.2.qml | 4 +- .../qml/qqmlecmascript/data/scriptDisconnect.3.qml | 4 +- .../qml/qqmlecmascript/data/scriptDisconnect.4.qml | 4 +- tests/auto/qml/qqmlecmascript/data/scriptErrors.js | 2 +- .../qqmlecmascript/data/selfDeletingBinding.2.qml | 2 +- .../qml/qqmlecmascript/data/signalAssignment.1.qml | 4 +- .../qml/qqmlecmascript/data/signalAssignment.2.qml | 2 +- .../data/signalTriggeredBindings.qml | 2 +- tests/auto/qml/qqmlecmascript/testtypes.h | 6 +- .../auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 48 ++++---- tests/auto/qml/qqmlengine/qqmlengine.pro | 2 +- .../qml/qqmlinstruction/tst_qqmlinstruction.cpp | 2 +- tests/auto/qml/qqmllanguage/data/NestedAlias.qml | 4 +- .../auto/qml/qqmllanguage/data/OnCompletedType.qml | 2 +- .../qml/qqmllanguage/data/OnDestructionType.qml | 2 +- tests/auto/qml/qqmllanguage/data/alias.4.qml | 2 +- tests/auto/qml/qqmllanguage/data/alias.5.qml | 2 +- .../qml/qqmllanguage/data/assignBasicTypes.qml | 2 +- .../qqmllanguage/data/defaultPropertyListOrder.qml | 4 +- .../data/dynamicObjectProperties.2.qml | 2 +- .../qqmllanguage/data/dynamicObjectProperties.qml | 2 +- .../auto/qml/qqmllanguage/data/interfaceQList.qml | 2 +- .../qqmllanguage/data/invalidGroupedProperty.1.qml | 2 +- .../qqmllanguage/data/invalidGroupedProperty.2.qml | 2 +- .../qqmllanguage/data/nonexistantProperty.3.qml | 4 +- tests/auto/qml/qqmllanguage/data/onCompleted.qml | 2 +- tests/auto/qml/qqmllanguage/data/onDestruction.qml | 2 +- tests/auto/qml/qqmllanguage/testtypes.h | 2 +- tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp | 28 ++--- .../auto/qml/qqmllistmodel/data/multipleroles.qml | 6 +- tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp | 6 +- .../data/importsMixedQmlCppPlugin.2.qml | 2 +- .../data/importsMixedQmlCppPlugin.qml | 2 +- .../qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp | 2 +- .../auto/qml/qqmlvaluetypes/data/conflicting.1.qml | 2 +- .../auto/qml/qqmlvaluetypes/data/conflicting.2.qml | 2 +- .../auto/qml/qqmlvaluetypes/data/conflicting.3.qml | 2 +- .../qml/qqmlxmlhttprequest/data/abort_opened.qml | 4 +- .../qml/qqmlxmlhttprequest/data/abort_unsent.qml | 2 +- tests/auto/qml/qqmlxmlhttprequest/data/element.qml | 4 +- .../data/getAllResponseHeaders.qml | 36 +++--- .../qqmlxmlhttprequest/data/getResponseHeader.qml | 52 ++++----- .../qqmlxmlhttprequest/data/invalidMethodUsage.qml | 2 +- .../qml/qqmlxmlhttprequest/data/redirectError.qml | 2 +- .../qml/qqmlxmlhttprequest/data/redirectRecur.qml | 2 +- .../auto/qml/qqmlxmlhttprequest/data/redirects.qml | 2 +- .../qqmlxmlhttprequest/data/send_alreadySent.qml | 2 +- tests/auto/qml/qqmlxmlhttprequest/data/status.qml | 36 +++--- .../qml/qqmlxmlhttprequest/data/statusText.qml | 36 +++--- .../qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp | 18 +-- .../tst_qquickfolderlistmodel.cpp | 4 +- .../qquickworkerscript/tst_qquickworkerscript.cpp | 2 +- .../quick/qquickanimations/data/runningTrueBug.qml | 2 +- .../qquickgridview/data/gridview-enforcerange.qml | 2 +- .../qquickgridview/data/propertychangestest.qml | 8 +- tests/auto/quick/qquickimage/data/aspectratio.qml | 2 +- .../tst_qquickimageprovider.cpp | 12 +- .../quick/qquickitem2/data/childrenRectBug3.qml | 2 +- .../qquicklistview/data/listview-enforcerange.qml | 2 +- .../qquicklistview/data/propertychangestest.qml | 8 +- .../auto/quick/qquicklistview/incrementalmodel.cpp | 6 +- .../quick/qquickmousearea/data/dragproperties.qml | 2 +- .../auto/quick/qquickmousearea/data/dragreset.qml | 2 +- .../quick/qquickpathview/data/propertychanges.qml | 4 +- .../auto/quick/qquickrepeater/data/properties.qml | 10 +- .../qquickstyledtext/tst_qquickstyledtext.cpp | 2 +- .../qquicktextedit/data/http/cursorHttpTest.qml | 4 +- .../data/http/cursorHttpTestFail1.qml | 4 +- .../data/http/cursorHttpTestFail2.qml | 4 +- .../data/http/cursorHttpTestPass.qml | 4 +- .../quick/qquicktextedit/data/inputmethodhints.qml | 2 +- .../auto/quick/qquicktextedit/data/navigation.qml | 4 +- .../auto/quick/qquicktextinput/data/navigation.qml | 4 +- .../auto/quick/qquicktextinput/data/validators.qml | 2 +- .../qquickxmllistmodel/tst_qquickxmllistmodel.cpp | 10 +- tests/auto/shared/testhttpserver.cpp | 6 +- .../benchmarks/qml/binding/data/localproperty.txt | 2 +- tests/benchmarks/qml/javascript/testtypes.h | 4 +- tests/benchmarks/qml/painting/paintbenchmark.cpp | 4 +- tests/benchmarks/qml/qmltime/qmltime.cpp | 6 +- tests/benchmarks/qml/qmltime/qmltime.pro | 2 +- .../qml/qqmlmetaproperty/qqmlmetaproperty.pro | 2 +- tests/benchmarks/qml/script/data/slot_complex.qml | 2 +- tests/manual/v4/test262.py | 12 +- tests/manual/v4/v8-bench.js | 16 +-- tools/qmlprofiler/qpacketprotocol.cpp | 2 +- tools/qmlprofiler/qqmldebugclient.cpp | 2 +- 299 files changed, 1248 insertions(+), 1248 deletions(-) diff --git a/examples/qml/dynamicscene/content/PaletteItem.qml b/examples/qml/dynamicscene/content/PaletteItem.qml index a74d7b6413..62d6efedc6 100644 --- a/examples/qml/dynamicscene/content/PaletteItem.qml +++ b/examples/qml/dynamicscene/content/PaletteItem.qml @@ -49,7 +49,7 @@ Image { source: image - MouseArea { + MouseArea { anchors.fill: parent onPressed: Code.startDrag(mouse); diff --git a/examples/qml/dynamicscene/content/PerspectiveItem.qml b/examples/qml/dynamicscene/content/PerspectiveItem.qml index 509d29320f..d0d1da9228 100644 --- a/examples/qml/dynamicscene/content/PerspectiveItem.qml +++ b/examples/qml/dynamicscene/content/PerspectiveItem.qml @@ -44,9 +44,9 @@ Image { id: rootItem property bool created: false - property string image + property string image - property double scaledBottom: y + (height + height*scale) / 2 + property double scaledBottom: y + (height + height*scale) / 2 property bool onLand: scaledBottom > (window.height / 2 + window.centerOffset) source: image diff --git a/examples/qml/dynamicscene/content/Sun.qml b/examples/qml/dynamicscene/content/Sun.qml index e2101a252b..5e867e45aa 100644 --- a/examples/qml/dynamicscene/content/Sun.qml +++ b/examples/qml/dynamicscene/content/Sun.qml @@ -49,7 +49,7 @@ Image { source: image onCreatedChanged: { if (created) { - sun.z = 1; // above the sky but below the ground layer + sun.z = 1; // above the sky but below the ground layer window.activeSuns++; // once item is created, start moving offscreen dropYAnim.duration = (window.height + window.centerOffset - sun.y) * 16; diff --git a/examples/qml/dynamicscene/content/itemCreation.js b/examples/qml/dynamicscene/content/itemCreation.js index 40f5415f9f..2829a83410 100644 --- a/examples/qml/dynamicscene/content/itemCreation.js +++ b/examples/qml/dynamicscene/content/itemCreation.js @@ -22,7 +22,7 @@ function loadComponent() { itemComponent = Qt.createComponent(paletteItem.componentFile); if (itemComponent.status == Component.Loading) //Depending on the content, it can be ready or error immediately component.statusChanged.connect(createItem); - else + else createItem(); } diff --git a/examples/qml/networkaccessmanagerfactory/networkaccessmanagerfactory.pro b/examples/qml/networkaccessmanagerfactory/networkaccessmanagerfactory.pro index 5994ab221e..b4d6d827fd 100644 --- a/examples/qml/networkaccessmanagerfactory/networkaccessmanagerfactory.pro +++ b/examples/qml/networkaccessmanagerfactory/networkaccessmanagerfactory.pro @@ -1,7 +1,7 @@ TEMPLATE = app QT += qml quick network -SOURCES += main.cpp +SOURCES += main.cpp RESOURCES += networkaccessmanagerfactory.qrc target.path = $$[QT_INSTALL_EXAMPLES]/qml/networkaccessmanagerfactory diff --git a/examples/qml/referenceexamples/adding/adding.pro b/examples/qml/referenceexamples/adding/adding.pro index 86c830bda9..602898f1b8 100644 --- a/examples/qml/referenceexamples/adding/adding.pro +++ b/examples/qml/referenceexamples/adding/adding.pro @@ -1,7 +1,7 @@ QT += qml SOURCES += main.cpp \ - person.cpp + person.cpp HEADERS += person.h RESOURCES += adding.qrc diff --git a/examples/qml/referenceexamples/attached/attached.pro b/examples/qml/referenceexamples/attached/attached.pro index 1225a5fcfd..16b585bc45 100644 --- a/examples/qml/referenceexamples/attached/attached.pro +++ b/examples/qml/referenceexamples/attached/attached.pro @@ -2,7 +2,7 @@ QT += qml SOURCES += main.cpp \ person.cpp \ - birthdayparty.cpp + birthdayparty.cpp HEADERS += person.h \ birthdayparty.h RESOURCES += attached.qrc diff --git a/examples/qml/referenceexamples/binding/binding.pro b/examples/qml/referenceexamples/binding/binding.pro index 3c1f9565ed..636d0a10f1 100644 --- a/examples/qml/referenceexamples/binding/binding.pro +++ b/examples/qml/referenceexamples/binding/binding.pro @@ -3,7 +3,7 @@ QT += qml SOURCES += main.cpp \ person.cpp \ birthdayparty.cpp \ - happybirthdaysong.cpp + happybirthdaysong.cpp HEADERS += person.h \ birthdayparty.h \ happybirthdaysong.h diff --git a/examples/qml/referenceexamples/binding/happybirthdaysong.cpp b/examples/qml/referenceexamples/binding/happybirthdaysong.cpp index af60dd329c..6e3a9fcf6d 100644 --- a/examples/qml/referenceexamples/binding/happybirthdaysong.cpp +++ b/examples/qml/referenceexamples/binding/happybirthdaysong.cpp @@ -72,10 +72,10 @@ void HappyBirthdaySong::setName(const QString &name) m_lyrics << "Happy birthday dear " + m_name + ","; m_lyrics << "Happy birthday to you!"; m_lyrics << ""; - + emit nameChanged(); } - + void HappyBirthdaySong::advance() { m_line = (m_line + 1) % m_lyrics.count(); diff --git a/examples/qml/referenceexamples/binding/main.cpp b/examples/qml/referenceexamples/binding/main.cpp index 0d4b13d63f..f09b45fed2 100644 --- a/examples/qml/referenceexamples/binding/main.cpp +++ b/examples/qml/referenceexamples/binding/main.cpp @@ -72,7 +72,7 @@ int main(int argc, char ** argv) Person *guest = party->guest(ii); QDate rsvpDate; - QObject *attached = + QObject *attached = qmlAttachedPropertiesObject(guest, false); if (attached) rsvpDate = attached->property("rsvp").toDate(); diff --git a/examples/qml/referenceexamples/coercion/coercion.pro b/examples/qml/referenceexamples/coercion/coercion.pro index c501b9cda2..7fca26c15e 100644 --- a/examples/qml/referenceexamples/coercion/coercion.pro +++ b/examples/qml/referenceexamples/coercion/coercion.pro @@ -2,7 +2,7 @@ QT += qml SOURCES += main.cpp \ person.cpp \ - birthdayparty.cpp + birthdayparty.cpp HEADERS += person.h \ birthdayparty.h RESOURCES += coercion.qrc diff --git a/examples/qml/referenceexamples/default/default.pro b/examples/qml/referenceexamples/default/default.pro index db4b88413b..c43867fc4a 100644 --- a/examples/qml/referenceexamples/default/default.pro +++ b/examples/qml/referenceexamples/default/default.pro @@ -2,7 +2,7 @@ QT += qml SOURCES += main.cpp \ person.cpp \ - birthdayparty.cpp + birthdayparty.cpp HEADERS += person.h \ birthdayparty.h RESOURCES += default.qrc diff --git a/examples/qml/referenceexamples/extended/extended.pro b/examples/qml/referenceexamples/extended/extended.pro index b38a1753b9..22d8ded708 100644 --- a/examples/qml/referenceexamples/extended/extended.pro +++ b/examples/qml/referenceexamples/extended/extended.pro @@ -1,7 +1,7 @@ QT += qml widgets SOURCES += main.cpp \ - lineedit.cpp + lineedit.cpp HEADERS += lineedit.h RESOURCES += extended.qrc diff --git a/examples/qml/referenceexamples/extended/lineedit.cpp b/examples/qml/referenceexamples/extended/lineedit.cpp index 522f8074ea..9c916a1bd8 100644 --- a/examples/qml/referenceexamples/extended/lineedit.cpp +++ b/examples/qml/referenceexamples/extended/lineedit.cpp @@ -66,7 +66,7 @@ int LineEditExtension::rightMargin() const return r; } -void LineEditExtension::setRightMargin(int m) +void LineEditExtension::setRightMargin(int m) { int l, r, t, b; m_lineedit->getTextMargins(&l, &t, &r, &b); @@ -80,7 +80,7 @@ int LineEditExtension::topMargin() const return t; } -void LineEditExtension::setTopMargin(int m) +void LineEditExtension::setTopMargin(int m) { int l, r, t, b; m_lineedit->getTextMargins(&l, &t, &r, &b); @@ -94,7 +94,7 @@ int LineEditExtension::bottomMargin() const return b; } -void LineEditExtension::setBottomMargin(int m) +void LineEditExtension::setBottomMargin(int m) { int l, r, t, b; m_lineedit->getTextMargins(&l, &t, &r, &b); diff --git a/examples/qml/referenceexamples/grouped/grouped.pro b/examples/qml/referenceexamples/grouped/grouped.pro index 7014d9680d..ef66ea3e1d 100644 --- a/examples/qml/referenceexamples/grouped/grouped.pro +++ b/examples/qml/referenceexamples/grouped/grouped.pro @@ -2,7 +2,7 @@ QT += qml SOURCES += main.cpp \ person.cpp \ - birthdayparty.cpp + birthdayparty.cpp HEADERS += person.h \ birthdayparty.h RESOURCES += grouped.qrc diff --git a/examples/qml/referenceexamples/methods/methods.pro b/examples/qml/referenceexamples/methods/methods.pro index c1be0713e6..911a460444 100644 --- a/examples/qml/referenceexamples/methods/methods.pro +++ b/examples/qml/referenceexamples/methods/methods.pro @@ -2,7 +2,7 @@ QT += qml SOURCES += main.cpp \ person.cpp \ - birthdayparty.cpp + birthdayparty.cpp HEADERS += person.h \ birthdayparty.h RESOURCES += methods.qrc diff --git a/examples/qml/referenceexamples/properties/properties.pro b/examples/qml/referenceexamples/properties/properties.pro index cd1ffeddcc..0349d44091 100644 --- a/examples/qml/referenceexamples/properties/properties.pro +++ b/examples/qml/referenceexamples/properties/properties.pro @@ -2,7 +2,7 @@ QT += qml SOURCES += main.cpp \ person.cpp \ - birthdayparty.cpp + birthdayparty.cpp HEADERS += person.h \ birthdayparty.h RESOURCES += properties.qrc diff --git a/examples/qml/referenceexamples/signal/main.cpp b/examples/qml/referenceexamples/signal/main.cpp index 8abb7d4234..dce5f71a9d 100644 --- a/examples/qml/referenceexamples/signal/main.cpp +++ b/examples/qml/referenceexamples/signal/main.cpp @@ -71,7 +71,7 @@ int main(int argc, char ** argv) Person *guest = party->guest(ii); QDate rsvpDate; - QObject *attached = + QObject *attached = qmlAttachedPropertiesObject(guest, false); if (attached) rsvpDate = attached->property("rsvp").toDate(); diff --git a/examples/qml/referenceexamples/signal/signal.pro b/examples/qml/referenceexamples/signal/signal.pro index 81692d3676..2dbc8e624b 100644 --- a/examples/qml/referenceexamples/signal/signal.pro +++ b/examples/qml/referenceexamples/signal/signal.pro @@ -2,7 +2,7 @@ QT += qml SOURCES += main.cpp \ person.cpp \ - birthdayparty.cpp + birthdayparty.cpp HEADERS += person.h \ birthdayparty.h RESOURCES += signal.qrc diff --git a/examples/qml/referenceexamples/valuesource/example.qml b/examples/qml/referenceexamples/valuesource/example.qml index e36cf7fc4f..1357536f5f 100644 --- a/examples/qml/referenceexamples/valuesource/example.qml +++ b/examples/qml/referenceexamples/valuesource/example.qml @@ -54,22 +54,22 @@ BirthdayParty { shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 } } - Boy { - name: "Leo Hodges" + Boy { + name: "Leo Hodges" BirthdayParty.rsvp: "2009-07-06" shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 } } - Boy { - name: "Jack Smith" + Boy { + name: "Jack Smith" shoe { size: 8; color: "blue"; brand: "Puma"; price: 19.95 } } - Girl { - name: "Anne Brown" + Girl { + name: "Anne Brown" BirthdayParty.rsvp: "2009-07-01" shoe.size: 7 shoe.color: "red" shoe.brand: "Marc Jacobs" - shoe.price: 699.99 + shoe.price: 699.99 } // ![1] diff --git a/examples/qml/referenceexamples/valuesource/happybirthdaysong.cpp b/examples/qml/referenceexamples/valuesource/happybirthdaysong.cpp index e41e3ea074..50fbea6e3c 100644 --- a/examples/qml/referenceexamples/valuesource/happybirthdaysong.cpp +++ b/examples/qml/referenceexamples/valuesource/happybirthdaysong.cpp @@ -70,7 +70,7 @@ void HappyBirthdaySong::setName(const QString &name) m_lyrics << "Happy birthday to you!"; m_lyrics << ""; } - + void HappyBirthdaySong::advance() { m_line = (m_line + 1) % m_lyrics.count(); diff --git a/examples/qml/referenceexamples/valuesource/main.cpp b/examples/qml/referenceexamples/valuesource/main.cpp index a7fba9e95e..ec88333ede 100644 --- a/examples/qml/referenceexamples/valuesource/main.cpp +++ b/examples/qml/referenceexamples/valuesource/main.cpp @@ -73,7 +73,7 @@ int main(int argc, char ** argv) Person *guest = party->guest(ii); QDate rsvpDate; - QObject *attached = + QObject *attached = qmlAttachedPropertiesObject(guest, false); if (attached) rsvpDate = attached->property("rsvp").toDate(); diff --git a/examples/qml/referenceexamples/valuesource/valuesource.pro b/examples/qml/referenceexamples/valuesource/valuesource.pro index 4ec77ff83b..01cfeeb6d8 100644 --- a/examples/qml/referenceexamples/valuesource/valuesource.pro +++ b/examples/qml/referenceexamples/valuesource/valuesource.pro @@ -3,7 +3,7 @@ QT += qml SOURCES += main.cpp \ person.cpp \ birthdayparty.cpp \ - happybirthdaysong.cpp + happybirthdaysong.cpp HEADERS += person.h \ birthdayparty.h \ happybirthdaysong.h diff --git a/examples/qml/tutorials/extending/chapter4-customPropertyTypes/app.qml b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/app.qml index 441b7f9b82..c757fdaedd 100644 --- a/examples/qml/tutorials/extending/chapter4-customPropertyTypes/app.qml +++ b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/app.qml @@ -49,9 +49,9 @@ Item { anchors.centerIn: parent width: 100; height: 100 - pieSlice: PieSlice { + pieSlice: PieSlice { anchors.fill: parent - color: "red" + color: "red" } } diff --git a/examples/qml/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro index 6d5c7acb6c..1742334107 100644 --- a/examples/qml/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro +++ b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro @@ -1,7 +1,7 @@ QT += qml quick HEADERS += piechart.h \ - pieslice.h + pieslice.h SOURCES += piechart.cpp \ pieslice.cpp \ main.cpp diff --git a/examples/qml/tutorials/extending/chapter5-listproperties/app.qml b/examples/qml/tutorials/extending/chapter5-listproperties/app.qml index a57d1b833f..68aa6e0c1d 100644 --- a/examples/qml/tutorials/extending/chapter5-listproperties/app.qml +++ b/examples/qml/tutorials/extending/chapter5-listproperties/app.qml @@ -49,17 +49,17 @@ Item { width: 100; height: 100 slices: [ - PieSlice { + PieSlice { anchors.fill: parent color: "red" - fromAngle: 0; angleSpan: 110 + fromAngle: 0; angleSpan: 110 }, - PieSlice { + PieSlice { anchors.fill: parent color: "black" - fromAngle: 110; angleSpan: 50 + fromAngle: 110; angleSpan: 50 }, - PieSlice { + PieSlice { anchors.fill: parent color: "blue" fromAngle: 160; angleSpan: 100 diff --git a/examples/qml/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro b/examples/qml/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro index 7cc2b40488..ba51dd9093 100644 --- a/examples/qml/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro +++ b/examples/qml/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro @@ -1,7 +1,7 @@ QT += qml quick HEADERS += piechart.h \ - pieslice.h + pieslice.h SOURCES += piechart.cpp \ pieslice.cpp \ main.cpp diff --git a/examples/qml/tutorials/extending/chapter6-plugins/app.qml b/examples/qml/tutorials/extending/chapter6-plugins/app.qml index 417fc6651a..d5a474b8d3 100644 --- a/examples/qml/tutorials/extending/chapter6-plugins/app.qml +++ b/examples/qml/tutorials/extending/chapter6-plugins/app.qml @@ -48,17 +48,17 @@ Item { width: 100; height: 100 slices: [ - PieSlice { + PieSlice { anchors.fill: parent color: "red" - fromAngle: 0; angleSpan: 110 + fromAngle: 0; angleSpan: 110 }, - PieSlice { + PieSlice { anchors.fill: parent color: "black" - fromAngle: 110; angleSpan: 50 + fromAngle: 110; angleSpan: 50 }, - PieSlice { + PieSlice { anchors.fill: parent color: "blue" fromAngle: 160; angleSpan: 100 diff --git a/examples/qml/tutorials/extending/extending.pro b/examples/qml/tutorials/extending/extending.pro index 967473fda0..a665975382 100644 --- a/examples/qml/tutorials/extending/extending.pro +++ b/examples/qml/tutorials/extending/extending.pro @@ -6,5 +6,5 @@ SUBDIRS += \ chapter3-bindings \ chapter4-customPropertyTypes \ chapter5-listproperties \ - chapter6-plugins + chapter6-plugins diff --git a/examples/qmltest/qmltest/tst_basic.qml b/examples/qmltest/qmltest/tst_basic.qml index 79bf81ab36..ee157cf155 100644 --- a/examples/qmltest/qmltest/tst_basic.qml +++ b/examples/qmltest/qmltest/tst_basic.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import QtQuick 2.0 +import QtQuick 2.0 import QtTest 1.0 TestCase { diff --git a/examples/quick/animation/behaviors/SideRect.qml b/examples/quick/animation/behaviors/SideRect.qml index be7dad3466..e8b0bea826 100644 --- a/examples/quick/animation/behaviors/SideRect.qml +++ b/examples/quick/animation/behaviors/SideRect.qml @@ -54,8 +54,8 @@ Rectangle { anchors.fill: parent hoverEnabled: true onEntered: { - focusRect.x = myRect.x; - focusRect.y = myRect.y; + focusRect.x = myRect.x; + focusRect.y = myRect.y; focusRect.text = myRect.text; } } diff --git a/examples/quick/animation/behaviors/tvtennis.qml b/examples/quick/animation/behaviors/tvtennis.qml index 4ca909cd8c..b5ad2e8667 100644 --- a/examples/quick/animation/behaviors/tvtennis.qml +++ b/examples/quick/animation/behaviors/tvtennis.qml @@ -64,7 +64,7 @@ Rectangle { PropertyAction { target: ball; property: "direction"; value: "right" } } - // Make y move with a velocity of 200 + // Make y move with a velocity of 200 Behavior on y { SpringAnimation{ velocity: 200; } } diff --git a/examples/quick/animation/states/states.qml b/examples/quick/animation/states/states.qml index 26acaf7bf0..7f3b840956 100644 --- a/examples/quick/animation/states/states.qml +++ b/examples/quick/animation/states/states.qml @@ -45,7 +45,7 @@ Rectangle { width: 640; height: 480 color: "#343434" - Image { + Image { id: userIcon x: topLeftRect.x; y: topLeftRect.y source: "qt-logo.png" diff --git a/examples/quick/animation/states/transitions.qml b/examples/quick/animation/states/transitions.qml index 8216182c06..e90dde35d8 100644 --- a/examples/quick/animation/states/transitions.qml +++ b/examples/quick/animation/states/transitions.qml @@ -42,7 +42,7 @@ import QtQuick 2.0 /* This is exactly the same as states.qml, except that we have appended - a set of transitions to apply animations when the item changes + a set of transitions to apply animations when the item changes between each state. */ @@ -51,7 +51,7 @@ Rectangle { width: 640; height: 480 color: "#343434" - Image { + Image { id: userIcon x: topLeftRect.x; y: topLeftRect.y source: "qt-logo.png" diff --git a/examples/quick/customitems/flipable/content/Card.qml b/examples/quick/customitems/flipable/content/Card.qml index 776a8ac1b0..c34dfb288c 100644 --- a/examples/quick/customitems/flipable/content/Card.qml +++ b/examples/quick/customitems/flipable/content/Card.qml @@ -49,7 +49,7 @@ Flipable { property int yAxis: 0 property int angle: 0 - width: front.width; height: front.height + width: front.width; height: front.height front: Image { id: frontImage } back: Image { source: "back.png" } diff --git a/examples/quick/customitems/flipable/flipable.qml b/examples/quick/customitems/flipable/flipable.qml index f47444a64d..5e809c2085 100644 --- a/examples/quick/customitems/flipable/flipable.qml +++ b/examples/quick/customitems/flipable/flipable.qml @@ -43,7 +43,7 @@ import "content" Rectangle { id: window - + width: 480; height: 320 color: "darkgreen" diff --git a/examples/quick/customitems/searchbox/SearchBox.qml b/examples/quick/customitems/searchbox/SearchBox.qml index cab0058bce..306640ec4d 100644 --- a/examples/quick/customitems/searchbox/SearchBox.qml +++ b/examples/quick/customitems/searchbox/SearchBox.qml @@ -66,7 +66,7 @@ FocusScope { font.italic: true } - MouseArea { + MouseArea { anchors.fill: parent onClicked: { focusScope.focus = true; Qt.inputMethod.show(); } } @@ -84,7 +84,7 @@ FocusScope { source: "images/clear.png" opacity: 0 - MouseArea { + MouseArea { anchors.fill: parent onClicked: { textInput.text = ''; focusScope.focus = true; textInput.openSoftwareInputPanel(); } } diff --git a/examples/quick/customitems/slideswitch/content/Switch.qml b/examples/quick/customitems/slideswitch/content/Switch.qml index 889ceb27bc..51b7185b72 100644 --- a/examples/quick/customitems/slideswitch/content/Switch.qml +++ b/examples/quick/customitems/slideswitch/content/Switch.qml @@ -53,7 +53,7 @@ Item { function toggle() { if (toggleswitch.state == "on") toggleswitch.state = "off"; - else + else toggleswitch.state = "on"; } //![2] diff --git a/examples/quick/demos/tweetsearch/content/FlipBar.qml b/examples/quick/demos/tweetsearch/content/FlipBar.qml index 4b6cd48f93..729bf68c5a 100644 --- a/examples/quick/demos/tweetsearch/content/FlipBar.qml +++ b/examples/quick/demos/tweetsearch/content/FlipBar.qml @@ -59,7 +59,7 @@ Item { width: cur.width height: cur.height - onFrontChanged: resync(); + onFrontChanged: resync(); onBackChanged: resync(); function resync() {//TODO: Are the items ever actually visible? @@ -128,7 +128,7 @@ Item { sourceItem: back hideSource: effect.visible } - + fragmentShader: " uniform lowp float qt_Opacity; uniform sampler2D sourceA; diff --git a/examples/quick/imageelements/content/ImageCell.qml b/examples/quick/imageelements/content/ImageCell.qml index 4b3fee3522..d7679e3fff 100644 --- a/examples/quick/imageelements/content/ImageCell.qml +++ b/examples/quick/imageelements/content/ImageCell.qml @@ -52,7 +52,7 @@ Item { clip: true // only makes a difference if mode is PreserveAspectCrop } - Text { + Text { id: captionItem anchors.horizontalCenter: parent.horizontalCenter; anchors.bottom: parent.bottom } diff --git a/examples/quick/imageprovider/imageprovider.cpp b/examples/quick/imageprovider/imageprovider.cpp index 873b812d8a..31290578fc 100644 --- a/examples/quick/imageprovider/imageprovider.cpp +++ b/examples/quick/imageprovider/imageprovider.cpp @@ -63,7 +63,7 @@ public: if (size) *size = QSize(width, height); QPixmap pixmap(requestedSize.width() > 0 ? requestedSize.width() : width, - requestedSize.height() > 0 ? requestedSize.height() : height); + requestedSize.height() > 0 ? requestedSize.height() : height); pixmap.fill(QColor(id).rgba()); //![0] diff --git a/examples/quick/keyinteraction/focus/Core/ContextMenu.qml b/examples/quick/keyinteraction/focus/Core/ContextMenu.qml index 3bbce04b07..ff69f0b81d 100644 --- a/examples/quick/keyinteraction/focus/Core/ContextMenu.qml +++ b/examples/quick/keyinteraction/focus/Core/ContextMenu.qml @@ -54,7 +54,7 @@ FocusScope { focus: true Keys.onRightPressed: mainView.focus = true - Text { + Text { anchors { top: parent.top; horizontalCenter: parent.horizontalCenter; margins: 30 } color: "black" font.pixelSize: 14 diff --git a/examples/quick/keyinteraction/focus/Core/GridMenu.qml b/examples/quick/keyinteraction/focus/Core/GridMenu.qml index 0fba859466..22016c37d2 100644 --- a/examples/quick/keyinteraction/focus/Core/GridMenu.qml +++ b/examples/quick/keyinteraction/focus/Core/GridMenu.qml @@ -44,7 +44,7 @@ FocusScope { property alias interactive: gridView.interactive onActiveFocusChanged: { - if (activeFocus) + if (activeFocus) mainView.state = "showGridViews" } diff --git a/examples/quick/keyinteraction/focus/Core/ListMenu.qml b/examples/quick/keyinteraction/focus/Core/ListMenu.qml index 27ed804f63..8ca751b7f1 100644 --- a/examples/quick/keyinteraction/focus/Core/ListMenu.qml +++ b/examples/quick/keyinteraction/focus/Core/ListMenu.qml @@ -44,7 +44,7 @@ FocusScope { clip: true onActiveFocusChanged: { - if (activeFocus) + if (activeFocus) mainView.state = "showListViews" } diff --git a/examples/quick/keyinteraction/focus/Core/TabMenu.qml b/examples/quick/keyinteraction/focus/Core/TabMenu.qml index a803e5289b..470252f4da 100644 --- a/examples/quick/keyinteraction/focus/Core/TabMenu.qml +++ b/examples/quick/keyinteraction/focus/Core/TabMenu.qml @@ -42,7 +42,7 @@ import QtQuick 2.1 FocusScope { onActiveFocusChanged: { - if (activeFocus) + if (activeFocus) mainView.state = "showTabViews" } diff --git a/examples/quick/keyinteraction/focus/focus.qml b/examples/quick/keyinteraction/focus/focus.qml index 4e58d4b8cc..11139cd361 100644 --- a/examples/quick/keyinteraction/focus/focus.qml +++ b/examples/quick/keyinteraction/focus/focus.qml @@ -43,7 +43,7 @@ import "Core" Rectangle { id: window - + width: 800; height: 640 color: "#3E606F" @@ -73,11 +73,11 @@ Rectangle { activeFocusOnTab: true } - Rectangle { + Rectangle { id: shade anchors.fill: parent color: "black" - opacity: 0 + opacity: 0 } states: [ diff --git a/examples/quick/models/abstractitemmodel/model.h b/examples/quick/models/abstractitemmodel/model.h index be6a6b4933..b90e8ef039 100644 --- a/examples/quick/models/abstractitemmodel/model.h +++ b/examples/quick/models/abstractitemmodel/model.h @@ -41,7 +41,7 @@ #include //![0] -class Animal +class Animal { public: Animal(const QString &type, const QString &size); diff --git a/examples/quick/models/stringlistmodel/stringlistmodel.pro b/examples/quick/models/stringlistmodel/stringlistmodel.pro index 2d1f99d4ed..fe561083f7 100644 --- a/examples/quick/models/stringlistmodel/stringlistmodel.pro +++ b/examples/quick/models/stringlistmodel/stringlistmodel.pro @@ -1,6 +1,6 @@ QT += qml quick -SOURCES += main.cpp +SOURCES += main.cpp RESOURCES += stringlistmodel.qrc target.path = $$[QT_INSTALL_EXAMPLES]/quick/models/stringlistmodel diff --git a/examples/quick/particles/affectors/content/spritegoal.qml b/examples/quick/particles/affectors/content/spritegoal.qml index ab108bb065..f5702fb9a7 100644 --- a/examples/quick/particles/affectors/content/spritegoal.qml +++ b/examples/quick/particles/affectors/content/spritegoal.qml @@ -149,7 +149,7 @@ Item { Item { id: circle - x: root.width / 1.2 + x: root.width / 1.2 y: root.height / 1.7 property real percent: 0 @@ -167,7 +167,7 @@ Item { } ImageParticle { - z:0 + z:0 system: sys groups: ["exhaust"] source: "qrc:///particleresources/fuzzydot.png" @@ -199,7 +199,7 @@ Item { lifeSpan: 500 y: holder.y - x: holder.x + x: holder.x velocity: PointDirection { xVariation: 40; yVariation: 40; } velocityFromMovement: 16 diff --git a/examples/quick/particles/affectors/content/wander.qml b/examples/quick/particles/affectors/content/wander.qml index f28aa03459..da0dcf261e 100644 --- a/examples/quick/particles/affectors/content/wander.qml +++ b/examples/quick/particles/affectors/content/wander.qml @@ -57,7 +57,7 @@ Rectangle { } //! [0] - Wander { + Wander { id: wanderer system: particles anchors.fill: parent diff --git a/examples/quick/particles/customparticle/content/blurparticles.qml b/examples/quick/particles/customparticle/content/blurparticles.qml index a5abb07ce6..583d5c251c 100644 --- a/examples/quick/particles/customparticle/content/blurparticles.qml +++ b/examples/quick/particles/customparticle/content/blurparticles.qml @@ -67,14 +67,14 @@ Rectangle { } CustomParticle { - system: sys + system: sys //! [vertex] vertexShader:" uniform lowp float qt_Opacity; varying lowp float fFade; varying lowp float fBlur; - void main() { + void main() { defaultMain(); highp float t = (qt_Timestamp - qt_ParticleData.x) / qt_ParticleData.y; highp float fadeIn = min(t * 10., 1.); diff --git a/examples/quick/particles/customparticle/content/fragmentshader.qml b/examples/quick/particles/customparticle/content/fragmentshader.qml index ed61720419..04646f811e 100644 --- a/examples/quick/particles/customparticle/content/fragmentshader.qml +++ b/examples/quick/particles/customparticle/content/fragmentshader.qml @@ -73,7 +73,7 @@ ParticleSystem { varying lowp float fFade; varying highp vec2 fPos; - void main() { + void main() { qt_TexCoord0 = qt_ParticleTex; highp float size = qt_ParticleData.z; highp float endSize = qt_ParticleData.w; diff --git a/examples/quick/particles/customparticle/content/imagecolors.qml b/examples/quick/particles/customparticle/content/imagecolors.qml index 3fb4c9f378..0702e33a2d 100644 --- a/examples/quick/particles/customparticle/content/imagecolors.qml +++ b/examples/quick/particles/customparticle/content/imagecolors.qml @@ -81,7 +81,7 @@ Rectangle { varying lowp float fFade; uniform lowp float qt_Opacity; - void main() { + void main() { fTex2 = vec2(qt_ParticlePos.x, qt_ParticlePos.y); //Uncomment this next line for each particle to use full texture, instead of the solid color at the center of the particle. diff --git a/examples/quick/particles/imageparticle/content/allatonce.qml b/examples/quick/particles/imageparticle/content/allatonce.qml index 737b6955e2..068093cc19 100644 --- a/examples/quick/particles/imageparticle/content/allatonce.qml +++ b/examples/quick/particles/imageparticle/content/allatonce.qml @@ -46,7 +46,7 @@ Rectangle { width: 640 height: 480 ParticleSystem { - id: sys + id: sys } ImageParticle { diff --git a/examples/quick/particles/itemparticle/content/Delegate2.qml b/examples/quick/particles/itemparticle/content/Delegate2.qml index ba6d725a45..d4cb81261d 100644 --- a/examples/quick/particles/itemparticle/content/Delegate2.qml +++ b/examples/quick/particles/itemparticle/content/Delegate2.qml @@ -43,7 +43,7 @@ import QtQuick 2.0 //![0] Package { Item { id: gridDelegate; width: w; height: h; Package.name: 'grid' } - Item { id: particleDelegate; width: w; height: h; Package.name: 'particles' + Item { id: particleDelegate; width: w; height: h; Package.name: 'particles' Rectangle { id: wrapper diff --git a/examples/quick/particles/itemparticle/content/ExpandingDelegate.qml b/examples/quick/particles/itemparticle/content/ExpandingDelegate.qml index c2a679b4ef..28e490787c 100644 --- a/examples/quick/particles/itemparticle/content/ExpandingDelegate.qml +++ b/examples/quick/particles/itemparticle/content/ExpandingDelegate.qml @@ -103,7 +103,7 @@ import "../../../modelviews/listview/content" width: background.width - recipeImage.width - 20; height: recipeImage.height spacing: 5 - Text { + Text { text: title font.bold: true; font.pointSize: 16 } @@ -185,7 +185,7 @@ import "../../../modelviews/listview/content" } transitions: Transition { - //The only strictly necessary particle specific lines + //The only strictly necessary particle specific lines to: "Details" reversible: true ScriptAction {script: { diff --git a/examples/quick/particles/itemparticle/particleview.qml b/examples/quick/particles/itemparticle/particleview.qml index 2637e13107..89dcf61a05 100644 --- a/examples/quick/particles/itemparticle/particleview.qml +++ b/examples/quick/particles/itemparticle/particleview.qml @@ -224,7 +224,7 @@ Item { anchors.centerIn: parent antialiasing: true; source: "http://" + Script.getImagePath(content); cache: true - fillMode: Image.PreserveAspectFit; + fillMode: Image.PreserveAspectFit; width: parent.width-4; height: parent.height-4 onStatusChanged: if (img.status == Image.Ready) { loading.opacity = 0; diff --git a/examples/quick/positioners/positioners-transitions.qml b/examples/quick/positioners/positioners-transitions.qml index 64ee15af32..8341d6c442 100644 --- a/examples/quick/positioners/positioners-transitions.qml +++ b/examples/quick/positioners/positioners-transitions.qml @@ -73,7 +73,7 @@ Rectangle { width: 100; height: 50 color: "lightsteelblue" border.color: "black" - radius: 15 + radius: 15 Behavior on opacity { NumberAnimation {} } opacity: effectiveOpacity } @@ -86,7 +86,7 @@ Rectangle { width: 100; height: 50 color: "lightsteelblue" border.color: "black" - radius: 15 + radius: 15 Behavior on opacity { NumberAnimation {} } opacity: effectiveOpacity } @@ -129,7 +129,7 @@ Rectangle { width: 50; height: 100 color: "lightsteelblue" border.color: "black" - radius: 15 + radius: 15 Behavior on opacity { NumberAnimation {} } opacity: effectiveOpacity } @@ -161,7 +161,7 @@ Rectangle { width: 50; height: 50 color: "lightsteelblue" border.color: "black" - radius: 15 + radius: 15 Behavior on opacity { NumberAnimation {} } opacity: effectiveOpacity } @@ -174,7 +174,7 @@ Rectangle { width: 50; height: 50 color: "lightsteelblue" border.color: "black" - radius: 15 + radius: 15 Behavior on opacity { NumberAnimation {} } opacity: effectiveOpacity } @@ -187,7 +187,7 @@ Rectangle { width: 50; height: 50 color: "lightsteelblue" border.color: "black" - radius: 15 + radius: 15 Behavior on opacity { NumberAnimation {} } opacity: effectiveOpacity } @@ -226,7 +226,7 @@ Rectangle { width: 60; height: 50 color: "lightsteelblue" border.color: "black" - radius: 15 + radius: 15 Behavior on opacity { NumberAnimation {} } opacity: effectiveOpacity } @@ -239,20 +239,20 @@ Rectangle { width: 60; height: 50 color: "lightsteelblue" border.color: "black" - radius: 15 + radius: 15 Behavior on opacity { NumberAnimation {} } opacity: effectiveOpacity } Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 } - Rectangle { + Rectangle { id: blueF3 visible: opacity != 0 width: 40; height: 50 color: "lightsteelblue" border.color: "black" - radius: 15 + radius: 15 Behavior on opacity { NumberAnimation {} } opacity: effectiveOpacity } diff --git a/examples/quick/text/textselection/textselection.qml b/examples/quick/text/textselection/textselection.qml index 80ce532369..047a3e7b79 100644 --- a/examples/quick/text/textselection/textselection.qml +++ b/examples/quick/text/textselection/textselection.qml @@ -137,9 +137,9 @@ Rectangle { Text { anchors.centerIn: parent; text: "Cut" } - MouseArea { + MouseArea { anchors.fill: parent - onClicked: { edit.cut(); editor.state = "" } + onClicked: { edit.cut(); editor.state = "" } } } @@ -152,9 +152,9 @@ Rectangle { Text { anchors.centerIn: parent; text: "Copy" } - MouseArea { + MouseArea { anchors.fill: parent - onClicked: { edit.copy(); editor.state = "selection" } + onClicked: { edit.copy(); editor.state = "selection" } } } @@ -167,9 +167,9 @@ Rectangle { Text { anchors.centerIn: parent; text: "Paste" } - MouseArea { + MouseArea { anchors.fill: parent - onClicked: { edit.paste(); edit.cursorPosition = edit.selectionEnd; editor.state = "" } + onClicked: { edit.paste(); edit.cursorPosition = edit.selectionEnd; editor.state = "" } } } @@ -182,13 +182,13 @@ Rectangle { Text { anchors.centerIn: parent; text: "Deselect" } - MouseArea { + MouseArea { anchors.fill: parent - onClicked: { + onClicked: { edit.cursorPosition = edit.selectionEnd; edit.deselect(); - editor.state = "" - } + editor.state = "" + } } } } diff --git a/examples/quick/touchinteraction/flickable/corkboards.qml b/examples/quick/touchinteraction/flickable/corkboards.qml index 34b0e3108a..3f04c49073 100644 --- a/examples/quick/touchinteraction/flickable/corkboards.qml +++ b/examples/quick/touchinteraction/flickable/corkboards.qml @@ -50,13 +50,13 @@ Rectangle { ListElement { name: "Panel One" - notes: [ + notes: [ ListElement { noteText: "Tap to edit" }, ListElement { noteText: "Drag to move" }, ListElement { noteText: "Flick to scroll" } ] } - + ListElement { name: "Panel Two" notes: [ diff --git a/examples/quick/tutorials/samegame/samegame1/samegame.qml b/examples/quick/tutorials/samegame/samegame1/samegame.qml index 83ab84a4cf..fa87d85f97 100644 --- a/examples/quick/tutorials/samegame/samegame1/samegame.qml +++ b/examples/quick/tutorials/samegame/samegame1/samegame.qml @@ -68,7 +68,7 @@ Rectangle { Button { anchors { left: parent.left; verticalCenter: parent.verticalCenter } - text: "New Game" + text: "New Game" onClicked: console.log("This doesn't do anything yet...") } diff --git a/examples/quick/tutorials/samegame/samegame3/Block.qml b/examples/quick/tutorials/samegame/samegame3/Block.qml index cd382f85b8..ff62bb5ec4 100644 --- a/examples/quick/tutorials/samegame/samegame3/Block.qml +++ b/examples/quick/tutorials/samegame/samegame3/Block.qml @@ -53,7 +53,7 @@ Item { source: { if (type == 0) return "../shared/pics/redStone.png"; - else if (type == 1) + else if (type == 1) return "../shared/pics/blueStone.png"; else return "../shared/pics/greenStone.png"; diff --git a/examples/quick/tutorials/samegame/samegame3/samegame.js b/examples/quick/tutorials/samegame/samegame3/samegame.js index df5bdfb049..01edc5bd41 100644 --- a/examples/quick/tutorials/samegame/samegame3/samegame.js +++ b/examples/quick/tutorials/samegame/samegame3/samegame.js @@ -160,7 +160,7 @@ function victoryCheck() { } //![2] -//only floods up and right, to see if it can find adjacent same-typed blocks +//only floods up and right, to see if it can find adjacent same-typed blocks function floodMoveCheck(column, row, type) { if (column >= maxColumn || column < 0 || row >= maxRow || row < 0) return false; diff --git a/examples/quick/tutorials/samegame/samegame4/content/samegame.js b/examples/quick/tutorials/samegame/samegame4/content/samegame.js index 7f1c976480..80b175d450 100755 --- a/examples/quick/tutorials/samegame/samegame4/content/samegame.js +++ b/examples/quick/tutorials/samegame/samegame4/content/samegame.js @@ -177,7 +177,7 @@ function victoryCheck() { } //![4] -//only floods up and right, to see if it can find adjacent same-typed blocks +//only floods up and right, to see if it can find adjacent same-typed blocks function floodMoveCheck(column, row, type) { if (column >= maxColumn || column < 0 || row >= maxRow || row < 0) return false; diff --git a/examples/quick/tutorials/samegame/samegame4/highscores/scores.php b/examples/quick/tutorials/samegame/samegame4/highscores/scores.php index daf480e21b..86e4187acd 100755 --- a/examples/quick/tutorials/samegame/samegame4/highscores/scores.php +++ b/examples/quick/tutorials/samegame/samegame4/highscores/scores.php @@ -8,8 +8,8 @@ $time = $_POST["time"]; if($name == "") $name = "Anonymous"; - $file = fopen("score_data.xml", "a"); - $ret = fwrite($file, "". $score . "" + $file = fopen("score_data.xml", "a"); + $ret = fwrite($file, "". $score . "" . $name . "" . $grid . "" . $time . "\n"); echo "Your score has been recorded. Thanks for playing!"; @@ -18,7 +18,7 @@ }else{#Read high score list #Now uses XSLT to display. So just print the file. With XML cruft added. #Note that firefox at least won't apply the XSLT on a php file. So redirecting - $file = fopen("scores.xml", "w"); + $file = fopen("scores.xml", "w"); $ret = fwrite($file, '' . "\n" . '' . "\n" . "\n" . file_get_contents("score_data.xml") . "\n"); diff --git a/examples/quick/views/listview/content/RecipesModel.qml b/examples/quick/views/listview/content/RecipesModel.qml index 0cdb8919b6..9830aa60d0 100644 --- a/examples/quick/views/listview/content/RecipesModel.qml +++ b/examples/quick/views/listview/content/RecipesModel.qml @@ -44,20 +44,20 @@ ListModel { ListElement { title: "Pancakes" picture: "content/pics/pancakes.jpg" - ingredients: " -
    -
  • 1 cup (150g) self-raising flour -
  • 1 tbs caster sugar -
  • 3/4 cup (185ml) milk -
  • 1 egg -
+ ingredients: " +
    +
  • 1 cup (150g) self-raising flour +
  • 1 tbs caster sugar +
  • 3/4 cup (185ml) milk +
  • 1 egg +
" - method: " -
    -
  1. Sift flour and sugar together into a bowl. Add a pinch of salt. -
  2. Beat milk and egg together, then add to dry ingredients. Beat until smooth. -
  3. Pour mixture into a pan on medium heat and cook until bubbles appear on the surface. -
  4. Turn over and cook other side until golden. + method: " +
      +
    1. Sift flour and sugar together into a bowl. Add a pinch of salt. +
    2. Beat milk and egg together, then add to dry ingredients. Beat until smooth. +
    3. Pour mixture into a pan on medium heat and cook until bubbles appear on the surface. +
    4. Turn over and cook other side until golden.
    " } @@ -70,60 +70,60 @@ ListModel { ListElement { title: "Vegetable Soup" picture: "content/pics/vegetable-soup.jpg" - ingredients: " -
      -
    • 1 onion -
    • 1 turnip -
    • 1 potato -
    • 1 carrot -
    • 1 head of celery -
    • 1 1/2 litres of water -
    + ingredients: " +
      +
    • 1 onion +
    • 1 turnip +
    • 1 potato +
    • 1 carrot +
    • 1 head of celery +
    • 1 1/2 litres of water +
    " - method: " -
      -
    1. Chop vegetables. -
    2. Boil in water until vegetables soften. -
    3. Season with salt and pepper to taste. -
    + method: " +
      +
    1. Chop vegetables. +
    2. Boil in water until vegetables soften. +
    3. Season with salt and pepper to taste. +
    " } ListElement { title: "Hamburger" picture: "content/pics/hamburger.jpg" - ingredients: " -
      -
    • 500g minced beef -
    • Seasoning -
    • lettuce, tomato, onion, cheese -
    • 1 hamburger bun for each burger -
    + ingredients: " +
      +
    • 500g minced beef +
    • Seasoning +
    • lettuce, tomato, onion, cheese +
    • 1 hamburger bun for each burger +
    " - method: " -
      -
    1. Mix the beef, together with seasoning, in a food processor. -
    2. Shape the beef into burgers. -
    3. Grill the burgers for about 5 mins on each side (until cooked through) -
    4. Serve each burger on a bun with ketchup, cheese, lettuce, tomato and onion. -
    + method: " +
      +
    1. Mix the beef, together with seasoning, in a food processor. +
    2. Shape the beef into burgers. +
    3. Grill the burgers for about 5 mins on each side (until cooked through) +
    4. Serve each burger on a bun with ketchup, cheese, lettuce, tomato and onion. +
    " } ListElement { title: "Lemonade" picture: "content/pics/lemonade.jpg" - ingredients: " -
      -
    • 1 cup Lemon Juice -
    • 1 cup Sugar -
    • 6 Cups of Water (2 cups warm water, 4 cups cold water) -
    + ingredients: " +
      +
    • 1 cup Lemon Juice +
    • 1 cup Sugar +
    • 6 Cups of Water (2 cups warm water, 4 cups cold water) +
    " - method: " -
      -
    1. Pour 2 cups of warm water into a pitcher and stir in sugar until it dissolves. -
    2. Pour in lemon juice, stir again, and add 4 cups of cold water. -
    3. Chill or serve over ice cubes. -
    + method: " +
      +
    1. Pour 2 cups of warm water into a pitcher and stir in sugar until it dissolves. +
    2. Pour in lemon juice, stir again, and add 4 cups of cold water. +
    3. Chill or serve over ice cubes. +
    " } } diff --git a/examples/quick/views/listview/dynamiclist.qml b/examples/quick/views/listview/dynamiclist.qml index a3e6026d16..fc09372602 100644 --- a/examples/quick/views/listview/dynamiclist.qml +++ b/examples/quick/views/listview/dynamiclist.qml @@ -204,7 +204,7 @@ Rectangle { anchors { left: parent.left; bottom: parent.bottom; margins: 20 } spacing: 10 - TextButton { + TextButton { text: "Add an item" onClicked: { fruitModel.append({ @@ -215,8 +215,8 @@ Rectangle { } } - TextButton { - text: "Remove all items" + TextButton { + text: "Remove all items" onClicked: fruitModel.clear() } } diff --git a/examples/quick/views/listview/expandingdelegates.qml b/examples/quick/views/listview/expandingdelegates.qml index c19e75f7bd..139ce6bd0d 100644 --- a/examples/quick/views/listview/expandingdelegates.qml +++ b/examples/quick/views/listview/expandingdelegates.qml @@ -103,7 +103,7 @@ Rectangle { width: background.width - recipeImage.width - 20; height: recipeImage.height spacing: 5 - Text { + Text { text: title font.bold: true; font.pointSize: 16 } diff --git a/examples/quick/views/listview/highlight.qml b/examples/quick/views/listview/highlight.qml index 9564ea11b3..d4c57277b1 100644 --- a/examples/quick/views/listview/highlight.qml +++ b/examples/quick/views/listview/highlight.qml @@ -67,7 +67,7 @@ Rectangle { PropertyChanges { target: wrapper; x: 20 } } transitions: Transition { - NumberAnimation { properties: "x"; duration: 200 } + NumberAnimation { properties: "x"; duration: 200 } } MouseArea { anchors.fill: parent diff --git a/examples/quick/views/listview/highlightranges.qml b/examples/quick/views/listview/highlightranges.qml index 8b4eed7400..eaa4470ef0 100644 --- a/examples/quick/views/listview/highlightranges.qml +++ b/examples/quick/views/listview/highlightranges.qml @@ -79,8 +79,8 @@ Rectangle { width: 320; height: 480 - // This example shows the same model in three different ListView items, - // with different highlight ranges. The highlight ranges are set by the + // This example shows the same model in three different ListView items, + // with different highlight ranges. The highlight ranges are set by the // preferredHighlightBegin and preferredHighlightEnd properties in ListView. // // The first ListView does not set a highlight range, so its currentItem diff --git a/examples/quick/views/listview/sections.qml b/examples/quick/views/listview/sections.qml index 636f78fdbd..64d3dc8d71 100644 --- a/examples/quick/views/listview/sections.qml +++ b/examples/quick/views/listview/sections.qml @@ -70,7 +70,7 @@ Rectangle { //! [0] // The delegate for each section header - Component { + Component { id: sectionHeading Rectangle { width: container.width diff --git a/examples/quick/views/parallax/parallax.qml b/examples/quick/views/parallax/parallax.qml index ddcafc1ee1..fad5bee36c 100644 --- a/examples/quick/views/parallax/parallax.qml +++ b/examples/quick/views/parallax/parallax.qml @@ -68,7 +68,7 @@ Rectangle { Loader { anchors { top: parent.top; topMargin: 10; horizontalCenter: parent.horizontalCenter } width: 300; height: 400 - clip: true; + clip: true; source: "../../demos/samegame/samegame.qml" } } diff --git a/src/plugins/qmltooling/shared/qpacketprotocol.cpp b/src/plugins/qmltooling/shared/qpacketprotocol.cpp index 0792dadfe3..7de5a7648e 100644 --- a/src/plugins/qmltooling/shared/qpacketprotocol.cpp +++ b/src/plugins/qmltooling/shared/qpacketprotocol.cpp @@ -237,7 +237,7 @@ QPacketProtocol::~QPacketProtocol() /*! Returns the maximum packet size allowed. By default this is 2,147,483,647 bytes. - + If a packet claiming to be larger than the maximum packet size is received, the QPacketProtocol::invalidPacket() signal is emitted. diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h index 5b5667abb4..a2cc051003 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -231,7 +231,7 @@ union Instr struct instr_ret { MOTH_INSTR_HEADER Param result; - }; + }; struct instr_loadRuntimeString { MOTH_INSTR_HEADER int stringId; @@ -525,7 +525,7 @@ union Instr }; struct instr_jump { MOTH_INSTR_HEADER - ptrdiff_t offset; + ptrdiff_t offset; }; struct instr_cjump { MOTH_INSTR_HEADER @@ -782,7 +782,7 @@ struct InstrMeta { typedef Instr::instr_##FMT DataType; \ static const DataType &data(const Instr &instr) { return instr.FMT; } \ static void setData(Instr &instr, const DataType &v) { instr.FMT = v; } \ - }; + }; FOR_EACH_MOTH_INSTR(MOTH_INSTR_META_TEMPLATE); #undef MOTH_INSTR_META_TEMPLATE diff --git a/src/qml/compiler/qv4jsir.cpp b/src/qml/compiler/qv4jsir.cpp index deb1af51b4..ea92bb468d 100644 --- a/src/qml/compiler/qv4jsir.cpp +++ b/src/qml/compiler/qv4jsir.cpp @@ -740,7 +740,7 @@ Temp *BasicBlock::LOCAL(unsigned index, unsigned scope) } Expr *BasicBlock::CONST(Type type, double value) -{ +{ Const *e = function->New(); if (type == NumberType) { int ival = (int)value; @@ -769,7 +769,7 @@ Expr *BasicBlock::REGEXP(const QString *value, int flags) } Name *BasicBlock::NAME(const QString &id, quint32 line, quint32 column) -{ +{ Name *e = function->New(); e->init(function->newString(id), line, column); return e; @@ -805,7 +805,7 @@ Expr *BasicBlock::CONVERT(Expr *expr, Type type) } Expr *BasicBlock::UNOP(AluOp op, Expr *expr) -{ +{ Unop *e = function->New(); e->init(op, expr); return e; @@ -819,7 +819,7 @@ Expr *BasicBlock::BINOP(AluOp op, Expr *left, Expr *right) } Expr *BasicBlock::CALL(Expr *base, ExprList *args) -{ +{ Call *e = function->New(); e->init(base, args); int argc = 0; @@ -851,7 +851,7 @@ Expr *BasicBlock::MEMBER(Expr *base, const QString *name, QQmlPropertyData *prop } Stmt *BasicBlock::EXP(Expr *expr) -{ +{ if (isTerminated()) return 0; @@ -862,7 +862,7 @@ Stmt *BasicBlock::EXP(Expr *expr) } Stmt *BasicBlock::MOVE(Expr *target, Expr *source) -{ +{ if (isTerminated()) return 0; @@ -872,7 +872,7 @@ Stmt *BasicBlock::MOVE(Expr *target, Expr *source) return s; } -Stmt *BasicBlock::JUMP(BasicBlock *target) +Stmt *BasicBlock::JUMP(BasicBlock *target) { if (isTerminated()) return 0; @@ -890,7 +890,7 @@ Stmt *BasicBlock::JUMP(BasicBlock *target) return s; } -Stmt *BasicBlock::CJUMP(Expr *cond, BasicBlock *iftrue, BasicBlock *iffalse) +Stmt *BasicBlock::CJUMP(Expr *cond, BasicBlock *iftrue, BasicBlock *iffalse) { if (isTerminated()) return 0; diff --git a/src/qml/debugger/qqmlenginedebugservice.cpp b/src/qml/debugger/qqmlenginedebugservice.cpp index 5f3db9fb65..300561050f 100644 --- a/src/qml/debugger/qqmlenginedebugservice.cpp +++ b/src/qml/debugger/qqmlenginedebugservice.cpp @@ -83,7 +83,7 @@ QQmlEngineDebugService::~QQmlEngineDebugService() delete m_statesDelegate; } -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const QQmlEngineDebugService::QQmlObjectData &data) { ds << data.url << data.lineNumber << data.columnNumber << data.idString @@ -92,7 +92,7 @@ QDataStream &operator<<(QDataStream &ds, return ds; } -QDataStream &operator>>(QDataStream &ds, +QDataStream &operator>>(QDataStream &ds, QQmlEngineDebugService::QQmlObjectData &data) { ds >> data.url >> data.lineNumber >> data.columnNumber >> data.idString @@ -101,7 +101,7 @@ QDataStream &operator>>(QDataStream &ds, return ds; } -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const QQmlEngineDebugService::QQmlObjectProperty &data) { ds << (int)data.type << data.name << data.value << data.valueTypeName @@ -109,7 +109,7 @@ QDataStream &operator<<(QDataStream &ds, return ds; } -QDataStream &operator>>(QDataStream &ds, +QDataStream &operator>>(QDataStream &ds, QQmlEngineDebugService::QQmlObjectProperty &data) { int type; @@ -219,13 +219,13 @@ QVariant QQmlEngineDebugService::valueContents(const QVariant &value) const return QString(QStringLiteral("")); } -void QQmlEngineDebugService::buildObjectDump(QDataStream &message, +void QQmlEngineDebugService::buildObjectDump(QDataStream &message, QObject *object, bool recur, bool dumpProperties) { message << objectData(object); QObjectList children = object->children(); - + int childrenCount = children.count(); for (int ii = 0; ii < children.count(); ++ii) { if (qobject_cast(children[ii])) diff --git a/src/qml/doc/snippets/delegatemodel/visualdatamodel_rootindex/view.qml b/src/qml/doc/snippets/delegatemodel/visualdatamodel_rootindex/view.qml index 1e8cfade96..f46671e9a0 100644 --- a/src/qml/doc/snippets/delegatemodel/visualdatamodel_rootindex/view.qml +++ b/src/qml/doc/snippets/delegatemodel/visualdatamodel_rootindex/view.qml @@ -55,7 +55,7 @@ ListView { MouseArea { anchors.fill: parent onClicked: { - if (model.hasModelChildren) + if (model.hasModelChildren) view.model.rootIndex = view.model.modelIndex(index) } } diff --git a/src/qml/doc/snippets/qml/SelfDestroyingRect.qml b/src/qml/doc/snippets/qml/SelfDestroyingRect.qml index b2e8c318f2..16a73c204d 100644 --- a/src/qml/doc/snippets/qml/SelfDestroyingRect.qml +++ b/src/qml/doc/snippets/qml/SelfDestroyingRect.qml @@ -45,9 +45,9 @@ Rectangle { width: 80; height: 80 color: "red" - NumberAnimation on opacity { + NumberAnimation on opacity { to: 0 - duration: 1000 + duration: 1000 onRunningChanged: { if (!running) { diff --git a/src/qml/doc/snippets/qml/createQmlObject.qml b/src/qml/doc/snippets/qml/createQmlObject.qml index 7984261f0f..10f49f13c3 100644 --- a/src/qml/doc/snippets/qml/createQmlObject.qml +++ b/src/qml/doc/snippets/qml/createQmlObject.qml @@ -45,7 +45,7 @@ Rectangle { width: 100 height: 100 - + function createIt() { //![0] var newObject = Qt.createQmlObject('import QtQuick 2.0; Rectangle {color: "red"; width: 20; height: 20}', diff --git a/src/qml/doc/snippets/qml/listmodel/listmodel-nested.qml b/src/qml/doc/snippets/qml/listmodel/listmodel-nested.qml index c9637712f6..3c836d81cf 100644 --- a/src/qml/doc/snippets/qml/listmodel/listmodel-nested.qml +++ b/src/qml/doc/snippets/qml/listmodel/listmodel-nested.qml @@ -86,7 +86,7 @@ Component { Text { text: "Attributes:" } Repeater { model: attributes - Text { text: description } + Text { text: description } } } } diff --git a/src/qml/doc/snippets/qml/qml-documents/inline-component.qml b/src/qml/doc/snippets/qml/qml-documents/inline-component.qml index 5b600499c4..b8144c263f 100644 --- a/src/qml/doc/snippets/qml/qml-documents/inline-component.qml +++ b/src/qml/doc/snippets/qml/qml-documents/inline-component.qml @@ -42,7 +42,7 @@ import QtQuick 2.0 Rectangle { - width: 240; height: 320; + width: 240; height: 320; ListView { anchors.fill: parent @@ -52,6 +52,6 @@ Rectangle { text: modelData.firstName + " " + modelData.lastName } } - } + } } //! [document] diff --git a/src/qml/doc/snippets/qml/qml-documents/inline-text-component.qml b/src/qml/doc/snippets/qml/qml-documents/inline-text-component.qml index 44d67a7480..e731ce998f 100644 --- a/src/qml/doc/snippets/qml/qml-documents/inline-text-component.qml +++ b/src/qml/doc/snippets/qml/qml-documents/inline-text-component.qml @@ -42,7 +42,7 @@ import QtQuick 2.0 Rectangle { - width: 240; height: 320; + width: 240; height: 320; ListView { anchors.fill: parent @@ -50,6 +50,6 @@ Rectangle { delegate: Text { text: modelData.firstName + " " + modelData.lastName } - } + } } //! [document] diff --git a/src/qml/doc/snippets/qml/qml-documents/non-trivial.qml b/src/qml/doc/snippets/qml/qml-documents/non-trivial.qml index ccf4603b44..cedd09d3ce 100644 --- a/src/qml/doc/snippets/qml/qml-documents/non-trivial.qml +++ b/src/qml/doc/snippets/qml/qml-documents/non-trivial.qml @@ -42,7 +42,7 @@ import QtQuick 2.0 Rectangle { - width: 240; height: 320; + width: 240; height: 320; resources: [ Component { @@ -57,6 +57,6 @@ Rectangle { anchors.fill: parent model: contactModel delegate: contactDelegate - } + } } //! [document] diff --git a/src/qml/doc/snippets/qml/qml-documents/qmldocuments.qml b/src/qml/doc/snippets/qml/qml-documents/qmldocuments.qml index 66322fdfd1..fd582db061 100644 --- a/src/qml/doc/snippets/qml/qml-documents/qmldocuments.qml +++ b/src/qml/doc/snippets/qml/qml-documents/qmldocuments.qml @@ -45,7 +45,7 @@ Rectangle { property alias text: textItem.text width: 100; height: 30 - border.width: 1 + border.width: 1 radius: 5 antialiasing: true diff --git a/src/qml/doc/snippets/qml/qtobject.qml b/src/qml/doc/snippets/qml/qtobject.qml index 7d0957326e..6fdf7f74d3 100644 --- a/src/qml/doc/snippets/qml/qtobject.qml +++ b/src/qml/doc/snippets/qml/qtobject.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 Item { - QtObject { + QtObject { id: attributes property string name property int size diff --git a/src/qml/jsruntime/qv4include.cpp b/src/qml/jsruntime/qv4include.cpp index d0e0e9413b..7642db1e9b 100644 --- a/src/qml/jsruntime/qv4include.cpp +++ b/src/qml/jsruntime/qv4include.cpp @@ -131,8 +131,8 @@ void QV4Include::finished() QVariant redirect = m_reply->attribute(QNetworkRequest::RedirectionTargetAttribute); if (redirect.isValid()) { m_url = m_url.resolved(redirect.toUrl()); - delete m_reply; - + delete m_reply; + QNetworkRequest request; request.setUrl(m_url); @@ -209,7 +209,7 @@ QV4::ReturnedValue QV4Include::method_include(QV4::CallContext *ctx) callbackFunction); result = i->result(); - } else { + } else { QFile f(localFile); diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index c27cea9cb6..1cf6ef06b7 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -1114,7 +1114,7 @@ static QV4::ReturnedValue CallMethod(QObject *object, int index, int returnType, return args[0].toValue(engine); } else if (returnType != QMetaType::Void) { - + CallArgument arg; arg.initAsType(returnType); @@ -1134,7 +1134,7 @@ static QV4::ReturnedValue CallMethod(QObject *object, int index, int returnType, } /*! - Returns the match score for converting \a actual to be of type \a conversionType. A + Returns the match score for converting \a actual to be of type \a conversionType. A zero score means "perfect match" whereas a higher score is worse. The conversion table is copied out of the \l QScript::callQtMethod() function. @@ -1308,7 +1308,7 @@ static const QQmlPropertyData * RelatedMethod(QObject *object, QMetaMethod method = mo->method(current->overrideIndex); dummy.load(method); - + // Look for overloaded methods QByteArray methodName = method.name(); for (int ii = current->overrideIndex - 1; ii >= methodOffset; --ii) { @@ -1342,7 +1342,7 @@ static QV4::ReturnedValue CallPrecise(QObject *object, const QQmlPropertyData &d int *args = 0; QVarLengthArray dummy; - args = QQmlPropertyCache::methodParameterTypes(object, data.coreIndex, dummy, + args = QQmlPropertyCache::methodParameterTypes(object, data.coreIndex, dummy, &unknownTypeError); if (!args) { @@ -1368,13 +1368,13 @@ static QV4::ReturnedValue CallPrecise(QObject *object, const QQmlPropertyData &d /*! Resolve the overloaded method to call. The algorithm works conceptually like this: 1. Resolve the set of overloads it is *possible* to call. - Impossible overloads include those that have too many parameters or have parameters - of unknown type. - 2. Filter the set of overloads to only contain those with the closest number of + Impossible overloads include those that have too many parameters or have parameters + of unknown type. + 2. Filter the set of overloads to only contain those with the closest number of parameters. For example, if we are called with 3 parameters and there are 2 overloads that take 2 parameters and one that takes 3, eliminate the 2 parameter overloads. - 3. Find the best remaining overload based on its match score. + 3. Find the best remaining overload based on its match score. If two or more overloads have the same match score, call the last one. The match score is constructed by adding the matchScore() result for each of the parameters. */ @@ -1425,7 +1425,7 @@ static QV4::ReturnedValue CallOverloaded(QObject *object, const QQmlPropertyData continue; // We already have a better option int methodMatchScore = 0; - for (int ii = 0; ii < methodArgumentCount; ++ii) + for (int ii = 0; ii < methodArgumentCount; ++ii) methodMatchScore += MatchScore((v = callArgs->args[ii]), methodArgTypes[ii]); if (bestParameterScore > methodParameterScore || bestMatchScore > methodMatchScore) { @@ -1447,7 +1447,7 @@ static QV4::ReturnedValue CallOverloaded(QObject *object, const QQmlPropertyData QString error = QLatin1String("Unable to determine callable overload. Candidates are:"); const QQmlPropertyData *candidate = &data; while (candidate) { - error += QLatin1String("\n ") + + error += QLatin1String("\n ") + QString::fromUtf8(object->metaObject()->method(candidate->coreIndex).methodSignature().constData()); candidate = RelatedMethod(object, candidate, dummy); } @@ -1482,7 +1482,7 @@ void CallArgument::cleanup() jsonObjectPtr->~QJsonObject(); } else if (type == QMetaType::QJsonValue) { jsonValuePtr->~QJsonValue(); - } + } } void *CallArgument::dataPtr() diff --git a/src/qml/jsruntime/qv4serialize.cpp b/src/qml/jsruntime/qv4serialize.cpp index dec0f69147..084ff9c98c 100644 --- a/src/qml/jsruntime/qv4serialize.cpp +++ b/src/qml/jsruntime/qv4serialize.cpp @@ -55,13 +55,13 @@ QT_BEGIN_NAMESPACE using namespace QV4; -// We allow the following JavaScript types to be passed between the main and +// We allow the following JavaScript types to be passed between the main and // the secondary thread: // + undefined // + null // + Boolean // + String -// + Function +// + Function // + Array // + "Simple" Objects // + Number @@ -143,7 +143,7 @@ static inline void *popPtr(const char *&data) return rv; } -// XXX TODO: Check that worker script is exception safe in the case of +// XXX TODO: Check that worker script is exception safe in the case of // serialization/deserialization failures #define ALIGN(size) (((size) + 3) & ~3) @@ -171,7 +171,7 @@ void Serialize::serialize(QByteArray &data, const QV4::ValueRef v, QV8Engine *en reserve(data, utf16size + sizeof(quint32)); push(data, valueheader(WorkerString, length)); - + int offset = data.size(); data.resize(data.size() + utf16size); char *buffer = data.data() + offset; diff --git a/src/qml/parser/qqmljslexer.cpp b/src/qml/parser/qqmljslexer.cpp index 8e8ed954ad..73d0a8c3dd 100644 --- a/src/qml/parser/qqmljslexer.cpp +++ b/src/qml/parser/qqmljslexer.cpp @@ -707,7 +707,7 @@ again: _validTokenText = true; _tokenText.resize(0); startCode--; - while (startCode != _codePtr - 1) + while (startCode != _codePtr - 1) _tokenText += *startCode++; while (_codePtr <= _endPtr) { diff --git a/src/qml/qml/ftw/qbitfield_p.h b/src/qml/qml/ftw/qbitfield_p.h index b224f5b57d..12e98dc655 100644 --- a/src/qml/qml/ftw/qbitfield_p.h +++ b/src/qml/qml/ftw/qbitfield_p.h @@ -91,13 +91,13 @@ QBitField::QBitField(const quint32 *bitData, int bitCount) QBitField::QBitField(const QBitField &other) : bits(other.bits), ownData(other.ownData), data(other.data) { - if (ownData) + if (ownData) ++(*ownData); } QBitField::~QBitField() { - if (ownData) + if (ownData) if(0 == --(*ownData)) delete [] ownData; } @@ -106,14 +106,14 @@ QBitField &QBitField::operator=(const QBitField &other) if (other.data == data) return *this; - if (ownData) + if (ownData) if(0 == --(*ownData)) delete [] ownData; bits = other.bits; ownData = other.ownData; data = other.data; - if (ownData) + if (ownData) ++(*ownData); return *this; diff --git a/src/qml/qml/ftw/qfieldlist_p.h b/src/qml/qml/ftw/qfieldlist_p.h index 5d37751f05..c90b6773a1 100644 --- a/src/qml/qml/ftw/qfieldlist_p.h +++ b/src/qml/qml/ftw/qfieldlist_p.h @@ -90,7 +90,7 @@ private: // QFieldList is a simple linked list, that can append and prepend and also // maintains a count template -class QFieldList +class QFieldList { public: inline QFieldList(); @@ -253,7 +253,7 @@ N *QFieldList::takeFirst() } value->*nextMember = 0; --_count; - } + } return value; } diff --git a/src/qml/qml/ftw/qfinitestack_p.h b/src/qml/qml/ftw/qfinitestack_p.h index 8b499d9b6d..31a530fa64 100644 --- a/src/qml/qml/ftw/qfinitestack_p.h +++ b/src/qml/qml/ftw/qfinitestack_p.h @@ -83,7 +83,7 @@ private: template QFiniteStack::QFiniteStack() -: _array(0), _alloc(0), _size(0) +: _array(0), _alloc(0), _size(0) { } @@ -134,7 +134,7 @@ T QFiniteStack::pop() return _array[_size]; } } - + template int QFiniteStack::count() const { @@ -154,7 +154,7 @@ T &QFiniteStack::operator[](int index) } template -void QFiniteStack::allocate(int size) +void QFiniteStack::allocate(int size) { Q_ASSERT(_array == 0); Q_ASSERT(_alloc == 0); @@ -171,7 +171,7 @@ void QFiniteStack::deallocate() { if (QTypeInfo::isComplex) { T *i = _array + _size; - while (i != _array) + while (i != _array) (--i)->~T(); } diff --git a/src/qml/qml/ftw/qhashedstring.cpp b/src/qml/qml/ftw/qhashedstring.cpp index 012412b6b5..fa3524ff3e 100644 --- a/src/qml/qml/ftw/qhashedstring.cpp +++ b/src/qml/qml/ftw/qhashedstring.cpp @@ -198,19 +198,19 @@ bool QHashedString::compare(const QChar *lhs, const QChar *rhs, int length) QHashedStringRef QHashedStringRef::mid(int offset, int length) const { Q_ASSERT(offset < m_length); - return QHashedStringRef(m_data + offset, + return QHashedStringRef(m_data + offset, (length == -1 || (offset + length) > m_length)?(m_length - offset):length); } bool QHashedStringRef::endsWith(const QString &s) const { - return s.length() < m_length && + return s.length() < m_length && QHashedString::compare(s.constData(), m_data + m_length - s.length(), s.length()); } bool QHashedStringRef::startsWith(const QString &s) const { - return s.length() < m_length && + return s.length() < m_length && QHashedString::compare(s.constData(), m_data, s.length()); } diff --git a/src/qml/qml/ftw/qhashedstring_p.h b/src/qml/qml/ftw/qhashedstring_p.h index 46f0533740..61a492013d 100644 --- a/src/qml/qml/ftw/qhashedstring_p.h +++ b/src/qml/qml/ftw/qhashedstring_p.h @@ -97,7 +97,7 @@ private: }; class QHashedCStringRef; -class Q_AUTOTEST_EXPORT QHashedStringRef +class Q_AUTOTEST_EXPORT QHashedStringRef { public: inline QHashedStringRef(); @@ -258,15 +258,15 @@ public: } inline bool equals(const QHashedStringRef &string) const { - return length == string.length() && - hash == string.hash() && + return length == string.length() && + hash == string.hash() && (isQString()?QHashedString::compare(string.constData(), (QChar *)utf16Data(), length): QHashedString::compare(string.constData(), cStrData(), length)); } inline bool equals(const QHashedCStringRef &string) const { - return length == string.length() && - hash == string.hash() && + return length == string.length() && + hash == string.hash() && (isQString()?QHashedString::compare((QChar *)utf16Data(), string.constData(), length): QHashedString::compare(string.constData(), cStrData(), length)); } @@ -275,7 +275,7 @@ public: class Q_AUTOTEST_EXPORT QStringHashData { public: - QStringHashData() + QStringHashData() : buckets(0), numBuckets(0), size(0), numBits(0) #ifdef QSTRINGHASH_LINK_DEBUG , linkCount(0) @@ -1026,33 +1026,33 @@ typename QStringHash::ConstIterator QStringMultiHash::findNext(const Const return ConstIterator(); } -inline uint qHash(const QHashedString &string) -{ - return uint(string.hash()); +inline uint qHash(const QHashedString &string) +{ + return uint(string.hash()); } -inline uint qHash(const QHashedStringRef &string) -{ - return uint(string.hash()); +inline uint qHash(const QHashedStringRef &string) +{ + return uint(string.hash()); } -QHashedString::QHashedString() -: QString(), m_hash(0) +QHashedString::QHashedString() +: QString(), m_hash(0) { } -QHashedString::QHashedString(const QString &string) -: QString(string), m_hash(0) +QHashedString::QHashedString(const QString &string) +: QString(string), m_hash(0) { } -QHashedString::QHashedString(const QString &string, quint32 hash) -: QString(string), m_hash(hash) +QHashedString::QHashedString(const QString &string, quint32 hash) +: QString(string), m_hash(hash) { } -QHashedString::QHashedString(const QHashedString &string) -: QString(string), m_hash(string.m_hash) +QHashedString::QHashedString(const QHashedString &string) +: QString(string), m_hash(string.m_hash) { } @@ -1065,29 +1065,29 @@ QHashedString &QHashedString::operator=(const QHashedString &string) bool QHashedString::operator==(const QHashedString &string) const { - return (string.m_hash == m_hash || !string.m_hash || !m_hash) && + return (string.m_hash == m_hash || !string.m_hash || !m_hash) && static_cast(*this) == static_cast(string); } bool QHashedString::operator==(const QHashedStringRef &string) const { return length() == string.m_length && - (string.m_hash == m_hash || !string.m_hash || !m_hash) && + (string.m_hash == m_hash || !string.m_hash || !m_hash) && QHashedString::compare(constData(), string.m_data, string.m_length); } quint32 QHashedString::hash() const -{ +{ if (!m_hash) computeHash(); return m_hash; } quint32 QHashedString::existingHash() const -{ +{ return m_hash; } -QHashedStringRef::QHashedStringRef() +QHashedStringRef::QHashedStringRef() : m_data(0), m_length(0), m_hash(0) { } @@ -1138,21 +1138,21 @@ bool QHashedStringRef::operator==(const QString &string) const bool QHashedStringRef::operator==(const QHashedString &string) const { - return m_length == string.length() && + return m_length == string.length() && (m_hash == string.m_hash || !m_hash || !string.m_hash) && QHashedString::compare(string.constData(), m_data, m_length); } bool QHashedStringRef::operator==(const QHashedStringRef &string) const { - return m_length == string.m_length && + return m_length == string.m_length && (m_hash == string.m_hash || !m_hash || !string.m_hash) && QHashedString::compare(string.m_data, m_data, m_length); } bool QHashedStringRef::operator==(const QHashedCStringRef &string) const { - return m_length == string.m_length && + return m_length == string.m_length && (m_hash == string.m_hash || !m_hash || !string.m_hash) && QHashedString::compare(m_data, string.m_data, m_length); } @@ -1165,7 +1165,7 @@ bool QHashedStringRef::operator!=(const QString &string) const bool QHashedStringRef::operator!=(const QHashedString &string) const { - return m_length != string.length() || + return m_length != string.length() || (m_hash != string.m_hash && m_hash && string.m_hash) || !QHashedString::compare(string.constData(), m_data, m_length); } @@ -1224,7 +1224,7 @@ bool QHashedStringRef::startsWithUpper() const } quint32 QHashedStringRef::hash() const -{ +{ if (!m_hash) computeHash(); return m_hash; } @@ -1279,20 +1279,20 @@ void QHashedCStringRef::writeUtf16(quint16 *output) const { int l = m_length; const char *d = m_data; - while (l--) + while (l--) *output++ = *d++; } -bool QHashedString::compare(const QChar *lhs, const char *rhs, int length) +bool QHashedString::compare(const QChar *lhs, const char *rhs, int length) { Q_ASSERT(lhs && rhs); const quint16 *l = (const quint16*)lhs; - while (length--) + while (length--) if (*l++ != *rhs++) return false; return true; } -bool QHashedString::compare(const char *lhs, const char *rhs, int length) +bool QHashedString::compare(const char *lhs, const char *rhs, int length) { Q_ASSERT(lhs && rhs); return 0 == ::memcmp(lhs, rhs, length); diff --git a/src/qml/qml/ftw/qhashfield_p.h b/src/qml/qml/ftw/qhashfield_p.h index 32c7a0fbe2..aa8840688a 100644 --- a/src/qml/qml/ftw/qhashfield_p.h +++ b/src/qml/qml/ftw/qhashfield_p.h @@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE // example where you would write: // QSet strings; // for (int ii = 0; ii < mystrings.count(); ++ii) { -// if (strings.contains(mystrings.at(ii))) +// if (strings.contains(mystrings.at(ii))) // qFatal("Duplication!"); // strings.insert(mystrings); // } @@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE // if (strings.testAndSet(qHash(mystrings.at(ii)))) { // // The string *might* be duplicated // for (int jj = 0; jj < ii; ++jj) { -// if (mystrings.at(ii) == mystrings.at(jj)) +// if (mystrings.at(ii) == mystrings.at(jj)) // qFatal("Duplication!"); // } // } diff --git a/src/qml/qml/ftw/qintrusivelist.cpp b/src/qml/qml/ftw/qintrusivelist.cpp index 12d710ca47..7c80b57c9d 100644 --- a/src/qml/qml/ftw/qintrusivelist.cpp +++ b/src/qml/qml/ftw/qintrusivelist.cpp @@ -46,7 +46,7 @@ \brief The QIntrusiveList class is a template class that provides a list of objects using static storage. \internal -QIntrusiveList creates a linked list of objects. Adding and removing objects from the +QIntrusiveList creates a linked list of objects. Adding and removing objects from the QIntrusiveList is a constant time operation and is very quick. The list performs no memory allocations, but does require the objects being added to the list to contain a QIntrusiveListNode instance for the list's use. Even so, for small lists QIntrusiveList uses less memory than Qt's @@ -102,7 +102,7 @@ Destroy the list. All entries are removed. /*! \fn void QIntrusiveList::insert(N *object); -Insert \a object into the list. If \a object is a member of this, or another list, it will be +Insert \a object into the list. If \a object is a member of this, or another list, it will be removed and inserted at the head of this list. */ diff --git a/src/qml/qml/ftw/qintrusivelist_p.h b/src/qml/qml/ftw/qintrusivelist_p.h index ccaeee2e40..67de569951 100644 --- a/src/qml/qml/ftw/qintrusivelist_p.h +++ b/src/qml/qml/ftw/qintrusivelist_p.h @@ -82,7 +82,7 @@ public: inline iterator &operator++(); inline iterator &erase(); - + private: N *_value; }; @@ -114,60 +114,60 @@ public: }; template -QIntrusiveList::iterator::iterator() -: _value(0) +QIntrusiveList::iterator::iterator() +: _value(0) { } template -QIntrusiveList::iterator::iterator(N *value) -: _value(value) +QIntrusiveList::iterator::iterator(N *value) +: _value(value) { } template -N *QIntrusiveList::iterator::operator*() const -{ - return _value; +N *QIntrusiveList::iterator::operator*() const +{ + return _value; } template -N *QIntrusiveList::iterator::operator->() const -{ - return _value; +N *QIntrusiveList::iterator::operator->() const +{ + return _value; } template -bool QIntrusiveList::iterator::operator==(const iterator &other) const -{ - return other._value == _value; +bool QIntrusiveList::iterator::operator==(const iterator &other) const +{ + return other._value == _value; } template -bool QIntrusiveList::iterator::operator!=(const iterator &other) const -{ - return other._value != _value; +bool QIntrusiveList::iterator::operator!=(const iterator &other) const +{ + return other._value != _value; } template -typename QIntrusiveList::iterator &QIntrusiveList::iterator::operator++() -{ - _value = QIntrusiveList::next(_value); - return *this; +typename QIntrusiveList::iterator &QIntrusiveList::iterator::operator++() +{ + _value = QIntrusiveList::next(_value); + return *this; } template -typename QIntrusiveList::iterator &QIntrusiveList::iterator::erase() -{ - N *old = _value; - _value = QIntrusiveList::next(_value); - (old->*member).remove(); +typename QIntrusiveList::iterator &QIntrusiveList::iterator::erase() +{ + N *old = _value; + _value = QIntrusiveList::next(_value); + (old->*member).remove(); return *this; } - + template -QIntrusiveList::QIntrusiveList() -: __first(0) +QIntrusiveList::QIntrusiveList() +: __first(0) { } @@ -184,7 +184,7 @@ bool QIntrusiveList::isEmpty() const } template -void QIntrusiveList::insert(N *n) +void QIntrusiveList::insert(N *n) { QIntrusiveListNode *nnode = &(n->*member); nnode->remove(); @@ -215,13 +215,13 @@ bool QIntrusiveList::contains(N *n) const } template -N *QIntrusiveList::first() const -{ - return __first?nodeToN(__first):0; +N *QIntrusiveList::first() const +{ + return __first?nodeToN(__first):0; } template -N *QIntrusiveList::next(N *current) +N *QIntrusiveList::next(N *current) { QIntrusiveListNode *nextnode = (current->*member)._next; N *nextstruct = nextnode?nodeToN(nextnode):0; @@ -229,19 +229,19 @@ N *QIntrusiveList::next(N *current) } template -typename QIntrusiveList::iterator QIntrusiveList::begin() -{ - return __first?iterator(nodeToN(__first)):iterator(); +typename QIntrusiveList::iterator QIntrusiveList::begin() +{ + return __first?iterator(nodeToN(__first)):iterator(); } template -typename QIntrusiveList::iterator QIntrusiveList::end() -{ - return iterator(); +typename QIntrusiveList::iterator QIntrusiveList::end() +{ + return iterator(); } template -N *QIntrusiveList::nodeToN(QIntrusiveListNode *node) +N *QIntrusiveList::nodeToN(QIntrusiveListNode *node) { return (N *)((char *)node - ((char *)&(((N *)0)->*member) - (char *)0)); } diff --git a/src/qml/qml/ftw/qqmlpool_p.h b/src/qml/qml/ftw/qqmlpool_p.h index 408ac74771..7a04291cd4 100644 --- a/src/qml/qml/ftw/qqmlpool_p.h +++ b/src/qml/qml/ftw/qqmlpool_p.h @@ -63,7 +63,7 @@ class Q_QML_PRIVATE_EXPORT QQmlPool { public: // The class has a destructor that needs to be called - class Class { + class Class { public: inline QQmlPool *pool() const; @@ -82,7 +82,7 @@ public: class POD { public: inline QQmlPool *pool() const; - + private: void *operator new(size_t); void *operator new(size_t, void *m) { return m; } @@ -120,16 +120,16 @@ public: int count() const { return m_length; } - int length() const { - return m_length; + int length() const { + return m_length; } - const T &at(int index) const { - Q_ASSERT(index < m_length); - return m_data[index]; + const T &at(int index) const { + Q_ASSERT(index < m_length); + return m_data[index]; }; T &operator[](int index) { - Q_ASSERT(index < m_length); - return m_data[index]; + Q_ASSERT(index < m_length); + return m_data[index]; }; const T *data() const { return m_data; } private: diff --git a/src/qml/qml/ftw/qqmlrefcount_p.h b/src/qml/qml/ftw/qqmlrefcount_p.h index 24c3e7a2cc..de32f0e915 100644 --- a/src/qml/qml/ftw/qqmlrefcount_p.h +++ b/src/qml/qml/ftw/qqmlrefcount_p.h @@ -86,7 +86,7 @@ public: inline QQmlRefPointer &operator=(const QQmlRefPointer &o); inline QQmlRefPointer &operator=(T *); - + inline bool isNull() const { return !o; } inline T* operator->() const { return o; } @@ -100,27 +100,27 @@ private: T *o; }; -QQmlRefCount::QQmlRefCount() -: refCount(1) +QQmlRefCount::QQmlRefCount() +: refCount(1) { } -QQmlRefCount::~QQmlRefCount() +QQmlRefCount::~QQmlRefCount() { Q_ASSERT(refCount.load() == 0); } -void QQmlRefCount::addref() -{ +void QQmlRefCount::addref() +{ Q_ASSERT(refCount.load() > 0); - refCount.ref(); + refCount.ref(); } -void QQmlRefCount::release() -{ +void QQmlRefCount::release() +{ Q_ASSERT(refCount.load() > 0); - if (!refCount.deref()) - destroy(); + if (!refCount.deref()) + destroy(); } int QQmlRefCount::count() const @@ -128,20 +128,20 @@ int QQmlRefCount::count() const return refCount.load(); } -void QQmlRefCount::destroy() -{ - delete this; +void QQmlRefCount::destroy() +{ + delete this; } template QQmlRefPointer::QQmlRefPointer() -: o(0) +: o(0) { } template QQmlRefPointer::QQmlRefPointer(T *o) -: o(o) +: o(o) { if (o) o->addref(); } diff --git a/src/qml/qml/ftw/qqmlthread.cpp b/src/qml/qml/ftw/qqmlthread.cpp index 1ea3f25405..c49463c913 100644 --- a/src/qml/qml/ftw/qqmlthread.cpp +++ b/src/qml/qml/ftw/qqmlthread.cpp @@ -83,10 +83,10 @@ public: void threadEvent(); protected: - virtual bool event(QEvent *); + virtual bool event(QEvent *); private: - struct MainObject : public QObject { + struct MainObject : public QObject { MainObject(QQmlThreadPrivate *p); virtual bool event(QEvent *e); QQmlThreadPrivate *p; @@ -97,8 +97,8 @@ private: QWaitCondition _wait; }; -QQmlThreadPrivate::MainObject::MainObject(QQmlThreadPrivate *p) -: p(p) +QQmlThreadPrivate::MainObject::MainObject(QQmlThreadPrivate *p) +: p(p) { } @@ -116,22 +116,22 @@ void QQmlThreadPrivate::triggerThreadEvent() QCoreApplication::postEvent(this, new QEvent(QEvent::User)); } -bool QQmlThreadPrivate::MainObject::event(QEvent *e) +bool QQmlThreadPrivate::MainObject::event(QEvent *e) { - if (e->type() == QEvent::User) + if (e->type() == QEvent::User) p->mainEvent(); return QObject::event(e); } - + QQmlThreadPrivate::QQmlThreadPrivate(QQmlThread *q) -: q(q), m_threadProcessing(false), m_mainProcessing(false), m_shutdown(false), +: q(q), m_threadProcessing(false), m_mainProcessing(false), m_shutdown(false), m_mainThreadWaiting(false), mainSync(0), m_mainObject(this) { } bool QQmlThreadPrivate::event(QEvent *e) { - if (e->type() == QEvent::User) + if (e->type() == QEvent::User) threadEvent(); return QThread::event(e); } @@ -175,7 +175,7 @@ void QQmlThreadPrivate::mainEvent() unlock(); } -void QQmlThreadPrivate::threadEvent() +void QQmlThreadPrivate::threadEvent() { lock(); diff --git a/src/qml/qml/ftw/qqmlthread_p.h b/src/qml/qml/ftw/qqmlthread_p.h index 688fce6d5a..ee5996d9ef 100644 --- a/src/qml/qml/ftw/qqmlthread_p.h +++ b/src/qml/qml/ftw/qqmlthread_p.h @@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE class QThread; class QQmlThreadPrivate; -class QQmlThread +class QQmlThread { public: QQmlThread(); diff --git a/src/qml/qml/ftw/qrecursionwatcher_p.h b/src/qml/qml/ftw/qrecursionwatcher_p.h index c6b3db38d4..8a8d6575da 100644 --- a/src/qml/qml/ftw/qrecursionwatcher_p.h +++ b/src/qml/qml/ftw/qrecursionwatcher_p.h @@ -76,7 +76,7 @@ private: }; QRecursionNode::QRecursionNode() -: _r(0) +: _r(0) { } diff --git a/src/qml/qml/qqml.h b/src/qml/qml/qqml.h index 641209d1f3..633953c81c 100644 --- a/src/qml/qml/qqml.h +++ b/src/qml/qml/qqml.h @@ -55,10 +55,10 @@ #define QML_DECLARE_TYPE(TYPE) \ Q_DECLARE_METATYPE(TYPE *) \ - Q_DECLARE_METATYPE(QQmlListProperty) + Q_DECLARE_METATYPE(QQmlListProperty) #define QML_DECLARE_TYPE_HASMETATYPE(TYPE) \ - Q_DECLARE_METATYPE(QQmlListProperty) + Q_DECLARE_METATYPE(QQmlListProperty) #define QML_DECLARE_INTERFACE(INTERFACE) \ QML_DECLARE_TYPE(INTERFACE) @@ -109,7 +109,7 @@ int qmlRegisterType() QML_GETTYPENAMES QQmlPrivate::RegisterType type = { - 0, + 0, qRegisterNormalizedMetaType(pointerName.constData()), qRegisterNormalizedMetaType >(listName.constData()), @@ -121,7 +121,7 @@ int qmlRegisterType() QQmlPrivate::attachedPropertiesFunc(), QQmlPrivate::attachedPropertiesMetaObject(), - QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), QQmlPrivate::StaticCastSelector::cast(), QQmlPrivate::StaticCastSelector::cast(), @@ -204,7 +204,7 @@ int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const c QML_GETTYPENAMES QQmlPrivate::RegisterType type = { - 0, + 0, qRegisterNormalizedMetaType(pointerName.constData()), qRegisterNormalizedMetaType >(listName.constData()), @@ -216,7 +216,7 @@ int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const c QQmlPrivate::attachedPropertiesFunc(), QQmlPrivate::attachedPropertiesMetaObject(), - QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), QQmlPrivate::StaticCastSelector::cast(), QQmlPrivate::StaticCastSelector::cast(), @@ -298,7 +298,7 @@ int qmlRegisterExtendedType() QML_GETTYPENAMES QQmlPrivate::RegisterType type = { - 0, + 0, qRegisterNormalizedMetaType(pointerName.constData()), qRegisterNormalizedMetaType >(listName.constData()), @@ -310,7 +310,7 @@ int qmlRegisterExtendedType() QQmlPrivate::attachedPropertiesFunc(), QQmlPrivate::attachedPropertiesMetaObject(), - QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), QQmlPrivate::StaticCastSelector::cast(), QQmlPrivate::StaticCastSelector::cast(), @@ -324,20 +324,20 @@ int qmlRegisterExtendedType() } template -int qmlRegisterExtendedType(const char *uri, int versionMajor, int versionMinor, +int qmlRegisterExtendedType(const char *uri, int versionMajor, int versionMinor, const char *qmlName) { QML_GETTYPENAMES QQmlAttachedPropertiesFunc attached = QQmlPrivate::attachedPropertiesFunc(); - const QMetaObject * attachedMetaObject = QQmlPrivate::attachedPropertiesMetaObject(); + const QMetaObject * attachedMetaObject = QQmlPrivate::attachedPropertiesMetaObject(); if (!attached) { attached = QQmlPrivate::attachedPropertiesFunc(); attachedMetaObject = QQmlPrivate::attachedPropertiesMetaObject(); } QQmlPrivate::RegisterType type = { - 0, + 0, qRegisterNormalizedMetaType(pointerName.constData()), qRegisterNormalizedMetaType >(listName.constData()), @@ -349,7 +349,7 @@ int qmlRegisterExtendedType(const char *uri, int versionMajor, int versionMinor, attached, attachedMetaObject, - QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), QQmlPrivate::StaticCastSelector::cast(), QQmlPrivate::StaticCastSelector::cast(), @@ -383,13 +383,13 @@ int qmlRegisterInterface(const char *typeName) } template -int qmlRegisterCustomType(const char *uri, int versionMajor, int versionMinor, +int qmlRegisterCustomType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, QQmlCustomParser *parser) { QML_GETTYPENAMES QQmlPrivate::RegisterType type = { - 0, + 0, qRegisterNormalizedMetaType(pointerName.constData()), qRegisterNormalizedMetaType >(listName.constData()), @@ -401,7 +401,7 @@ int qmlRegisterCustomType(const char *uri, int versionMajor, int versionMinor, QQmlPrivate::attachedPropertiesFunc(), QQmlPrivate::attachedPropertiesMetaObject(), - QQmlPrivate::StaticCastSelector::cast(), + QQmlPrivate::StaticCastSelector::cast(), QQmlPrivate::StaticCastSelector::cast(), QQmlPrivate::StaticCastSelector::cast(), @@ -506,7 +506,7 @@ inline int qmlRegisterSingletonType(const QUrl &url, const char *uri, int versio inline int qmlRegisterType(const QUrl &url, const char *uri, int versionMajor, int versionMinor, const char *qmlName) { - if (url.isRelative()) { + if (url.isRelative()) { // User input check must go here, because QQmlPrivate::qmlregister is also used internally for composite types qWarning("qmlRegisterType requires absolute URLs."); return 0; diff --git a/src/qml/qml/qqmlcleanup.cpp b/src/qml/qml/qqmlcleanup.cpp index 36f633c29f..94762d4fc7 100644 --- a/src/qml/qml/qqmlcleanup.cpp +++ b/src/qml/qml/qqmlcleanup.cpp @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE /*! \internal \class QQmlCleanup -\brief The QQmlCleanup provides a callback when a QQmlEngine is deleted. +\brief The QQmlCleanup provides a callback when a QQmlEngine is deleted. Any object that needs cleanup to occur before the QQmlEngine's V8 engine is destroyed should inherit from QQmlCleanup. The clear() virtual method will be @@ -111,7 +111,7 @@ QQmlCleanup::~QQmlCleanup() if (prev) *prev = next; if (next) next->prev = prev; - prev = 0; + prev = 0; next = 0; } diff --git a/src/qml/qml/qqmlcleanup_p.h b/src/qml/qml/qqmlcleanup_p.h index 249ef97cc3..1f210ea7ce 100644 --- a/src/qml/qml/qqmlcleanup_p.h +++ b/src/qml/qml/qqmlcleanup_p.h @@ -44,7 +44,7 @@ #include -// +// // W A R N I N G // ------------- // diff --git a/src/qml/qml/qqmlcompileddata.cpp b/src/qml/qml/qqmlcompileddata.cpp index cc8fcdb6ba..05ec0ab9c7 100644 --- a/src/qml/qml/qqmlcompileddata.cpp +++ b/src/qml/qml/qqmlcompileddata.cpp @@ -127,7 +127,7 @@ QQmlCompiledData::~QQmlCompiledData() qDeleteAll(resolvedTypes); resolvedTypes.clear(); - for (int ii = 0; ii < propertyCaches.count(); ++ii) + for (int ii = 0; ii < propertyCaches.count(); ++ii) if (propertyCaches.at(ii)) propertyCaches.at(ii)->release(); @@ -163,7 +163,7 @@ QQmlPropertyCache *QQmlCompiledData::TypeReference::propertyCache() const /*! Returns the property cache, creating one if it doesn't already exist. The cache is not referenced. */ -QQmlPropertyCache *QQmlCompiledData::TypeReference::createPropertyCache(QQmlEngine *engine) +QQmlPropertyCache *QQmlCompiledData::TypeReference::createPropertyCache(QQmlEngine *engine) { if (typePropertyCache) { return typePropertyCache; @@ -234,13 +234,13 @@ int QQmlCompiledData::addInstructionHelper(QQmlInstruction::Type type, QQmlInstr return ptrOffset; } -int QQmlCompiledData::nextInstructionIndex() -{ +int QQmlCompiledData::nextInstructionIndex() +{ return bytecode.size(); } -QQmlInstruction *QQmlCompiledData::instruction(int index) -{ +QQmlInstruction *QQmlCompiledData::instruction(int index) +{ return (QQmlInstruction *)(bytecode.constData() + index); } diff --git a/src/qml/qml/qqmlcompiler.cpp b/src/qml/qml/qqmlcompiler.cpp index a0c1bbcdda..cd0dea975b 100644 --- a/src/qml/qml/qqmlcompiler.cpp +++ b/src/qml/qml/qqmlcompiler.cpp @@ -102,7 +102,7 @@ QQmlCompiler::QQmlCompiler(QQmlPool *pool) : compileState(0), pool(pool), output(0), engine(0), enginePrivate(0), unitRoot(0), unit(0), cachedComponentTypeRef(-1), cachedTranslationContextIndex(-1), componentStats(0) { - if (compilerStatDump()) + if (compilerStatDump()) componentStats = pool->New(); } @@ -1007,13 +1007,13 @@ bool QQmlCompiler::buildObject(QQmlScript::Object *obj, const BindingContext &ct if (tr.type && obj->metatype->metaObject() == &QQmlComponent::staticMetaObject) { COMPILE_CHECK(buildComponent(obj, ctxt)); return true; - } + } if (tr.component) { - typedef QQmlInstruction I; + typedef QQmlInstruction I; const I *init = ((const I *)tr.component->bytecode.constData()); Q_ASSERT(init && tr.component->instructionType(init) == QQmlInstruction::Init); - + // Adjust stack depths to include nested components compileState->objectDepth.pushPop(init->init.objectStackSize); compileState->listDepth.pushPop(init->init.listStackSize); @@ -1027,7 +1027,7 @@ bool QQmlCompiler::buildObject(QQmlScript::Object *obj, const BindingContext &ct BindingContext objCtxt(obj); // Create the synthesized meta object, ignoring aliases - COMPILE_CHECK(checkDynamicMeta(obj)); + COMPILE_CHECK(checkDynamicMeta(obj)); COMPILE_CHECK(mergeDynamicMetaProperties(obj)); COMPILE_CHECK(buildDynamicMeta(obj, Normal)); @@ -1058,7 +1058,7 @@ bool QQmlCompiler::buildObject(QQmlScript::Object *obj, const BindingContext &ct } } - // Merge + // Merge Property *defaultProperty = 0; Property *skipProperty = 0; if (obj->defaultProperty) { @@ -1098,7 +1098,7 @@ bool QQmlCompiler::buildObject(QQmlScript::Object *obj, const BindingContext &ct } defaultProperty->values.insertAfter(insertPos, explicitProperty->values); - } + } } QQmlCustomParser *cp = 0; @@ -1316,9 +1316,9 @@ void QQmlCompiler::genObjectBody(QQmlScript::Object *obj) Instruction::DeferInit dinit; // XXX - these are now massive over allocations dinit.bindingsSize = compileState->totalBindingsCount; - dinit.parserStatusSize = compileState->parserStatusCount; - dinit.objectStackSize = compileState->objectDepth.maxDepth(); - dinit.listStackSize = compileState->listDepth.maxDepth(); + dinit.parserStatusSize = compileState->parserStatusCount; + dinit.objectStackSize = compileState->objectDepth.maxDepth(); + dinit.listStackSize = compileState->listDepth.maxDepth(); output->addInstruction(dinit); for (Property *prop = obj->valueProperties.first(); prop; prop = Object::PropertyList::next(prop)) { @@ -1404,7 +1404,7 @@ void QQmlCompiler::genObjectBody(QQmlScript::Object *obj) } for (Property *prop = obj->valueProperties.first(); prop; prop = Object::PropertyList::next(prop)) { - if (prop->isDeferred) + if (prop->isDeferred) continue; if (prop->isAlias) genValueProperty(prop, obj); @@ -1485,7 +1485,7 @@ void QQmlCompiler::genComponent(QQmlScript::Object *obj) Instruction::Done done; output->addInstruction(done); - output->instruction(createInstruction)->createComponent.count = + output->instruction(createInstruction)->createComponent.count = output->nextInstructionIndex() - nextInstructionIndex; compileState = oldCompileState; @@ -1516,12 +1516,12 @@ bool QQmlCompiler::buildComponent(QQmlScript::Object *obj, if (obj->properties.isMany() || (obj->properties.isOne() && obj->properties.first()->name() != id_string)) COMPILE_EXCEPTION(obj->properties.first(), tr("Component elements may not contain properties other than id")); - + if (!obj->properties.isEmpty()) idProp = obj->properties.first(); if (idProp) { - if (idProp->value || idProp->values.isMany() || idProp->values.first()->object) + if (idProp->value || idProp->values.isMany() || idProp->values.first()->object) COMPILE_EXCEPTION(idProp, tr("Invalid component id specification")); COMPILE_CHECK(checkValidId(idProp->values.first(), idProp->values.first()->primitive())) @@ -1790,7 +1790,7 @@ bool QQmlCompiler::buildProperty(QQmlScript::Property *prop, QQmlScript::Object *obj, const BindingContext &ctxt) { - if (prop->isEmpty()) + if (prop->isEmpty()) COMPILE_EXCEPTION(prop, tr("Empty property assignment")); if (isAttachedPropertyName(prop->name())) { @@ -1808,7 +1808,7 @@ bool QQmlCompiler::buildProperty(QQmlScript::Property *prop, unit->imports().resolveType(prop->name(), &type, 0, 0, &typeNamespace); if (typeNamespace) { - COMPILE_CHECK(buildPropertyInNamespace(typeNamespace, prop, obj, + COMPILE_CHECK(buildPropertyInNamespace(typeNamespace, prop, obj, ctxt)); return true; } else if (!type || !type->attachedPropertiesType()) { @@ -1852,13 +1852,13 @@ bool QQmlCompiler::buildProperty(QQmlScript::Property *prop, // We can't error here as the "id" property does not require a // successful index resolution - if (prop->index != -1) + if (prop->index != -1) prop->type = prop->core.propType; // Check if this is an alias - if (prop->index != -1 && - prop->parent && - prop->parent->type != -1 && + if (prop->index != -1 && + prop->parent && + prop->parent->type != -1 && output->types.at(prop->parent->type).component) { QQmlPropertyCache *cache = output->types.at(prop->parent->type).component->rootPropertyCache; @@ -1866,7 +1866,7 @@ bool QQmlCompiler::buildProperty(QQmlScript::Property *prop, prop->isAlias = true; } - if (prop->index != -1 && !prop->values.isEmpty()) + if (prop->index != -1 && !prop->values.isEmpty()) prop->parent->setBindingBit(prop->index); } @@ -1931,7 +1931,7 @@ bool QQmlCompiler::buildPropertyInNamespace(QQmlImportNamespace *ns, QQmlType *type = 0; unit->imports().resolveType(ns, prop->name(), &type, 0, 0); - if (!type || !type->attachedPropertiesType()) + if (!type || !type->attachedPropertiesType()) COMPILE_EXCEPTION(prop, tr("Non-existent attached object")); if (!prop->value) @@ -2131,7 +2131,7 @@ void QQmlCompiler::saveComponentState() compileState->root->componentCompileState = compileState; - if (componentStats) + if (componentStats) componentStats->savedComponentStats.append(componentStats->componentStat); } @@ -2234,7 +2234,7 @@ bool QQmlCompiler::buildGroupedProperty(QQmlScript::Property *prop, if (!prop->value->metatype) COMPILE_EXCEPTION(prop, tr("Invalid grouped property access")); - if (!prop->values.isEmpty()) + if (!prop->values.isEmpty()) COMPILE_EXCEPTION(prop->values.first(), tr( "Cannot assign a value directly to a grouped property")); obj->addGroupedProperty(prop); @@ -2263,7 +2263,7 @@ bool QQmlCompiler::buildValueTypeProperty(QObject *type, for (Property *prop = obj->properties.first(); prop; prop = obj->properties.next(prop)) { QQmlPropertyData *d = property(obj, prop->name()); - if (d == 0) + if (d == 0) COMPILE_EXCEPTION(prop, tr("Cannot assign to non-existent property \"%1\"").arg(prop->name().toString())); prop->index = d->coreIndex; @@ -2311,7 +2311,7 @@ bool QQmlCompiler::buildValueTypeProperty(QObject *type, for (Value *v = prop->onValues.first(); v; v = Property::ValueList::next(v)) { Q_ASSERT(v->object); - COMPILE_CHECK(buildPropertyOnAssignment(prop, obj, baseObj, v, ctxt)); + COMPILE_CHECK(buildPropertyOnAssignment(prop, obj, baseObj, v, ctxt)); } obj->addValueProperty(prop); @@ -2323,7 +2323,7 @@ bool QQmlCompiler::buildValueTypeProperty(QObject *type, } // Build assignments to QML lists. QML lists are properties of type -// QQmlListProperty. List properties can accept a list of +// QQmlListProperty. List properties can accept a list of // objects, or a single binding. bool QQmlCompiler::buildListProperty(QQmlScript::Property *prop, QQmlScript::Object *obj, @@ -2720,7 +2720,7 @@ bool QQmlCompiler::checkDynamicMeta(QQmlScript::Object *obj) } if (propNames.testAndSet(prop.name.hash())) { - for (Object::DynamicProperty *p2 = obj->dynamicProperties.first(); p2 != p; + for (Object::DynamicProperty *p2 = obj->dynamicProperties.first(); p2 != p; p2 = obj->dynamicProperties.next(p2)) { if (p2->name == prop.name) { COMPILE_EXCEPTION_LOCATION(prop.nameLocation.line, @@ -2798,7 +2798,7 @@ bool QQmlCompiler::mergeDynamicMetaProperties(QQmlScript::Object *obj) property = obj->getDefaultProperty(); } else { property = obj->getProperty(p->name); - if (!property->values.isEmpty()) + if (!property->values.isEmpty()) COMPILE_EXCEPTION(property, tr("Property value set multiple times")); } @@ -3620,7 +3620,7 @@ int QQmlCompiler::genContextCache() } QQmlPropertyData -QQmlCompiler::genValueTypeData(QQmlScript::Property *valueTypeProp, +QQmlCompiler::genValueTypeData(QQmlScript::Property *valueTypeProp, QQmlScript::Property *prop) { QQmlValueType *vt = QQmlValueTypeFactory::valueType(prop->type); @@ -3633,8 +3633,8 @@ bool QQmlCompiler::completeComponentBuild() if (componentStats) componentStats->componentStat.ids = compileState->ids.count(); - for (Object *aliasObject = compileState->aliasingObjects.first(); aliasObject; - aliasObject = compileState->aliasingObjects.next(aliasObject)) + for (Object *aliasObject = compileState->aliasingObjects.first(); aliasObject; + aliasObject = compileState->aliasingObjects.next(aliasObject)) COMPILE_CHECK(buildDynamicMetaAliases(aliasObject)); const QQmlScript::Parser &parser = unit->parser(); @@ -3884,7 +3884,7 @@ QQmlCompiler::signal(QQmlScript::Object *object, const QHashedStringRef &name, b QHashedStringRef propName = name.mid(0, name.length() - Changed_string.length()); d = property(object, propName, notInRevision); - if (d) + if (d) return cache->signal(d->notifyIndex); } @@ -3892,20 +3892,20 @@ QQmlCompiler::signal(QQmlScript::Object *object, const QHashedStringRef &name, b } // This code must match the semantics of QQmlPropertyPrivate::findSignalByName -int QQmlCompiler::indexOfSignal(QQmlScript::Object *object, const QString &name, +int QQmlCompiler::indexOfSignal(QQmlScript::Object *object, const QString &name, bool *notInRevision) { QQmlPropertyData *d = signal(object, QStringRef(&name), notInRevision); return d?d->coreIndex:-1; } -int QQmlCompiler::indexOfProperty(QQmlScript::Object *object, const QString &name, +int QQmlCompiler::indexOfProperty(QQmlScript::Object *object, const QString &name, bool *notInRevision) { return indexOfProperty(object, QStringRef(&name), notInRevision); } -int QQmlCompiler::indexOfProperty(QQmlScript::Object *object, const QHashedStringRef &name, +int QQmlCompiler::indexOfProperty(QQmlScript::Object *object, const QHashedStringRef &name, bool *notInRevision) { QQmlPropertyData *d = property(object, name, notInRevision); diff --git a/src/qml/qml/qqmlcompiler_p.h b/src/qml/qml/qqmlcompiler_p.h index 0feebed93d..c63f430b0a 100644 --- a/src/qml/qml/qqmlcompiler_p.h +++ b/src/qml/qml/qqmlcompiler_p.h @@ -101,7 +101,7 @@ public: int listMetaTypeId; bool isRegisteredWithEngine; - struct TypeReference + struct TypeReference { TypeReference() : type(0), typePropertyCache(0), component(0) @@ -208,7 +208,7 @@ private: }; namespace QQmlCompilerTypes { - struct BindingContext + struct BindingContext { BindingContext() : stack(0), owner(0), object(0) {} @@ -258,7 +258,7 @@ namespace QQmlCompilerTypes { int n; }; - struct IdList : public QFieldList { QQmlScript::Object *value(const QString &id) const { @@ -292,8 +292,8 @@ namespace QQmlCompilerTypes { // more than one of these for each compile struct ComponentCompileState : public QQmlPool::Class { - ComponentCompileState() - : parserStatusCount(0), totalBindingsCount(0), pushedProperties(0), nested(false), + ComponentCompileState() + : parserStatusCount(0), totalBindingsCount(0), pushedProperties(0), nested(false), root(0) {} IdList ids; @@ -364,23 +364,23 @@ private: bool buildObject(QQmlScript::Object *obj, const QQmlCompilerTypes::BindingContext &); bool buildComponent(QQmlScript::Object *obj, const QQmlCompilerTypes::BindingContext &); bool buildSubObject(QQmlScript::Object *obj, const QQmlCompilerTypes::BindingContext &); - bool buildSignal(QQmlScript::Property *prop, QQmlScript::Object *obj, + bool buildSignal(QQmlScript::Property *prop, QQmlScript::Object *obj, const QQmlCompilerTypes::BindingContext &); - bool buildProperty(QQmlScript::Property *prop, QQmlScript::Object *obj, + bool buildProperty(QQmlScript::Property *prop, QQmlScript::Object *obj, const QQmlCompilerTypes::BindingContext &); bool buildPropertyInNamespace(QQmlImportNamespace *ns, - QQmlScript::Property *prop, - QQmlScript::Object *obj, + QQmlScript::Property *prop, + QQmlScript::Object *obj, const QQmlCompilerTypes::BindingContext &); bool buildIdProperty(QQmlScript::Property *prop, QQmlScript::Object *obj); - bool buildAttachedProperty(QQmlScript::Property *prop, + bool buildAttachedProperty(QQmlScript::Property *prop, QQmlScript::Object *obj, const QQmlCompilerTypes::BindingContext &ctxt); bool buildGroupedProperty(QQmlScript::Property *prop, QQmlScript::Object *obj, const QQmlCompilerTypes::BindingContext &ctxt); - bool buildValueTypeProperty(QObject *type, - QQmlScript::Object *obj, + bool buildValueTypeProperty(QObject *type, + QQmlScript::Object *obj, QQmlScript::Object *baseObj, const QQmlCompilerTypes::BindingContext &ctxt); bool buildListProperty(QQmlScript::Property *prop, @@ -432,13 +432,13 @@ private: void genComponent(QQmlScript::Object *obj); void genValueProperty(QQmlScript::Property *prop, QQmlScript::Object *obj); void genListProperty(QQmlScript::Property *prop, QQmlScript::Object *obj); - void genPropertyAssignment(QQmlScript::Property *prop, + void genPropertyAssignment(QQmlScript::Property *prop, QQmlScript::Object *obj, QQmlScript::Property *valueTypeProperty = 0); void genLiteralAssignment(QQmlScript::Property *prop, QQmlScript::Value *value); - void genBindingAssignment(QQmlScript::Value *binding, - QQmlScript::Property *prop, + void genBindingAssignment(QQmlScript::Value *binding, + QQmlScript::Property *prop, QQmlScript::Object *obj, QQmlScript::Property *valueTypeProperty = 0); int genContextCache(); diff --git a/src/qml/qml/qqmlcomponent_p.h b/src/qml/qml/qqmlcomponent_p.h index 8bf4005dd6..7e855fdfd0 100644 --- a/src/qml/qml/qqmlcomponent_p.h +++ b/src/qml/qml/qqmlcomponent_p.h @@ -81,7 +81,7 @@ class QQmlComponentAttached; class Q_QML_PRIVATE_EXPORT QQmlComponentPrivate : public QObjectPrivate, public QQmlTypeData::TypeDataCallback { Q_DECLARE_PUBLIC(QQmlComponent) - + public: QQmlComponentPrivate() : typeData(0), progress(0.), start(-1), cc(0), engine(0), creationContext(0), depthIncreased(false) {} @@ -95,7 +95,7 @@ public: QQmlTypeData *typeData; virtual void typeDataReady(QQmlTypeData *); virtual void typeDataProgress(QQmlTypeData *, qreal); - + void fromTypeData(QQmlTypeData *data); QUrl url; @@ -124,7 +124,7 @@ public: }; ConstructionState state; - static void beginDeferred(QQmlEnginePrivate *enginePriv, QObject *object, + static void beginDeferred(QQmlEnginePrivate *enginePriv, QObject *object, ConstructionState *state); static void complete(QQmlEnginePrivate *enginePriv, ConstructionState *state); diff --git a/src/qml/qml/qqmlcontext.cpp b/src/qml/qml/qqmlcontext.cpp index 78e6650d02..7b1ba46db2 100644 --- a/src/qml/qml/qqmlcontext.cpp +++ b/src/qml/qml/qqmlcontext.cpp @@ -403,7 +403,7 @@ QVariant QQmlContext::contextProperty(const QString &name) const } /*! -Returns the name of \a object in this context, or an empty string if \a object +Returns the name of \a object in this context, or an empty string if \a object is not named in the context. Objects are named by setContextProperty(), or by ids in the case of QML created contexts. @@ -521,7 +521,7 @@ QObject *QQmlContextPrivate::context_at(QQmlListProperty *prop, int ind QQmlContextData::QQmlContextData() -: parent(0), engine(0), isInternal(false), ownedByParent(false), isJSContext(false), +: parent(0), engine(0), isInternal(false), ownedByParent(false), isJSContext(false), isPragmaLibraryContext(false), unresolvedNames(false), hasEmittedDestruction(false), isRootObjectInCreation(false), publicContext(0), activeVMEData(0), contextObject(0), imports(0), childContexts(0), nextChild(0), prevChild(0), @@ -531,7 +531,7 @@ QQmlContextData::QQmlContextData() } QQmlContextData::QQmlContextData(QQmlContext *ctxt) -: parent(0), engine(0), isInternal(false), ownedByParent(false), isJSContext(false), +: parent(0), engine(0), isInternal(false), ownedByParent(false), isJSContext(false), isPragmaLibraryContext(false), unresolvedNames(false), hasEmittedDestruction(false), isRootObjectInCreation(false), publicContext(ctxt), activeVMEData(0), contextObject(0), imports(0), childContexts(0), nextChild(0), prevChild(0), diff --git a/src/qml/qml/qqmlcontext_p.h b/src/qml/qml/qqmlcontext_p.h index 26048b0217..464bee82c0 100644 --- a/src/qml/qml/qqmlcontext_p.h +++ b/src/qml/qml/qqmlcontext_p.h @@ -134,7 +134,7 @@ public: QUrl resolvedUrl(const QUrl &); - // My containing QQmlContext. If isInternal is true this owns publicContext. + // My containing QQmlContext. If isInternal is true this owns publicContext. // If internal is false publicContext owns this. QQmlContext *asQQmlContext(); QQmlContextPrivate *asQQmlContextPrivate(); diff --git a/src/qml/qml/qqmlcustomparser.cpp b/src/qml/qml/qqmlcustomparser.cpp index 90bd2fd875..004d9f435a 100644 --- a/src/qml/qml/qqmlcustomparser.cpp +++ b/src/qml/qml/qqmlcustomparser.cpp @@ -93,7 +93,7 @@ using namespace QQmlScript; The \a object will be an instance of the TypeClass specified by QML_REGISTER_CUSTOM_TYPE. */ -QQmlCustomParserNode +QQmlCustomParserNode QQmlCustomParserNodePrivate::fromObject(QQmlScript::Object *root) { QQmlCustomParserNode rootNode; @@ -111,7 +111,7 @@ QQmlCustomParserNodePrivate::fromObject(QQmlScript::Object *root) return rootNode; } -QQmlCustomParserProperty +QQmlCustomParserProperty QQmlCustomParserNodePrivate::fromProperty(QQmlScript::Property *p) { QQmlCustomParserProperty prop; diff --git a/src/qml/qml/qqmlcustomparser_p.h b/src/qml/qml/qqmlcustomparser_p.h index b4d716b240..b406717410 100644 --- a/src/qml/qml/qqmlcustomparser_p.h +++ b/src/qml/qml/qqmlcustomparser_p.h @@ -79,7 +79,7 @@ public: QQmlScript::Location location() const; bool isList() const; - // Will be one of QQmlScript::Variant, QQmlCustomParserProperty or + // Will be one of QQmlScript::Variant, QQmlCustomParserProperty or // QQmlCustomParserNode QList assignedValues() const; diff --git a/src/qml/qml/qqmldata_p.h b/src/qml/qml/qqmldata_p.h index 982156ea15..c4b19394f0 100644 --- a/src/qml/qml/qqmldata_p.h +++ b/src/qml/qml/qqmldata_p.h @@ -143,7 +143,7 @@ public: void layout(QQmlNotifierEndpoint*); }; NotifyList *notifyList; - + inline QQmlNotifierEndpoint *notify(int index); void addNotify(int index, QQmlNotifierEndpoint *); int endpointCount(int index); @@ -151,7 +151,7 @@ public: void disconnectNotifiers(); // The context that created the C++ object - QQmlContextData *context; + QQmlContextData *context; // The outermost context in which this object lives QQmlContextData *outerContext; @@ -163,7 +163,7 @@ public: QQmlData**prevContextObject; int bindingBitsSize; - quint32 *bindingBits; + quint32 *bindingBits; inline bool hasBindingBit(int) const; void clearBindingBit(int); diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index f8e5ad5874..205034dfbb 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -107,7 +107,7 @@ #include #include -#define CSIDL_APPDATA 0x001a // \Application Data +#define CSIDL_APPDATA 0x001a // \Application Data #endif Q_DECLARE_METATYPE(QQmlProperty) diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h index 19eb320fbe..e292dbf6c0 100644 --- a/src/qml/qml/qqmlengine_p.h +++ b/src/qml/qml/qqmlengine_p.h @@ -271,16 +271,16 @@ public: mutable QMutex mutex; private: - // Locker locks the QQmlEnginePrivate data structures for read and write, if necessary. - // Currently, locking is only necessary if the threaded loader is running concurrently. If it is + // Locker locks the QQmlEnginePrivate data structures for read and write, if necessary. + // Currently, locking is only necessary if the threaded loader is running concurrently. If it is // either idle, or is running with the main thread blocked, no locking is necessary. This way // we only pay for locking when we have to. - // Consequently, this class should only be used to protect simple accesses or modifications of the + // Consequently, this class should only be used to protect simple accesses or modifications of the // QQmlEnginePrivate structures or operations that can be guaranteed not to start activity // on the loader thread. - // The Locker API is identical to QMutexLocker. Locker reuses the QQmlEnginePrivate::mutex + // The Locker API is identical to QMutexLocker. Locker reuses the QQmlEnginePrivate::mutex // QMutex instance and multiple Lockers are recursive in the same thread. - class Locker + class Locker { public: inline Locker(const QQmlEngine *); @@ -333,7 +333,7 @@ QQmlEnginePrivate::Locker::~Locker() void QQmlEnginePrivate::Locker::unlock() { - if (m_locked) { + if (m_locked) { m_ep->mutex.unlock(); m_locked = false; } @@ -373,7 +373,7 @@ thread, \a value will be deleted immediately. This method should be used for *any* type that has resources that need to be freed in the engine thread. This is generally types that use V8 handles. As there is some small overhead in checking the current thread, it is best -practice to check if any V8 handles actually need to be freed and delete +practice to check if any V8 handles actually need to be freed and delete the instance directly if not. */ template @@ -384,7 +384,7 @@ void QQmlEnginePrivate::deleteInEngineThread(T *value) Q_ASSERT(value); if (isEngineThread()) { delete value; - } else { + } else { struct I : public Deletable { I(T *value) : value(value) {} ~I() { delete value; } @@ -420,10 +420,10 @@ is returned. The returned cache is not referenced, so if it is to be stored, call addref(). XXX thread There is a potential future race condition in this and all the cache() -functions. As the QQmlPropertyCache is returned unreferenced, when called -from the loader thread, it is possible that the cache will have been dereferenced +functions. As the QQmlPropertyCache is returned unreferenced, when called +from the loader thread, it is possible that the cache will have been dereferenced and deleted before the loader thread has a chance to use or reference it. This -can't currently happen as the cache holds a reference to the +can't currently happen as the cache holds a reference to the QQmlPropertyCache until the QQmlEngine is destroyed. */ QQmlPropertyCache *QQmlEnginePrivate::cache(QObject *obj) @@ -475,8 +475,8 @@ QQmlPropertyCache *QQmlEnginePrivate::cache(QQmlType *type, int minorVersion, QQ return rv; } -QV8Engine *QQmlEnginePrivate::getV8Engine(QQmlEngine *e) -{ +QV8Engine *QQmlEnginePrivate::getV8Engine(QQmlEngine *e) +{ Q_ASSERT(e); return e->d_func()->v8engine(); @@ -489,32 +489,32 @@ QV4::ExecutionEngine *QQmlEnginePrivate::getV4Engine(QQmlEngine *e) return e->d_func()->v4engine(); } -QQmlEnginePrivate *QQmlEnginePrivate::get(QQmlEngine *e) -{ +QQmlEnginePrivate *QQmlEnginePrivate::get(QQmlEngine *e) +{ Q_ASSERT(e); return e->d_func(); } -const QQmlEnginePrivate *QQmlEnginePrivate::get(const QQmlEngine *e) -{ +const QQmlEnginePrivate *QQmlEnginePrivate::get(const QQmlEngine *e) +{ Q_ASSERT(e); return e->d_func(); } -QQmlEnginePrivate *QQmlEnginePrivate::get(QQmlContext *c) -{ - return (c && c->engine()) ? QQmlEnginePrivate::get(c->engine()) : 0; +QQmlEnginePrivate *QQmlEnginePrivate::get(QQmlContext *c) +{ + return (c && c->engine()) ? QQmlEnginePrivate::get(c->engine()) : 0; } -QQmlEnginePrivate *QQmlEnginePrivate::get(QQmlContextData *c) -{ - return (c && c->engine) ? QQmlEnginePrivate::get(c->engine) : 0; +QQmlEnginePrivate *QQmlEnginePrivate::get(QQmlContextData *c) +{ + return (c && c->engine) ? QQmlEnginePrivate::get(c->engine) : 0; } -QQmlEngine *QQmlEnginePrivate::get(QQmlEnginePrivate *p) -{ +QQmlEngine *QQmlEnginePrivate::get(QQmlEnginePrivate *p) +{ Q_ASSERT(p); return p->q_func(); diff --git a/src/qml/qml/qqmlerror.cpp b/src/qml/qml/qqmlerror.cpp index ad95ecdf06..c583156c43 100644 --- a/src/qml/qml/qqmlerror.cpp +++ b/src/qml/qml/qqmlerror.cpp @@ -131,7 +131,7 @@ QQmlError &QQmlError::operator=(const QQmlError &other) } /*! - \internal + \internal */ QQmlError::~QQmlError() { @@ -297,7 +297,7 @@ QDebug operator<<(QDebug debug, const QQmlError &error) if(error.column() > 0) { int column = qMax(0, error.column() - 1); - column = qMin(column, line.length()); + column = qMin(column, line.length()); QByteArray ind; ind.reserve(column); diff --git a/src/qml/qml/qqmlglobal_p.h b/src/qml/qml/qqmlglobal_p.h index 7b968a7e46..eca13e8fb8 100644 --- a/src/qml/qml/qqmlglobal_p.h +++ b/src/qml/qml/qqmlglobal_p.h @@ -193,14 +193,14 @@ struct QQmlGraphics_DerivedObject : public QObject }; /*! - Returns true if the case of \a fileName is equivalent to the file case of + Returns true if the case of \a fileName is equivalent to the file case of \a fileName on disk, and false otherwise. - This is used to ensure that the behavior of QML on a case-insensitive file - system is the same as on a case-sensitive file system. This function - performs a "best effort" attempt to determine the real case of the file. + This is used to ensure that the behavior of QML on a case-insensitive file + system is the same as on a case-sensitive file system. This function + performs a "best effort" attempt to determine the real case of the file. It may have false positives (say the case is correct when it isn't), but it - should never have a false negative (say the case is incorrect when it is + should never have a false negative (say the case is incorrect when it is correct). Length specifies specifies the number of characters to be checked from diff --git a/src/qml/qml/qqmlguard_p.h b/src/qml/qml/qqmlguard_p.h index 455f5c93a8..b2e0949c74 100644 --- a/src/qml/qml/qqmlguard_p.h +++ b/src/qml/qml/qqmlguard_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE -class QQmlGuardImpl +class QQmlGuardImpl { public: inline QQmlGuardImpl(); @@ -91,7 +91,7 @@ public: inline T *object() const; inline void setObject(T *g); - + inline bool isNull() const { return !o; } @@ -141,7 +141,7 @@ void QQmlGuardImpl::addGuard() { Q_ASSERT(!prev); - if (QObjectPrivate::get(o)->wasDeleted) + if (QObjectPrivate::get(o)->wasDeleted) return; QQmlData *data = QQmlData::get(o, true); @@ -198,13 +198,13 @@ QQmlGuard &QQmlGuard::operator=(T *g) } template -T *QQmlGuard::object() const -{ - return static_cast(o); +T *QQmlGuard::object() const +{ + return static_cast(o); } template -void QQmlGuard::setObject(T *g) +void QQmlGuard::setObject(T *g) { if (g != o) { if (prev) remGuard(); diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp index 8645d2116a..0848af07e3 100644 --- a/src/qml/qml/qqmlimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -303,7 +303,7 @@ public: \brief The QQmlImports class encapsulates one QML document's import statements. \internal */ -QQmlImports::QQmlImports(const QQmlImports ©) +QQmlImports::QQmlImports(const QQmlImports ©) : d(copy.d) { ++d->ref; @@ -1631,7 +1631,7 @@ QString QQmlImportDatabase::resolvePlugin(QQmlTypeLoader *typeLoader, } if (qmlImportTrace()) - qDebug() << "QQmlImportDatabase::resolvePlugin: Could not resolve plugin" << baseName + qDebug() << "QQmlImportDatabase::resolvePlugin: Could not resolve plugin" << baseName << "in" << qmldirPath; return QString(); diff --git a/src/qml/qml/qqmlincubator.cpp b/src/qml/qml/qqmlincubator.cpp index 52bf1d8b3e..10fd05ab58 100644 --- a/src/qml/qml/qqmlincubator.cpp +++ b/src/qml/qml/qqmlincubator.cpp @@ -48,8 +48,8 @@ #include "qqmlmemoryprofiler_p.h" #include "qqmlobjectcreator_p.h" -// XXX TODO -// - check that the Component.onCompleted behavior is the same as 4.8 in the synchronous and +// XXX TODO +// - check that the Component.onCompleted behavior is the same as 4.8 in the synchronous and // async if nested cases void QQmlEnginePrivate::incubate(QQmlIncubator &i, QQmlContextData *forContext) { @@ -107,7 +107,7 @@ void QQmlEnginePrivate::incubate(QQmlIncubator &i, QQmlContextData *forContext) } /*! -Sets the engine's incubation \a controller. The engine can only have one active controller +Sets the engine's incubation \a controller. The engine can only have one active controller and it does not take ownership of it. \sa incubationController() @@ -181,7 +181,7 @@ the process of creating objects a QQmlIncubators must be driven only during the application's idle time. QQmlIncubationController allows the application to control exactly when, how often and for how long this processing occurs. -A QQmlIncubationController derived instance should be created and set on a +A QQmlIncubationController derived instance should be created and set on a QQmlEngine by calling the QQmlEngine::setIncubationController() method. Processing is then controlled by calling the QQmlIncubationController::incubateFor() or QQmlIncubationController::incubateWhile() methods as dictated by the application's @@ -191,12 +191,12 @@ For example, this is an example of a incubation controller that will incubate fo of 5 milliseconds out of every 16 milliseconds. \code -class PeriodicIncubationController : public QObject, - public QQmlIncubationController +class PeriodicIncubationController : public QObject, + public QQmlIncubationController { public: - PeriodicIncubationController() { - startTimer(16); + PeriodicIncubationController() { + startTimer(16); } protected: @@ -208,7 +208,7 @@ protected: Although the previous example would work, it is not optimal. Real world incubation controllers should try and maximize the amount of idle time they consume - rather -than a static amount like 5 milliseconds - while not disturbing the application. +than a static amount like 5 milliseconds - while not disturbing the application. */ /*! @@ -244,7 +244,7 @@ int QQmlIncubationController::incubatingObjectCount() const } /*! -Called when the number of incubating objects changes. \a incubatingObjectCount is the +Called when the number of incubating objects changes. \a incubatingObjectCount is the new number of incubating objects. The default implementation does nothing. @@ -307,7 +307,7 @@ void QQmlIncubatorPrivate::incubate(QQmlVME::Interrupt &i) return; result = tresult; - if (errors.isEmpty() && result == 0) + if (errors.isEmpty() && result == 0) goto finishIncubate; if (result) { @@ -428,8 +428,8 @@ application uses QQmlComponent::create() directly, the QML object instance is cr synchronously which, depending on the complexity of the object, can cause noticeable pauses or stutters in the application. -The use of QQmlIncubator gives more control over the creation of a QML object, -including allowing it to be created asynchronously using application idle time. The following +The use of QQmlIncubator gives more control over the creation of a QML object, +including allowing it to be created asynchronously using application idle time. The following example shows a simple use of QQmlIncubator. \code @@ -443,25 +443,25 @@ while (incubator.isReady()) { QObject *object = incubator.object(); \endcode -Asynchronous incubators are controlled by a QQmlIncubationController that is +Asynchronous incubators are controlled by a QQmlIncubationController that is set on the QQmlEngine, which lets the engine know when the application is idle and incubating objects should be processed. If an incubation controller is not set on the QQmlEngine, QQmlIncubator creates objects synchronously regardless of the -specified IncubationMode. +specified IncubationMode. QQmlIncubator supports three incubation modes: \list \li Synchronous The creation occurs synchronously. That is, once the QQmlComponent::create() call returns, the incubator will already be in either the Error or Ready state. A synchronous incubator has no real advantage compared to using -the synchronous creation methods on QQmlComponent directly, but it may simplify an -application's implementation to use the same API for both synchronous and asynchronous +the synchronous creation methods on QQmlComponent directly, but it may simplify an +application's implementation to use the same API for both synchronous and asynchronous creations. \li Asynchronous (default) The creation occurs asynchronously, assuming a -QQmlIncubatorController is set on the QQmlEngine. +QQmlIncubatorController is set on the QQmlEngine. -The incubator will remain in the Loading state until either the creation is complete or an error +The incubator will remain in the Loading state until either the creation is complete or an error occurs. The statusChanged() callback can be used to be notified of status changes. Applications should use the Asynchronous incubation mode to create objects that are not needed @@ -471,31 +471,31 @@ the object is needed immediately the QQmlIncubator::forceCompletion() method can to complete the creation process synchronously. \li AsynchronousIfNested The creation will occur asynchronously if part of a nested asynchronous -creation, or synchronously if not. +creation, or synchronously if not. In most scenarios where a QML component wants the appearance of a synchronous -instantiation, it should use this mode. +instantiation, it should use this mode. This mode is best explained with an example. When the ListView type is first created, it needs -to populate itself with an initial set of delegates to show. If the ListView was 400 pixels high, +to populate itself with an initial set of delegates to show. If the ListView was 400 pixels high, and each delegate was 100 pixels high, it would need to create four initial delegate instances. If the ListView used the Asynchronous incubation mode, the ListView would always be created empty and then, sometime later, the four initial items would appear. -Conversely, if the ListView was to use the Synchronous incubation mode it would behave correctly -but it may introduce stutters into the application. As QML would have to stop and instantiate the -ListView's delegates synchronously, if the ListView was part of a QML component that was being +Conversely, if the ListView was to use the Synchronous incubation mode it would behave correctly +but it may introduce stutters into the application. As QML would have to stop and instantiate the +ListView's delegates synchronously, if the ListView was part of a QML component that was being instantiated asynchronously this would undo much of the benefit of asynchronous instantiation. The AsynchronousIfNested mode reconciles this problem. By using AsynchronousIfNested, the ListView delegates are instantiated asynchronously if the ListView itself is already part of an asynchronous instantiation, and synchronously otherwise. In the case of a nested asynchronous instantiation, the outer asynchronous instantiation will not complete until after all the nested instantiations have also -completed. This ensures that by the time the outer asynchronous instantitation completes, inner +completed. This ensures that by the time the outer asynchronous instantitation completes, inner items like ListView have already completed loading their initial delegates. It is almost always incorrect to use the Synchronous incubation mode - elements or components that -want the appearance of synchronous instantiation, but without the downsides of introducing freezes +want the appearance of synchronous instantiation, but without the downsides of introducing freezes or stutters into the application, should use the AsynchronousIfNested incubation mode. \endlist */ @@ -523,14 +523,14 @@ QQmlIncubator::~QQmlIncubator() /*! \enum QQmlIncubator::IncubationMode -Specifies the mode the incubator operates in. Regardless of the incubation mode, a +Specifies the mode the incubator operates in. Regardless of the incubation mode, a QQmlIncubator will behave synchronously if the QQmlEngine does not have a QQmlIncubationController set. \value Asynchronous The object will be created asynchronously. \value AsynchronousIfNested If the object is being created in a context that is already part -of an asynchronous creation, this incubator will join that existing incubation and execute -asynchronously. The existing incubation will not become Ready until both it and this +of an asynchronous creation, this incubator will join that existing incubation and execute +asynchronously. The existing incubation will not become Ready until both it and this incubation have completed. Otherwise, the incubation will execute synchronously. \value Synchronous The object will be created synchronously. */ @@ -547,7 +547,7 @@ Specifies the status of the QQmlIncubator. */ /*! -Clears the incubator. Any in-progress incubation is aborted. If the incubator is in the +Clears the incubator. Any in-progress incubation is aborted. If the incubator is in the Ready state, the created object is \b not deleted. */ void QQmlIncubator::clear() @@ -706,7 +706,7 @@ void QQmlIncubator::setInitialState(QObject *object) void QQmlIncubatorPrivate::changeStatus(QQmlIncubator::Status s) { - if (s == status) + if (s == status) return; status = s; @@ -716,13 +716,13 @@ void QQmlIncubatorPrivate::changeStatus(QQmlIncubator::Status s) QQmlIncubator::Status QQmlIncubatorPrivate::calculateStatus() const { - if (!errors.isEmpty()) + if (!errors.isEmpty()) return QQmlIncubator::Error; else if (result && progress == QQmlIncubatorPrivate::Completed && waitingFor.isEmpty()) return QQmlIncubator::Ready; else if (compiledData) return QQmlIncubator::Loading; - else + else return QQmlIncubator::Null; } diff --git a/src/qml/qml/qqmlincubator.h b/src/qml/qml/qqmlincubator.h index 4d3287a394..2bcaee8a45 100644 --- a/src/qml/qml/qqmlincubator.h +++ b/src/qml/qml/qqmlincubator.h @@ -60,11 +60,11 @@ public: AsynchronousIfNested, Synchronous }; - enum Status { - Null, - Ready, - Loading, - Error + enum Status { + Null, + Ready, + Loading, + Error }; QQmlIncubator(IncubationMode = Asynchronous); diff --git a/src/qml/qml/qqmlinfo.cpp b/src/qml/qml/qqmlinfo.cpp index 32f0eeef36..63ce2d419c 100644 --- a/src/qml/qml/qqmlinfo.cpp +++ b/src/qml/qml/qqmlinfo.cpp @@ -61,13 +61,13 @@ QT_BEGIN_NAMESPACE When QML types display warning messages, it improves traceability if they include the QML file and line number on which the particular instance was instantiated. - + To include the file and line number, an object must be passed. If the file and line number is not available for that instance (either it was not instantiated by the QML engine or location information is disabled), "unknown location" will be used instead. - For example, + For example, \code qmlInfo(object) << tr("component property is a write-once property"); diff --git a/src/qml/qml/qqmlinstruction_p.h b/src/qml/qml/qqmlinstruction_p.h index bda8c3db0d..aeda9832f3 100644 --- a/src/qml/qml/qqmlinstruction_p.h +++ b/src/qml/qml/qqmlinstruction_p.h @@ -131,7 +131,7 @@ QT_BEGIN_NAMESPACE F(Defer, defer) \ F(PopFetchedObject, common) \ F(FetchValueType, fetchValue) \ - F(PopValueType, fetchValue) + F(PopValueType, fetchValue) #ifndef QT_NO_TRANSLATION #define F_TRANSLATION(F, I, FMT) F(I, FMT) @@ -161,7 +161,7 @@ QT_BEGIN_NAMESPACE class QQmlCompiledData; union QQmlInstruction { - enum Type { + enum Type { FOR_EACH_QML_INSTR(QML_INSTR_ENUM) }; @@ -193,7 +193,7 @@ union QQmlInstruction struct instr_completeQml { QML_INSTR_HEADER ushort column; - ushort line; + ushort line; bool isRoot; }; struct instr_create { @@ -201,7 +201,7 @@ union QQmlInstruction int type; int data; ushort column; - ushort line; + ushort line; bool isRoot:1; bool parentToSuper:1; }; @@ -211,7 +211,7 @@ union QQmlInstruction int typeSize; int type; ushort column; - ushort line; + ushort line; bool parentToSuper; }; struct instr_storeMeta { @@ -266,7 +266,7 @@ union QQmlInstruction struct instr_begin { QML_INSTR_HEADER int castValue; - }; + }; struct instr_storeFloat { QML_INSTR_HEADER int propertyIndex; @@ -322,7 +322,7 @@ union QQmlInstruction double numberValue; bool isStringLiteral:1; bool isNumberLiteral:1; - }; + }; struct instr_storeScript { QML_INSTR_HEADER int value; @@ -399,7 +399,7 @@ union QQmlInstruction struct instr_assignSignalObject { QML_INSTR_HEADER int signal; - ushort line; + ushort line; }; struct instr_createComponent { QML_INSTR_HEADER diff --git a/src/qml/qml/qqmllist.cpp b/src/qml/qml/qqmllist.cpp index d172c9a185..6d0fddf2ad 100644 --- a/src/qml/qml/qqmllist.cpp +++ b/src/qml/qml/qqmllist.cpp @@ -109,7 +109,7 @@ QML list properties are typesafe. Only QObject's that derive from the correct b the list. The listElementType() method can be used to query the QMetaObject of the QObject type supported. Attempting to add objects of the incorrect type to a list property will fail. -Like with normal lists, when accessing a list element by index, it is the callers responsibility to ensure +Like with normal lists, when accessing a list element by index, it is the callers responsibility to ensure that it does not request an out of range element using the count() method before calling at(). The \l {Qt Quick 1} version of this class is named QDeclarativeListReference. @@ -125,7 +125,7 @@ QQmlListReference::QQmlListReference() /*! Constructs a QQmlListReference for \a object's \a property. If \a property is not a list -property, an invalid QQmlListReference is created. If \a object is destroyed after +property, an invalid QQmlListReference is created. If \a object is destroyed after the reference is constructed, it will automatically become invalid. That is, it is safe to hold QQmlListReference instances even after \a object is deleted. @@ -243,7 +243,7 @@ bool QQmlListReference::canClear() const } /*! -Returns true if the list property can be queried for its element count, otherwise false. +Returns true if the list property can be queried for its element count, otherwise false. Returns false if the reference is invalid. \sa count() @@ -336,7 +336,7 @@ int QQmlListReference::count() const \class QQmlListProperty \since 5.0 \inmodule QtQml -\brief The QQmlListProperty class allows applications to expose list-like +\brief The QQmlListProperty class allows applications to expose list-like properties to QML. QML has many list properties, where more than one object value can be assigned. @@ -344,7 +344,7 @@ The use of a list property from QML looks like this: \code FruitBasket { - fruit: [ + fruit: [ Apple {}, Orange{}, Banana{} @@ -354,10 +354,10 @@ FruitBasket { The QQmlListProperty encapsulates a group of function pointers that represet the set of actions QML can perform on the list - adding items, retrieving items and -clearing the list. In the future, additional operations may be supported. All +clearing the list. In the future, additional operations may be supported. All list properties must implement the append operation, but the rest are optional. -To provide a list property, a C++ class must implement the operation callbacks, +To provide a list property, a C++ class must implement the operation callbacks, and then return an appropriate QQmlListProperty value from the property getter. List properties should have no setter. In the example above, the Q_PROPERTY() declarative will look like this: @@ -366,7 +366,7 @@ declarative will look like this: Q_PROPERTY(QQmlListProperty fruit READ fruit); \endcode -QML list properties are typesafe - in this case \c {Fruit} is a QObject type that +QML list properties are typesafe - in this case \c {Fruit} is a QObject type that \c {Apple}, \c {Orange} and \c {Banana} all derive from. The \l {Qt Quick 1} version of this class is named QDeclarativeListProperty. @@ -375,7 +375,7 @@ The \l {Qt Quick 1} version of this class is named QDeclarativeListProperty. */ /*! -\fn QQmlListProperty::QQmlListProperty() +\fn QQmlListProperty::QQmlListProperty() \internal */ @@ -386,7 +386,7 @@ Convenience constructor for making a QQmlListProperty value from an existing QList \a list. The \a list reference must remain valid for as long as \a object exists. \a object must be provided. -Generally this constructor should not be used in production code, as a +Generally this constructor should not be used in production code, as a writable QList violates QML's memory management rules. However, this constructor can very useful while prototyping. */ @@ -401,12 +401,12 @@ remains valid while \a object exists. */ /*! -\fn QQmlListProperty::QQmlListProperty(QObject *object, void *data, AppendFunction append, +\fn QQmlListProperty::QQmlListProperty(QObject *object, void *data, AppendFunction append, CountFunction count, AtFunction at, ClearFunction clear) Construct a QQmlListProperty from a set of operation functions. An opaque \a data handle -may be passed which can be accessed from within the operation functions. The list property +may be passed which can be accessed from within the operation functions. The list property remains valid while \a object exists. Null pointers can be passed for any function. If any null pointers are passed in, the list @@ -431,7 +431,7 @@ Return the number of elements in the list \a property. */ /*! -\fn bool QQmlListProperty::operator==(const QQmlListProperty &other) const +\fn bool QQmlListProperty::operator==(const QQmlListProperty &other) const Returns true if this QQmlListProperty is equal to \a other, otherwise false. */ diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp index 437e920d1a..1dd8ce0e3e 100644 --- a/src/qml/qml/qqmlmetatype.cpp +++ b/src/qml/qml/qqmlmetatype.cpp @@ -116,7 +116,7 @@ struct QQmlMetaTypeData class QQmlTypeModulePrivate { public: - QQmlTypeModulePrivate() + QQmlTypeModulePrivate() : minMinorVersion(INT_MAX), maxMinorVersion(0), locked(false) {} static QQmlTypeModulePrivate* get(QQmlTypeModule* q) { return q->d; } @@ -479,7 +479,7 @@ QQmlType *QQmlType::superType() const return d->superType; } -static void clone(QMetaObjectBuilder &builder, const QMetaObject *mo, +static void clone(QMetaObjectBuilder &builder, const QMetaObject *mo, const QMetaObject *ignoreStart, const QMetaObject *ignoreEnd) { // Set classname @@ -491,7 +491,7 @@ static void clone(QMetaObjectBuilder &builder, const QMetaObject *mo, int otherIndex = ignoreEnd->indexOfClassInfo(info.name()); if (otherIndex >= ignoreStart->classInfoOffset() + ignoreStart->classInfoCount()) { - // Skip + // Skip } else { builder.addClassInfo(info.name(), info.value()); } @@ -504,7 +504,7 @@ static void clone(QMetaObjectBuilder &builder, const QMetaObject *mo, int otherIndex = ignoreEnd->indexOfProperty(property.name()); if (otherIndex >= ignoreStart->propertyOffset() + ignoreStart->propertyCount()) { builder.addProperty(QByteArray("__qml_ignore__") + property.name(), QByteArray("void")); - // Skip + // Skip } else { builder.addProperty(property); } @@ -520,7 +520,7 @@ static void clone(QMetaObjectBuilder &builder, const QMetaObject *mo, bool found = false; - for (int ii = ignoreStart->methodOffset() + ignoreStart->methodCount(); + for (int ii = ignoreStart->methodOffset() + ignoreStart->methodCount(); !found && ii < ignoreEnd->methodOffset() + ignoreEnd->methodCount(); ++ii) { @@ -540,7 +540,7 @@ static void clone(QMetaObjectBuilder &builder, const QMetaObject *mo, int otherIndex = ignoreEnd->indexOfEnumerator(enumerator.name()); if (otherIndex >= ignoreStart->enumeratorOffset() + ignoreStart->enumeratorCount()) { - // Skip + // Skip } else { builder.addEnumerator(enumerator); } @@ -860,7 +860,7 @@ const QMetaObject *QQmlType::attachedPropertiesType() const /* This is the id passed to qmlAttachedPropertiesById(). This is different from the index -for the case that a single class is registered under two or more names (eg. Item in +for the case that a single class is registered under two or more names (eg. Item in Qt 4.7 and QtQuick 1.0). */ int QQmlType::attachedPropertiesId() const @@ -1128,7 +1128,7 @@ int registerAutoParentFunction(QQmlPrivate::RegisterAutoParent &autoparent) int registerInterface(const QQmlPrivate::RegisterInterface &interface) { - if (interface.version > 0) + if (interface.version > 0) qFatal("qmlRegisterType(): Cannot mix incompatible QML versions."); QWriteLocker lock(metaTypeDataLock()); @@ -1472,7 +1472,7 @@ bool QQmlMetaType::isModule(const QString &module, int versionMajor, int version QQmlMetaTypeData *data = metaTypeData(); // first, check Types - QQmlTypeModule *tm = + QQmlTypeModule *tm = data->uriToModule.value(QQmlMetaTypeData::VersionedUri(module, versionMajor)); if (tm && tm->minimumMinorVersion() <= versionMinor && tm->maximumMinorVersion() >= versionMinor) return true; @@ -1755,7 +1755,7 @@ QQmlType *QQmlMetaType::qmlType(const QMetaObject *metaObject, const QHashedStri } /*! - Returns the type (if any) that corresponds to the QVariant::Type \a userType. + Returns the type (if any) that corresponds to the QVariant::Type \a userType. Returns null if no type is registered. */ QQmlType *QQmlMetaType::qmlType(int userType) diff --git a/src/qml/qml/qqmlmetatype_p.h b/src/qml/qml/qqmlmetatype_p.h index 2f473f5f46..6c19da6b15 100644 --- a/src/qml/qml/qqmlmetatype_p.h +++ b/src/qml/qml/qqmlmetatype_p.h @@ -103,7 +103,7 @@ public: enum TypeCategory { Unknown, Object, List }; static TypeCategory typeCategory(int); - + static bool isInterface(int); static const char *interfaceIId(int); static bool isList(int); @@ -277,7 +277,7 @@ private: QQmlTypeModulePrivate *d; }; -class QQmlTypeModuleVersion +class QQmlTypeModuleVersion { public: QQmlTypeModuleVersion(); diff --git a/src/qml/qml/qqmlnotifier.cpp b/src/qml/qml/qqmlnotifier.cpp index 3d4b260574..fb058379be 100644 --- a/src/qml/qml/qqmlnotifier.cpp +++ b/src/qml/qml/qqmlnotifier.cpp @@ -84,7 +84,7 @@ void QQmlNotifier::emitNotify(QQmlNotifierEndpoint *endpoint, void **a) // End of notifying, restore values endpoint->senderPtr = originalSenderPtr; } - } + } } /*! \internal diff --git a/src/qml/qml/qqmlnotifier_p.h b/src/qml/qml/qqmlnotifier_p.h index 93f2cd68da..0794f3a911 100644 --- a/src/qml/qml/qqmlnotifier_p.h +++ b/src/qml/qml/qqmlnotifier_p.h @@ -123,7 +123,7 @@ QQmlNotifier::QQmlNotifier() } QQmlNotifier::~QQmlNotifier() -{ +{ QQmlNotifierEndpoint *endpoint = endpoints; while (endpoint) { QQmlNotifierEndpoint *n = endpoint; @@ -221,7 +221,7 @@ bool QQmlNotifierEndpoint::isNotifying() const /*! Cancel any notifies that are in progress. */ -void QQmlNotifierEndpoint::cancelNotify() +void QQmlNotifierEndpoint::cancelNotify() { if (isNotifying()) { qintptr sp = *((qintptr *)(senderPtr & ~0x1)); diff --git a/src/qml/qml/qqmlnullablevalue_p_p.h b/src/qml/qml/qqmlnullablevalue_p_p.h index ed3dfb8780..6c17153181 100644 --- a/src/qml/qml/qqmlnullablevalue_p_p.h +++ b/src/qml/qml/qqmlnullablevalue_p_p.h @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE template -struct QQmlNullableValue +struct QQmlNullableValue { QQmlNullableValue() : isNull(true), value(T()) {} diff --git a/src/qml/qml/qqmlopenmetaobject.cpp b/src/qml/qml/qqmlopenmetaobject.cpp index 5745f35498..4d2c3d0332 100644 --- a/src/qml/qml/qqmlopenmetaobject.cpp +++ b/src/qml/qml/qqmlopenmetaobject.cpp @@ -254,7 +254,7 @@ int QQmlOpenMetaObject::metaCall(QMetaObject::Call c, int id, void **a) propertyWritten(propId); activate(d->object, d->type->d->signalOffset + propId, 0); } - } + } return -1; } else { if (d->parent) diff --git a/src/qml/qml/qqmlparserstatus.cpp b/src/qml/qml/qqmlparserstatus.cpp index 41b7d962ce..0da22fb668 100644 --- a/src/qml/qml/qqmlparserstatus.cpp +++ b/src/qml/qml/qqmlparserstatus.cpp @@ -109,7 +109,7 @@ QQmlParserStatus::~QQmlParserStatus() /*! \fn void QQmlParserStatus::componentComplete() - Invoked after the root component that caused this instantiation has + Invoked after the root component that caused this instantiation has completed construction. At this point all static values and binding values have been assigned to the class. */ diff --git a/src/qml/qml/qqmlprivate.h b/src/qml/qml/qqmlprivate.h index 15306cb131..90e7961e6b 100644 --- a/src/qml/qml/qqmlprivate.h +++ b/src/qml/qml/qqmlprivate.h @@ -85,8 +85,8 @@ namespace QQmlPrivate class QQmlElement : public T { public: - virtual ~QQmlElement() { - QQmlPrivate::qdeclarativeelement_destructor(this); + virtual ~QQmlElement() { + QQmlPrivate::qdeclarativeelement_destructor(this); } }; @@ -130,7 +130,7 @@ namespace QQmlPrivate }; template - class has_attachedPropertiesMethod + class has_attachedPropertiesMethod { public: typedef int yes_type; @@ -141,7 +141,7 @@ namespace QQmlPrivate static no_type check(...); static bool const value = sizeof(check(&T::qmlAttachedProperties)) == sizeof(yes_type); - }; + }; template class has_attachedPropertiesMethod diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp index 3975b88bb0..0bbcafda54 100644 --- a/src/qml/qml/qqmlproperty.cpp +++ b/src/qml/qml/qqmlproperty.cpp @@ -1250,7 +1250,7 @@ QQmlPropertyPrivate::writeValueProperty(QObject *object, return rv; } -bool QQmlPropertyPrivate::write(QObject *object, +bool QQmlPropertyPrivate::write(QObject *object, const QQmlPropertyData &property, const QVariant &value, QQmlContextData *context, WriteFlags flags) diff --git a/src/qml/qml/qqmlproperty.h b/src/qml/qml/qqmlproperty.h index c3322c0048..992d579aed 100644 --- a/src/qml/qml/qqmlproperty.h +++ b/src/qml/qml/qqmlproperty.h @@ -64,7 +64,7 @@ public: Normal }; - enum Type { + enum Type { Invalid, Property, SignalProperty diff --git a/src/qml/qml/qqmlproperty_p.h b/src/qml/qml/qqmlproperty_p.h index ce15061ba0..28e9dca515 100644 --- a/src/qml/qml/qqmlproperty_p.h +++ b/src/qml/qml/qqmlproperty_p.h @@ -101,11 +101,11 @@ public: bool writeValueProperty(const QVariant &, WriteFlags); static QQmlMetaObject rawMetaObjectForType(QQmlEnginePrivate *, int); - static bool writeEnumProperty(const QMetaProperty &prop, int idx, QObject *object, + static bool writeEnumProperty(const QMetaProperty &prop, int idx, QObject *object, const QVariant &value, int flags); static bool writeValueProperty(QObject *, const QQmlPropertyData &, - const QVariant &, QQmlContextData *, + const QVariant &, QQmlContextData *, WriteFlags flags = 0); static bool write(QObject *, const QQmlPropertyData &, const QVariant &, QQmlContextData *, WriteFlags flags = 0); diff --git a/src/qml/qml/qqmlproxymetaobject.cpp b/src/qml/qml/qqmlproxymetaobject.cpp index 8a6af7cb05..282cbb7a21 100644 --- a/src/qml/qml/qqmlproxymetaobject.cpp +++ b/src/qml/qml/qqmlproxymetaobject.cpp @@ -78,7 +78,7 @@ int QQmlProxyMetaObject::metaCall(QMetaObject::Call c, int id, void **a) if (id >= data.propertyOffset) { if (!proxies) { proxies = new QObject*[metaObjects->count()]; - ::memset(proxies, 0, + ::memset(proxies, 0, sizeof(QObject *) * metaObjects->count()); } @@ -93,7 +93,7 @@ int QQmlProxyMetaObject::metaCall(QMetaObject::Call c, int id, void **a) // ### - Can this be done more optimally? for (int jj = 0; jj < methods; ++jj) { - QMetaMethod method = + QMetaMethod method = metaObject->method(jj + methodOffset); if (method.methodType() == QMetaMethod::Signal) QQmlPropertyPrivate::connect(proxy, methodOffset + jj, object, localOffset + jj); diff --git a/src/qml/qml/qqmlscript.cpp b/src/qml/qml/qqmlscript.cpp index 6cb23ec07c..0618c90fa5 100644 --- a/src/qml/qml/qqmlscript.cpp +++ b/src/qml/qml/qqmlscript.cpp @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE using namespace QQmlJS; using namespace QQmlScript; -// +// // Parser IR classes // QQmlScript::Object::Object() @@ -68,8 +68,8 @@ QQmlScript::Object::Object() { } -QQmlScript::Object::~Object() -{ +QQmlScript::Object::~Object() +{ if (synthCache) synthCache->release(); } @@ -215,7 +215,7 @@ int QQmlScript::Object::DynamicSlot::parameterNamesLength() const } QQmlScript::Property::Property() -: parent(0), type(0), index(-1), value(0), isDefault(true), isDeferred(false), +: parent(0), type(0), index(-1), value(0), isDefault(true), isDeferred(false), isValueTypeSubProperty(false), isAlias(false), isReadOnlyDeclaration(false), scriptStringScope(-1), nextMainProperty(0), nextProperty(0) { @@ -354,7 +354,7 @@ QString escapedString(const QString &string) QString QQmlScript::Variant::asScript() const { - switch(type()) { + switch (type()) { default: case Invalid: return QString(); @@ -363,7 +363,7 @@ QString QQmlScript::Variant::asScript() const case Number: if (asWritten.isEmpty()) return QString::number(d); - else + else return asWritten.toString(); case String: return escapedString(asString()); @@ -727,7 +727,7 @@ ProcessAST::defineObjectBinding(AST::Node *node, } else { // Class - QQmlScript::Object *obj = _parser->_pool.New(); + QQmlScript::Object *obj = _parser->_pool.New(); obj->type = _parser->findOrCreateTypeId(objectType, obj); obj->typeReference = _parser->_refTypes.at(obj->type); @@ -1034,11 +1034,11 @@ bool ProcessAST::visit(AST::UiPublicMember *node) bool typeFound = false; Object::DynamicProperty::Type type; - if ((unsigned)memberType.length() == strlen("alias") && + if ((unsigned)memberType.length() == strlen("alias") && QHashedString::compare(memberType.constData(), "alias", int(strlen("alias")))) { type = Object::DynamicProperty::Alias; typeFound = true; - } + } for(int ii = 0; !typeFound && ii < propTypeNameToTypesCount; ++ii) { const TypeNameToType *t = propTypeNameToTypes + ii; @@ -1054,7 +1054,7 @@ bool ProcessAST::visit(AST::UiPublicMember *node) if (typeModifier.isEmpty()) { type = Object::DynamicProperty::Custom; - } else if((unsigned)typeModifier.length() == strlen("list") && + } else if ((unsigned)typeModifier.length() == strlen("list") && QHashedString::compare(typeModifier.constData(), "list", int(strlen("list")))) { type = Object::DynamicProperty::CustomList; } else { @@ -1411,7 +1411,7 @@ QList QQmlScript::Parser::errors() const return _errors; } -static void replaceWithSpace(QString &str, int idx, int n) +static void replaceWithSpace(QString &str, int idx, int n) { QChar *data = str.data() + idx; const QChar space(QLatin1Char(' ')); @@ -1490,42 +1490,42 @@ QQmlScript::Object::ScriptBlock::Pragmas QQmlScript::Parser::extractPragmas(QStr #define CHECK_TOKEN(t) if (token != QQmlJSGrammar:: t) return rv; static const int uriTokens[] = { - QQmlJSGrammar::T_IDENTIFIER, - QQmlJSGrammar::T_PROPERTY, - QQmlJSGrammar::T_SIGNAL, - QQmlJSGrammar::T_READONLY, - QQmlJSGrammar::T_ON, - QQmlJSGrammar::T_BREAK, - QQmlJSGrammar::T_CASE, - QQmlJSGrammar::T_CATCH, - QQmlJSGrammar::T_CONTINUE, - QQmlJSGrammar::T_DEFAULT, - QQmlJSGrammar::T_DELETE, - QQmlJSGrammar::T_DO, - QQmlJSGrammar::T_ELSE, - QQmlJSGrammar::T_FALSE, - QQmlJSGrammar::T_FINALLY, - QQmlJSGrammar::T_FOR, - QQmlJSGrammar::T_FUNCTION, - QQmlJSGrammar::T_IF, - QQmlJSGrammar::T_IN, - QQmlJSGrammar::T_INSTANCEOF, - QQmlJSGrammar::T_NEW, - QQmlJSGrammar::T_NULL, - QQmlJSGrammar::T_RETURN, - QQmlJSGrammar::T_SWITCH, - QQmlJSGrammar::T_THIS, - QQmlJSGrammar::T_THROW, - QQmlJSGrammar::T_TRUE, - QQmlJSGrammar::T_TRY, - QQmlJSGrammar::T_TYPEOF, - QQmlJSGrammar::T_VAR, - QQmlJSGrammar::T_VOID, - QQmlJSGrammar::T_WHILE, - QQmlJSGrammar::T_CONST, - QQmlJSGrammar::T_DEBUGGER, - QQmlJSGrammar::T_RESERVED_WORD, - QQmlJSGrammar::T_WITH, + QQmlJSGrammar::T_IDENTIFIER, + QQmlJSGrammar::T_PROPERTY, + QQmlJSGrammar::T_SIGNAL, + QQmlJSGrammar::T_READONLY, + QQmlJSGrammar::T_ON, + QQmlJSGrammar::T_BREAK, + QQmlJSGrammar::T_CASE, + QQmlJSGrammar::T_CATCH, + QQmlJSGrammar::T_CONTINUE, + QQmlJSGrammar::T_DEFAULT, + QQmlJSGrammar::T_DELETE, + QQmlJSGrammar::T_DO, + QQmlJSGrammar::T_ELSE, + QQmlJSGrammar::T_FALSE, + QQmlJSGrammar::T_FINALLY, + QQmlJSGrammar::T_FOR, + QQmlJSGrammar::T_FUNCTION, + QQmlJSGrammar::T_IF, + QQmlJSGrammar::T_IN, + QQmlJSGrammar::T_INSTANCEOF, + QQmlJSGrammar::T_NEW, + QQmlJSGrammar::T_NULL, + QQmlJSGrammar::T_RETURN, + QQmlJSGrammar::T_SWITCH, + QQmlJSGrammar::T_THIS, + QQmlJSGrammar::T_THROW, + QQmlJSGrammar::T_TRUE, + QQmlJSGrammar::T_TRY, + QQmlJSGrammar::T_TYPEOF, + QQmlJSGrammar::T_VAR, + QQmlJSGrammar::T_VOID, + QQmlJSGrammar::T_WHILE, + QQmlJSGrammar::T_CONST, + QQmlJSGrammar::T_DEBUGGER, + QQmlJSGrammar::T_RESERVED_WORD, + QQmlJSGrammar::T_WITH, QQmlJSGrammar::EOF_SYMBOL }; diff --git a/src/qml/qml/qqmlscript_p.h b/src/qml/qml/qqmlscript_p.h index fac31add5c..29da97fe83 100644 --- a/src/qml/qml/qqmlscript_p.h +++ b/src/qml/qml/qqmlscript_p.h @@ -72,14 +72,14 @@ namespace QQmlCompilerTypes { struct BindingReference; struct ComponentCompileSt namespace QQmlScript { -struct Location +struct Location { Location() : line(0), column(0) {} quint16 line; quint16 column; inline bool operator<(const Location &other) { - return line < other.line || + return line < other.line || (line == other.line && column < other.column); } }; @@ -253,12 +253,12 @@ public: void addValue(Value *v); void addOnValue(Value *v); - // The QVariant::Type of the property, or 0 (QVariant::Invalid) if + // The QVariant::Type of the property, or 0 (QVariant::Invalid) if // unknown. int type; // The metaobject index of this property, or -1 if unknown. int index; - // The core data in the case of a regular property. + // The core data in the case of a regular property. // XXX This has to be a value now as the synthCache may change during // compilation which invalidates pointers. We should fix this. QQmlPropertyData core; @@ -280,14 +280,14 @@ public: const QHashedStringRef &name() const { return _name; } void setName(const QString &n) { _name = QHashedStringRef(pool()->NewString(n)); } void setName(const QHashedStringRef &n) { _name = n; } - // True if this property was accessed as the default property. + // True if this property was accessed as the default property. bool isDefault; // True if the setting of this property will be deferred. Set by the // QQmlCompiler bool isDeferred; // True if this property is a value-type pseudo-property bool isValueTypeSubProperty; - // True if this property is a property alias. Set by the + // True if this property is a property alias. Set by the // QQmlCompiler bool isAlias; // True if this is a readonly property declaration @@ -314,9 +314,9 @@ class Object : public QQmlPool::Class { public: Object(); - virtual ~Object(); + virtual ~Object(); - // Type of the object. The integer is an index into the + // Type of the object. The integer is an index into the // QQmlCompiledData::types array, or -1 if the object is a property // group. int type; @@ -331,7 +331,7 @@ public: // Custom parsed data QByteArray custom; // Bit mask of the properties assigned bindings - QByteArray bindingBitmask; + QByteArray bindingBitmask; void setBindingBit(int); QQmlPropertyCache *metatype; @@ -374,7 +374,7 @@ public: // Script blocks that were nested under this object struct ScriptBlock { - enum Pragma { + enum Pragma { None = 0x00000000, Shared = 0x00000001 }; @@ -385,14 +385,14 @@ public: Pragmas pragmas; }; - // The bytes to cast instances by to get to the QQmlParserStatus + // The bytes to cast instances by to get to the QQmlParserStatus // interface. -1 indicates the type doesn't support this interface. // Set by the QQmlCompiler. int parserStatusCast; LocationSpan location; - struct DynamicProperty : public QQmlPool::POD + struct DynamicProperty : public QQmlPool::POD { DynamicProperty(); @@ -500,7 +500,7 @@ public: class JavaScriptMetaData { public: - JavaScriptMetaData() + JavaScriptMetaData() : pragmas(QQmlScript::Object::ScriptBlock::None) {} QQmlScript::Object::ScriptBlock::Pragmas pragmas; diff --git a/src/qml/qml/qqmlscriptstring.h b/src/qml/qml/qqmlscriptstring.h index b192be8b77..852e7d629d 100644 --- a/src/qml/qml/qqmlscriptstring.h +++ b/src/qml/qml/qqmlscriptstring.h @@ -54,7 +54,7 @@ class QObject; class QQmlContext; class QQmlScriptStringPrivate; class QmlObjectCreator; -class Q_QML_EXPORT QQmlScriptString +class Q_QML_EXPORT QQmlScriptString { public: QQmlScriptString(); diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp index 278bb017d0..f734b77eec 100644 --- a/src/qml/qml/qqmltypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -94,7 +94,7 @@ #else -#define ASSERT_MAINTHREAD() +#define ASSERT_MAINTHREAD() #define ASSERT_LOADTHREAD() #define ASSERT_CALLBACK() @@ -116,9 +116,9 @@ namespace { } // This is a lame object that we need to ensure that slots connected to -// QNetworkReply get called in the correct thread (the loader thread). +// QNetworkReply get called in the correct thread (the loader thread). // As QQmlDataLoader lives in the main thread, and we can't use -// Qt::DirectConnection connections from a QNetworkReply (because then +// Qt::DirectConnection connections from a QNetworkReply (because then // sender() wont work), we need to insert this object in the middle. class QQmlDataLoaderNetworkReplyProxy : public QObject { @@ -168,8 +168,8 @@ private: }; -QQmlDataLoaderNetworkReplyProxy::QQmlDataLoaderNetworkReplyProxy(QQmlDataLoader *l) -: l(l) +QQmlDataLoaderNetworkReplyProxy::QQmlDataLoaderNetworkReplyProxy(QQmlDataLoader *l) +: l(l) { } @@ -241,7 +241,7 @@ This enum describes the type of the data blob. Create a new QQmlDataBlob for \a url and of the provided \a type. */ QQmlDataBlob::QQmlDataBlob(const QUrl &url, Type type) -: m_type(type), m_url(url), m_finalUrl(url), m_manager(0), m_redirectCount(0), +: m_type(type), m_url(url), m_finalUrl(url), m_manager(0), m_redirectCount(0), m_inCallback(false), m_isDone(false) { } @@ -396,7 +396,7 @@ QList QQmlDataBlob::errors() const /*! Mark this blob as having \a errors. -All outstanding dependencies will be cancelled. Requests to add new dependencies +All outstanding dependencies will be cancelled. Requests to add new dependencies will be ignored. Entry into the Error state is irreversable. The setError() method may only be called from within a QQmlDataBlob callback. @@ -434,8 +434,8 @@ void QQmlDataBlob::setError(const QList &errors) tryDone(); } -/*! -Wait for \a blob to become complete or to error. If \a blob is already +/*! +Wait for \a blob to become complete or to error. If \a blob is already complete or in error, or this blob is already complete, this has no effect. The setError() method may only be called from within a QQmlDataBlob callback. @@ -448,7 +448,7 @@ void QQmlDataBlob::addDependency(QQmlDataBlob *blob) if (!blob || blob->status() == Error || blob->status() == Complete || - status() == Error || status() == Complete || m_isDone || + status() == Error || status() == Complete || m_isDone || m_waitingFor.contains(blob)) return; @@ -469,7 +469,7 @@ or addDependency(). */ /*! -Invoked once data has either been received or a network error occurred, and all +Invoked once data has either been received or a network error occurred, and all dependencies are complete. You can set an error in this method, but you cannot add new dependencies. Implementors @@ -537,7 +537,7 @@ void QQmlDataBlob::networkError(QNetworkReply::NetworkError networkError) setError(error); } -/*! +/*! Called if \a blob, which was previously waited for, has an error. The default implementation does nothing. @@ -557,9 +557,9 @@ void QQmlDataBlob::dependencyComplete(QQmlDataBlob *blob) Q_UNUSED(blob); } -/*! -Called when all blobs waited for have completed. This occurs regardless of -whether they are in error, or complete state. +/*! +Called when all blobs waited for have completed. This occurs regardless of +whether they are in error, or complete state. The default implementation does nothing. */ @@ -571,9 +571,9 @@ void QQmlDataBlob::allDependenciesDone() Called when the download progress of this blob changes. \a progress goes from 0 to 1. -This callback is only invoked if an asynchronous load for this blob is +This callback is only invoked if an asynchronous load for this blob is made. An asynchronous load is one in which the Asynchronous mode is -specified explicitly, or one that is implicitly delayed due to a network +specified explicitly, or one that is implicitly delayed due to a network operation. The default implementation does nothing. @@ -587,12 +587,12 @@ void QQmlDataBlob::downloadProgressChanged(qreal progress) Invoked on the main thread sometime after done() was called on the load thread. You cannot modify the blobs state at all in this callback and cannot depend on the -order or timeliness of these callbacks. Implementors should use this callback to notify +order or timeliness of these callbacks. Implementors should use this callback to notify dependencies on the main thread that the blob is done and not a lot else. -This callback is only invoked if an asynchronous load for this blob is +This callback is only invoked if an asynchronous load for this blob is made. An asynchronous load is one in which the Asynchronous mode is -specified explicitly, or one that is implicitly delayed due to a network +specified explicitly, or one that is implicitly delayed due to a network operation. The default implementation does nothing. @@ -670,7 +670,7 @@ void QQmlDataBlob::notifyComplete(QQmlDataBlob *blob) blob->release(); - if (!isError() && m_waitingFor.isEmpty()) + if (!isError() && m_waitingFor.isEmpty()) allDependenciesDone(); m_inCallback = false; @@ -754,10 +754,10 @@ QQmlDataLoaderNetworkReplyProxy *QQmlDataLoaderThread::networkReplyProxy() const return m_networkReplyProxy; } -void QQmlDataLoaderThread::load(QQmlDataBlob *b) -{ +void QQmlDataLoaderThread::load(QQmlDataBlob *b) +{ b->addref(); - callMethodInThread(&This::loadThread, b); + callMethodInThread(&This::loadThread, b); } void QQmlDataLoaderThread::loadAsync(QQmlDataBlob *b) @@ -778,19 +778,19 @@ void QQmlDataLoaderThread::loadWithStaticDataAsync(QQmlDataBlob *b, const QByteA postMethodToThread(&This::loadWithStaticDataThread, b, d); } -void QQmlDataLoaderThread::callCompleted(QQmlDataBlob *b) -{ - b->addref(); - postMethodToMain(&This::callCompletedMain, b); +void QQmlDataLoaderThread::callCompleted(QQmlDataBlob *b) +{ + b->addref(); + postMethodToMain(&This::callCompletedMain, b); } -void QQmlDataLoaderThread::callDownloadProgressChanged(QQmlDataBlob *b, qreal p) -{ - b->addref(); - postMethodToMain(&This::callDownloadProgressChangedMain, b, p); +void QQmlDataLoaderThread::callDownloadProgressChanged(QQmlDataBlob *b, qreal p) +{ + b->addref(); + postMethodToMain(&This::callDownloadProgressChangedMain, b, p); } -void QQmlDataLoaderThread::initializeEngine(QQmlExtensionInterface *iface, +void QQmlDataLoaderThread::initializeEngine(QQmlExtensionInterface *iface, const char *uri) { callMethodInMain(&This::initializeEngineMain, iface, uri); @@ -804,9 +804,9 @@ void QQmlDataLoaderThread::shutdownThread() m_networkReplyProxy = 0; } -void QQmlDataLoaderThread::loadThread(QQmlDataBlob *b) -{ - m_loader->loadThread(b); +void QQmlDataLoaderThread::loadThread(QQmlDataBlob *b) +{ + m_loader->loadThread(b); b->release(); } @@ -816,27 +816,27 @@ void QQmlDataLoaderThread::loadWithStaticDataThread(QQmlDataBlob *b, const QByte b->release(); } -void QQmlDataLoaderThread::callCompletedMain(QQmlDataBlob *b) -{ +void QQmlDataLoaderThread::callCompletedMain(QQmlDataBlob *b) +{ QML_MEMORY_SCOPE_URL(b->url()); #ifdef DATABLOB_DEBUG - qWarning("QQmlDataLoaderThread: %s completed() callback", qPrintable(b->url().toString())); + qWarning("QQmlDataLoaderThread: %s completed() callback", qPrintable(b->url().toString())); #endif - b->completed(); - b->release(); + b->completed(); + b->release(); } -void QQmlDataLoaderThread::callDownloadProgressChangedMain(QQmlDataBlob *b, qreal p) -{ +void QQmlDataLoaderThread::callDownloadProgressChangedMain(QQmlDataBlob *b, qreal p) +{ #ifdef DATABLOB_DEBUG - qWarning("QQmlDataLoaderThread: %s downloadProgressChanged(%f) callback", - qPrintable(b->url().toString()), p); + qWarning("QQmlDataLoaderThread: %s downloadProgressChanged(%f) callback", + qPrintable(b->url().toString()), p); #endif - b->downloadProgressChanged(p); - b->release(); + b->downloadProgressChanged(p); + b->release(); } -void QQmlDataLoaderThread::initializeEngineMain(QQmlExtensionInterface *iface, +void QQmlDataLoaderThread::initializeEngineMain(QQmlExtensionInterface *iface, const char *uri) { Q_ASSERT(m_loader->engine()->thread() == QThread::currentThread()); @@ -856,7 +856,7 @@ The loader then fetches the data over the network or from the local file system QQmlDataBlob is an abstract class, so should always be specialized. Once data is received, the QQmlDataBlob::dataReceived() method is invoked on the blob. The -derived class should use this callback to process the received data. Processing of the data can +derived class should use this callback to process the received data. Processing of the data can result in an error being set (QQmlDataBlob::setError()), or one or more dependencies being created (QQmlDataBlob::addDependency()). Dependencies are other QQmlDataBlob's that are required before processing can fully complete. @@ -884,7 +884,7 @@ QQmlDataLoader::QQmlDataLoader(QQmlEngine *engine) /*! \internal */ QQmlDataLoader::~QQmlDataLoader() { - for (NetworkReplies::Iterator iter = m_networkReplies.begin(); iter != m_networkReplies.end(); ++iter) + for (NetworkReplies::Iterator iter = m_networkReplies.begin(); iter != m_networkReplies.end(); ++iter) (*iter)->release(); shutdownThread(); @@ -909,7 +909,7 @@ The loader must be locked. void QQmlDataLoader::load(QQmlDataBlob *blob, Mode mode) { #ifdef DATABLOB_DEBUG - qWarning("QQmlDataLoader::load(%s): %s thread", qPrintable(blob->m_url.toString()), + qWarning("QQmlDataLoader::load(%s): %s thread", qPrintable(blob->m_url.toString()), m_thread->isThisThread()?"Compile":"Engine"); #endif blob->startLoading(this); @@ -941,7 +941,7 @@ The loader must be locked. void QQmlDataLoader::loadWithStaticData(QQmlDataBlob *blob, const QByteArray &data, Mode mode) { #ifdef DATABLOB_DEBUG - qWarning("QQmlDataLoader::loadWithStaticData(%s, data): %s thread", qPrintable(blob->m_url.toString()), + qWarning("QQmlDataLoader::loadWithStaticData(%s, data): %s thread", qPrintable(blob->m_url.toString()), m_thread->isThisThread()?"Compile":"Engine"); #endif @@ -1118,7 +1118,7 @@ QQmlEngine *QQmlDataLoader::engine() const Call the initializeEngine() method on \a iface. Used by QQmlImportDatabase to ensure it gets called in the correct thread. */ -void QQmlDataLoader::initializeEngine(QQmlExtensionInterface *iface, +void QQmlDataLoader::initializeEngine(QQmlExtensionInterface *iface, const char *uri) { Q_ASSERT(m_thread->isThisThread() || engine()->thread() == QThread::currentThread()); @@ -1158,7 +1158,7 @@ void QQmlDataLoader::setData(QQmlDataBlob *blob, const QQmlDataBlob::Data &d) if (!blob->isError() && !blob->isWaiting()) blob->allDependenciesDone(); - if (blob->status() != QQmlDataBlob::Error) + if (blob->status() != QQmlDataBlob::Error) blob->m_data.setStatus(QQmlDataBlob::WaitingForDependencies); blob->m_inCallback = false; @@ -1525,12 +1525,12 @@ Returns a QQmlTypeData for the specified \a url. The QQmlTypeData may be cached */ QQmlTypeData *QQmlTypeLoader::getType(const QUrl &url, Mode mode) { - Q_ASSERT(!url.isRelative() && + Q_ASSERT(!url.isRelative() && (QQmlFile::urlToLocalFileOrQrc(url).isEmpty() || !QDir::isRelativePath(QQmlFile::urlToLocalFileOrQrc(url)))); LockHolder holder(this); - + QQmlTypeData *typeData = m_typeCache.value(url); if (!typeData) { @@ -1546,7 +1546,7 @@ QQmlTypeData *QQmlTypeLoader::getType(const QUrl &url, Mode mode) } /*! -Returns a QQmlTypeData for the given \a data with the provided base \a url. The +Returns a QQmlTypeData for the given \a data with the provided base \a url. The QQmlTypeData will not be cached. */ QQmlTypeData *QQmlTypeLoader::getType(const QByteArray &data, const QUrl &url) @@ -1564,7 +1564,7 @@ Return a QQmlScriptBlob for \a url. The QQmlScriptData may be cached. */ QQmlScriptBlob *QQmlTypeLoader::getScript(const QUrl &url) { - Q_ASSERT(!url.isRelative() && + Q_ASSERT(!url.isRelative() && (QQmlFile::urlToLocalFileOrQrc(url).isEmpty() || !QDir::isRelativePath(QQmlFile::urlToLocalFileOrQrc(url)))); @@ -1588,7 +1588,7 @@ Returns a QQmlQmldirData for \a url. The QQmlQmldirData may be cached. */ QQmlQmldirData *QQmlTypeLoader::getQmldir(const QUrl &url) { - Q_ASSERT(!url.isRelative() && + Q_ASSERT(!url.isRelative() && (QQmlFile::urlToLocalFileOrQrc(url).isEmpty() || !QDir::isRelativePath(QQmlFile::urlToLocalFileOrQrc(url)))); @@ -1905,7 +1905,7 @@ void QQmlTypeLoader::clearCache() { for (TypeCache::Iterator iter = m_typeCache.begin(); iter != m_typeCache.end(); ++iter) (*iter)->release(); - for (ScriptCache::Iterator iter = m_scriptCache.begin(); iter != m_scriptCache.end(); ++iter) + for (ScriptCache::Iterator iter = m_scriptCache.begin(); iter != m_scriptCache.end(); ++iter) (*iter)->release(); for (QmldirCache::Iterator iter = m_qmldirCache.begin(); iter != m_qmldirCache.end(); ++iter) (*iter)->release(); @@ -1971,9 +1971,9 @@ QQmlTypeData::QQmlTypeData(const QUrl &url, QQmlTypeLoader *manager) QQmlTypeData::~QQmlTypeData() { - for (int ii = 0; ii < m_scripts.count(); ++ii) + for (int ii = 0; ii < m_scripts.count(); ++ii) m_scripts.at(ii).script->release(); - for (int ii = 0; ii < m_types.count(); ++ii) + for (int ii = 0; ii < m_types.count(); ++ii) if (m_types.at(ii).typeData) m_types.at(ii).typeData->release(); if (m_compiledData) m_compiledData->release(); @@ -2110,7 +2110,7 @@ void QQmlTypeData::done() } // Compile component - if (!isError()) + if (!isError()) compile(); scriptParser.clear(); diff --git a/src/qml/qml/qqmltypeloader_p.h b/src/qml/qml/qqmltypeloader_p.h index a022162a7c..976f5a5ffb 100644 --- a/src/qml/qml/qqmltypeloader_p.h +++ b/src/qml/qml/qqmltypeloader_p.h @@ -189,7 +189,7 @@ private: // m_errors should *always* be written before the status is set to Error. // We use the status change as a memory fence around m_errors so that locking - // isn't required. Once the status is set to Error (or Complete), m_errors + // isn't required. Once the status is set to Error (or Complete), m_errors // cannot be changed. QList m_errors; @@ -244,7 +244,7 @@ private: void loadWithStaticDataThread(QQmlDataBlob *, const QByteArray &); void networkReplyFinished(QNetworkReply *); void networkReplyProgress(QNetworkReply *, qint64, qint64); - + typedef QHash NetworkReplies; void setData(QQmlDataBlob *, const QByteArray &); @@ -491,10 +491,10 @@ private: bool loadImplicitImport(); }; -// QQmlScriptData instances are created, uninitialized, by the loader in the +// QQmlScriptData instances are created, uninitialized, by the loader in the // load thread. The first time they are used by the VME, they are initialized which // creates their v8 objects and they are referenced and added to the engine's cleanup -// list. During QQmlCleanup::clear() all v8 resources are destroyed, and the +// list. During QQmlCleanup::clear() all v8 resources are destroyed, and the // reference that was created is released but final deletion only occurs once all the // references as released. This is all intended to ensure that the v8 resources are // only created and destroyed in the main thread :) diff --git a/src/qml/qml/qqmltypenamecache.cpp b/src/qml/qml/qqmltypenamecache.cpp index a880bbdd58..f388972559 100644 --- a/src/qml/qml/qqmltypenamecache.cpp +++ b/src/qml/qml/qqmltypenamecache.cpp @@ -99,7 +99,7 @@ QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QHashedStringRef &name) return result; } -QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QHashedStringRef &name, +QQmlTypeNameCache::Result QQmlTypeNameCache::query(const QHashedStringRef &name, const void *importNamespace) { Q_ASSERT(importNamespace); diff --git a/src/qml/qml/qqmltypewrapper.cpp b/src/qml/qml/qqmltypewrapper.cpp index 93ad8dc6fe..573779acab 100644 --- a/src/qml/qml/qqmltypewrapper.cpp +++ b/src/qml/qml/qqmltypewrapper.cpp @@ -248,7 +248,7 @@ void QmlTypeWrapper::put(Managed *m, const StringRef name, const ValueRef value) if (type && !type->isSingleton() && w->object) { QObject *object = w->object; QObject *ao = qmlAttachedPropertiesObjectById(type->attachedPropertiesId(), object); - if (ao) + if (ao) QV4::QObjectWrapper::setQmlProperty(v4->currentContext(), context, ao, name.getPointer(), QV4::QObjectWrapper::IgnoreRevision, value); } else if (type && type->isSingleton()) { QQmlEngine *e = v8engine->engine(); diff --git a/src/qml/qml/qqmlvaluetype_p.h b/src/qml/qml/qqmlvaluetype_p.h index bd44dfb0cf..953ea2154d 100644 --- a/src/qml/qml/qqmlvaluetype_p.h +++ b/src/qml/qml/qqmlvaluetype_p.h @@ -247,7 +247,7 @@ public: qreal y() const; void setX(qreal); void setY(qreal); - + qreal width() const; qreal height() const; void setWidth(qreal); @@ -270,7 +270,7 @@ public: int y() const; void setX(int); void setY(int); - + int width() const; int height() const; void setWidth(int); diff --git a/src/qml/qml/qqmlvme.cpp b/src/qml/qml/qqmlvme.cpp index 115fcc72d2..e60413327a 100644 --- a/src/qml/qml/qqmlvme.cpp +++ b/src/qml/qml/qqmlvme.cpp @@ -173,9 +173,9 @@ bool QQmlVME::initDeferred(QObject *object) } namespace { -struct ActiveVMERestorer +struct ActiveVMERestorer { - ActiveVMERestorer(QQmlVME *me, QQmlEnginePrivate *ep) + ActiveVMERestorer(QQmlVME *me, QQmlEnginePrivate *ep) : ep(ep), oldVME(ep->activeVME) { ep->activeVME = me; } ~ActiveVMERestorer() { ep->activeVME = oldVME; } @@ -202,7 +202,7 @@ QObject *QQmlVME::execute(QList *errors, const Interrupt &interrupt) return rv; } -inline bool fastHasBinding(QObject *o, int index) +inline bool fastHasBinding(QObject *o, int index) { if (QQmlData *ddata = static_cast(QObjectPrivate::get(o)->declarativeData)) { int coreIndex = index & 0x0000FFFF; @@ -238,7 +238,7 @@ static QV4::ExecutionContext *qmlBindingContext(QQmlEngine *engine, QV4::Executi return wrapper->context(); } -// XXX we probably need some form of "work count" here to prevent us checking this +// XXX we probably need some form of "work count" here to prevent us checking this // for every instruction. #define QML_BEGIN_INSTR_COMMON(I) { \ const QQmlInstructionMeta<(int)QQmlInstruction::I>::DataType &instr = QQmlInstructionMeta<(int)QQmlInstruction::I>::data(*genericInstr); \ @@ -461,7 +461,7 @@ QObject *QQmlVME::run(QList *errors, CTXT->imports = COMP->importCache; CTXT->imports->addref(); CTXT->setParent(parentCtxt); - if (instr.contextCache != -1) + if (instr.contextCache != -1) CTXT->setIdPropertyData(COMP->contextCaches.at(instr.contextCache)); if (states.count() == 1) { rootContext = CTXT; @@ -469,7 +469,7 @@ QObject *QQmlVME::run(QList *errors, rootContext->isRootObjectInCreation = true; } if (states.count() == 1 && !creationContext.isNull()) { - // A component that is logically created within another component instance shares the + // A component that is logically created within another component instance shares the // same instances of script imports. For example: // // import QtQuick 2.0 @@ -482,7 +482,7 @@ QObject *QQmlVME::run(QList *errors, // } // // Has the same "Test" instance. To implement this, we simply copy the v8 handles into - // the inner context. We have to create a fresh persistent handle for each to prevent + // the inner context. We have to create a fresh persistent handle for each to prevent // double dispose. It is possible we could do this more efficiently using some form of // referencing instead. CTXT->importedScripts = creationContext->importedScripts; @@ -630,9 +630,9 @@ QObject *QQmlVME::run(QList *errors, if (!objects.isEmpty()) { QObject *parent = objects.at(objects.count() - 1 - (instr.parentToSuper?1:0)); #if 0 // ### refactor - if (o->isWidgetType() && parent->isWidgetType()) + if (o->isWidgetType() && parent->isWidgetType()) static_cast(o)->setParent(static_cast(parent)); - else + else #endif QQml_setParent_noEvent(o, parent); ddata->parentFrozen = true; @@ -644,7 +644,7 @@ QObject *QQmlVME::run(QList *errors, QML_BEGIN_INSTR(CreateSimpleObject) const QQmlCompiledData::TypeReference &ref = TYPES.at(instr.type); Q_QML_VME_PROFILE(profiler.start(ref.type->qmlTypeName(), CTXT->url, instr.line, instr.column)); - QObject *o = (QObject *)operator new(instr.typeSize + sizeof(QQmlData)); + QObject *o = (QObject *)operator new(instr.typeSize + sizeof(QQmlData)); ::memset(static_cast(o), 0, instr.typeSize + sizeof(QQmlData)); instr.create(o); @@ -656,16 +656,16 @@ QObject *QQmlVME::run(QList *errors, ddata->lineNumber = instr.line; ddata->columnNumber = instr.column; - QObjectPrivate::get(o)->declarativeData = ddata; + QObjectPrivate::get(o)->declarativeData = ddata; ddata->context = ddata->outerContext = CTXT; - ddata->nextContextObject = CTXT->contextObjects; - if (ddata->nextContextObject) - ddata->nextContextObject->prevContextObject = &ddata->nextContextObject; - ddata->prevContextObject = &CTXT->contextObjects; - CTXT->contextObjects = ddata; + ddata->nextContextObject = CTXT->contextObjects; + if (ddata->nextContextObject) + ddata->nextContextObject->prevContextObject = &ddata->nextContextObject; + ddata->prevContextObject = &CTXT->contextObjects; + CTXT->contextObjects = ddata; QObject *parent = objects.at(objects.count() - 1 - (instr.parentToSuper?1:0)); - QQml_setParent_noEvent(o, parent); + QQml_setParent_noEvent(o, parent); ddata->parentFrozen = true; objects.push(o); @@ -682,7 +682,7 @@ QObject *QQmlVME::run(QList *errors, QML_END_INSTR(SetDefault) QML_BEGIN_INSTR(CreateComponent) - QQmlComponent *qcomp = + QQmlComponent *qcomp = new QQmlComponent(CTXT->engine, COMP, INSTRUCTIONSTREAM - COMP->bytecode.constData(), objects.isEmpty() ? 0 : objects.top()); @@ -717,7 +717,7 @@ QObject *QQmlVME::run(QList *errors, QQmlPropertyCache *propertyCache = PROPERTYCACHES.at(instr.propertyCache); - const QQmlVMEMetaData *data = + const QQmlVMEMetaData *data = (const QQmlVMEMetaData *)DATAS.at(instr.aliasData).constData(); QV4::ExecutionContext *qmlContext = qmlBindingContext(engine, QV8Engine::getV4(engine), qmlBindingWrappers, CTXT, target, objects.count() - 1); @@ -739,13 +739,13 @@ QObject *QQmlVME::run(QList *errors, QQmlMetaType::StringConverter converter = QQmlMetaType::customStringConverter(type); QVariant v = (*converter)(primitive); - QMetaProperty prop = + QMetaProperty prop = target->metaObject()->property(instr.propertyIndex); - if (v.isNull() || ((int)prop.type() != type && prop.userType() != type)) + if (v.isNull() || ((int)prop.type() != type && prop.userType() != type)) VME_EXCEPTION(tr("Cannot assign value %1 to property %2").arg(primitive).arg(QString::fromUtf8(prop.name())), instr.line); void *a[] = { (void *)v.data(), 0, &status, &flags }; - QMetaObject::metacall(target, QMetaObject::WriteProperty, + QMetaObject::metacall(target, QMetaObject::WriteProperty, instr.propertyIndex, a); QML_END_INSTR(AssignCustomType) @@ -818,7 +818,7 @@ QObject *QQmlVME::run(QList *errors, ss.d.data()->numberValue = instr.numberValue; void *a[] = { &ss, 0, &status, &flags }; - QMetaObject::metacall(target, QMetaObject::WriteProperty, + QMetaObject::metacall(target, QMetaObject::WriteProperty, instr.propertyIndex, a); QML_END_INSTR(StoreScriptString) @@ -837,9 +837,9 @@ QObject *QQmlVME::run(QList *errors, QML_END_INSTR(BeginObject) QML_BEGIN_INSTR(StoreBinding) - QObject *target = + QObject *target = objects.at(objects.count() - 1 - instr.owner); - QObject *context = + QObject *context = objects.at(objects.count() - 1 - instr.context); if (instr.isRoot && BINDINGSKIPLIST.testBit(instr.property.coreIndex)) @@ -885,7 +885,7 @@ QObject *QQmlVME::run(QList *errors, QObject *obj = objects.pop(); QQmlPropertyValueInterceptor *vi = reinterpret_cast(reinterpret_cast(obj) + instr.castValue); QObject *target = obj->parent(); - QQmlProperty prop = + QQmlProperty prop = QQmlPropertyPrivate::restore(target, instr.property, CTXT); vi->setTarget(prop); QQmlVMEMetaObject *mo = QQmlVMEMetaObject::get(target); @@ -913,9 +913,9 @@ QObject *QQmlVME::run(QList *errors, void *ptr = 0; const char *iid = QQmlMetaType::interfaceIId(type); - if (iid) + if (iid) ptr = assign->qt_metacast(iid); - if (!ptr) + if (!ptr) VME_EXCEPTION(tr("Cannot assign object to list"), instr.line); if (list.qListProperty.append) @@ -938,17 +938,17 @@ QObject *QQmlVME::run(QList *errors, void *ptr = assign->qt_metacast(iid); if (ptr) { void *a[] = { &ptr, 0, &status, &flags }; - QMetaObject::metacall(target, + QMetaObject::metacall(target, QMetaObject::WriteProperty, coreIdx, a); ok = true; } - } + } - if (!ok) + if (!ok) VME_EXCEPTION(tr("Cannot assign object to interface property"), instr.line); QML_END_INSTR(StoreInterface) - + QML_BEGIN_INSTR(FetchAttached) QObject *target = objects.top(); @@ -968,7 +968,7 @@ QObject *QQmlVME::run(QList *errors, void *a[1]; a[0] = (void *)&(lists.top().qListProperty); - QMetaObject::metacall(target, QMetaObject::ReadProperty, + QMetaObject::metacall(target, QMetaObject::ReadProperty, instr.property, a); QML_END_INSTR(FetchQList) @@ -976,11 +976,11 @@ QObject *QQmlVME::run(QList *errors, QObject *target = objects.top(); QObject *obj = 0; - // NOTE: This assumes a cast to QObject does not alter the + // NOTE: This assumes a cast to QObject does not alter the // object pointer void *a[1]; a[0] = &obj; - QMetaObject::metacall(target, QMetaObject::ReadProperty, + QMetaObject::metacall(target, QMetaObject::ReadProperty, instr.property, a); if (!obj) @@ -1026,14 +1026,14 @@ QObject *QQmlVME::run(QList *errors, // Possibly need to clear bindings QQmlData *targetData = QQmlData::get(target); if (targetData) { - QQmlAbstractBinding *binding = + QQmlAbstractBinding *binding = QQmlPropertyPrivate::binding(target, instr.property, -1); if (binding && binding->bindingType() != QQmlAbstractBinding::ValueTypeProxy) { QQmlPropertyPrivate::setBinding(target, instr.property, -1, 0); binding->destroy(); } else if (binding) { - QQmlValueTypeProxyBinding *proxy = + QQmlValueTypeProxyBinding *proxy = static_cast(binding); proxy->removeBindings(instr.bindingSkipList); } @@ -1048,7 +1048,7 @@ QObject *QQmlVME::run(QList *errors, QML_END_INSTR(FetchValueType) QML_BEGIN_INSTR(PopValueType) - QQmlValueType *valueHandler = + QQmlValueType *valueHandler = static_cast(objects.pop()); QObject *target = objects.top(); valueHandler->write(target, instr.property, QQmlPropertyPrivate::BypassInterceptor); @@ -1093,9 +1093,9 @@ void QQmlVME::reset() QRecursionWatcher watcher(this); if (!objects.isEmpty() && !(states.at(0).flags & State::Deferred)) - delete objects.at(0); - - if (!rootContext.isNull()) + delete objects.at(0); + + if (!rootContext.isNull()) rootContext->activeVMEData = 0; // Remove the QQmlParserStatus and QQmlAbstractBinding back pointers @@ -1106,7 +1106,7 @@ void QQmlVME::reset() QQmlComponentAttached *a = componentAttached; a->rem(); } - + engine = 0; objects.deallocate(); lists.deallocate(); @@ -1293,7 +1293,7 @@ QQmlVMEGuard::~QQmlVMEGuard() void QQmlVMEGuard::guard(QQmlVME *vme) { clear(); - + m_objectCount = vme->objects.count(); m_objects = new QPointer[m_objectCount]; for (int ii = 0; ii < m_objectCount; ++ii) @@ -1301,7 +1301,7 @@ void QQmlVMEGuard::guard(QQmlVME *vme) m_contextCount = (vme->rootContext.isNull()?0:1) + vme->states.count(); m_contexts = new QQmlGuardedContextData[m_contextCount]; - for (int ii = 0; ii < vme->states.count(); ++ii) + for (int ii = 0; ii < vme->states.count(); ++ii) m_contexts[ii] = vme->states.at(ii).context; if (!vme->rootContext.isNull()) m_contexts[m_contextCount - 1] = vme->rootContext.contextData(); diff --git a/src/qml/qml/qqmlvme_p.h b/src/qml/qml/qqmlvme_p.h index d5afd4c67a..d26812a68f 100644 --- a/src/qml/qml/qqmlvme_p.h +++ b/src/qml/qml/qqmlvme_p.h @@ -187,7 +187,7 @@ private: }; // Used to check that a QQmlVME that is interrupted mid-execution -// is still valid. Checks all the objects and contexts have not been +// is still valid. Checks all the objects and contexts have not been // deleted. class QQmlVMEGuard { diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index ebe72b2ff6..0b966484ca 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -224,7 +224,7 @@ const void *QQmlVMEVariant::dataPtr() const return &data; } -void *QQmlVMEVariant::dataPtr() +void *QQmlVMEVariant::dataPtr() { return &data; } @@ -234,7 +234,7 @@ size_t QQmlVMEVariant::dataSize() const return sizeof(data); } -QObject *QQmlVMEVariant::asQObject() +QObject *QQmlVMEVariant::asQObject() { if (type != QMetaType::QObjectStar) setValue((QObject *)0, 0, -1); @@ -242,7 +242,7 @@ QObject *QQmlVMEVariant::asQObject() return *(QQmlGuard *)(dataPtr()); } -const QVariant &QQmlVMEVariant::asQVariant() +const QVariant &QQmlVMEVariant::asQVariant() { if (type != QMetaType::QVariant) setValue(QVariant()); @@ -250,7 +250,7 @@ const QVariant &QQmlVMEVariant::asQVariant() return *(QVariant *)(dataPtr()); } -int QQmlVMEVariant::asInt() +int QQmlVMEVariant::asInt() { if (type != QMetaType::Int) setValue(int(0)); @@ -258,7 +258,7 @@ int QQmlVMEVariant::asInt() return *(int *)(dataPtr()); } -bool QQmlVMEVariant::asBool() +bool QQmlVMEVariant::asBool() { if (type != QMetaType::Bool) setValue(bool(false)); @@ -266,7 +266,7 @@ bool QQmlVMEVariant::asBool() return *(bool *)(dataPtr()); } -double QQmlVMEVariant::asDouble() +double QQmlVMEVariant::asDouble() { if (type != QMetaType::Double) setValue(double(0)); @@ -274,7 +274,7 @@ double QQmlVMEVariant::asDouble() return *(double *)(dataPtr()); } -const QString &QQmlVMEVariant::asQString() +const QString &QQmlVMEVariant::asQString() { if (type != QMetaType::QString) setValue(QString()); @@ -282,7 +282,7 @@ const QString &QQmlVMEVariant::asQString() return *(QString *)(dataPtr()); } -const QUrl &QQmlVMEVariant::asQUrl() +const QUrl &QQmlVMEVariant::asQUrl() { if (type != QMetaType::QUrl) setValue(QUrl()); @@ -290,7 +290,7 @@ const QUrl &QQmlVMEVariant::asQUrl() return *(QUrl *)(dataPtr()); } -const QTime &QQmlVMEVariant::asQTime() +const QTime &QQmlVMEVariant::asQTime() { if (type != QMetaType::QTime) setValue(QTime()); @@ -298,7 +298,7 @@ const QTime &QQmlVMEVariant::asQTime() return *(QTime *)(dataPtr()); } -const QDate &QQmlVMEVariant::asQDate() +const QDate &QQmlVMEVariant::asQDate() { if (type != QMetaType::QDate) setValue(QDate()); @@ -306,7 +306,7 @@ const QDate &QQmlVMEVariant::asQDate() return *(QDate *)(dataPtr()); } -const QDateTime &QQmlVMEVariant::asQDateTime() +const QDateTime &QQmlVMEVariant::asQDateTime() { if (type != QMetaType::QDateTime) setValue(QDateTime()); @@ -779,9 +779,9 @@ int QQmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) if (t == qMetaTypeId >()) { int listIndex = data[id].asInt(); const List *list = &listProperties.at(listIndex); - *reinterpret_cast *>(a[0]) = + *reinterpret_cast *>(a[0]) = QQmlListProperty(object, (void *)list, - list_append, list_count, list_at, + list_append, list_count, list_at, list_clear); } @@ -858,7 +858,7 @@ int QQmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) QQmlVMEMetaData::AliasData *d = metaData->aliasData() + id; - if (d->flags & QML_ALIAS_FLAG_PTR && c == QMetaObject::ReadProperty) + if (d->flags & QML_ALIAS_FLAG_PTR && c == QMetaObject::ReadProperty) *reinterpret_cast(a[0]) = 0; if (!ctxt) return -1; @@ -867,7 +867,7 @@ int QQmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) QQmlContextPrivate *ctxtPriv = QQmlContextPrivate::get(context); QObject *target = ctxtPriv->data->idValues[d->contextIdx].data(); - if (!target) + if (!target) return -1; connectAlias(id); @@ -875,8 +875,8 @@ int QQmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) if (d->isObjectAlias()) { *reinterpret_cast(a[0]) = target; return -1; - } - + } + // Remove binding (if any) on write if(c == QMetaObject::WriteProperty) { int flags = *reinterpret_cast(a[3]); @@ -888,7 +888,7 @@ int QQmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) } } } - + if (d->isValueTypeAlias()) { // Value type property QQmlValueType *valueType = QQmlValueTypeFactory::valueType(d->valueType()); @@ -896,7 +896,7 @@ int QQmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) valueType->read(target, d->propertyIndex()); int rv = QMetaObject::metacall(valueType, c, d->valueTypeIndex(), a); - + if (c == QMetaObject::WriteProperty) valueType->write(target, d->propertyIndex(), 0x00); @@ -987,7 +987,7 @@ QV4::ReturnedValue QQmlVMEMetaObject::method(int index) return QV4::Primitive::undefinedValue().asReturnedValue(); } - if (!v8methods) + if (!v8methods) v8methods = new QV4::PersistentValue[metaData->methodCount]; return v8methods[index].value(); @@ -1186,7 +1186,7 @@ void QQmlVMEMetaObject::setVmeMethod(int index, QV4::ValueRef function) int plainSignals = metaData->signalCount + metaData->propertyCount + metaData->aliasCount; Q_ASSERT(index >= (methodOffset() + plainSignals) && index < (methodOffset() + plainSignals + metaData->methodCount)); - if (!v8methods) + if (!v8methods) v8methods = new QV4::PersistentValue[metaData->methodCount]; int methodIndex = index - methodOffset() - plainSignals; diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h index a9a0308ded..77db107668 100644 --- a/src/qml/qml/qqmlvmemetaobject_p.h +++ b/src/qml/qml/qqmlvmemetaobject_p.h @@ -113,7 +113,7 @@ struct QQmlVMEMetaData return (propertyIdx & 0xFFFF0000) ? propType : 0; } }; - + struct PropertyData { int propertyType; }; diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index 79428ca4a8..e2cdac16c0 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -122,11 +122,11 @@ QQmlXMLHttpRequestData::~QQmlXMLHttpRequestData() namespace { class DocumentImpl; -class NodeImpl +class NodeImpl { public: NodeImpl() : type(Element), document(0), parent(0) {} - virtual ~NodeImpl() { + virtual ~NodeImpl() { for (int ii = 0; ii < children.count(); ++ii) delete children.at(ii); for (int ii = 0; ii < attributes.count(); ++ii) @@ -134,18 +134,18 @@ public: } // These numbers are copied from the Node IDL definition - enum Type { - Attr = 2, - CDATA = 4, - Comment = 8, - Document = 9, - DocumentFragment = 11, + enum Type { + Attr = 2, + CDATA = 4, + Comment = 8, + Document = 9, + DocumentFragment = 11, DocumentType = 10, - Element = 1, - Entity = 6, + Element = 1, + Entity = 6, EntityReference = 5, - Notation = 12, - ProcessingInstruction = 7, + Notation = 12, + ProcessingInstruction = 7, Text = 3 }; Type type; @@ -407,7 +407,7 @@ public: } -void NodeImpl::addref() +void NodeImpl::addref() { document->addref(); } @@ -826,7 +826,7 @@ ReturnedValue Document::load(QV8Engine *engine, const QByteArray &data) break; case QXmlStreamReader::EndDocument: break; - case QXmlStreamReader::StartElement: + case QXmlStreamReader::StartElement: { Q_ASSERT(document); NodeImpl *node = new NodeImpl; @@ -851,7 +851,7 @@ ReturnedValue Document::load(QV8Engine *engine, const QByteArray &data) attr->parent = node; node->attributes.append(attr); } - } + } break; case QXmlStreamReader::EndElement: nodeStack.pop(); @@ -1045,7 +1045,7 @@ class QQmlXMLHttpRequest : public QObject { Q_OBJECT public: - enum State { Unsent = 0, + enum State { Unsent = 0, Opened = 1, HeadersReceived = 2, Loading = 3, Done = 4 }; @@ -1250,7 +1250,7 @@ void QQmlXMLHttpRequest::requestFromUrl(const QUrl &url) } request.setHeader(QNetworkRequest::ContentTypeHeader, str); } else { - request.setHeader(QNetworkRequest::ContentTypeHeader, + request.setHeader(QNetworkRequest::ContentTypeHeader, QLatin1String("text/plain;charset=UTF-8")); } } @@ -1258,7 +1258,7 @@ void QQmlXMLHttpRequest::requestFromUrl(const QUrl &url) if (xhrDump()) { qWarning().nospace() << "XMLHttpRequest: " << qPrintable(m_method) << ' ' << qPrintable(url.toString()); if (!m_data.isEmpty()) { - qWarning().nospace() << " " + qWarning().nospace() << " " << qPrintable(QString::fromUtf8(m_data)); } } @@ -1303,7 +1303,7 @@ ReturnedValue QQmlXMLHttpRequest::abort(const ValueRef me) m_errorFlag = true; m_request = QNetworkRequest(); - if (!(m_state == Unsent || + if (!(m_state == Unsent || (m_state == Opened && !m_sendFlag) || m_state == Done)) { @@ -1329,7 +1329,7 @@ void QQmlXMLHttpRequest::setMe(const ValueRef me) void QQmlXMLHttpRequest::readyRead() { - m_status = + m_status = m_network->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); m_statusText = QString::fromUtf8(m_network->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toByteArray()); @@ -1394,7 +1394,7 @@ void QQmlXMLHttpRequest::error(QNetworkReply::NetworkError error) } else { m_errorFlag = true; m_responseEntityBody = QByteArray(); - } + } m_state = Done; @@ -1438,7 +1438,7 @@ void QQmlXMLHttpRequest::finished() if (xhrDump()) { qWarning().nospace() << "XMLHttpRequest: RESPONSE " << qPrintable(m_url.toString()); if (!m_responseEntityBody.isEmpty()) { - qWarning().nospace() << " " + qWarning().nospace() << " " << qPrintable(QString::fromUtf8(m_responseEntityBody)); } } @@ -1479,7 +1479,7 @@ void QQmlXMLHttpRequest::readEncoding() } } - if (m_mime.isEmpty() || m_mime == "text/xml" || m_mime == "application/xml" || m_mime.endsWith("+xml")) + if (m_mime.isEmpty() || m_mime == "text/xml" || m_mime == "application/xml" || m_mime.endsWith("+xml")) m_gotXml = true; } @@ -1494,7 +1494,7 @@ QTextCodec* QQmlXMLHttpRequest::findTextCodec() const { QTextCodec *codec = 0; - if (!m_charset.isEmpty()) + if (!m_charset.isEmpty()) codec = QTextCodec::codecForName(m_charset); if (!codec && m_gotXml) { @@ -1503,7 +1503,7 @@ QTextCodec* QQmlXMLHttpRequest::findTextCodec() const codec = QTextCodec::codecForName(reader.documentEncoding().toString().toUtf8()); } - if (!codec && m_mime == "text/html") + if (!codec && m_mime == "text/html") codec = QTextCodec::codecForHtml(m_responseEntityBody, 0); if (!codec) @@ -1737,7 +1737,7 @@ ReturnedValue QQmlXMLHttpRequestCtor::method_open(CallContext *ctx) // Argument 0 - Method QString method = ctx->callData->args[0].toQStringNoThrow().toUpper(); - if (method != QLatin1String("GET") && + if (method != QLatin1String("GET") && method != QLatin1String("PUT") && method != QLatin1String("HEAD") && method != QLatin1String("POST") && @@ -1747,7 +1747,7 @@ ReturnedValue QQmlXMLHttpRequestCtor::method_open(CallContext *ctx) // Argument 1 - URL QUrl url = QUrl(ctx->callData->args[1].toQStringNoThrow()); - if (url.isRelative()) + if (url.isRelative()) url = engine->callingContext()->resolvedUrl(url); // Argument 2 - async (optional) @@ -1811,7 +1811,7 @@ ReturnedValue QQmlXMLHttpRequestCtor::method_setRequestHeader(CallContext *ctx) nameUpper == QLatin1String("USER-AGENT") || nameUpper == QLatin1String("VIA") || nameUpper.startsWith(QLatin1String("PROXY-")) || - nameUpper.startsWith(QLatin1String("SEC-"))) + nameUpper.startsWith(QLatin1String("SEC-"))) return Encode::undefined(); r->addHeader(name, value); @@ -1958,7 +1958,7 @@ ReturnedValue QQmlXMLHttpRequestCtor::method_get_responseText(CallContext *ctx) if (r->readyState() != QQmlXMLHttpRequest::Loading && r->readyState() != QQmlXMLHttpRequest::Done) return engine->toString(QString()); - else + else return engine->toString(r->responseBody()); } diff --git a/src/qml/qml/v8/qv8engine_p.h b/src/qml/qml/v8/qv8engine_p.h index 5d1005b479..e390ef56dd 100644 --- a/src/qml/qml/v8/qv8engine_p.h +++ b/src/qml/qml/v8/qv8engine_p.h @@ -117,7 +117,7 @@ namespace QV4 { // ... // Q_INVOKABLE void myMethod(QQmlV8Function*); // }; -// The QQmlV8Function - and consequently the arguments and return value - only remains +// The QQmlV8Function - and consequently the arguments and return value - only remains // valid during the call. If the return value isn't set within myMethod(), the will return // undefined. class QV8Engine; diff --git a/src/qml/types/qquickworkerscript.cpp b/src/qml/types/qquickworkerscript.cpp index 53e45e2003..5af33a34f8 100644 --- a/src/qml/types/qquickworkerscript.cpp +++ b/src/qml/types/qquickworkerscript.cpp @@ -195,15 +195,15 @@ private: void reportScriptException(WorkerScript *, const QQmlError &error); }; -QQuickWorkerScriptEnginePrivate::WorkerEngine::WorkerEngine(QQuickWorkerScriptEnginePrivate *parent) +QQuickWorkerScriptEnginePrivate::WorkerEngine::WorkerEngine(QQuickWorkerScriptEnginePrivate *parent) : QV8Engine(0), p(parent), accessManager(0) { m_v4Engine->v8Engine = this; } -QQuickWorkerScriptEnginePrivate::WorkerEngine::~WorkerEngine() -{ - delete accessManager; +QQuickWorkerScriptEnginePrivate::WorkerEngine::~WorkerEngine() +{ + delete accessManager; } void QQuickWorkerScriptEnginePrivate::WorkerEngine::init() @@ -264,7 +264,7 @@ QV4::ReturnedValue QQuickWorkerScriptEnginePrivate::WorkerEngine::sendFunction(i return v.asReturnedValue(); } -QNetworkAccessManager *QQuickWorkerScriptEnginePrivate::WorkerEngine::networkAccessManager() +QNetworkAccessManager *QQuickWorkerScriptEnginePrivate::WorkerEngine::networkAccessManager() { if (!accessManager) { if (p->qmlengine && p->qmlengine->networkAccessManagerFactory()) { @@ -411,7 +411,7 @@ void QQuickWorkerScriptEnginePrivate::processLoad(int id, const QUrl &url) } } -void QQuickWorkerScriptEnginePrivate::reportScriptException(WorkerScript *script, +void QQuickWorkerScriptEnginePrivate::reportScriptException(WorkerScript *script, const QQmlError &error) { QQuickWorkerScriptEnginePrivate *p = QQuickWorkerScriptEnginePrivate::get(workerEngine); diff --git a/src/quick/doc/snippets/qml/animatedimage.qml b/src/quick/doc/snippets/qml/animatedimage.qml index d2f778e030..f6e8d027ea 100644 --- a/src/quick/doc/snippets/qml/animatedimage.qml +++ b/src/quick/doc/snippets/qml/animatedimage.qml @@ -49,7 +49,7 @@ Rectangle { AnimatedImage { id: animation; source: "animation.gif" } - Rectangle { + Rectangle { property int frames: animation.frameCount width: 4; height: 8 diff --git a/src/quick/doc/snippets/qml/listview/listview.qml b/src/quick/doc/snippets/qml/listview/listview.qml index 41c7f78fbe..868ba4dfc1 100644 --- a/src/quick/doc/snippets/qml/listview/listview.qml +++ b/src/quick/doc/snippets/qml/listview/listview.qml @@ -141,7 +141,7 @@ ListView { } model: ContactModel {} - delegate: contactsDelegate + delegate: contactsDelegate focus: true } //![isCurrentItem] diff --git a/src/quick/doc/snippets/qml/loader/connections.qml b/src/quick/doc/snippets/qml/loader/connections.qml index cc63fad40d..a433f4a40e 100644 --- a/src/quick/doc/snippets/qml/loader/connections.qml +++ b/src/quick/doc/snippets/qml/loader/connections.qml @@ -49,7 +49,7 @@ Item { source: "MyItem.qml" } - Connections { + Connections { target: myLoader.item onMessage: console.log(msg) } diff --git a/src/quick/doc/snippets/qml/loader/simple.qml b/src/quick/doc/snippets/qml/loader/simple.qml index 4a68a3ce53..e9a1940ac6 100644 --- a/src/quick/doc/snippets/qml/loader/simple.qml +++ b/src/quick/doc/snippets/qml/loader/simple.qml @@ -46,7 +46,7 @@ Item { Loader { id: pageLoader } - MouseArea { + MouseArea { anchors.fill: parent onClicked: pageLoader.source = "Page1.qml" } diff --git a/src/quick/doc/snippets/qml/parentanimation.qml b/src/quick/doc/snippets/qml/parentanimation.qml index c5077ba000..6652030e15 100644 --- a/src/quick/doc/snippets/qml/parentanimation.qml +++ b/src/quick/doc/snippets/qml/parentanimation.qml @@ -43,13 +43,13 @@ import QtQuick 2.0 Item { width: 200; height: 100 - Rectangle { + Rectangle { id: redRect width: 100; height: 100 color: "red" } - Rectangle { + Rectangle { id: blueRect x: redRect.width width: 50; height: 50 diff --git a/src/quick/doc/snippets/qml/parentchange.qml b/src/quick/doc/snippets/qml/parentchange.qml index 777fa225eb..4f1fb2a286 100644 --- a/src/quick/doc/snippets/qml/parentchange.qml +++ b/src/quick/doc/snippets/qml/parentchange.qml @@ -43,13 +43,13 @@ import QtQuick 2.0 Item { width: 200; height: 100 - Rectangle { + Rectangle { id: redRect width: 100; height: 100 color: "red" } - Rectangle { + Rectangle { id: blueRect x: redRect.width width: 50; height: 50 diff --git a/src/quick/doc/snippets/qml/propertyanimation.qml b/src/quick/doc/snippets/qml/propertyanimation.qml index 4d7140d406..db589bbc21 100644 --- a/src/quick/doc/snippets/qml/propertyanimation.qml +++ b/src/quick/doc/snippets/qml/propertyanimation.qml @@ -55,8 +55,8 @@ Rectangle { } //! [single state] - transitions: Transition { - PropertyAnimation { properties: "x,y"; easing.type: Easing.InOutQuad } + transitions: Transition { + PropertyAnimation { properties: "x,y"; easing.type: Easing.InOutQuad } } } //![transition] diff --git a/src/quick/doc/snippets/qml/propertychanges.qml b/src/quick/doc/snippets/qml/propertychanges.qml index b49b9df2eb..f9f1b807e0 100644 --- a/src/quick/doc/snippets/qml/propertychanges.qml +++ b/src/quick/doc/snippets/qml/propertychanges.qml @@ -53,9 +53,9 @@ Item { width: 100; height: 100 color: "red" - MouseArea { + MouseArea { id: mouseArea - anchors.fill: parent + anchors.fill: parent } states: State { diff --git a/src/quick/doc/snippets/qml/repeaters/repeater.qml b/src/quick/doc/snippets/qml/repeaters/repeater.qml index 704bea6bee..3afc8c67c2 100644 --- a/src/quick/doc/snippets/qml/repeaters/repeater.qml +++ b/src/quick/doc/snippets/qml/repeaters/repeater.qml @@ -48,7 +48,7 @@ Row { Row { Repeater { model: 3 - Rectangle { + Rectangle { width: 100; height: 40 border.width: 1 color: "yellow" @@ -60,7 +60,7 @@ Row { //! [index] Column { Repeater { - model: 10 + model: 10 Text { text: "I'm item " + index } } } @@ -79,7 +79,7 @@ Column { Row { Rectangle { width: 10; height: 20; color: "red" } Repeater { - model: 10 + model: 10 Rectangle { width: 20; height: 20; radius: 10; color: "green" } } Rectangle { width: 10; height: 20; color: "blue" } diff --git a/src/quick/doc/snippets/qml/rotationanimation.qml b/src/quick/doc/snippets/qml/rotationanimation.qml index 3924332f86..677c798ce9 100644 --- a/src/quick/doc/snippets/qml/rotationanimation.qml +++ b/src/quick/doc/snippets/qml/rotationanimation.qml @@ -50,9 +50,9 @@ Item { color: "red" antialiasing: true - states: State { + states: State { name: "rotated" - PropertyChanges { target: rect; rotation: 180 } + PropertyChanges { target: rect; rotation: 180 } } transitions: Transition { diff --git a/src/quick/doc/snippets/qml/row.qml b/src/quick/doc/snippets/qml/row.qml index ad8a21326b..88f24c9140 100644 --- a/src/quick/doc/snippets/qml/row.qml +++ b/src/quick/doc/snippets/qml/row.qml @@ -48,7 +48,7 @@ Rectangle { Row { anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter - + spacing: 5 Rectangle { width: 100; height: 100; radius: 20.0 diff --git a/src/quick/doc/snippets/qml/state.qml b/src/quick/doc/snippets/qml/state.qml index 03475c49ab..09afde4b6f 100644 --- a/src/quick/doc/snippets/qml/state.qml +++ b/src/quick/doc/snippets/qml/state.qml @@ -45,9 +45,9 @@ Rectangle { width: 100; height: 100 color: "black" - MouseArea { + MouseArea { id: mouseArea - anchors.fill: parent + anchors.fill: parent onClicked: myRect.state == 'clicked' ? myRect.state = "" : myRect.state = 'clicked'; } diff --git a/src/quick/doc/snippets/qml/transition-from-to.qml b/src/quick/doc/snippets/qml/transition-from-to.qml index 415ab4f41f..7afc097eef 100644 --- a/src/quick/doc/snippets/qml/transition-from-to.qml +++ b/src/quick/doc/snippets/qml/transition-from-to.qml @@ -52,7 +52,7 @@ Rectangle { PropertyChanges { target: rect; color: "yellow" } } - transitions: Transition { + transitions: Transition { ColorAnimation { duration: 1000 } } } diff --git a/src/quick/doc/snippets/qml/transition-reversible.qml b/src/quick/doc/snippets/qml/transition-reversible.qml index 03848a37fa..1bb5a0bc5b 100644 --- a/src/quick/doc/snippets/qml/transition-reversible.qml +++ b/src/quick/doc/snippets/qml/transition-reversible.qml @@ -54,7 +54,7 @@ Rectangle { } //! [sequential animations] - transitions: Transition { + transitions: Transition { SequentialAnimation { PropertyAnimation { property: "x"; duration: 1000 } ColorAnimation { duration: 1000 } diff --git a/src/quick/doc/snippets/qml/transition.qml b/src/quick/doc/snippets/qml/transition.qml index a4189074fa..421149764c 100644 --- a/src/quick/doc/snippets/qml/transition.qml +++ b/src/quick/doc/snippets/qml/transition.qml @@ -55,8 +55,8 @@ Rectangle { PropertyChanges { target: rect; x: 50; y: 50 } } - transitions: Transition { - NumberAnimation { properties: "x,y"; easing.type: Easing.InOutQuad } + transitions: Transition { + NumberAnimation { properties: "x,y"; easing.type: Easing.InOutQuad } } } //![0] diff --git a/src/quick/util/qquickimageprovider.cpp b/src/quick/util/qquickimageprovider.cpp index 450238bd41..16c18d2594 100644 --- a/src/quick/util/qquickimageprovider.cpp +++ b/src/quick/util/qquickimageprovider.cpp @@ -147,8 +147,8 @@ QImage QQuickTextureFactory::image() const Image { source: "image://myimageprovider/image.png" } \endqml - This specifies that the image should be loaded by the image provider named - "myimageprovider", and the image to be loaded is named "image.png". The QML engine + This specifies that the image should be loaded by the image provider named + "myimageprovider", and the image to be loaded is named "image.png". The QML engine invokes the appropriate image provider according to the providers that have been registered through QQmlEngine::addImageProvider(). @@ -173,11 +173,11 @@ QImage QQuickTextureFactory::image() const When these images are loaded by QML, it looks for a matching image provider and calls its requestImage() or requestPixmap() method (depending on its - imageType()) to load the image. The method is called with the \c id + imageType()) to load the image. The method is called with the \c id parameter set to "yellow" for the first image, and "red" for the second. - Here is an image provider implementation that can load the images - requested by the above QML. This implementation dynamically + Here is an image provider implementation that can load the images + requested by the above QML. This implementation dynamically generates QPixmap images that are filled with the requested color: \snippet imageprovider/imageprovider.cpp 0 @@ -188,7 +188,7 @@ QImage QQuickTextureFactory::image() const with a "colors" identifier: \code - int main(int argc, char *argv[]) + int main(int argc, char *argv[]) { ... @@ -203,7 +203,7 @@ QImage QQuickTextureFactory::image() const \image imageprovider.png - A complete example is available in Qt's + A complete example is available in Qt's \l {qml/imageprovider}{examples/quick/imageprovider} directory. Note the example registers the provider via a \l{QQmlExtensionPlugin}{plugin} instead of registering it in the application \c main() function as shown above. @@ -214,7 +214,7 @@ QImage QQuickTextureFactory::image() const Image providers that support QImage or Texture loading automatically include support for asychronous loading of images. To enable asynchronous loading for an image source, set the \c asynchronous property to \c true for the relevant - \l Image, \l BorderImage or \l AnimatedImage object. When this is enabled, + \l Image, \l BorderImage or \l AnimatedImage object. When this is enabled, the image request to the provider is run in a low priority thread, allowing image loading to be executed in the background, and reducing the performance impact on the user interface. @@ -285,7 +285,7 @@ QQuickImageProvider::Flags QQuickImageProvider::flags() const } /*! - Implement this method to return the image with \a id. The default + Implement this method to return the image with \a id. The default implementation returns an empty image. The \a id is the requested image source, with the "image:" scheme and diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp index af66ef26a4..3bff2bb890 100644 --- a/src/quick/util/qquickpixmapcache.cpp +++ b/src/quick/util/qquickpixmapcache.cpp @@ -234,7 +234,7 @@ class QQuickPixmapData { public: QQuickPixmapData(QQuickPixmap *pixmap, const QUrl &u, const QSize &s, const QString &e) - : refCount(1), inCache(false), pixmapStatus(QQuickPixmap::Error), + : refCount(1), inCache(false), pixmapStatus(QQuickPixmap::Error), url(u), errorString(e), requestSize(s), textureFactory(0), reply(0), prevUnreferenced(0), prevUnreferencedPtr(0), nextUnreferenced(0) { @@ -242,7 +242,7 @@ public: } QQuickPixmapData(QQuickPixmap *pixmap, const QUrl &u, const QSize &r) - : refCount(1), inCache(false), pixmapStatus(QQuickPixmap::Loading), + : refCount(1), inCache(false), pixmapStatus(QQuickPixmap::Loading), url(u), requestSize(r), textureFactory(0), reply(0), prevUnreferenced(0), prevUnreferencedPtr(0), nextUnreferenced(0) { @@ -286,7 +286,7 @@ public: uint refCount; bool inCache:1; - + QQuickPixmap::Status pixmapStatus; QUrl url; QString errorString; @@ -337,7 +337,7 @@ QNetworkAccessManager *QQuickPixmapReader::networkAccessManager() return accessManager; } -static bool readImage(const QUrl& url, QIODevice *dev, QImage *image, QString *errorString, QSize *impsize, +static bool readImage(const QUrl& url, QIODevice *dev, QImage *image, QString *errorString, QSize *impsize, const QSize &requestSize) { QImageReader imgio(dev); @@ -469,17 +469,17 @@ QQuickPixmapReaderThreadObject::QQuickPixmapReaderThreadObject(QQuickPixmapReade { } -void QQuickPixmapReaderThreadObject::processJobs() -{ - QCoreApplication::postEvent(this, new QEvent(QEvent::User)); +void QQuickPixmapReaderThreadObject::processJobs() +{ + QCoreApplication::postEvent(this, new QEvent(QEvent::User)); } -bool QQuickPixmapReaderThreadObject::event(QEvent *e) +bool QQuickPixmapReaderThreadObject::event(QEvent *e) { - if (e->type() == QEvent::User) { - reader->processJobs(); - return true; - } else { + if (e->type() == QEvent::User) { + reader->processJobs(); + return true; + } else { return QObject::event(e); } } @@ -495,7 +495,7 @@ void QQuickPixmapReader::processJobs() QMutexLocker locker(&mutex); while (true) { - if (cancelled.isEmpty() && (jobs.isEmpty() || replies.count() >= IMAGEREQUEST_MAX_REQUEST_COUNT)) + if (cancelled.isEmpty() && (jobs.isEmpty() || replies.count() >= IMAGEREQUEST_MAX_REQUEST_COUNT)) return; // Nothing else to do // Clean cancelled jobs @@ -529,7 +529,7 @@ void QQuickPixmapReader::processJobs() } } -void QQuickPixmapReader::processJob(QQuickPixmapReply *runningJob, const QUrl &url, +void QQuickPixmapReader::processJob(QQuickPixmapReply *runningJob, const QUrl &url, const QSize &requestSize) { // fetch @@ -649,7 +649,7 @@ QQuickPixmapReply *QQuickPixmapReader::getImage(QQuickPixmapData *data) QQuickPixmapReply *reply = new QQuickPixmapReply(data); reply->engineForReader = engine; jobs.append(reply); - // XXX + // XXX if (threadObject) threadObject->processJobs(); mutex.unlock(); return reply; @@ -661,7 +661,7 @@ void QQuickPixmapReader::cancel(QQuickPixmapReply *reply) if (reply->loading) { cancelled.append(reply); reply->data = 0; - // XXX + // XXX if (threadObject) threadObject->processJobs(); } else { jobs.removeAll(reply); @@ -816,7 +816,7 @@ void QQuickPixmapStore::referencePixmap(QQuickPixmapData *data) Q_ASSERT(data->prevUnreferencedPtr); *data->prevUnreferencedPtr = data->nextUnreferenced; - if (data->nextUnreferenced) { + if (data->nextUnreferenced) { data->nextUnreferenced->prevUnreferencedPtr = data->prevUnreferencedPtr; data->nextUnreferenced->prevUnreferenced = data->prevUnreferenced; } @@ -927,7 +927,7 @@ void QQuickPixmapData::addref() { ++refCount; Q_QML_PROFILE(pixmapCountChanged(url, refCount)); - if (prevUnreferencedPtr) + if (prevUnreferencedPtr) pixmapStore()->referencePixmap(this); } @@ -1029,7 +1029,7 @@ static QQuickPixmapData* createPixmapDataSync(QQuickPixmap *declarativePixmap, Q } QString localFile = QQmlFile::urlToLocalFileOrQrc(url); - if (localFile.isEmpty()) + if (localFile.isEmpty()) return 0; QFile f(localFile); @@ -1130,7 +1130,7 @@ const QUrl &QQuickPixmap::url() const const QSize &QQuickPixmap::implicitSize() const { - if (d) + if (d) return d->implicitSize; else return nullPixmap()->size; @@ -1252,7 +1252,7 @@ void QQuickPixmap::load(QQmlEngine *engine, const QUrl &url, const QSize &reques Q_QML_PROFILE(pixmapStateChanged(url)); return; } - } + } if (!engine) return; @@ -1283,7 +1283,7 @@ void QQuickPixmap::clear() void QQuickPixmap::clear(QObject *obj) { if (d) { - if (d->reply) + if (d->reply) QObject::disconnect(d->reply, 0, obj, 0); d->declarativePixmaps.remove(this); d->release(); diff --git a/src/quick/util/qquickstate_p_p.h b/src/quick/util/qquickstate_p_p.h index c559c8163c..82e456ed65 100644 --- a/src/quick/util/qquickstate_p_p.h +++ b/src/quick/util/qquickstate_p_p.h @@ -215,7 +215,7 @@ public: struct OperationGuard : public QQmlGuard { - OperationGuard(QObject *obj, QList *l) : list(l) { + OperationGuard(QObject *obj, QList *l) : list(l) { setObject(static_cast(obj)); } QList *list; diff --git a/src/quick/util/qquicktimeline.cpp b/src/quick/util/qquicktimeline.cpp index d8cf9bd877..5305537d24 100644 --- a/src/quick/util/qquicktimeline.cpp +++ b/src/quick/util/qquicktimeline.cpp @@ -81,7 +81,7 @@ struct QQuickTimeLinePrivate Execute }; Op() {} - Op(Type t, int l, qreal v, qreal v2, int o, + Op(Type t, int l, qreal v, qreal v2, int o, const QQuickTimeLineCallback &ev = QQuickTimeLineCallback(), const QEasingCurve &es = QEasingCurve()) : type(t), length(l), value(v), value2(v2), order(o), event(ev), easing(es) {} @@ -89,8 +89,8 @@ struct QQuickTimeLinePrivate : type(o.type), length(o.length), value(o.value), value2(o.value2), order(o.order), event(o.event), easing(o.easing) {} Op &operator=(const Op &o) { - type = o.type; length = o.length; value = o.value; - value2 = o.value2; order = o.order; event = o.event; + type = o.type; length = o.length; value = o.value; + value2 = o.value2; order = o.order; event = o.event; easing = o.easing; return *this; } @@ -604,8 +604,8 @@ void QQuickTimeLine::sync(QQuickTimeLineValue &timeLineValue) d->syncPoint = d->length; }*/ -/*! - \internal +/*! + \internal Temporary hack. */ @@ -614,9 +614,9 @@ void QQuickTimeLine::setSyncPoint(int sp) d->syncPoint = sp; } -/*! - \internal - +/*! + \internal + Temporary hack. */ int QQuickTimeLine::syncPoint() const @@ -739,7 +739,7 @@ int QQuickTimeLinePrivate::advance(int t) TimeLine &tl = *iter; Op &op = tl.ops.first(); int length = op.length - tl.consumedOpLength; - + if (length < advanceTime) { advanceTime = length; if (advanceTime == 0) @@ -748,7 +748,7 @@ int QQuickTimeLinePrivate::advance(int t) } t -= advanceTime; - // Process until then. A zero length advance time will only process + // Process until then. A zero length advance time will only process // sets. QList > updates; @@ -762,8 +762,8 @@ int QQuickTimeLinePrivate::advance(int t) if (advanceTime == 0 && op.length != 0) continue; - if (tl.consumedOpLength == 0 && - op.type != Op::Pause && + if (tl.consumedOpLength == 0 && + op.type != Op::Pause && op.type != Op::Execute) tl.base = v->value(); diff --git a/src/quick/util/qquicktransitionmanager.cpp b/src/quick/util/qquicktransitionmanager.cpp index 769dadc4fc..2821d7628c 100644 --- a/src/quick/util/qquicktransitionmanager.cpp +++ b/src/quick/util/qquicktransitionmanager.cpp @@ -89,7 +89,7 @@ bool QQuickTransitionManager::isRunning() const return d->transitionInstance && d->transitionInstance->isRunning(); } -void QQuickTransitionManager::complete() +void QQuickTransitionManager::complete() { d->applyBindings(); @@ -100,7 +100,7 @@ void QQuickTransitionManager::complete() d->completeList.clear(); - if (d->state) + if (d->state) static_cast(QObjectPrivate::get(d->state))->complete(); finished(); @@ -228,8 +228,8 @@ void QQuickTransitionManager::transition(const QList &list, } else { if (touched.contains(action.property)) { - if (action.toValue != action.fromValue) - d->completeList << + if (action.toValue != action.fromValue) + d->completeList << QQuickSimpleAction(action, QQuickSimpleAction::EndState); applyList.removeAt(ii); @@ -242,7 +242,7 @@ void QQuickTransitionManager::transition(const QList &list, // Any actions remaining have not been handled by the transition and should // be applied immediately. We skip applying bindings, as they are all - // applied at the end in applyBindings() to avoid any nastiness mid + // applied at the end in applyBindings() to avoid any nastiness mid // transition foreach(const QQuickStateAction &action, applyList) { if (action.event && !action.event->changesBindings()) { @@ -261,7 +261,7 @@ void QQuickTransitionManager::transition(const QList &list, qWarning() << " No transition for event:" << action.event->type(); else qWarning() << " No transition for:" << action.property.object() - << action.property.name() << "From:" << action.fromValue + << action.property.name() << "From:" << action.fromValue << "To:" << action.toValue; } } diff --git a/src/quick/util/qquicktransitionmanager_p_p.h b/src/quick/util/qquicktransitionmanager_p_p.h index 6211b5488c..bf203feaf4 100644 --- a/src/quick/util/qquicktransitionmanager_p_p.h +++ b/src/quick/util/qquicktransitionmanager_p_p.h @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE class QQuickStatePrivate; class QQuickTransitionManagerPrivate; -class Q_AUTOTEST_EXPORT QQuickTransitionManager +class Q_AUTOTEST_EXPORT QQuickTransitionManager { public: QQuickTransitionManager(); diff --git a/tests/auto/particles/qquickgroupgoal/data/basic.qml b/tests/auto/particles/qquickgroupgoal/data/basic.qml index 8e25a4dc3f..8e3833916f 100644 --- a/tests/auto/particles/qquickgroupgoal/data/basic.qml +++ b/tests/auto/particles/qquickgroupgoal/data/basic.qml @@ -61,7 +61,7 @@ Rectangle { goalState: "" jump: true } - + Emitter { //0,0 position group: "notdefault" diff --git a/tests/auto/qml/debugger/qpacketprotocol/tst_qpacketprotocol.cpp b/tests/auto/qml/debugger/qpacketprotocol/tst_qpacketprotocol.cpp index 7fd1f47838..26919af1b6 100644 --- a/tests/auto/qml/debugger/qpacketprotocol/tst_qpacketprotocol.cpp +++ b/tests/auto/qml/debugger/qpacketprotocol/tst_qpacketprotocol.cpp @@ -82,10 +82,10 @@ void tst_QPacketProtocol::init() m_server = new QTcpServer(this); m_serverConn = 0; QVERIFY(m_server->listen(QHostAddress("127.0.0.1"))); - + m_client = new QTcpSocket(this); m_client->connectToHost(m_server->serverAddress(), m_server->serverPort()); - + QVERIFY(m_client->waitForConnected()); QVERIFY(m_server->waitForNewConnection(10000)); m_serverConn = m_server->nextPendingConnection(); diff --git a/tests/auto/qml/debugger/shared/qqmldebugclient.cpp b/tests/auto/qml/debugger/shared/qqmldebugclient.cpp index 6474a04796..80322dc841 100644 --- a/tests/auto/qml/debugger/shared/qqmldebugclient.cpp +++ b/tests/auto/qml/debugger/shared/qqmldebugclient.cpp @@ -388,7 +388,7 @@ QQmlDebugClientPrivate::QQmlDebugClientPrivate() { } -QQmlDebugClient::QQmlDebugClient(const QString &name, +QQmlDebugClient::QQmlDebugClient(const QString &name, QQmlDebugConnection *parent) : QObject(parent), d(new QQmlDebugClientPrivate) diff --git a/tests/auto/qml/parserstress/tests/shell.js b/tests/auto/qml/parserstress/tests/shell.js index 40af0f3799..b3a84cc2ed 100644 --- a/tests/auto/qml/parserstress/tests/shell.js +++ b/tests/auto/qml/parserstress/tests/shell.js @@ -191,7 +191,7 @@ function reportFailure (msg) var l; var funcName = currentFunc(); var prefix = (funcName) ? "[reported from " + funcName + "] ": ""; - + for (var i=0; i(component.create()); QVERIFY(object != 0); QCOMPARE(object->value(), 0); @@ -885,7 +885,7 @@ void tst_qqmlecmascript::deferredProperties() qmlExecuteDeferred(object); QCOMPARE(object->value(), 10); QVERIFY(object->objectProperty() != 0); - MyQmlObject *qmlObject = + MyQmlObject *qmlObject = qobject_cast(object->objectProperty()); QVERIFY(qmlObject != 0); QCOMPARE(qmlObject->value(), 10); @@ -899,7 +899,7 @@ void tst_qqmlecmascript::deferredProperties() void tst_qqmlecmascript::deferredPropertiesErrors() { QQmlComponent component(&engine, testFileUrl("deferredPropertiesErrors.qml")); - MyDeferredObject *object = + MyDeferredObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->value(), 0); @@ -961,7 +961,7 @@ void tst_qqmlecmascript::deferredPropertiesInDestruction() void tst_qqmlecmascript::extensionObjects() { QQmlComponent component(&engine, testFileUrl("extensionObjects.qml")); - MyExtendedObject *object = + MyExtendedObject *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->baseProperty(), 13); @@ -1153,7 +1153,7 @@ void tst_qqmlecmascript::valueTypeFunctions() delete obj; } -/* +/* Tests that writing a constant to a property with a binding on it disables the binding. */ @@ -1236,7 +1236,7 @@ the original binding to be disabled. */ void tst_qqmlecmascript::outerBindingOverridesInnerBinding() { - QQmlComponent component(&engine, + QQmlComponent component(&engine, testFileUrl("outerBindingOverridesInnerBinding.qml")); MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != 0); @@ -1259,7 +1259,7 @@ void tst_qqmlecmascript::outerBindingOverridesInnerBinding() } /* -Access a non-existent attached object. +Access a non-existent attached object. Tests for a regression where this used to crash. */ @@ -1916,7 +1916,7 @@ void tst_qqmlecmascript::propertyAssignmentErrors() delete object; } - + /* Test bindings still work when the reeval is triggered from within a signal script. @@ -2263,7 +2263,7 @@ void tst_qqmlecmascript::regExpBug() static inline bool evaluate_error(QV8Engine *engine, const QV4::ValueRef o, const char *source) { - QString functionSource = QLatin1String("(function(object) { return ") + + QString functionSource = QLatin1String("(function(object) { return ") + QLatin1String(source) + QLatin1String(" })"); QV4::Script program(QV8Engine::getV4(engine)->rootContext, functionSource); @@ -2291,7 +2291,7 @@ static inline bool evaluate_error(QV8Engine *engine, const QV4::ValueRef o, cons static inline bool evaluate_value(QV8Engine *engine, const QV4::ValueRef o, const char *source, const QV4::ValueRef result) { - QString functionSource = QLatin1String("(function(object) { return ") + + QString functionSource = QLatin1String("(function(object) { return ") + QLatin1String(source) + QLatin1String(" })"); QV4::Script program(QV8Engine::getV4(engine)->rootContext, functionSource); @@ -2323,7 +2323,7 @@ static inline bool evaluate_value(QV8Engine *engine, const QV4::ValueRef o, static inline QV4::ReturnedValue evaluate(QV8Engine *engine, const QV4::ValueRef o, const char *source) { - QString functionSource = QLatin1String("(function(object) { return ") + + QString functionSource = QLatin1String("(function(object) { return ") + QLatin1String(source) + QLatin1String(" })"); QV4::ExecutionContext *ctx = QV8Engine::getV4(engine)->currentContext(); @@ -2362,7 +2362,7 @@ void tst_qqmlecmascript::callQtInvokables() QQmlEngine qmlengine; QQmlEnginePrivate *ep = QQmlEnginePrivate::get(&qmlengine); - + QV8Engine *engine = ep->v8engine(); QV4::Scope scope(QV8Engine::getV4(engine)); @@ -3026,7 +3026,7 @@ void tst_qqmlecmascript::attachedPropertyScope() QObject *object = component.create(); QVERIFY(object != 0); - MyQmlAttachedObject *attached = + MyQmlAttachedObject *attached = qobject_cast(qmlAttachedPropertiesObject(object)); QVERIFY(attached != 0); @@ -3241,7 +3241,7 @@ void tst_qqmlecmascript::ownership() QVERIFY(own.object != 0); QObject *object = component.create(context); - + engine.collectGarbage(); QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); @@ -3277,7 +3277,7 @@ public: QPointer value; }; -// QTBUG-15695. +// QTBUG-15695. // Test setObjectOwnership(CppOwnership) works even when there is no QQmlData void tst_qqmlecmascript::cppOwnershipReturnValue() { @@ -5627,7 +5627,7 @@ void tst_qqmlecmascript::assignSequenceTypes() } } -// Test that assigning a null object works +// Test that assigning a null object works // Regressed with: df1788b4dbbb2826ae63f26bdf166342595343f4 void tst_qqmlecmascript::nullObjectBinding() { @@ -6278,7 +6278,7 @@ void tst_qqmlecmascript::aliasBindingsAssignCorrectly() // Test bindings assigned to alias properties override a binding on the target (QTBUG-13719) void tst_qqmlecmascript::aliasBindingsOverrideTarget() { - { + { QQmlComponent component(&engine, testFileUrl("aliasBindingsOverrideTarget.qml")); QObject *o = component.create(); QVERIFY(o != 0); diff --git a/tests/auto/qml/qqmlengine/qqmlengine.pro b/tests/auto/qml/qqmlengine/qqmlengine.pro index fd8c463742..e84512fae3 100644 --- a/tests/auto/qml/qqmlengine/qqmlengine.pro +++ b/tests/auto/qml/qqmlengine/qqmlengine.pro @@ -4,7 +4,7 @@ macx:CONFIG -= app_bundle include (../../shared/util.pri) -SOURCES += tst_qqmlengine.cpp +SOURCES += tst_qqmlengine.cpp QT += core-private gui-private qml-private network testlib DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/qml/qqmlinstruction/tst_qqmlinstruction.cpp b/tests/auto/qml/qqmlinstruction/tst_qqmlinstruction.cpp index 9d62aa2984..0c8424aaba 100644 --- a/tests/auto/qml/qqmlinstruction/tst_qqmlinstruction.cpp +++ b/tests/auto/qml/qqmlinstruction/tst_qqmlinstruction.cpp @@ -486,7 +486,7 @@ void tst_qqmlinstruction::dump() } QStringList expect; - expect + expect << "Index\tOperation\t\tData1\tData2\tData3\tComments" << "-------------------------------------------------------------------------------" << "0\t\tINIT\t\t\t0\t3\t-1\t-1" diff --git a/tests/auto/qml/qqmllanguage/data/NestedAlias.qml b/tests/auto/qml/qqmllanguage/data/NestedAlias.qml index 7d49b0ac98..3606836e96 100644 --- a/tests/auto/qml/qqmllanguage/data/NestedAlias.qml +++ b/tests/auto/qml/qqmllanguage/data/NestedAlias.qml @@ -7,8 +7,8 @@ QtObject { property alias a: object2.a o1: QtObject { id: object1 } - o2: QtObject { - id: object2 + o2: QtObject { + id: object2 property int a: 1923 } } diff --git a/tests/auto/qml/qqmllanguage/data/OnCompletedType.qml b/tests/auto/qml/qqmllanguage/data/OnCompletedType.qml index 947f14811f..6b589fb612 100644 --- a/tests/auto/qml/qqmllanguage/data/OnCompletedType.qml +++ b/tests/auto/qml/qqmllanguage/data/OnCompletedType.qml @@ -3,6 +3,6 @@ import QtQuick 2.0 MyQmlObject { property int a: Math.max(10, 9) - property int b: 11 + property int b: 11 Component.onCompleted: console.log("Completed " + a + " " + b); } diff --git a/tests/auto/qml/qqmllanguage/data/OnDestructionType.qml b/tests/auto/qml/qqmllanguage/data/OnDestructionType.qml index 11fb9d9578..a172d94a9e 100644 --- a/tests/auto/qml/qqmllanguage/data/OnDestructionType.qml +++ b/tests/auto/qml/qqmllanguage/data/OnDestructionType.qml @@ -3,6 +3,6 @@ import QtQuick 2.0 MyQmlObject { property int a: Math.max(10, 9) - property int b: 11 + property int b: 11 Component.onDestruction: console.log("Destruction " + a + " " + b); } diff --git a/tests/auto/qml/qqmllanguage/data/alias.4.qml b/tests/auto/qml/qqmllanguage/data/alias.4.qml index bd6a769367..da6c6e7898 100644 --- a/tests/auto/qml/qqmllanguage/data/alias.4.qml +++ b/tests/auto/qml/qqmllanguage/data/alias.4.qml @@ -1,6 +1,6 @@ import Test 1.0 Alias2 { - enumAlias: MyTypeObject.EnumVal2 + enumAlias: MyTypeObject.EnumVal2 } diff --git a/tests/auto/qml/qqmllanguage/data/alias.5.qml b/tests/auto/qml/qqmllanguage/data/alias.5.qml index cee2a88cf7..ccd47658e0 100644 --- a/tests/auto/qml/qqmllanguage/data/alias.5.qml +++ b/tests/auto/qml/qqmllanguage/data/alias.5.qml @@ -4,7 +4,7 @@ import Test 1.0 QtObject { property alias otherAlias: otherObject - property variant other + property variant other other: MyQmlObject { id: otherObject value: 10 diff --git a/tests/auto/qml/qqmllanguage/data/assignBasicTypes.qml b/tests/auto/qml/qqmllanguage/data/assignBasicTypes.qml index 4d54bc83c1..c91cf581b3 100644 --- a/tests/auto/qml/qqmllanguage/data/assignBasicTypes.qml +++ b/tests/auto/qml/qqmllanguage/data/assignBasicTypes.qml @@ -15,7 +15,7 @@ MyTypeObject { floatProperty: 8.5 colorProperty: "red" dateProperty: "1982-11-25" - timeProperty: "11:11:32" + timeProperty: "11:11:32" dateTimeProperty: "2009-05-12T13:22:01" pointProperty: "99,13" pointFProperty: "-10.1,12.3" diff --git a/tests/auto/qml/qqmllanguage/data/defaultPropertyListOrder.qml b/tests/auto/qml/qqmllanguage/data/defaultPropertyListOrder.qml index 31d17fd55f..fc878170cf 100644 --- a/tests/auto/qml/qqmllanguage/data/defaultPropertyListOrder.qml +++ b/tests/auto/qml/qqmllanguage/data/defaultPropertyListOrder.qml @@ -13,10 +13,10 @@ MyContainer { children: [ QtObject { property int index: 2 - }, + }, QtObject { property int index: 3 - } + } ] QtObject { diff --git a/tests/auto/qml/qqmllanguage/data/dynamicObjectProperties.2.qml b/tests/auto/qml/qqmllanguage/data/dynamicObjectProperties.2.qml index 6f822ba157..319e1f5bc5 100644 --- a/tests/auto/qml/qqmllanguage/data/dynamicObjectProperties.2.qml +++ b/tests/auto/qml/qqmllanguage/data/dynamicObjectProperties.2.qml @@ -1,4 +1,4 @@ -import QtQuick 2.0 +import QtQuick 2.0 import QtQuick 2.0 as Qt47 Qt.QtObject { diff --git a/tests/auto/qml/qqmllanguage/data/dynamicObjectProperties.qml b/tests/auto/qml/qqmllanguage/data/dynamicObjectProperties.qml index 5d072b160a..d4c77f1432 100644 --- a/tests/auto/qml/qqmllanguage/data/dynamicObjectProperties.qml +++ b/tests/auto/qml/qqmllanguage/data/dynamicObjectProperties.qml @@ -8,6 +8,6 @@ QtObject { objectProperty2: QtObject {} property MyComponent myComponentProperty - property MyComponent myComponentProperty2 + property MyComponent myComponentProperty2 myComponentProperty2: MyComponent {} } diff --git a/tests/auto/qml/qqmllanguage/data/interfaceQList.qml b/tests/auto/qml/qqmllanguage/data/interfaceQList.qml index c87dfae785..2e968e4fea 100644 --- a/tests/auto/qml/qqmllanguage/data/interfaceQList.qml +++ b/tests/auto/qml/qqmllanguage/data/interfaceQList.qml @@ -1,6 +1,6 @@ import Test 1.0 MyContainer { - qlistInterfaces: [ + qlistInterfaces: [ MyQmlObject {}, MyQmlObject {} ] diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.1.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.1.qml index fa46b8242a..d61dbd76d0 100644 --- a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.1.qml +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.1.qml @@ -1,4 +1,4 @@ -import QtQuick 2.0 +import QtQuick 2.0 QtObject { property variant o; diff --git a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.2.qml b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.2.qml index 3e516738d6..23f6c6353b 100644 --- a/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.2.qml +++ b/tests/auto/qml/qqmllanguage/data/invalidGroupedProperty.2.qml @@ -1,4 +1,4 @@ -import QtQuick 2.0 +import QtQuick 2.0 QtObject { property int o; diff --git a/tests/auto/qml/qqmllanguage/data/nonexistantProperty.3.qml b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.3.qml index 5b08608862..b1610f7b4f 100644 --- a/tests/auto/qml/qqmllanguage/data/nonexistantProperty.3.qml +++ b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.3.qml @@ -1,4 +1,4 @@ import Test 1.0 -MyQmlObject { - something: 1 + 1 +MyQmlObject { + something: 1 + 1 } diff --git a/tests/auto/qml/qqmllanguage/data/onCompleted.qml b/tests/auto/qml/qqmllanguage/data/onCompleted.qml index 89e6777f8a..6de38d7aab 100644 --- a/tests/auto/qml/qqmllanguage/data/onCompleted.qml +++ b/tests/auto/qml/qqmllanguage/data/onCompleted.qml @@ -10,7 +10,7 @@ MyTypeObject { objectProperty: OnCompletedType { qmlobjectProperty: MyQmlObject { id: nestedObject - property int b: 10 + property int b: 10 Component.onCompleted: console.log("Completed " + a + " " + nestedObject.b) } } diff --git a/tests/auto/qml/qqmllanguage/data/onDestruction.qml b/tests/auto/qml/qqmllanguage/data/onDestruction.qml index 7d6da260b4..4eb5771943 100644 --- a/tests/auto/qml/qqmllanguage/data/onDestruction.qml +++ b/tests/auto/qml/qqmllanguage/data/onDestruction.qml @@ -10,7 +10,7 @@ MyTypeObject { objectProperty: OnDestructionType { qmlobjectProperty: MyQmlObject { id: nestedObject - property int b: 10 + property int b: 10 Component.onDestruction: console.log("Destruction " + a + " " + nestedObject.b) } } diff --git a/tests/auto/qml/qqmllanguage/testtypes.h b/tests/auto/qml/qqmllanguage/testtypes.h index 1b51042eaa..0416258075 100644 --- a/tests/auto/qml/qqmllanguage/testtypes.h +++ b/tests/auto/qml/qqmllanguage/testtypes.h @@ -59,7 +59,7 @@ QVariant myCustomVariantTypeConverter(const QString &data); -class MyInterface +class MyInterface { public: MyInterface() : id(913) {} diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index 6a577ec91c..6110e4870f 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -487,11 +487,11 @@ void tst_qqmllanguage::errors_data() QTest::newRow("notAvailable") << "notAvailable.qml" << "notAvailable.errors.txt" << false; QTest::newRow("singularProperty") << "singularProperty.qml" << "singularProperty.errors.txt" << false; QTest::newRow("singularProperty.2") << "singularProperty.2.qml" << "singularProperty.2.errors.txt" << false; - QTest::newRow("incorrectCase") << "incorrectCase.qml" + QTest::newRow("incorrectCase") << "incorrectCase.qml" #if defined(Q_OS_MAC) || defined(Q_OS_WIN32) - << "incorrectCase.errors.insensitive.txt" + << "incorrectCase.errors.insensitive.txt" #else - << "incorrectCase.errors.sensitive.txt" + << "incorrectCase.errors.sensitive.txt" #endif << false; @@ -612,7 +612,7 @@ void tst_qqmllanguage::assignQmlComponent() QCOMPARE(child->property("y"), QVariant(11)); } -// Test literal assignment to all the basic types +// Test literal assignment to all the basic types void tst_qqmllanguage::assignBasicTypes() { QQmlComponent component(&engine, testFileUrl("assignBasicTypes.qml")); @@ -1170,7 +1170,7 @@ void tst_qqmllanguage::idProperty() MyContainer *object = qobject_cast(component.create()); QVERIFY(object != 0); QCOMPARE(object->getChildren()->count(), 1); - MyTypeObject *child = + MyTypeObject *child = qobject_cast(object->getChildren()->at(0)); QVERIFY(child != 0); QCOMPARE(child->id(), QString("myObjectId")); @@ -1361,12 +1361,12 @@ void tst_qqmllanguage::propertyValueSource() QList valueSources; QObjectList allChildren = object->findChildren(); foreach (QObject *child, allChildren) { - if (qobject_cast(child)) + if (qobject_cast(child)) valueSources.append(child); } QCOMPARE(valueSources.count(), 1); - MyPropertyValueSource *valueSource = + MyPropertyValueSource *valueSource = qobject_cast(valueSources.at(0)); QVERIFY(valueSource != 0); QCOMPARE(valueSource->prop.object(), qobject_cast(object)); @@ -1382,12 +1382,12 @@ void tst_qqmllanguage::propertyValueSource() QList valueSources; QObjectList allChildren = object->findChildren(); foreach (QObject *child, allChildren) { - if (qobject_cast(child)) + if (qobject_cast(child)) valueSources.append(child); } QCOMPARE(valueSources.count(), 1); - MyPropertyValueSource *valueSource = + MyPropertyValueSource *valueSource = qobject_cast(valueSources.at(0)); QVERIFY(valueSource != 0); QCOMPARE(valueSource->prop.object(), qobject_cast(object)); @@ -1510,7 +1510,7 @@ void tst_qqmllanguage::aliasProperties() QVERIFY(object != 0); // Read through alias - MyQmlObject *v = + MyQmlObject *v = qvariant_cast(object->property("aliasObject")); QVERIFY(v != 0); QCOMPARE(v->value(), 10); @@ -1519,7 +1519,7 @@ void tst_qqmllanguage::aliasProperties() MyQmlObject *v2 = new MyQmlObject(); v2->setParent(object); object->setProperty("aliasObject", qVariantFromValue(v2)); - MyQmlObject *v3 = + MyQmlObject *v3 = qvariant_cast(object->property("aliasObject")); QVERIFY(v3 != 0); QCOMPARE(v3, v2); @@ -1592,7 +1592,7 @@ void tst_qqmllanguage::aliasProperties() QCOMPARE(object->property("a").toInt(), 1923); } - // Ptr Alias Cleanup - check that aliases to ptr types return 0 + // Ptr Alias Cleanup - check that aliases to ptr types return 0 // if the object aliased to is removed { QQmlComponent component(&engine, testFileUrl("alias.7.qml")); @@ -1846,7 +1846,7 @@ void tst_qqmllanguage::scriptString() } } -// Check that default property assignments are correctly spliced into explicit +// Check that default property assignments are correctly spliced into explicit // property assignments void tst_qqmllanguage::defaultPropertyListOrder() { @@ -2993,7 +2993,7 @@ void tst_qqmllanguage::remoteLoadCrash() QQmlComponent component(&engine); component.setData("import QtQuick 2.0; Text {}", QUrl("http://127.0.0.1:14448/remoteLoadCrash.qml")); - while (component.isLoading()) + while (component.isLoading()) QCoreApplication::processEvents( QEventLoop::ExcludeUserInputEvents | QEventLoop::WaitForMoreEvents, 50); QObject *o = component.create(); diff --git a/tests/auto/qml/qqmllistmodel/data/multipleroles.qml b/tests/auto/qml/qqmllistmodel/data/multipleroles.qml index 4a331e2b3e..cd4f1aca40 100644 --- a/tests/auto/qml/qqmllistmodel/data/multipleroles.qml +++ b/tests/auto/qml/qqmllistmodel/data/multipleroles.qml @@ -2,12 +2,12 @@ import QtQuick 2.0 ListView { width: 100 height: 250 - delegate: Rectangle { + delegate: Rectangle { width: 100 height: 50 - color: black ? "black": "white" + color: black ? "black": "white" } - model: ListModel { + model: ListModel { objectName: "listModel" ListElement { black: false diff --git a/tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp b/tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp index 90023222d3..2c57129657 100644 --- a/tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp +++ b/tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp @@ -139,7 +139,7 @@ void tst_qqmlmetatype::qmlParserStatusCast() QCOMPARE(QQmlMetaType::qmlType(qMetaTypeId())->parserStatusCast(), -1); QVERIFY(QQmlMetaType::qmlType(qMetaTypeId()) != 0); QCOMPARE(QQmlMetaType::qmlType(qMetaTypeId())->parserStatusCast(), -1); - + QVERIFY(QQmlMetaType::qmlType(qMetaTypeId()) != 0); int cast = QQmlMetaType::qmlType(qMetaTypeId())->parserStatusCast(); QVERIFY(cast != -1); @@ -159,7 +159,7 @@ void tst_qqmlmetatype::qmlPropertyValueSourceCast() QCOMPARE(QQmlMetaType::qmlType(qMetaTypeId())->propertyValueSourceCast(), -1); QVERIFY(QQmlMetaType::qmlType(qMetaTypeId()) != 0); QCOMPARE(QQmlMetaType::qmlType(qMetaTypeId())->propertyValueSourceCast(), -1); - + QVERIFY(QQmlMetaType::qmlType(qMetaTypeId()) != 0); int cast = QQmlMetaType::qmlType(qMetaTypeId())->propertyValueSourceCast(); QVERIFY(cast != -1); @@ -179,7 +179,7 @@ void tst_qqmlmetatype::qmlPropertyValueInterceptorCast() QCOMPARE(QQmlMetaType::qmlType(qMetaTypeId())->propertyValueInterceptorCast(), -1); QVERIFY(QQmlMetaType::qmlType(qMetaTypeId()) != 0); QCOMPARE(QQmlMetaType::qmlType(qMetaTypeId())->propertyValueInterceptorCast(), -1); - + QVERIFY(QQmlMetaType::qmlType(qMetaTypeId()) != 0); int cast = QQmlMetaType::qmlType(qMetaTypeId())->propertyValueInterceptorCast(); QVERIFY(cast != -1); diff --git a/tests/auto/qml/qqmlmoduleplugin/data/importsMixedQmlCppPlugin.2.qml b/tests/auto/qml/qqmlmoduleplugin/data/importsMixedQmlCppPlugin.2.qml index 97732d35d8..b13b2004c2 100644 --- a/tests/auto/qml/qqmlmoduleplugin/data/importsMixedQmlCppPlugin.2.qml +++ b/tests/auto/qml/qqmlmoduleplugin/data/importsMixedQmlCppPlugin.2.qml @@ -5,7 +5,7 @@ Item { property bool test: false property bool test2: false - Bar { + Bar { id: bar } diff --git a/tests/auto/qml/qqmlmoduleplugin/data/importsMixedQmlCppPlugin.qml b/tests/auto/qml/qqmlmoduleplugin/data/importsMixedQmlCppPlugin.qml index f09c29b5a8..563c0b28e3 100644 --- a/tests/auto/qml/qqmlmoduleplugin/data/importsMixedQmlCppPlugin.qml +++ b/tests/auto/qml/qqmlmoduleplugin/data/importsMixedQmlCppPlugin.qml @@ -3,7 +3,7 @@ import QtQuick 2.0 Item { property bool test: false - Bar { + Bar { id: bar } diff --git a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp index a6d9fb5601..04c7e51e4f 100644 --- a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp +++ b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp @@ -145,7 +145,7 @@ void tst_qqmlmoduleplugin::importsPlugin() QTest::ignoreMessage(QtWarningMsg, "Module 'org.qtproject.AutoTestQmlPluginType' does not contain a module identifier directive - it cannot be protected from external registrations."); QQmlComponent component(&engine, testFileUrl(QStringLiteral("works.qml"))); foreach (QQmlError err, component.errors()) - qWarning() << err; + qWarning() << err; VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); diff --git a/tests/auto/qml/qqmlvaluetypes/data/conflicting.1.qml b/tests/auto/qml/qqmlvaluetypes/data/conflicting.1.qml index 923922c55a..78d3bc0fbd 100644 --- a/tests/auto/qml/qqmlvaluetypes/data/conflicting.1.qml +++ b/tests/auto/qml/qqmlvaluetypes/data/conflicting.1.qml @@ -10,7 +10,7 @@ Rectangle { property int myPixelSize: 12 property int myPixelSize2: 24 - + Text { id: other font.pixelSize: 6 diff --git a/tests/auto/qml/qqmlvaluetypes/data/conflicting.2.qml b/tests/auto/qml/qqmlvaluetypes/data/conflicting.2.qml index 9804af4df6..725ba50a45 100644 --- a/tests/auto/qml/qqmlvaluetypes/data/conflicting.2.qml +++ b/tests/auto/qml/qqmlvaluetypes/data/conflicting.2.qml @@ -10,7 +10,7 @@ Rectangle { property int myPixelSize: 12 property int myPixelSize2: 24 - + Text { id: other font.pixelSize: 6 diff --git a/tests/auto/qml/qqmlvaluetypes/data/conflicting.3.qml b/tests/auto/qml/qqmlvaluetypes/data/conflicting.3.qml index b5bb7f8ccc..509fb39562 100644 --- a/tests/auto/qml/qqmlvaluetypes/data/conflicting.3.qml +++ b/tests/auto/qml/qqmlvaluetypes/data/conflicting.3.qml @@ -10,7 +10,7 @@ Rectangle { property int myPixelSize: 12 property int myPixelSize2: 24 - + Text { id: other font.pixelSize: 6 diff --git a/tests/auto/qml/qqmlxmlhttprequest/data/abort_opened.qml b/tests/auto/qml/qqmlxmlhttprequest/data/abort_opened.qml index d5bb84ddc0..7fcbc9367a 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/data/abort_opened.qml +++ b/tests/auto/qml/qqmlxmlhttprequest/data/abort_opened.qml @@ -15,7 +15,7 @@ QtObject { Component.onCompleted: { var x = new XMLHttpRequest; - x.abort(); + x.abort(); if (x.readyState == XMLHttpRequest.UNSENT) readyState = true; @@ -23,7 +23,7 @@ QtObject { x.open("PUT", url); x.setRequestHeader("Accept-Language", "en-US"); - x.abort(); + x.abort(); x.open("GET", url); x.setRequestHeader("Accept-Language", "en-US"); diff --git a/tests/auto/qml/qqmlxmlhttprequest/data/abort_unsent.qml b/tests/auto/qml/qqmlxmlhttprequest/data/abort_unsent.qml index 4f58062a26..0a85c6b16f 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/data/abort_unsent.qml +++ b/tests/auto/qml/qqmlxmlhttprequest/data/abort_unsent.qml @@ -15,7 +15,7 @@ QtObject { Component.onCompleted: { var x = new XMLHttpRequest; - x.abort(); + x.abort(); if (x.readyState == XMLHttpRequest.UNSENT) readyState = true; diff --git a/tests/auto/qml/qqmlxmlhttprequest/data/element.qml b/tests/auto/qml/qqmlxmlhttprequest/data/element.qml index 9b190f3a43..e0701d511a 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/data/element.qml +++ b/tests/auto/qml/qqmlxmlhttprequest/data/element.qml @@ -115,8 +115,8 @@ QtObject { function checkXML(document) { - checkElement(document.documentElement, - document.documentElement.childNodes[0], + checkElement(document.documentElement, + document.documentElement.childNodes[0], document.documentElement.childNodes[1]); } diff --git a/tests/auto/qml/qqmlxmlhttprequest/data/getAllResponseHeaders.qml b/tests/auto/qml/qqmlxmlhttprequest/data/getAllResponseHeaders.qml index 580688b835..a9066093d4 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/data/getAllResponseHeaders.qml +++ b/tests/auto/qml/qqmlxmlhttprequest/data/getAllResponseHeaders.qml @@ -20,12 +20,12 @@ QtObject { Component.onCompleted: { var x = new XMLHttpRequest; - try { - x.getResponseHeader("Test-Header"); - } catch (e) { - if (e.code == DOMException.INVALID_STATE_ERR) - unsentException = true; - } + try { + x.getResponseHeader("Test-Header"); + } catch (e) { + if (e.code == DOMException.INVALID_STATE_ERR) + unsentException = true; + } if (x.readyState == XMLHttpRequest.UNSENT) readyState = true; @@ -36,25 +36,25 @@ QtObject { if (x.readyState == XMLHttpRequest.OPENED) openedState = true; - try { - x.getResponseHeader("Test-Header"); - } catch (e) { - if (e.code == DOMException.INVALID_STATE_ERR) - openedException = true; - } + try { + x.getResponseHeader("Test-Header"); + } catch (e) { + if (e.code == DOMException.INVALID_STATE_ERR) + openedException = true; + } var headers = "connection: close\r\ncontent-type: text/html; charset=UTF-8\r\ntest-header: TestValue\r\nmultitest-header: TestValue, SecondTestValue\r\ncontent-length: 11"; // Test to the end x.onreadystatechange = function() { - if (x.readyState == XMLHttpRequest.HEADERS_RECEIVED) { - headersReceivedState = true; + if (x.readyState == XMLHttpRequest.HEADERS_RECEIVED) { + headersReceivedState = true; - headersReceivedHeader = (x.getAllResponseHeaders() == headers); - } else if (x.readyState == XMLHttpRequest.DONE) { - doneState = headersReceivedState && true; + headersReceivedHeader = (x.getAllResponseHeaders() == headers); + } else if (x.readyState == XMLHttpRequest.DONE) { + doneState = headersReceivedState && true; - doneHeader = (x.getAllResponseHeaders() == headers); + doneHeader = (x.getAllResponseHeaders() == headers); dataOK = (x.responseText == "QML Rocks!\n"); } } diff --git a/tests/auto/qml/qqmlxmlhttprequest/data/getResponseHeader.qml b/tests/auto/qml/qqmlxmlhttprequest/data/getResponseHeader.qml index 203967e539..0219d7b2fc 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/data/getResponseHeader.qml +++ b/tests/auto/qml/qqmlxmlhttprequest/data/getResponseHeader.qml @@ -26,12 +26,12 @@ QtObject { Component.onCompleted: { var x = new XMLHttpRequest; - try { - x.getResponseHeader("Test-Header"); - } catch (e) { - if (e.code == DOMException.INVALID_STATE_ERR) - unsentException = true; - } + try { + x.getResponseHeader("Test-Header"); + } catch (e) { + if (e.code == DOMException.INVALID_STATE_ERR) + unsentException = true; + } if (x.readyState == XMLHttpRequest.UNSENT) readyState = true; @@ -42,29 +42,29 @@ QtObject { if (x.readyState == XMLHttpRequest.OPENED) openedState = true; - try { - x.getResponseHeader("Test-Header"); - } catch (e) { - if (e.code == DOMException.INVALID_STATE_ERR) - openedException = true; - } + try { + x.getResponseHeader("Test-Header"); + } catch (e) { + if (e.code == DOMException.INVALID_STATE_ERR) + openedException = true; + } // Test to the end x.onreadystatechange = function() { - if (x.readyState == XMLHttpRequest.HEADERS_RECEIVED) { - headersReceivedState = true; - - headersReceivedNullHeader = (x.getResponseHeader("Nonexistant-header") == ""); - headersReceivedValidHeader = (x.getResponseHeader("Test-HEAder") == "TestValue"); - headersReceivedMultiValidHeader = (x.getResponseHeader("MultiTest-HEAder") == "TestValue, SecondTestValue"); - headersReceivedCookieHeader = (x.getResponseHeader("Set-Cookie") == "" && x.getResponseHeader("Set-Cookie2") == ""); - } else if (x.readyState == XMLHttpRequest.DONE) { - doneState = headersReceivedState && true; - - doneNullHeader = (x.getResponseHeader("Nonexistant-header") == ""); - doneValidHeader = (x.getResponseHeader("Test-HEAder") == "TestValue"); - doneMultiValidHeader = (x.getResponseHeader("MultiTest-HEAder") == "TestValue, SecondTestValue"); - doneCookieHeader = (x.getResponseHeader("Set-Cookie") == "" && x.getResponseHeader("Set-Cookie2") == ""); + if (x.readyState == XMLHttpRequest.HEADERS_RECEIVED) { + headersReceivedState = true; + + headersReceivedNullHeader = (x.getResponseHeader("Nonexistant-header") == ""); + headersReceivedValidHeader = (x.getResponseHeader("Test-HEAder") == "TestValue"); + headersReceivedMultiValidHeader = (x.getResponseHeader("MultiTest-HEAder") == "TestValue, SecondTestValue"); + headersReceivedCookieHeader = (x.getResponseHeader("Set-Cookie") == "" && x.getResponseHeader("Set-Cookie2") == ""); + } else if (x.readyState == XMLHttpRequest.DONE) { + doneState = headersReceivedState && true; + + doneNullHeader = (x.getResponseHeader("Nonexistant-header") == ""); + doneValidHeader = (x.getResponseHeader("Test-HEAder") == "TestValue"); + doneMultiValidHeader = (x.getResponseHeader("MultiTest-HEAder") == "TestValue, SecondTestValue"); + doneCookieHeader = (x.getResponseHeader("Set-Cookie") == "" && x.getResponseHeader("Set-Cookie2") == ""); dataOK = (x.responseText == "QML Rocks!\n"); } } diff --git a/tests/auto/qml/qqmlxmlhttprequest/data/invalidMethodUsage.qml b/tests/auto/qml/qqmlxmlhttprequest/data/invalidMethodUsage.qml index 5a4093b9f1..88207c19ca 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/data/invalidMethodUsage.qml +++ b/tests/auto/qml/qqmlxmlhttprequest/data/invalidMethodUsage.qml @@ -1,4 +1,4 @@ -import QtQuick 2.0 +import QtQuick 2.0 QtObject { property bool readyState: false diff --git a/tests/auto/qml/qqmlxmlhttprequest/data/redirectError.qml b/tests/auto/qml/qqmlxmlhttprequest/data/redirectError.qml index e5c7b74553..5b01caad39 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/data/redirectError.qml +++ b/tests/auto/qml/qqmlxmlhttprequest/data/redirectError.qml @@ -5,7 +5,7 @@ QtObject { property bool dataOK: false property bool done: false - + Component.onCompleted: { var x = new XMLHttpRequest; x.open("GET", url); diff --git a/tests/auto/qml/qqmlxmlhttprequest/data/redirectRecur.qml b/tests/auto/qml/qqmlxmlhttprequest/data/redirectRecur.qml index 0894573ecc..cd6e1f99ad 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/data/redirectRecur.qml +++ b/tests/auto/qml/qqmlxmlhttprequest/data/redirectRecur.qml @@ -5,7 +5,7 @@ QtObject { property bool dataOK: false property bool done: false - + Component.onCompleted: { var x = new XMLHttpRequest; x.open("GET", url); diff --git a/tests/auto/qml/qqmlxmlhttprequest/data/redirects.qml b/tests/auto/qml/qqmlxmlhttprequest/data/redirects.qml index 003d1954e9..c658feb5aa 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/data/redirects.qml +++ b/tests/auto/qml/qqmlxmlhttprequest/data/redirects.qml @@ -5,7 +5,7 @@ QtObject { property bool dataOK: false property bool done: false - + Component.onCompleted: { var x = new XMLHttpRequest; x.open("GET", url); diff --git a/tests/auto/qml/qqmlxmlhttprequest/data/send_alreadySent.qml b/tests/auto/qml/qqmlxmlhttprequest/data/send_alreadySent.qml index 4e0caa7171..65ce90853d 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/data/send_alreadySent.qml +++ b/tests/auto/qml/qqmlxmlhttprequest/data/send_alreadySent.qml @@ -19,7 +19,7 @@ QtObject { x.send(); try { - x.send() + x.send() } catch (e) { if (e.code == DOMException.INVALID_STATE_ERR) test = true; diff --git a/tests/auto/qml/qqmlxmlhttprequest/data/status.qml b/tests/auto/qml/qqmlxmlhttprequest/data/status.qml index 5feac17711..22c45c099d 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/data/status.qml +++ b/tests/auto/qml/qqmlxmlhttprequest/data/status.qml @@ -19,22 +19,22 @@ QtObject { Component.onCompleted: { var x = new XMLHttpRequest; - try { - var a = x.status; - } catch (e) { - if (e.code == DOMException.INVALID_STATE_ERR) - unsentException = true; - } + try { + var a = x.status; + } catch (e) { + if (e.code == DOMException.INVALID_STATE_ERR) + unsentException = true; + } x.open("GET", url); x.setRequestHeader("Accept-Language", "en-US"); - try { - var a = x.status; - } catch (e) { - if (e.code == DOMException.INVALID_STATE_ERR) - openedException = true; - } + try { + var a = x.status; + } catch (e) { + if (e.code == DOMException.INVALID_STATE_ERR) + openedException = true; + } // Test to the end x.onreadystatechange = function() { @@ -65,11 +65,11 @@ QtObject { x.send() - try { - var a = x.status; - } catch (e) { - if (e.code == DOMException.INVALID_STATE_ERR) - sentException = true; - } + try { + var a = x.status; + } catch (e) { + if (e.code == DOMException.INVALID_STATE_ERR) + sentException = true; + } } } diff --git a/tests/auto/qml/qqmlxmlhttprequest/data/statusText.qml b/tests/auto/qml/qqmlxmlhttprequest/data/statusText.qml index 3c74efc091..bf59a1e9f9 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/data/statusText.qml +++ b/tests/auto/qml/qqmlxmlhttprequest/data/statusText.qml @@ -19,22 +19,22 @@ QtObject { Component.onCompleted: { var x = new XMLHttpRequest; - try { - var a = x.statusText; - } catch (e) { - if (e.code == DOMException.INVALID_STATE_ERR) - unsentException = true; - } + try { + var a = x.statusText; + } catch (e) { + if (e.code == DOMException.INVALID_STATE_ERR) + unsentException = true; + } x.open("GET", url); x.setRequestHeader("Accept-Language", "en-US"); - try { - var a = x.statusText; - } catch (e) { - if (e.code == DOMException.INVALID_STATE_ERR) - openedException = true; - } + try { + var a = x.statusText; + } catch (e) { + if (e.code == DOMException.INVALID_STATE_ERR) + openedException = true; + } // Test to the end x.onreadystatechange = function() { @@ -65,11 +65,11 @@ QtObject { x.send() - try { - var a = x.statusText; - } catch (e) { - if (e.code == DOMException.INVALID_STATE_ERR) - sentException = true; - } + try { + var a = x.statusText; + } catch (e) { + if (e.code == DOMException.INVALID_STATE_ERR) + sentException = true; + } } } diff --git a/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp b/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp index 9c67e6e2e9..17becb3714 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp +++ b/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp @@ -208,7 +208,7 @@ void tst_qqmlxmlhttprequest::instanceStateValues() QCOMPARE(object->property("done").toInt(), 4); } -// Test calling constructor +// Test calling constructor void tst_qqmlxmlhttprequest::constructor() { QQmlComponent component(&engine, testFileUrl("constructor.qml")); @@ -436,7 +436,7 @@ void tst_qqmlxmlhttprequest::setRequestHeader_sent() component.completeCreate(); QCOMPARE(object->property("test").toBool(), true); - + QTRY_VERIFY(object->property("dataOK").toBool() == true); } @@ -796,7 +796,7 @@ void tst_qqmlxmlhttprequest::statusText() TestHTTPServer server(SERVER_PORT); QVERIFY(server.isValid()); QVERIFY(server.wait(testFileUrl("status.expect"), - replyUrl, + replyUrl, testFileUrl("testdocument.html"))); QQmlComponent component(&engine, testFileUrl("statusText.qml")); @@ -836,7 +836,7 @@ void tst_qqmlxmlhttprequest::responseText() TestHTTPServer server(SERVER_PORT); QVERIFY(server.isValid()); QVERIFY(server.wait(testFileUrl("status.expect"), - replyUrl, + replyUrl, bodyUrl)); QQmlComponent component(&engine, testFileUrl("responseText.qml")); @@ -883,7 +883,7 @@ void tst_qqmlxmlhttprequest::nonUtf8() QMetaObject::invokeMethod(object.data(), "startRequest"); QTRY_VERIFY(object->property("dataOK").toBool() == true); - + QCOMPARE(object->property("responseText").toString(), responseText); if (!xmlRootNodeValue.isEmpty()) { @@ -980,10 +980,10 @@ void tst_qqmlxmlhttprequest::redirects() object->setProperty("expectedText", ""); component.completeCreate(); - for (int ii = 0; ii < 60; ++ii) { - if (object->property("done").toBool()) break; - QTest::qWait(50); - } + for (int ii = 0; ii < 60; ++ii) { + if (object->property("done").toBool()) break; + QTest::qWait(50); + } QVERIFY(object->property("done").toBool() == true); QCOMPARE(object->property("dataOK").toBool(), true); diff --git a/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp b/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp index 53df72d75f..73e8a283c7 100644 --- a/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp +++ b/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp @@ -137,8 +137,8 @@ void tst_qquickfolderlistmodel::basicProperties() QCOMPARE(flm->property("showDotAndDotDot").toBool(), false); QCOMPARE(flm->property("showOnlyReadable").toBool(), false); QCOMPARE(flm->data(flm->index(0),FileNameRole).toString(), QLatin1String("basic.qml")); - QCOMPARE(flm->data(flm->index(1),FileNameRole).toString(), QLatin1String("dummy.qml")); - + QCOMPARE(flm->data(flm->index(1),FileNameRole).toString(), QLatin1String("dummy.qml")); + flm->setProperty("folder",QUrl::fromLocalFile("")); QCOMPARE(flm->property("folder").toUrl(), QUrl::fromLocalFile("")); } diff --git a/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp b/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp index 1530ce83e2..a799fc4fc4 100644 --- a/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp +++ b/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp @@ -187,7 +187,7 @@ void tst_QQuickWorkerScript::messaging_sendJsObject() waitForEchoMessage(worker); QVariant result = qVariantFromValue(false); - QVERIFY(QMetaObject::invokeMethod(worker, "compareLiteralResponse", Qt::DirectConnection, + QVERIFY(QMetaObject::invokeMethod(worker, "compareLiteralResponse", Qt::DirectConnection, Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, jsObject))); QVERIFY(result.toBool()); diff --git a/tests/auto/quick/qquickanimations/data/runningTrueBug.qml b/tests/auto/quick/qquickanimations/data/runningTrueBug.qml index bec6fab368..b2e8afcf0f 100644 --- a/tests/auto/quick/qquickanimations/data/runningTrueBug.qml +++ b/tests/auto/quick/qquickanimations/data/runningTrueBug.qml @@ -26,5 +26,5 @@ Rectangle { duration: 1000 } } - } + } } diff --git a/tests/auto/quick/qquickgridview/data/gridview-enforcerange.qml b/tests/auto/quick/qquickgridview/data/gridview-enforcerange.qml index 2bfe7da78e..d1f8c31e1d 100644 --- a/tests/auto/quick/qquickgridview/data/gridview-enforcerange.qml +++ b/tests/auto/quick/qquickgridview/data/gridview-enforcerange.qml @@ -39,7 +39,7 @@ Rectangle { color: "lightsteelblue" } } - + GridView { id: grid objectName: "grid" diff --git a/tests/auto/quick/qquickgridview/data/propertychangestest.qml b/tests/auto/quick/qquickgridview/data/propertychangestest.qml index 97efbe78f5..af3126f2d4 100644 --- a/tests/auto/quick/qquickgridview/data/propertychangestest.qml +++ b/tests/auto/quick/qquickgridview/data/propertychangestest.qml @@ -6,7 +6,7 @@ Rectangle { id: delegate Item { id: wrapper - width: 180; height: 40; + width: 180; height: 40; Column { x: 5; y: 5 Text { text: 'Name: ' + name } @@ -36,7 +36,7 @@ Rectangle { flow: GridView.LeftToRight } - data:[ + data:[ ListModel { id: listModel ListElement { @@ -65,5 +65,5 @@ Rectangle { } ] } - - + + diff --git a/tests/auto/quick/qquickimage/data/aspectratio.qml b/tests/auto/quick/qquickimage/data/aspectratio.qml index b26f0e1f04..a04a09d64e 100644 --- a/tests/auto/quick/qquickimage/data/aspectratio.qml +++ b/tests/auto/quick/qquickimage/data/aspectratio.qml @@ -1,6 +1,6 @@ import QtQuick 2.0 -Image { +Image { source: "heart.png" fillMode: Image.PreserveAspectFit; } diff --git a/tests/auto/quick/qquickimageprovider/tst_qquickimageprovider.cpp b/tests/auto/quick/qquickimageprovider/tst_qquickimageprovider.cpp index 3eea3c955c..48af48b17b 100644 --- a/tests/auto/quick/qquickimageprovider/tst_qquickimageprovider.cpp +++ b/tests/auto/quick/qquickimageprovider/tst_qquickimageprovider.cpp @@ -105,10 +105,10 @@ public: if (id == QLatin1String("no-such-file.png")) return QImage(); - int width = 100; + int width = 100; int height = 100; QImage image(width, height, QImage::Format_RGB32); - if (size) + if (size) *size = QSize(width, height); if (requestedSize.isValid()) image = image.scaled(requestedSize); @@ -142,10 +142,10 @@ public: if (id == QLatin1String("no-such-file.png")) return QPixmap(); - int width = 100; + int width = 100; int height = 100; QPixmap image(width, height); - if (size) + if (size) *size = QSize(width, height); if (requestedSize.isValid()) image = image.scaled(requestedSize); @@ -161,7 +161,7 @@ Q_DECLARE_METATYPE(TestQPixmapProvider*); QString tst_qquickimageprovider::newImageFileName() const { // need to generate new filenames each time or else images are loaded - // from cache and we won't get loading status changes when testing + // from cache and we won't get loading status changes when testing // async loading static int count = 0; return QString("image://test/image-%1.png").arg(count++); @@ -229,7 +229,7 @@ void tst_qquickimageprovider::runTest(bool async, QQuickImageProvider *provider) engine.addImageProvider("test", provider); QVERIFY(engine.imageProvider("test") != 0); - QString componentStr = "import QtQuick 2.0\nImage { source: \"" + source + "\"; " + QString componentStr = "import QtQuick 2.0\nImage { source: \"" + source + "\"; " + (async ? "asynchronous: true; " : "") + properties + " }"; QQmlComponent component(&engine); diff --git a/tests/auto/quick/qquickitem2/data/childrenRectBug3.qml b/tests/auto/quick/qquickitem2/data/childrenRectBug3.qml index 518e76509e..25d6a526d2 100644 --- a/tests/auto/quick/qquickitem2/data/childrenRectBug3.qml +++ b/tests/auto/quick/qquickitem2/data/childrenRectBug3.qml @@ -9,7 +9,7 @@ Rectangle { Repeater { model: 1 - Rectangle { } + Rectangle { } } } } diff --git a/tests/auto/quick/qquicklistview/data/listview-enforcerange.qml b/tests/auto/quick/qquicklistview/data/listview-enforcerange.qml index 4ccf3088b0..3d3885a5ca 100644 --- a/tests/auto/quick/qquicklistview/data/listview-enforcerange.qml +++ b/tests/auto/quick/qquicklistview/data/listview-enforcerange.qml @@ -39,7 +39,7 @@ Rectangle { color: "lightsteelblue" } } - + ListView { id: list objectName: "list" diff --git a/tests/auto/quick/qquicklistview/data/propertychangestest.qml b/tests/auto/quick/qquicklistview/data/propertychangestest.qml index 146f3f13b0..f269b4ab92 100644 --- a/tests/auto/quick/qquicklistview/data/propertychangestest.qml +++ b/tests/auto/quick/qquicklistview/data/propertychangestest.qml @@ -6,7 +6,7 @@ Rectangle { id: delegate Item { id: wrapper - width: 180; height: 40; + width: 180; height: 40; Column { x: 5; y: 5 Text { text: 'Name: ' + name } @@ -38,7 +38,7 @@ Rectangle { snapMode: ListView.SnapToItem } - data:[ + data:[ ListModel { id: listModel ListElement { @@ -67,5 +67,5 @@ Rectangle { } ] } - - + + diff --git a/tests/auto/quick/qquicklistview/incrementalmodel.cpp b/tests/auto/quick/qquicklistview/incrementalmodel.cpp index 473d52eb28..3d4b716e6b 100644 --- a/tests/auto/quick/qquicklistview/incrementalmodel.cpp +++ b/tests/auto/quick/qquicklistview/incrementalmodel.cpp @@ -59,10 +59,10 @@ QVariant IncrementalModel::data(const QModelIndex &index, int role) const { if (!index.isValid()) return QVariant(); - + if (index.row() >= list.size() || index.row() < 0) return QVariant(); - + if (role == Qt::DisplayRole) return list.at(index.row()); return QVariant(); @@ -82,7 +82,7 @@ void IncrementalModel::fetchMore(const QModelIndex & /* index */) int itemsToFetch = qMin(5, remainder); beginInsertRows(QModelIndex(), count, count+itemsToFetch-1); - + count += itemsToFetch; endInsertRows(); diff --git a/tests/auto/quick/qquickmousearea/data/dragproperties.qml b/tests/auto/quick/qquickmousearea/data/dragproperties.qml index d8d7b3bb6e..4e0dbe6277 100644 --- a/tests/auto/quick/qquickmousearea/data/dragproperties.qml +++ b/tests/auto/quick/qquickmousearea/data/dragproperties.qml @@ -1,7 +1,7 @@ import QtQuick 2.0 Rectangle { id: whiteRect - width: 200 + width: 200 height: 200 color: "white" Rectangle { diff --git a/tests/auto/quick/qquickmousearea/data/dragreset.qml b/tests/auto/quick/qquickmousearea/data/dragreset.qml index 3259dcf87d..10039f1fcb 100644 --- a/tests/auto/quick/qquickmousearea/data/dragreset.qml +++ b/tests/auto/quick/qquickmousearea/data/dragreset.qml @@ -1,7 +1,7 @@ import QtQuick 2.0 Rectangle { id: whiteRect - width: 200 + width: 200 height: 200 color: "white" Rectangle { diff --git a/tests/auto/quick/qquickpathview/data/propertychanges.qml b/tests/auto/quick/qquickpathview/data/propertychanges.qml index 09b309f86f..17d24f6606 100644 --- a/tests/auto/quick/qquickpathview/data/propertychanges.qml +++ b/tests/auto/quick/qquickpathview/data/propertychanges.qml @@ -6,7 +6,7 @@ Rectangle { id: myDelegate Item { id: wrapper - width: 180; height: 40; + width: 180; height: 40; opacity: PathView.opacity Column { x: 5; y: 5 @@ -46,7 +46,7 @@ Rectangle { } } - data:[ + data:[ ListModel { id: listModel ListElement { diff --git a/tests/auto/quick/qquickrepeater/data/properties.qml b/tests/auto/quick/qquickrepeater/data/properties.qml index 035431c784..18d014f96d 100644 --- a/tests/auto/quick/qquickrepeater/data/properties.qml +++ b/tests/auto/quick/qquickrepeater/data/properties.qml @@ -1,11 +1,11 @@ import QtQuick 2.0 -Row { - Repeater { +Row { + Repeater { objectName: "repeater" model: 5 - Text { - text: "I'm item " + index - } + Text { + text: "I'm item " + index + } } } diff --git a/tests/auto/quick/qquickstyledtext/tst_qquickstyledtext.cpp b/tests/auto/quick/qquickstyledtext/tst_qquickstyledtext.cpp index 4e9ceba2a2..a2e05ba883 100644 --- a/tests/auto/quick/qquickstyledtext/tst_qquickstyledtext.cpp +++ b/tests/auto/quick/qquickstyledtext/tst_qquickstyledtext.cpp @@ -86,7 +86,7 @@ const QChar tst_qquickstyledtext::disc(0x25e6); const QChar tst_qquickstyledtext::square(0x25a1); // For malformed input all we test is that we get the expected text and format out. -// +// void tst_qquickstyledtext::textOutput_data() { QTest::addColumn("input"); diff --git a/tests/auto/quick/qquicktextedit/data/http/cursorHttpTest.qml b/tests/auto/quick/qquicktextedit/data/http/cursorHttpTest.qml index 043304d027..5deffe7d11 100644 --- a/tests/auto/quick/qquicktextedit/data/http/cursorHttpTest.qml +++ b/tests/auto/quick/qquicktextedit/data/http/cursorHttpTest.qml @@ -1,12 +1,12 @@ import QtQuick 2.0 Rectangle { width: 300; height: 300; color: "white" - resources: [ + resources: [ Component { id:cursorFail; FailItem { objectName: "delegateFail" } }, Component { id:cursorWait; WaitItem { objectName: "delegateSlow" } }, Component { id:cursorNorm; NormItem { objectName: "delegateOkay" } }, Component { id:cursorErr; ErrItem { objectName: "delegateErrorA" } } - ] + ] TextEdit { cursorDelegate: cursorFail cursorVisible: true diff --git a/tests/auto/quick/qquicktextedit/data/http/cursorHttpTestFail1.qml b/tests/auto/quick/qquicktextedit/data/http/cursorHttpTestFail1.qml index a6556454fe..bff8ae435b 100644 --- a/tests/auto/quick/qquicktextedit/data/http/cursorHttpTestFail1.qml +++ b/tests/auto/quick/qquicktextedit/data/http/cursorHttpTestFail1.qml @@ -1,11 +1,11 @@ import QtQuick 2.0 Rectangle { width: 300; height: 300; color: "white" - resources: [ + resources: [ Component { id:cursorFail; FailItem { objectName: "delegateFail" } }, Component { id:cursorWait; WaitItem { objectName: "delegateSlow" } }, Component { id:cursorNorm; NormItem { objectName: "delegateOkay" } } - ] + ] TextEdit { cursorDelegate: cursorFail cursorVisible: true diff --git a/tests/auto/quick/qquicktextedit/data/http/cursorHttpTestFail2.qml b/tests/auto/quick/qquicktextedit/data/http/cursorHttpTestFail2.qml index 9429779a87..1cf1ed47f2 100644 --- a/tests/auto/quick/qquicktextedit/data/http/cursorHttpTestFail2.qml +++ b/tests/auto/quick/qquicktextedit/data/http/cursorHttpTestFail2.qml @@ -1,11 +1,11 @@ import QtQuick 2.0 Rectangle { width: 300; height: 300; color: "white" - resources: [ + resources: [ Component { id:cursorWait; WaitItem { objectName: "delegateSlow" } }, Component { id:cursorNorm; NormItem { objectName: "delegateOkay" } }, Component { id:cursorErr; ErrItem { objectName: "delegateErrorA" } } - ] + ] TextEdit { cursorDelegate: cursorWait cursorVisible: true diff --git a/tests/auto/quick/qquicktextedit/data/http/cursorHttpTestPass.qml b/tests/auto/quick/qquicktextedit/data/http/cursorHttpTestPass.qml index 69e498ef8d..d97a9a609a 100644 --- a/tests/auto/quick/qquicktextedit/data/http/cursorHttpTestPass.qml +++ b/tests/auto/quick/qquicktextedit/data/http/cursorHttpTestPass.qml @@ -1,10 +1,10 @@ import QtQuick 2.0 Rectangle { width: 300; height: 300; color: "white" - resources: [ + resources: [ Component { id:cursorWait; WaitItem { objectName: "delegateSlow" } }, Component { id:cursorNorm; NormItem { objectName: "delegateOkay" } } - ] + ] TextEdit { cursorDelegate: cursorWait text: "Hello" diff --git a/tests/auto/quick/qquicktextedit/data/inputmethodhints.qml b/tests/auto/quick/qquicktextedit/data/inputmethodhints.qml index dec3b978e7..5ec99198a4 100644 --- a/tests/auto/quick/qquicktextedit/data/inputmethodhints.qml +++ b/tests/auto/quick/qquicktextedit/data/inputmethodhints.qml @@ -1,6 +1,6 @@ import QtQuick 2.0 -TextEdit { +TextEdit { text: "Hello world!" inputMethodHints: Qt.ImhNoPredictiveText } diff --git a/tests/auto/quick/qquicktextedit/data/navigation.qml b/tests/auto/quick/qquicktextedit/data/navigation.qml index 0201c62b3c..7604c96adf 100644 --- a/tests/auto/quick/qquicktextedit/data/navigation.qml +++ b/tests/auto/quick/qquicktextedit/data/navigation.qml @@ -5,7 +5,7 @@ Rectangle { width: 800; height: 600; color: "blue" - Item { + Item { id: firstItem; KeyNavigation.right: input } @@ -18,7 +18,7 @@ Rectangle { text: "a" } Item { - id: lastItem + id: lastItem KeyNavigation.left: input } } diff --git a/tests/auto/quick/qquicktextinput/data/navigation.qml b/tests/auto/quick/qquicktextinput/data/navigation.qml index 3a7d07b3c7..8df0d151a7 100644 --- a/tests/auto/quick/qquicktextinput/data/navigation.qml +++ b/tests/auto/quick/qquicktextinput/data/navigation.qml @@ -5,7 +5,7 @@ Rectangle { width: 800; height: 600; color: "blue" - Item { + Item { id: firstItem; KeyNavigation.right: input } @@ -18,7 +18,7 @@ Rectangle { KeyNavigation.down: lastItem } Item { - id: lastItem + id: lastItem KeyNavigation.left: input } } diff --git a/tests/auto/quick/qquicktextinput/data/validators.qml b/tests/auto/quick/qquicktextinput/data/validators.qml index 0ba87e0592..b923f69801 100644 --- a/tests/auto/quick/qquicktextinput/data/validators.qml +++ b/tests/auto/quick/qquicktextinput/data/validators.qml @@ -25,5 +25,5 @@ Item { property bool acceptable: acceptableInput } } - + } diff --git a/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp b/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp index 12ae3c273f..a3cfa0011a 100644 --- a/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp +++ b/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp @@ -744,9 +744,9 @@ void tst_qquickxmllistmodel::noKeysValueChanges() QQmlComponent component(&engine, testFileUrl("roleKeys.qml")); QAbstractItemModel *model = qobject_cast(component.create()); QVERIFY(model != 0); - + QString xml; - + xml = makeItemXmlAndData("name=A,age=25,sport=Football;name=B,age=35,sport=Athletics"); model->setProperty("xml",xml); QTRY_COMPARE(model->rowCount(), 2); @@ -820,11 +820,11 @@ void tst_qquickxmllistmodel::threading() QQmlComponent component(&engine, testFileUrl("roleKeys.qml")); QAbstractItemModel *m1 = qobject_cast(component.create()); - QVERIFY(m1 != 0); + QVERIFY(m1 != 0); QAbstractItemModel *m2 = qobject_cast(component.create()); - QVERIFY(m2 != 0); + QVERIFY(m2 != 0); QAbstractItemModel *m3 = qobject_cast(component.create()); - QVERIFY(m3 != 0); + QVERIFY(m3 != 0); for (int dataCount=0; dataCountdisconnectFromHost(); } } diff --git a/tests/benchmarks/qml/binding/data/localproperty.txt b/tests/benchmarks/qml/binding/data/localproperty.txt index c7ca0efdb4..d1b1f4386a 100644 --- a/tests/benchmarks/qml/binding/data/localproperty.txt +++ b/tests/benchmarks/qml/binding/data/localproperty.txt @@ -1,5 +1,5 @@ import Test 1.0 -MyQmlObject { +MyQmlObject { result: ### } diff --git a/tests/benchmarks/qml/javascript/testtypes.h b/tests/benchmarks/qml/javascript/testtypes.h index 99781fc797..05b1c7ef9c 100644 --- a/tests/benchmarks/qml/javascript/testtypes.h +++ b/tests/benchmarks/qml/javascript/testtypes.h @@ -44,7 +44,7 @@ #include -class TestObject : public QObject +class TestObject : public QObject { Q_OBJECT Q_PROPERTY(int intValue READ intValue); @@ -58,7 +58,7 @@ public: private: QString m_string; -}; +}; void registerTypes(); diff --git a/tests/benchmarks/qml/painting/paintbenchmark.cpp b/tests/benchmarks/qml/painting/paintbenchmark.cpp index 1fc7813c04..672bed4c10 100644 --- a/tests/benchmarks/qml/painting/paintbenchmark.cpp +++ b/tests/benchmarks/qml/painting/paintbenchmark.cpp @@ -351,8 +351,8 @@ public: last = elapsed; } QPainter p(this); - p.fillRect(rect(), Qt::white); - p.setPen(Qt::black); + p.fillRect(rect(), Qt::white); + p.setPen(Qt::black); QTime drawTimer; drawTimer.start(); testFunc(p); diff --git a/tests/benchmarks/qml/qmltime/qmltime.cpp b/tests/benchmarks/qml/qmltime/qmltime.cpp index bae0b51824..d6b73ed5f4 100644 --- a/tests/benchmarks/qml/qmltime/qmltime.cpp +++ b/tests/benchmarks/qml/qmltime/qmltime.cpp @@ -111,10 +111,10 @@ void Timer::run(uint iterations) QObject *o = m_component->create(&context); QGraphicsObject *go = qobject_cast(o); - if (m_willparent && go) + if (m_willparent && go) go->setParentItem(&m_item); delete o; - + runTest(&context, iterations); } @@ -135,7 +135,7 @@ void Timer::runTest(QQmlContext *context, uint iterations) for (uint ii = 0; ii < iterations; ++ii) { QObject *o = m_component->create(context); QGraphicsObject *go = qobject_cast(o); - if (m_willparent && go) + if (m_willparent && go) go->setParentItem(&m_item); delete o; } diff --git a/tests/benchmarks/qml/qmltime/qmltime.pro b/tests/benchmarks/qml/qmltime/qmltime.pro index c151b8d10f..4e3e9471a4 100644 --- a/tests/benchmarks/qml/qmltime/qmltime.pro +++ b/tests/benchmarks/qml/qmltime/qmltime.pro @@ -4,6 +4,6 @@ TARGET = qmltime QT += qml widgets testlib macx:CONFIG -= app_bundle -SOURCES += qmltime.cpp +SOURCES += qmltime.cpp DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/benchmarks/qml/qqmlmetaproperty/qqmlmetaproperty.pro b/tests/benchmarks/qml/qqmlmetaproperty/qqmlmetaproperty.pro index e71f16aecb..ce66e1e51f 100644 --- a/tests/benchmarks/qml/qqmlmetaproperty/qqmlmetaproperty.pro +++ b/tests/benchmarks/qml/qqmlmetaproperty/qqmlmetaproperty.pro @@ -4,7 +4,7 @@ TARGET = tst_qqmlmetaproperty QT += qml testlib macx:CONFIG -= app_bundle -SOURCES += tst_qqmlmetaproperty.cpp +SOURCES += tst_qqmlmetaproperty.cpp # Define SRCDIR equal to test's source directory DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/benchmarks/qml/script/data/slot_complex.qml b/tests/benchmarks/qml/script/data/slot_complex.qml index 4e467da901..ffc9e2f98f 100644 --- a/tests/benchmarks/qml/script/data/slot_complex.qml +++ b/tests/benchmarks/qml/script/data/slot_complex.qml @@ -47,7 +47,7 @@ TestObject { var a = 1; while (n > 0) { a = a * n; - n--; + n--; } return a; } diff --git a/tests/manual/v4/test262.py b/tests/manual/v4/test262.py index dbc6049a1a..acd467ea23 100755 --- a/tests/manual/v4/test262.py +++ b/tests/manual/v4/test262.py @@ -162,9 +162,9 @@ def BuildOptions(): help="Print summary after running tests") result.add_option("--full-summary", default=False, action="store_true", help="Print summary and test output after running tests") - result.add_option("--strict_only", default=False, action="store_true", + result.add_option("--strict_only", default=False, action="store_true", help="Test only strict mode") - result.add_option("--non_strict_only", default=False, action="store_true", + result.add_option("--non_strict_only", default=False, action="store_true", help="Test only non-strict mode") result.add_option("--parallel", default=False, action="store_true", help="Run tests in parallel") @@ -174,7 +174,7 @@ def BuildOptions(): help="Update test expectations fail when a test passes that was expected to fail") # TODO: Once enough tests are made strict compat, change the default # to "both" - result.add_option("--unmarked_default", default="non_strict", + result.add_option("--unmarked_default", default="non_strict", help="default mode for tests of unspecified strictness") return result @@ -293,7 +293,7 @@ class TestCase(object): del testRecord["header"] del testRecord["commentary"] self.testRecord = testRecord; - + def GetName(self): return path.join(*self.name) @@ -570,8 +570,8 @@ def Main(): parser = BuildOptions() (options, args) = parser.parse_args() ValidateOptions(options) - test_suite = TestSuite(options.tests, - options.strict_only, + test_suite = TestSuite(options.tests, + options.strict_only, options.non_strict_only, options.unmarked_default, options.with_test_expectations) diff --git a/tests/manual/v4/v8-bench.js b/tests/manual/v4/v8-bench.js index baa6274136..41a04fa29a 100644 --- a/tests/manual/v4/v8-bench.js +++ b/tests/manual/v4/v8-bench.js @@ -4339,7 +4339,7 @@ function initRuntime() { tmp = tmp.replace(/\n/g, "
    "); tmp = tmp.replace(/\t/g, "    "); return tmp; - + } document.write("
    "); @@ -4865,7 +4865,7 @@ sc_Pair.prototype.sc_toWriteOrDisplayString = function(writeOrDisplay) { } else // current.cdr == null break; } - + res += ")"; return res; @@ -5205,7 +5205,7 @@ function sc_reverseAppendBang(l1, l2) { } return res; } - + function sc_dualAppend(l1, l2) { if (l1 === null) return l2; if (l2 === null) return l1; @@ -6639,7 +6639,7 @@ sc_Tokenizer.prototype.nextToken = function() { if (c === "(") return new sc_Token(14/*VECTOR_BEGIN*/); - + if (c === "\\") { // character var tmp = "" while (!isWhitespaceOrEOF(port.peekChar())) @@ -6684,7 +6684,7 @@ sc_Tokenizer.prototype.nextToken = function() { } else return new sc_Token(13/*ERROR*/, "bad #-pattern5"); } - + }; skipWhitespaceAndComments(); @@ -6763,7 +6763,7 @@ sc_Reader.prototype.read = function() { + " " + par.type; else return sc_reverseAppendBang(res, cdr); - + default: res = sc_cons(this.read(), res); @@ -6782,7 +6782,7 @@ sc_Reader.prototype.read = function() { case 2/*CLOSE_PAR*/: tokenizer.readToken(); return a; - + default: a.push(this.read()); } @@ -6794,7 +6794,7 @@ sc_Reader.prototype.read = function() { this.backref[nb] = tmp; return tmp; }; - + function readReference(nb) { if (nb in this.backref) return this.backref[nb]; diff --git a/tools/qmlprofiler/qpacketprotocol.cpp b/tools/qmlprofiler/qpacketprotocol.cpp index e0fe08740d..b8017fad60 100644 --- a/tools/qmlprofiler/qpacketprotocol.cpp +++ b/tools/qmlprofiler/qpacketprotocol.cpp @@ -235,7 +235,7 @@ QPacketProtocol::~QPacketProtocol() /*! Returns the maximum packet size allowed. By default this is 2,147,483,647 bytes. - + If a packet claiming to be larger than the maximum packet size is received, the QPacketProtocol::invalidPacket() signal is emitted. diff --git a/tools/qmlprofiler/qqmldebugclient.cpp b/tools/qmlprofiler/qqmldebugclient.cpp index 3ba8b334ff..334fc7297f 100644 --- a/tools/qmlprofiler/qqmldebugclient.cpp +++ b/tools/qmlprofiler/qqmldebugclient.cpp @@ -335,7 +335,7 @@ QQmlDebugClientPrivate::QQmlDebugClientPrivate() { } -QQmlDebugClient::QQmlDebugClient(const QString &name, +QQmlDebugClient::QQmlDebugClient(const QString &name, QQmlDebugConnection *parent) : QObject(parent), d(new QQmlDebugClientPrivate) -- cgit v1.2.3