From 0714893c8f2066b166d5f49254f9a5112b9cbbbe Mon Sep 17 00:00:00 2001 From: Kai Koehne <kai.koehne@nokia.com> Date: Thu, 4 Mar 2010 16:17:02 +0100 Subject: [PATCH] QmlDesigner/QmlInspector: Document private headers dependency Users also can now explicitly set the path to the private header files by passing "QT_PRIVATE_HEADERS=$PATH" to qmake, or force qmake to ignore the plugins by passing in an invalid /empty path. Reviewed-by: con --- README | 25 +++++++++++++++++++++++++ src/plugins/plugins.pro | 22 +++++++++++++++++----- 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/README b/README index 61880cf0678..20b08ce3460 100644 --- a/README +++ b/README @@ -26,6 +26,31 @@ cd $BUILD_DIRECTORY qmake $SOURCE_DIRECTORY/qtcreator.pro make (or mingw32-make or nmake or jom, depending on your platform) +QmlDesigner, QmlInspector require private headers +------------------------------------------------- + +The QmlDesigner and QmlInspector plugins depend on "private" Qt headers, +specifically from the QtDeclarative module. These private headers always end +with an "_p.h", and Nokia does not make any promises to keep the files or API's +binary or source compatible between releases. This means that when compiled, +the two plugins have a dependency to the exact Qt version they were compiled +with. Running Qt Creator with the plugins against updated Qt libraries (also for +patch releases) might lead to link time failures, or even crashes. + +If you want to disable the plugins, you can pass "QT_PRIVATE_HEADERS=" to qmake: + + qmake "QT_PRIVATE_HEADERS=" $SOURCE_DIRECTORY/qtcreator.pro + +Anyhow, the plugins will not be compiled when the private header files needed +are not found. This might be the case when you are using a Qt version from your +distribution, or when you installed your self-compiled Qt to a separate +directory via 'make install'. You can fix this by either re-building your Qt +with the "-developer-build" configure option, or pass the include directory in +the source directory to qmake, e.g. + + qmake "QT_PRIVATE_HEADERS=$$QT_SOURCE_TREE/include" $SOURCE_DIRECTORY/qtcreator.pro + + Third-party components ====================== Qt Creator includes the following third-party components, diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index 047e9c03185..7d2da3f0fcb 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -37,13 +37,25 @@ SUBDIRS = plugin_coreplugin \ contains(QT_CONFIG, declarative) { - SUBDIRS += plugin_qmlprojectmanager \ - plugin_qmlinspector + SUBDIRS += plugin_qmlprojectmanager - exists($$[QT_INSTALL_HEADERS]/QtDeclarative/private/qdeclarativecontext_p.h) { - SUBDIRS += plugin_qmldesigner + # Try to find location of Qt private headers (see README) + + isEmpty(QT_PRIVATE_HEADERS) { + QT_PRIVATE_HEADERS = $$[QT_INSTALL_HEADERS] + } else { + INCLUDEPATH += QT_PRIVATE_HEADERS + } + + exists($$QT_PRIVATE_HEADERS/QtDeclarative/private/qdeclarativecontext_p.h) { + SUBDIRS += plugin_qmldesigner \ + plugin_qmlinspector } else { - warning("QmlDesigner plugin disabled! It depends on private headers from QtDeclarative module, which seems not to be installed.") + warning() + warning("QmlDesigner and QmlInspector plugins have been disabled") + warning("The plugins depend on on private headers from QtDeclarative module.") + warning("To enable them, pass 'QT_PRIVATE_HEADERS=$QTDIR/include' to qmake, where $QTDIR is the source directory of qt.") + warning() } } -- GitLab