2 #############################################################################
4 ## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
5 ## Contact: http://www.qt-project.org/
7 ## This file is part of the QtQml module of the Qt Toolkit.
9 ## $QT_BEGIN_LICENSE:LGPL$
10 ## GNU Lesser General Public License Usage
11 ## This file may be used under the terms of the GNU Lesser General Public
12 ## License version 2.1 as published by the Free Software Foundation and
13 ## appearing in the file LICENSE.LGPL included in the packaging of this
14 ## file. Please review the following information to ensure the GNU Lesser
15 ## General Public License version 2.1 requirements will be met:
16 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ## In addition, as a special exception, Nokia gives you certain additional
19 ## rights. These rights are described in the Nokia Qt LGPL Exception
20 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ## GNU General Public License Usage
23 ## Alternatively, this file may be used under the terms of the GNU General
24 ## Public License version 3.0 as published by the Free Software Foundation
25 ## and appearing in the file LICENSE.GPL included in the packaging of this
26 ## file. Please review the following information to ensure the GNU General
27 ## Public License version 3.0 requirements will be met:
28 ## http://www.gnu.org/copyleft/gpl.html.
31 ## Alternatively, this file may be used in accordance with the terms and
32 ## conditions contained in a signed written agreement between you and Nokia.
41 #############################################################################
43 # Replaces deprecated QDeclarative symbol names with their replacements
45 # Changes instances in all regular files under the specified directory;
46 # use on a clean source tree!
50 echo " Usage: $0 <directory>"
57 QDeclarativeAbstractBinding
58 QDeclarativeAbstractBoundSignal
59 QDeclarativeAbstractExpression
60 QDeclarativeAccessible
62 QDeclarativeAccessorProperties
63 QDeclarativeAnimationTimer
64 QDeclarativeAssociationList
65 QDeclarativeAttachedPropertiesFunc
67 QDeclarativeBindingPrivate
68 QDeclarativeBindingProfiler
69 QDeclarativeBoundSignal
70 QDeclarativeBoundSignalParameters
71 QDeclarativeBoundSignalProxy
72 QDeclarativeBuiltinFunctions
74 QDeclarativeColorValueType
75 QDeclarativeCompiledData
77 QDeclarativeCompilerTypes
78 QDeclarativeCompilingProfiler
80 QDeclarativeComponentAttached
81 QDeclarativeComponentExtension
82 QDeclarativeComponentPrivate
83 QDeclarativeComponent_setQmlParent
84 QDeclarativeCompositeTypeData
85 QDeclarativeConnectionsParser
87 QDeclarativeContextData
88 QDeclarativeContextPrivate
89 QDeclarativeCustomParser
90 QDeclarativeCustomParserNode
91 QDeclarativeCustomParserNodePrivate
92 QDeclarativeCustomParserProperty
93 QDeclarativeCustomParserPropertyPrivate
96 QDeclarativeDataExtended
97 QDeclarativeDataLoader
98 QDeclarativeDataLoaderNetworkReplyProxy
99 QDeclarativeDataLoaderThread
100 QDeclarativeDateExtension
103 QDeclarativeDebugClient
104 QDeclarativeDebugClientPrivate
105 QDeclarativeDebugConnection
106 QDeclarativeDebugConnectionPrivate
107 QDeclarativeDebugContextReference
108 QDeclarativeDebugData
109 QDeclarativeDebugEngineReference
110 QDeclarativeDebugEnginesQuery
111 QDeclarativeDebugExpressionQuery
112 QDeclarativeDebugFileReference
114 QDeclarativeDebuggingEnabler
115 QDeclarativeDebugHelper
116 QDeclarativeDebugObjectExpressionWatch
117 QDeclarativeDebugObjectQuery
118 QDeclarativeDebugObjectReference
119 QDeclarativeDebugPropertyReference
120 QDeclarativeDebugPropertyWatch
121 QDeclarativeDebugQuery
122 QDeclarativeDebugRootContextQuery
123 QDeclarativeDebugServer
124 QDeclarativeDebugServerConnection
125 QDeclarativeDebugServerPrivate
126 QDeclarativeDebugServerThread
127 QDeclarativeDebugService
128 QDeclarativeDebugServicePrivate
129 QDeclarativeDebugStatesDelegate
130 QDeclarativeDebugTrace
131 QDeclarativeDebugWatch
132 QDeclarativeDelayedError
133 QDeclarativeDirComponents
134 QDeclarativeDirParser
135 QDeclarativeDirScripts
136 QDeclarativeDOMNodeResource
137 QDeclarativeEasingValueType
140 QDeclarativeEngineDebug
141 QDeclarativeEngineDebugClient
142 QDeclarativeEngineDebugService
143 QDeclarativeEngineDebugPrivate
144 QDeclarativeEnginePrivate
146 QDeclarativeErrorPrivate
147 QDeclarativeExpression
148 QDeclarativeExpressionPrivate
149 QDeclarativeExtensionInterface
150 QDeclarativeExtensionPlugin
151 QDeclarativeFontValueType
152 QDeclarativeGraphics_DerivedObject
154 QDeclarativeGuardedContextData
155 QDeclarativeGuardImpl
156 QDeclarativeHandlingSignalProfiler
157 QDeclarativeImportDatabase
158 QDeclarativeImportedNamespace
160 QDeclarativeImportsPrivate
161 QDeclarativeIncubationController
162 QDeclarativeIncubator
163 QDeclarativeIncubatorController
164 QDeclarativeIncubatorPrivate
165 QDeclarativeIncubators
167 QDeclarativeInfoPrivate
168 QDeclarativeInspector
169 QDeclarativeInspectorInterface
170 QDeclarativeInspectorService
171 QDeclarativeInstruction
172 QDeclarativeInstructionData
173 QDeclarativeInstructionMeta
174 QDeclarativeIntegerCache
175 QDeclarativeJavaScriptExpression
176 QDeclarativeJavaScriptExpressionGuard
178 QDeclarativeJSGrammar
179 QDeclarativeListProperty
180 QDeclarativeListReference
181 QDeclarativeListReferencePrivate
183 QDeclarativeLocalStoragePlugin
184 QDeclarativeMatrix4x4ValueType
186 QDeclarativeMetaTypeData
187 QDeclarativeNetworkAccessManagerFactory
189 QDeclarativeNotifierEndpoint
190 QDeclarativeNullableValue
191 QDeclarativeNumberExtension
192 QDeclarativeObjectCreatingProfiler
193 QDeclarativeObjectData
194 QDeclarativeObjectProperty
195 QDeclarativeObserverMode
196 QDeclarativeOpenMetaObject
197 QDeclarativeOpenMetaObjectPrivate
198 QDeclarativeOpenMetaObjectType
199 QDeclarativeOpenMetaObjectTypePrivate
201 QDeclarativeParserStatus
202 QDeclarativePointFValueType
203 QDeclarativePointValueType
206 QDeclarativeProfilerData
207 QDeclarativeProfilerService
208 QDeclarativeProperties
210 QDeclarativePropertyCache
211 QDeclarativePropertyCacheMethodArguments
212 QDeclarativePropertyData
213 QDeclarativePropertyMap
214 QDeclarativePropertyMapMetaObject
215 QDeclarativePropertyMapPrivate
216 QDeclarativePropertyPrivate
217 QDeclarativePropertyRawData
218 QDeclarativePropertyValueInterceptor
219 QDeclarativePropertyValueSource
220 QDeclarativeProxyMetaObject
221 QDeclarativeQmldirData
222 QDeclarativeQtQuick1Module
223 QDeclarativeQtQuick2Module
224 QDeclarativeQtQuick2DebugStatesDelegate
225 QDeclarativeQuaternionValueType
226 QDeclarativeRectFValueType
227 QDeclarativeRectValueType
229 QDeclarativeRefPointer
230 QDeclarativeRegisterType
233 QDeclarativeScriptBlob
234 QDeclarativeScriptData
235 QDeclarativeScriptPrivate
236 QDeclarativeScriptString
237 QDeclarativeScriptStringPrivate
238 QDeclarativeSizeFValueType
239 QDeclarativeSizeValueType
240 QDeclarativeSqlDatabaseData
241 QDeclarativeStringConverters
243 QDeclarativeThreadPrivate
248 QDeclarativeTypeLoader
249 QDeclarativeTypeModule
250 QDeclarativeTypeModulePrivate
251 QDeclarativeTypeModuleVersion
252 QDeclarativeTypeNameCache
253 QDeclarativeTypeNotAvailable
254 QDeclarativeTypePrivate
255 QDeclarativeTypesExtensionInterface
256 QDeclarativeV8Function
258 QDeclarativeValueType
259 QDeclarativeValueTypeProxyBinding
260 QDeclarativeValueTypeFactory
261 QDeclarativeVector2DValueType
262 QDeclarativeVector3DValueType
263 QDeclarativeVector4DValueType
266 QDeclarativeVMEMetaData
267 QDeclarativeVMEMetaObject
268 QDeclarativeVMEMetaObjectEndpoint
269 QDeclarativeVMEVariant
272 QDeclarativeWatchProxy
273 QDeclarativeXMLHttpRequest
274 QDeclarativeXMLHttpRequestData
275 QDeclarative_isFileCaseCorrect
276 QDeclarative_setParent_noEvent
278 QQuickPropertyCacheMethodArguments
283 QDeclarativeAbstractAnimation
284 QDeclarativeAbstractAnimationAction
285 QDeclarativeAbstractAnimationPrivate
287 QDeclarativeActionEvent
289 QDeclarativeAnimationController
290 QDeclarativeAnimationControllerPrivate
291 QDeclarativeAnimationGroup
292 QDeclarativeAnimationGroupPrivate
293 QDeclarativeAnimationPropertyUpdater
294 QDeclarativeApplication
295 QDeclarativeApplicationPrivate
297 QDeclarativeBehaviorPrivate
299 QDeclarativeBindPrivate
300 QDeclarativeBulkValueAnimator
301 QDeclarativeBulkValueUpdater
302 QDeclarativeCachedBezier
303 QDeclarativeChangeSet
304 QDeclarativeColorAnimation
305 QDeclarativeConnections
306 QDeclarativeConnectionsPrivate
308 QDeclarativeDefaultTextureFactory
310 QDeclarativeFocusPanel
311 QDeclarativeFolderListModel
312 QDeclarativeFolderListModelPrivate
313 QDeclarativeFontLoader
314 QDeclarativeFontLoaderPrivate
315 QDeclarativeFontObject
316 QDeclarativeGestureArea
317 QDeclarativeGestureAreaParser
318 QDeclarativeGestureAreaPrivate
320 QDeclarativeImageProvider
321 QDeclarativeImageProviderPrivate
323 QDeclarativeItemAccessor
324 QDeclarativeItemChangeListener
325 QDeclarativeItemKeyFilter
326 QDeclarativeItemPrivate
327 QDeclarativeListAccessor
328 QDeclarativeListCompositor
329 QDeclarativeListElement
330 QDeclarativeListModel
331 QDeclarativeListModelParser
332 QDeclarativeListModelWorkerAgent
334 QDeclarativeNumberAnimation
336 QDeclarativePackageAttached
337 QDeclarativePackagePrivate
338 QDeclarativeParallelAnimation
340 QDeclarativeParticleMotion
341 QDeclarativeParticleMotionGravity
342 QDeclarativeParticleMotionLinear
343 QDeclarativeParticleMotionWander
344 QDeclarativeParticles
345 QDeclarativeParticlesPainter
346 QDeclarativeParticlesPrivate
349 QDeclarativePathAttribute
350 QDeclarativePathCatmullRomCurve
351 QDeclarativePathCubic
352 QDeclarativePathCurve
354 QDeclarativePathElement
355 QDeclarativePathInterpolator
357 QDeclarativePathPercent
358 QDeclarativePathPrivate
361 QDeclarativePauseAnimation
362 QDeclarativePauseAnimationPrivate
364 QDeclarativePixmapData
365 QDeclarativePixmapKey
366 QDeclarativePixmapNull
367 QDeclarativePixmapReader
368 QDeclarativePixmapReaderThreadObject
369 QDeclarativePixmapReply
370 QDeclarativePixmapStore
371 QDeclarativePropertyAction
372 QDeclarativePropertyActionPrivate
373 QDeclarativePropertyAnimation
374 QDeclarativePropertyAnimationPrivate
375 QDeclarativePropertyChanges
376 QDeclarativePropertyChangesParser
377 QDeclarativePropertyChangesPrivate
378 QDeclarativeReplaceSignalHandler
379 QDeclarativeRevertAction
380 QDeclarativeRotationAnimation
381 QDeclarativeRotationAnimationPrivate
382 QDeclarativeSequentialAnimation
383 QDeclarativeScriptAction
384 QDeclarativeScriptActionPrivate
385 QDeclarativeSetPropertyAnimationAction
386 QDeclarativeSimpleAction
387 QDeclarativeSmoothedAnimation
388 QDeclarativeSmoothedAnimationPrivate
389 QDeclarativeSpringAnimation
390 QDeclarativeSpringAnimationPrivate
392 QDeclarativeStateActions
393 QDeclarativeStateChange
394 QDeclarativeStateChangeScript
395 QDeclarativeStateChangeScriptPrivate
396 QDeclarativeStateGroup
397 QDeclarativeStateGroupPrivate
398 QDeclarativeStateOperation
399 QDeclarativeStateOperationPrivate
400 QDeclarativeStatePrivate
401 QDeclarativeStyledText
402 QDeclarativeStyledTextImgTag
403 QDeclarativeStyledTextPrivate
404 QDeclarativeSystemPalette
405 QDeclarativeSystemPalettePrivate
406 QDeclarativeTextureFactory
408 QDeclarativeTimeLineCallback
409 QDeclarativeTimeLineObject
410 QDeclarativeTimeLinePrivate
411 QDeclarativeTimeLineValue
412 QDeclarativeTimeLineValueProxy
413 QDeclarativeTimeLineValues
415 QDeclarativeTimerPrivate
416 QDeclarativeTransition
417 QDeclarativeTransitionInstance
418 QDeclarativeTransitionManager
419 QDeclarativeTransitionManagerPrivate
420 QDeclarativeTransitionPrivate
421 QDeclarativeUtilModule
422 QDeclarativeVector3dAnimation
424 QDeclarativeViewInspector
425 QDeclarativeViewInspectorPrivate
426 QDeclarativeViewPrivate
428 QDeclarativeXmlListModel
429 QDeclarativeXmlListModelPrivate
430 QDeclarativeXmlListModelRole
431 QDeclarativeXmlListRange
432 QDeclarativeXmlQueryEngine
433 QDeclarativeXmlQueryResult
434 QDeclarativeXmlQueryThreadObject
435 QDeclarativeXmlRoleList
436 QDeclarativeSvgParser
437 QDeclarativeWorkerScript
438 QDeclarativeWorkerScriptEngine
439 QDeclarativeWorkerScriptEnginePrivate
443 qdeclarativeaccessible.h
444 qdeclarativeaccessors_p.h
445 qdeclarativebinding_p.h
446 qdeclarativebinding_p_p.h
447 qdeclarativeboundsignal_p.h
448 qdeclarativebuiltinfunctions_p.h
449 qdeclarativecleanup_p.h
450 qdeclarativecompiler_p.h
451 qdeclarativecomponentattached_p.h
452 qdeclarativecomponent.h
453 qdeclarativecomponent_p.h
454 qdeclarativecontext.h
455 qdeclarativecontext_p.h
456 qdeclarativecustomparser_p.h
457 qdeclarativecustomparser_p_p.h
459 qdeclarativedebugclient_p.h
461 qdeclarativedebughelper_p.h
462 qdeclarativedebugserverconnection_p.h
463 qdeclarativedebugserver_p.h
464 qdeclarativedebugservice_p.h
465 qdeclarativedebugservice_p_p.h
466 qdeclarativedebugstatesdelegate_p.h
467 qdeclarativedebugtrace_p.h
468 qdeclarativedirparser_p.h
469 qdeclarativeenginedebug_p.h
470 qdeclarativeenginedebugservice_p.h
472 qdeclarativeengine_p.h
474 qdeclarativeexpression.h
475 qdeclarativeexpression_p.h
476 qdeclarativeextensioninterface.h
477 qdeclarativeextensionplugin.h
478 qdeclarativeglobal_p.h
479 qdeclarativeguard_p.h
481 qdeclarativeimageprovider.h
482 qdeclarativeimport_p.h
483 qdeclarativeincubator.h
484 qdeclarativeincubator_p.h
486 qdeclarativeinspectorinterface_p.h
487 qdeclarativeinspectorprotocol.h
488 qdeclarativeinspectorservice_p.h
489 qdeclarativeinstruction_p.h
490 qdeclarativeintegercache_p.h
491 qdeclarativejsastfwd_p.h
492 qdeclarativejsast_p.h
493 qdeclarativejsastvisitor_p.h
494 qdeclarativejsengine_p.h
495 qdeclarativejsglobal_p.h
496 qdeclarativejsgrammar_p.h
497 qdeclarativejskeywords_p.h
498 qdeclarativejslexer_p.h
499 qdeclarativejsmemorypool_p.h
500 qdeclarativejsparser_p.h
503 qdeclarativelocale_p.h
504 qdeclarativemetatype_p.h
505 qdeclarativenetworkaccessmanagerfactory.h
506 qdeclarativenotifier_p.h
507 qdeclarativenullablevalue_p_p.h
508 qdeclarativeopenmetaobject_p.h
509 qdeclarativeparserstatus.h
511 qdeclarativeprivate.h
512 qdeclarativeprofilerservice_p.h
513 qdeclarativepropertycache_p.h
514 qdeclarativeproperty.h
515 qdeclarativepropertymap.h
516 qdeclarativeproperty_p.h
517 qdeclarativepropertyvalueinterceptor_p.h
518 qdeclarativepropertyvaluesource.h
519 qdeclarativeproxymetaobject_p.h
520 qdeclarativerefcount_p.h
521 qdeclarativerewrite_p.h
522 qdeclarativescript_p.h
523 qdeclarativescriptstring.h
524 qdeclarativescriptstring_p.h
525 qdeclarativesqldatabase_p.h
526 qdeclarativestringconverters_p.h
527 qdeclarativethread_p.h
528 qdeclarativetrace_p.h
529 qdeclarativetypeloader_p.h
530 qdeclarativetypenamecache_p.h
531 qdeclarativetypenotavailable_p.h
532 qdeclarativevaluetype_p.h
533 qdeclarativevmemetaobject_p.h
535 qdeclarativewatcher_p.h
536 qdeclarativexmlhttprequest_p.h
537 qdeclarativexmllistmodel_p.h
540 QUICK_INCLUDE_FILES="\
541 qdeclarativeanimation_p.h
542 qdeclarativeanimation_p_p.h
543 qdeclarativeanimationcontroller_p.h
544 qdeclarativeapplication_p.h
545 qdeclarativebehavior_p.h
547 qdeclarativechangeset_p.h
548 qdeclarativeconnections_p.h
549 qdeclarativefolderlistmodel.h
550 qdeclarativefontloader_p.h
551 qdeclarativelistaccessor_p.h
552 qdeclarativelistcompositor_p.h
553 qdeclarativelistmodel_p.h
554 qdeclarativelistmodel_p_p.h
555 qdeclarativelistmodelworkeragent_p.h
556 qdeclarativepackage_p.h
557 qdeclarativepathinterpolator_p.h
559 qdeclarativepath_p_p.h
560 qdeclarativepixmapcache_p.h
561 qdeclarativepropertychanges_p.h
562 qdeclarativesmoothedanimation_p.h
563 qdeclarativesmoothedanimation_p_p.h
564 qdeclarativespringanimation_p.h
565 qdeclarativestategroup_p.h
566 qdeclarativestateoperations_p.h
567 qdeclarativestate_p.h
568 qdeclarativestate_p_p.h
569 qdeclarativestyledtext_p.h
570 qdeclarativesvgparser_p.h
571 qdeclarativesystempalette_p.h
572 qdeclarativetimeline_p_p.h
573 qdeclarativetimer_p.h
574 qdeclarativetransitionmanager_p_p.h
575 qdeclarativetransition_p.h
576 qdeclarativeutilmodule_p.h
577 qdeclarativeworkerscript_p.h
584 echo "Replacing $SYMBOL with $REPLACEMENT:"
586 CONTAINERS=$(find "$MODIFY_DIR" ! -path ".git" -type f | xargs grep -l -I "$SYMBOL")
587 for CONTAINER in $CONTAINERS
590 TMP_FILE="$CONTAINER.tmp"
592 sed 's|'"$SYMBOL"'|'"$REPLACEMENT"'|g' <"$CONTAINER" >"$TMP_FILE"
593 mv "$TMP_FILE" "$CONTAINER"
598 for QML_SYMBOL in $QML_SYMBOLS
600 QML_REPLACEMENT="QQml${QML_SYMBOL#QDeclarative}"
601 replaceMatch "\bQtDeclarative/$QML_SYMBOL\b" "QtQml/$QML_REPLACEMENT"
602 replaceMatch "\b$QML_SYMBOL\b" "$QML_REPLACEMENT"
605 for QUICK_SYMBOL in $QUICK_SYMBOLS
607 QUICK_REPLACEMENT="QQuick${QUICK_SYMBOL#QDeclarative}"
608 replaceMatch "\bQtDeclarative/$QUICK_SYMBOL\b" "QtQuick/$QUICK_REPLACEMENT"
609 replaceMatch "\b$QUICK_SYMBOL\b" "$QUICK_REPLACEMENT"
612 for QML_INCLUDE_FILE in $QML_INCLUDE_FILES
614 QML_INCLUDE_REPLACEMENT="qqml${QML_INCLUDE_FILE#qdeclarative}"
615 replaceMatch "\b$QML_INCLUDE_FILE\b" "$QML_INCLUDE_REPLACEMENT"
618 for QUICK_INCLUDE_FILE in $QUICK_INCLUDE_FILES
620 QUICK_INCLUDE_REPLACEMENT="qquick${QUICK_INCLUDE_FILE#qdeclarative}"
621 replaceMatch "\b$QUICK_INCLUDE_FILE\b" "$QUICK_INCLUDE_REPLACEMENT"
624 # Various one-off replacements
625 replaceMatch "\bQtDeclarative\b" "QtQml"
626 replaceMatch "\basQDeclarativeContext\b" "asQQmlContext"
627 replaceMatch "\basQDeclarativeContextPrivate\b" "asQQmlContextPrivate"
629 # Replace any references to the 'declarative' module with 'qml'
630 echo "Replacing module declarative with qml:"
631 CONTAINERS=$(find "$MODIFY_DIR" \( -name \*\.pro -o -name \*\.pri \) | xargs grep -l -I "\bdeclarative\b")
632 for CONTAINER in $CONTAINERS
635 TMP_FILE="$CONTAINER.tmp"
637 sed 's|\bdeclarative\b|qml|g' <"$CONTAINER" >"$TMP_FILE"
638 mv "$TMP_FILE" "$CONTAINER"
642 echo "Replacements complete"