path: root/mkspecs
diff options
authorMatthew Vogt <>2012-02-23 11:31:05 +1000
committerQt by Nokia <>2012-02-27 01:55:39 +0100
commit6225e3ba01ef918724a15dd1311ab5d8205be534 (patch)
treebce9bcde1c32b76391b0473dffdd543ad07ccc98 /mkspecs
parent5bb1408927b4eb5a03e8ab9f7cbc68f80d8a3962 (diff)
Add workaround for projects using 'QT += declarative'
The code previously exported by the declarative library has been migrated to the qml and quick libraries, and the symbol names have been changed accordingly. To allow existing projects to continue to build, the declarative module now contains a set of definitions redefining the deprecated class names to their replacement names. To make this work, a dependency on the declarative module now automatically adds a dependency on the qml module in order to make the new library available for linking. This is a temporary change to prevent breaking existing projects that depend on the declarative module. After clients have had an opportunity to update their code to the use the new interfaces, it can be removed. Task-number: QTBUG-23737 Change-Id: Idee6ac627858856802bb1be29e9a4a079da73688 Reviewed-by: Kent Hansen <> Reviewed-by: Lars Knoll <> Reviewed-by: Martin Jones <>
Diffstat (limited to 'mkspecs')
1 files changed, 27 insertions, 0 deletions
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index b7da02e5bb..1c2aec49c6 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -1,5 +1,32 @@
CONFIG *= moc thread
+# Temporary fixes to avoid QDeclarative -> QQml breakage:
+# Projects depending on declarative will now get the full set of
+# -DOldSymbol=NewSymbol definitions added to their configuration
+# so that the old symbol names still compile. All code previously
+# in the declarative library is now in the qml library.
+contains(QT, qmldevtools):!contains(QT, declarative) {
+ QT += declarative
+contains(QT, qmldevtools-private):!contains(QT, declarative-private) {
+ QT += declarative-private
+contains(QT, quick):!contains(QT, declarative) {
+ QT += declarative
+contains(QT, quick-private):!contains(QT, declarative-private) {
+ QT += declarative-private
+contains(QT, declarative):!contains(QT, qml) {
+ QT += qml
+contains(QT, declarative-private):!contains(QT, qml-private) {
+ QT += qml-private
#handle defines
win32 {
qt_static:DEFINES += QT_NODLL