Merge master into api_changes
[profile/ivi/qtdeclarative.git] / bin / rename-qtdeclarative-symbols.sh
1 #!/bin/sh
2 #############################################################################
3 ##
4 ## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
5 ## Contact: http://www.qt-project.org/
6 ##
7 ## This file is part of the QtQml module of the Qt Toolkit.
8 ##
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.
17 ##
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.
21 ##
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.
29 ##
30 ## Other Usage
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.
33 ##
34 ##
35 ##
36 ##
37 ##
38 ##
39 ## $QT_END_LICENSE$
40 ##
41 #############################################################################
42
43 # Replaces deprecated QDeclarative symbol names with their replacements
44 #
45 # Changes instances in all regular files under the specified directory;
46 # use on a clean source tree!
47
48 if [ "$#" -lt "1" ]
49 then
50     echo "    Usage: $0 <directory>"
51     exit 1;
52 fi
53
54 MODIFY_DIR="$1"
55
56 QML_SYMBOLS="\
57     QDeclarativeAbstractBinding
58     QDeclarativeAbstractBoundSignal
59     QDeclarativeAbstractExpression
60     QDeclarativeAccessible
61     QDeclarativeAccessors
62     QDeclarativeAccessorProperties
63     QDeclarativeAnimationTimer
64     QDeclarativeAssociationList
65     QDeclarativeAttachedPropertiesFunc
66     QDeclarativeBinding
67     QDeclarativeBindingPrivate
68     QDeclarativeBindingProfiler
69     QDeclarativeBoundSignal
70     QDeclarativeBoundSignalParameters
71     QDeclarativeBoundSignalProxy
72     QDeclarativeBuiltinFunctions
73     QDeclarativeCleanup
74     QDeclarativeColorValueType
75     QDeclarativeCompiledData
76     QDeclarativeCompiler
77     QDeclarativeCompilerTypes
78     QDeclarativeCompilingProfiler
79     QDeclarativeComponent
80     QDeclarativeComponentAttached
81     QDeclarativeComponentExtension
82     QDeclarativeComponentPrivate
83     QDeclarativeComponent_setQmlParent
84     QDeclarativeCompositeTypeData
85     QDeclarativeConnectionsParser
86     QDeclarativeContext
87     QDeclarativeContextData
88     QDeclarativeContextPrivate
89     QDeclarativeCustomParser
90     QDeclarativeCustomParserNode
91     QDeclarativeCustomParserNodePrivate
92     QDeclarativeCustomParserProperty
93     QDeclarativeCustomParserPropertyPrivate
94     QDeclarativeData
95     QDeclarativeDataBlob
96     QDeclarativeDataExtended
97     QDeclarativeDataLoader
98     QDeclarativeDataLoaderNetworkReplyProxy
99     QDeclarativeDataLoaderThread
100     QDeclarativeDateExtension
101     QDeclarativeDataTest
102     QDeclarativeDebug
103     QDeclarativeDebugClient
104     QDeclarativeDebugClientPrivate
105     QDeclarativeDebugConnection
106     QDeclarativeDebugConnectionPrivate
107     QDeclarativeDebugContextReference
108     QDeclarativeDebugData
109     QDeclarativeDebugEngineReference
110     QDeclarativeDebugEnginesQuery
111     QDeclarativeDebugExpressionQuery
112     QDeclarativeDebugFileReference
113     QDeclarativeDebugger
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
138     QDeclarativeElement
139     QDeclarativeEngine
140     QDeclarativeEngineDebug
141     QDeclarativeEngineDebugClient
142     QDeclarativeEngineDebugService
143     QDeclarativeEngineDebugPrivate
144     QDeclarativeEnginePrivate
145     QDeclarativeError
146     QDeclarativeErrorPrivate
147     QDeclarativeExpression
148     QDeclarativeExpressionPrivate
149     QDeclarativeExtensionInterface
150     QDeclarativeExtensionPlugin
151     QDeclarativeFontValueType
152     QDeclarativeGraphics_DerivedObject
153     QDeclarativeGuard
154     QDeclarativeGuardedContextData
155     QDeclarativeGuardImpl
156     QDeclarativeHandlingSignalProfiler
157     QDeclarativeImportDatabase
158     QDeclarativeImportedNamespace
159     QDeclarativeImports
160     QDeclarativeImportsPrivate
161     QDeclarativeIncubationController
162     QDeclarativeIncubator
163     QDeclarativeIncubatorController
164     QDeclarativeIncubatorPrivate
165     QDeclarativeIncubators
166     QDeclarativeInfo
167     QDeclarativeInfoPrivate
168     QDeclarativeInspector
169     QDeclarativeInspectorInterface
170     QDeclarativeInspectorService
171     QDeclarativeInstruction
172     QDeclarativeInstructionData
173     QDeclarativeInstructionMeta
174     QDeclarativeIntegerCache
175     QDeclarativeJavaScriptExpression
176     QDeclarativeJavaScriptExpressionGuard
177     QDeclarativeJS
178     QDeclarativeJSGrammar
179     QDeclarativeListProperty
180     QDeclarativeListReference
181     QDeclarativeListReferencePrivate
182     QDeclarativeLocale
183     QDeclarativeLocalStoragePlugin
184     QDeclarativeMatrix4x4ValueType
185     QDeclarativeMetaType
186     QDeclarativeMetaTypeData
187     QDeclarativeNetworkAccessManagerFactory
188     QDeclarativeNotifier
189     QDeclarativeNotifierEndpoint
190     QDeclarativeNullableValue
191     QDeclarativeNumberExtension
192     QDeclarativeObjectCreatingProfiler
193     QDeclarativeObjectData
194     QDeclarativeObjectProperty
195     QDeclarativeObserverMode
196     QDeclarativeOpenMetaObject
197     QDeclarativeOpenMetaObjectPrivate
198     QDeclarativeOpenMetaObjectType
199     QDeclarativeOpenMetaObjectTypePrivate
200     QDeclarativeParser
201     QDeclarativeParserStatus
202     QDeclarativePointFValueType
203     QDeclarativePointValueType
204     QDeclarativePool
205     QDeclarativePrivate
206     QDeclarativeProfilerData
207     QDeclarativeProfilerService
208     QDeclarativeProperties
209     QDeclarativeProperty
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
228     QDeclarativeRefCount
229     QDeclarativeRefPointer
230     QDeclarativeRegisterType
231     QDeclarativeRewrite
232     QDeclarativeScript
233     QDeclarativeScriptBlob
234     QDeclarativeScriptData
235     QDeclarativeScriptPrivate
236     QDeclarativeScriptString
237     QDeclarativeScriptStringPrivate
238     QDeclarativeSizeFValueType
239     QDeclarativeSizeValueType
240     QDeclarativeSqlDatabaseData
241     QDeclarativeStringConverters
242     QDeclarativeThread
243     QDeclarativeThreadPrivate
244     QDeclarativeTrace
245     QDeclarativeType
246     QDeclarativeTypeData
247     QDeclarativeTypeInfo
248     QDeclarativeTypeLoader
249     QDeclarativeTypeModule
250     QDeclarativeTypeModulePrivate
251     QDeclarativeTypeModuleVersion
252     QDeclarativeTypeNameCache
253     QDeclarativeTypeNotAvailable
254     QDeclarativeTypePrivate
255     QDeclarativeTypesExtensionInterface
256     QDeclarativeV8Function
257     QDeclarativeV8Handle
258     QDeclarativeValueType
259     QDeclarativeValueTypeProxyBinding
260     QDeclarativeValueTypeFactory
261     QDeclarativeVector2DValueType
262     QDeclarativeVector3DValueType
263     QDeclarativeVector4DValueType
264     QDeclarativeVME
265     QDeclarativeVMEGuard
266     QDeclarativeVMEMetaData
267     QDeclarativeVMEMetaObject
268     QDeclarativeVMEMetaObjectEndpoint
269     QDeclarativeVMEVariant
270     QDeclarativeVMETypes
271     QDeclarativeWatcher
272     QDeclarativeWatchProxy
273     QDeclarativeXMLHttpRequest
274     QDeclarativeXMLHttpRequestData
275     QDeclarative_isFileCaseCorrect
276     QDeclarative_setParent_noEvent
277     QQuickProperties
278     QQuickPropertyCacheMethodArguments
279     QQuickPropertyData
280 "
281
282 QUICK_SYMBOLS="\
283     QDeclarativeAbstractAnimation
284     QDeclarativeAbstractAnimationAction
285     QDeclarativeAbstractAnimationPrivate
286     QDeclarativeAction
287     QDeclarativeActionEvent
288     QDeclarativeAnchors
289     QDeclarativeAnimationController
290     QDeclarativeAnimationControllerPrivate
291     QDeclarativeAnimationGroup
292     QDeclarativeAnimationGroupPrivate
293     QDeclarativeAnimationPropertyUpdater
294     QDeclarativeApplication
295     QDeclarativeApplicationPrivate
296     QDeclarativeBehavior
297     QDeclarativeBehaviorPrivate
298     QDeclarativeBind
299     QDeclarativeBindPrivate
300     QDeclarativeBulkValueAnimator
301     QDeclarativeBulkValueUpdater
302     QDeclarativeCachedBezier
303     QDeclarativeChangeSet
304     QDeclarativeColorAnimation
305     QDeclarativeConnections
306     QDeclarativeConnectionsPrivate
307     QDeclarativeCurve
308     QDeclarativeDefaultTextureFactory
309     QDeclarativeFlick
310     QDeclarativeFocusPanel
311     QDeclarativeFolderListModel
312     QDeclarativeFolderListModelPrivate
313     QDeclarativeFontLoader
314     QDeclarativeFontLoaderPrivate
315     QDeclarativeFontObject
316     QDeclarativeGestureArea
317     QDeclarativeGestureAreaParser
318     QDeclarativeGestureAreaPrivate
319     QDeclarativeGraphics
320     QDeclarativeImageProvider
321     QDeclarativeImageProviderPrivate
322     QDeclarativeItem
323     QDeclarativeItemAccessor
324     QDeclarativeItemChangeListener
325     QDeclarativeItemKeyFilter
326     QDeclarativeItemPrivate
327     QDeclarativeListAccessor
328     QDeclarativeListCompositor
329     QDeclarativeListElement
330     QDeclarativeListModel
331     QDeclarativeListModelParser
332     QDeclarativeListModelWorkerAgent
333     QDeclarativeListView
334     QDeclarativeNumberAnimation
335     QDeclarativePackage
336     QDeclarativePackageAttached
337     QDeclarativePackagePrivate
338     QDeclarativeParallelAnimation
339     QDeclarativeParticle
340     QDeclarativeParticleMotion
341     QDeclarativeParticleMotionGravity
342     QDeclarativeParticleMotionLinear
343     QDeclarativeParticleMotionWander
344     QDeclarativeParticles
345     QDeclarativeParticlesPainter
346     QDeclarativeParticlesPrivate
347     QDeclarativePath
348     QDeclarativePathArc
349     QDeclarativePathAttribute
350     QDeclarativePathCatmullRomCurve
351     QDeclarativePathCubic
352     QDeclarativePathCurve
353     QDeclarativePathData
354     QDeclarativePathElement
355     QDeclarativePathInterpolator
356     QDeclarativePathLine
357     QDeclarativePathPercent
358     QDeclarativePathPrivate
359     QDeclarativePathQuad
360     QDeclarativePathSvg
361     QDeclarativePauseAnimation
362     QDeclarativePauseAnimationPrivate
363     QDeclarativePixmap
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
391     QDeclarativeState
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
407     QDeclarativeTimeLine
408     QDeclarativeTimeLineCallback
409     QDeclarativeTimeLineObject
410     QDeclarativeTimeLinePrivate
411     QDeclarativeTimeLineValue
412     QDeclarativeTimeLineValueProxy
413     QDeclarativeTimeLineValues
414     QDeclarativeTimer
415     QDeclarativeTimerPrivate
416     QDeclarativeTransition
417     QDeclarativeTransitionInstance
418     QDeclarativeTransitionManager
419     QDeclarativeTransitionManagerPrivate
420     QDeclarativeTransitionPrivate
421     QDeclarativeUtilModule
422     QDeclarativeVector3dAnimation
423     QDeclarativeView
424     QDeclarativeViewInspector
425     QDeclarativeViewInspectorPrivate
426     QDeclarativeViewPrivate
427     QDeclarativeWebView
428     QDeclarativeXmlListModel
429     QDeclarativeXmlListModelPrivate
430     QDeclarativeXmlListModelRole
431     QDeclarativeXmlListRange
432     QDeclarativeXmlQueryEngine
433     QDeclarativeXmlQueryResult
434     QDeclarativeXmlQueryThreadObject
435     QDeclarativeXmlRoleList
436     QDeclarativeSvgParser
437     QDeclarativeWorkerScript
438     QDeclarativeWorkerScriptEngine
439     QDeclarativeWorkerScriptEnginePrivate
440 "
441
442 QML_INCLUDE_FILES="\
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
458     qdeclarativedata_p.h
459     qdeclarativedebugclient_p.h
460     qdeclarativedebug.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
471     qdeclarativeengine.h
472     qdeclarativeengine_p.h
473     qdeclarativeerror.h
474     qdeclarativeexpression.h
475     qdeclarativeexpression_p.h
476     qdeclarativeextensioninterface.h
477     qdeclarativeextensionplugin.h
478     qdeclarativeglobal_p.h
479     qdeclarativeguard_p.h
480     qdeclarative.h
481     qdeclarativeimageprovider.h
482     qdeclarativeimport_p.h
483     qdeclarativeincubator.h
484     qdeclarativeincubator_p.h
485     qdeclarativeinfo.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
501     qdeclarativelist.h
502     qdeclarativelist_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
510     qdeclarativepool_p.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
534     qdeclarativevme_p.h
535     qdeclarativewatcher_p.h
536     qdeclarativexmlhttprequest_p.h
537     qdeclarativexmllistmodel_p.h
538 "
539
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
546     qdeclarativebind_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
558     qdeclarativepath_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
578 "
579
580 replaceMatch()
581 {
582     SYMBOL="$1"
583     REPLACEMENT="$2"
584     echo "Replacing $SYMBOL with $REPLACEMENT:"
585
586     CONTAINERS=$(find "$MODIFY_DIR" ! -path ".git" -type f | xargs grep -l -I "$SYMBOL")
587     for CONTAINER in $CONTAINERS
588     do
589         echo "    $CONTAINER"
590         TMP_FILE="$CONTAINER.tmp"
591
592         sed 's|'"$SYMBOL"'|'"$REPLACEMENT"'|g' <"$CONTAINER" >"$TMP_FILE"
593         mv "$TMP_FILE" "$CONTAINER"
594     done
595     echo
596 }
597
598 for QML_SYMBOL in $QML_SYMBOLS
599 do
600     QML_REPLACEMENT="QQml${QML_SYMBOL#QDeclarative}"
601     replaceMatch "\bQtDeclarative/$QML_SYMBOL\b" "QtQml/$QML_REPLACEMENT"
602     replaceMatch "\b$QML_SYMBOL\b" "$QML_REPLACEMENT"
603 done
604
605 for QUICK_SYMBOL in $QUICK_SYMBOLS
606 do
607     QUICK_REPLACEMENT="QQuick${QUICK_SYMBOL#QDeclarative}"
608     replaceMatch "\bQtDeclarative/$QUICK_SYMBOL\b" "QtQuick/$QUICK_REPLACEMENT"
609     replaceMatch "\b$QUICK_SYMBOL\b" "$QUICK_REPLACEMENT"
610 done
611
612 for QML_INCLUDE_FILE in $QML_INCLUDE_FILES
613 do
614     QML_INCLUDE_REPLACEMENT="qqml${QML_INCLUDE_FILE#qdeclarative}"
615     replaceMatch "\b$QML_INCLUDE_FILE\b" "$QML_INCLUDE_REPLACEMENT"
616 done
617
618 for QUICK_INCLUDE_FILE in $QUICK_INCLUDE_FILES
619 do
620     QUICK_INCLUDE_REPLACEMENT="qquick${QUICK_INCLUDE_FILE#qdeclarative}"
621     replaceMatch "\b$QUICK_INCLUDE_FILE\b" "$QUICK_INCLUDE_REPLACEMENT"
622 done
623
624 # Various one-off replacements
625 replaceMatch "\bQtDeclarative\b" "QtQml"
626 replaceMatch "\basQDeclarativeContext\b" "asQQmlContext"
627 replaceMatch "\basQDeclarativeContextPrivate\b" "asQQmlContextPrivate"
628
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
633 do
634     echo "    $CONTAINER"
635     TMP_FILE="$CONTAINER.tmp"
636
637     sed 's|\bdeclarative\b|qml|g' <"$CONTAINER" >"$TMP_FILE"
638     mv "$TMP_FILE" "$CONTAINER"
639 done
640 echo
641
642 echo "Replacements complete"
643 exit 0