forked from qt-creator/qt-creator
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user