QmlJsEditor: Delay construction of QuickToolBar

It's now apparently created when the first .qml file opens.

Change-Id: I4bcd84d29da268565ee6e771f8c56c8b07ecdaf3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2023-09-01 15:10:50 +02:00
parent 3170973723
commit c4f2c14aa2
5 changed files with 24 additions and 23 deletions

View File

@@ -85,7 +85,6 @@ public:
ICore::resourcePath("json/").toString()}};
QmlJSEditorFactory m_qmlJSEditorFactory;
QmlJSOutlineWidgetFactory m_qmlJSOutlineWidgetFactory;
QuickToolBar m_quickToolBar;
QmlJsEditingSettingsPage m_qmJSEditingSettingsPage;
};
@@ -223,12 +222,6 @@ QmlJS::JsonSchemaManager *QmlJSEditorPlugin::jsonManager()
return &m_instance->d->m_jsonManager;
}
QuickToolBar *QmlJSEditorPlugin::quickToolBar()
{
QTC_ASSERT(m_instance && m_instance->d, return new QuickToolBar());
return &m_instance->d->m_quickToolBar;
}
void QmlJSEditorPluginPrivate::renameUsages()
{
if (auto editor = qobject_cast<QmlJSEditorWidget*>(EditorManager::currentEditor()->widget()))