From 613183ff8c101fe544814259197d897b3540bc85 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Fri, 25 Nov 2011 12:13:16 +0100 Subject: Automatically add QtQuick module if only QtDeclarative is specified QtQuick and related APIs (QQuickItem, SceneGraph, et al), which used to live in the QtDeclarative module, have moved to a new module, QtQuick. Existing projects that use QtQuick-specific APIs should add "quick" to their project's QT variable, and update their include statements. E.g., QT += declarative should be changed to QT += declarative quick and #include should be changed to #include and similarly for the other QtQuick classes. In order to give existing projects a chance to migrate smoothly, we should issue a warning and automatically add the QtQuick module if only the QtDeclarative module was specified. (If a project doesn't use any QtQuick APIs, the warning can be ignored -- but there is no way to disable it.) This change, along with the compatibility headers in QtDeclarative, make it possible to build existing projects without any modifications on the project's side. This change will be removed at a later time; when that happens, existing projects that did not port to the QtQuick module will no longer build. Change-Id: I56abcadc1e5c74490527fc03646310d801bfc084 Reviewed-by: Lars Knoll --- mkspecs/features/qt.prf | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index d288930eaf..b0ee214a28 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -1,5 +1,14 @@ CONFIG *= moc thread +contains(QT, declarative)|contains(QT, declarative-private):!contains(DEFINES, QT_BUILD_QUICK_LIB):!contains(QT, quick):!contains(QT, quick-private) { + warning("This project is using the declarative module, but not the quick module.") + warning("If you're using QtQuick-specific APIs (QQuickItem, SceneGraph et al), you should add") + warning(" QT += quick") + warning("to your project's .pro file.") + contains(QT, declarative-private):QT += quick-private + else:QT += quick +} + #handle defines win32 { qt_static:DEFINES += QT_NODLL -- cgit v1.2.3