diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2010-06-03 10:25:17 +0200 |
---|---|---|
committer | hjk <qtc-committer@nokia.com> | 2010-06-04 11:21:20 +0200 |
commit | 85eb32da2bf5d0e509fff4e3c2b81a8b2ee84251 (patch) | |
tree | f3439116106e563c87da12144df07e53afccdfea | |
parent | 514b30ecbf105da2c6109470b2a8b2571c22654c (diff) |
Make the QmlJSEditor work when Qml support is disabled.
- Enable qmlprojectplugin even if Qml support is disabled.
- But disable its wizards in that case.
- Disable the Qml file wizard if the support is off.
Reviewed-by: Kai Koehne
(cherry picked from commit 5234c775f765a2c6293da9bcf960a6f4edec46dc)
-rw-r--r-- | qtcreator.pri | 6 | ||||
-rw-r--r-- | src/plugins/plugins.pro | 14 | ||||
-rw-r--r-- | src/plugins/qmljseditor/qmljseditorplugin.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qmlprojectmanager/qmlprojectplugin.cpp | 2 |
4 files changed, 16 insertions, 8 deletions
diff --git a/qtcreator.pri b/qtcreator.pri index b4ca541b0f..73b2e73d8b 100644 --- a/qtcreator.pri +++ b/qtcreator.pri @@ -117,3 +117,9 @@ win32-msvc* { # Handle S60 support: default on Windows, conditionally built on other platforms. macx:SUPPORT_QT_S60 = $$(QTCREATOR_WITH_S60) else:SUPPORT_QT_S60=1 + +# Define QTCREATOR_WITH_QML if building with Qml support +SUPPORT_QT_QML = $$(QTCREATOR_WITH_QML) +!isEmpty(SUPPORT_QT_QML) { + DEFINES += QTCREATOR_WITH_QML +} diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index c8bbb792ed..e358fa1af0 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -37,13 +37,11 @@ SUBDIRS = plugin_coreplugin \ SUPPORT_QT_QML = $$(QTCREATOR_WITH_QML) -!isEmpty(SUPPORT_QT_QML) { - message("Adding support for Qt/QML projects.") - DEFINES += QTCREATOR_WITH_QML +contains(QT_CONFIG, declarative) { + SUBDIRS += plugin_qmlprojectmanager - contains(QT_CONFIG, declarative) { - - SUBDIRS += plugin_qmlprojectmanager + !isEmpty(SUPPORT_QT_QML) { + message("Adding support for QmlDesigner, QmlInspector and Qml wizards.") include(private_headers.pri) exists($${QT_PRIVATE_HEADERS}/QtDeclarative/private/qdeclarativecontext_p.h) { @@ -55,8 +53,8 @@ SUPPORT_QT_QML = $$(QTCREATOR_WITH_QML) 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() - } - } + } + } } plugin_coreplugin.subdir = coreplugin diff --git a/src/plugins/qmljseditor/qmljseditorplugin.cpp b/src/plugins/qmljseditor/qmljseditorplugin.cpp index f998309ac1..20ae4bf115 100644 --- a/src/plugins/qmljseditor/qmljseditorplugin.cpp +++ b/src/plugins/qmljseditor/qmljseditorplugin.cpp @@ -105,6 +105,7 @@ bool QmlJSEditorPlugin::initialize(const QStringList & /*arguments*/, QString *e m_editor = new QmlJSEditorFactory(this); addObject(m_editor); +#ifdef QTCREATOR_WITH_QML Core::BaseFileWizardParameters wizardParameters(Core::IWizard::FileWizard); wizardParameters.setCategory(QLatin1String(Core::Constants::WIZARD_CATEGORY_QT)); wizardParameters.setDisplayCategory(QCoreApplication::translate("Core", Core::Constants::WIZARD_TR_CATEGORY_QT)); @@ -112,6 +113,7 @@ bool QmlJSEditorPlugin::initialize(const QStringList & /*arguments*/, QString *e wizardParameters.setDisplayName(tr("Qt QML File")); wizardParameters.setId(QLatin1String("Q.Qml")); addAutoReleasedObject(new QmlFileWizard(wizardParameters, core)); +#endif m_actionHandler = new TextEditor::TextEditorActionHandler(QmlJSEditor::Constants::C_QMLJSEDITOR_ID, TextEditor::TextEditorActionHandler::Format diff --git a/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp b/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp index 144d5d0088..3a321bfc8f 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp @@ -82,8 +82,10 @@ bool QmlProjectPlugin::initialize(const QStringList &, QString *errorMessage) addAutoReleasedObject(manager); addAutoReleasedObject(new Internal::QmlProjectRunConfigurationFactory); addAutoReleasedObject(new Internal::QmlRunControlFactory); +#ifdef QTCREATOR_WITH_QML addAutoReleasedObject(new QmlProjectApplicationWizard); addAutoReleasedObject(new QmlProjectImportWizard); +#endif QmlProjectFileFormat::registerDeclarativeTypes(); |