Add workaround for projects using 'QT += declarative'
authorMatthew Vogt <matthew.vogt@nokia.com>
Thu, 23 Feb 2012 01:31:05 +0000 (11:31 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 27 Feb 2012 00:55:39 +0000 (01:55 +0100)
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 <kent.hansen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
mkspecs/features/qt.prf

index b7da02e..1c2aec4 100644 (file)
@@ -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