forked from qt-creator/qt-creator
QmlDesigner: Move wizard registration to StudioWelcome
Change-Id: Iacaac80420da96f6757236db6c15ac23a6f723cf Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -18,31 +18,10 @@
|
|||||||
|
|
||||||
#include "studioplugin.h"
|
#include "studioplugin.h"
|
||||||
|
|
||||||
#include <modelnodecontextmenu_helper.h>
|
|
||||||
#include <componentcore_constants.h>
|
|
||||||
#include <qmldesignerplugin.h>
|
|
||||||
#include <viewmanager.h>
|
|
||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
|
||||||
#include <extensionsystem/pluginspec.h>
|
|
||||||
#include <coreplugin/icore.h>
|
|
||||||
|
|
||||||
#include <utils/qtcassert.h>
|
|
||||||
#include <utils/utilsicons.h>
|
|
||||||
|
|
||||||
#include <projectexplorer/jsonwizard/jsonwizardfactory.h>
|
|
||||||
#include <projectexplorer/runconfiguration.h>
|
|
||||||
|
|
||||||
#include <QtPlugin>
|
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
|
||||||
|
|
||||||
StudioPlugin::StudioPlugin()
|
StudioPlugin::StudioPlugin()
|
||||||
{
|
{
|
||||||
JsonWizardFactory::clearWizardPaths();
|
|
||||||
JsonWizardFactory::addWizardPath(Core::ICore::resourcePath("qmldesigner/studio_templates"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString StudioPlugin::pluginName() const
|
QString StudioPlugin::pluginName() const
|
||||||
|
@@ -41,9 +41,12 @@
|
|||||||
#include <extensionsystem/pluginmanager.h>
|
#include <extensionsystem/pluginmanager.h>
|
||||||
#include <extensionsystem/pluginspec.h>
|
#include <extensionsystem/pluginspec.h>
|
||||||
|
|
||||||
|
#include <projectexplorer/jsonwizard/jsonwizardfactory.h>
|
||||||
#include <projectexplorer/projectexplorer.h>
|
#include <projectexplorer/projectexplorer.h>
|
||||||
#include <projectexplorer/projectmanager.h>
|
#include <projectexplorer/projectmanager.h>
|
||||||
|
|
||||||
|
#include <qmlprojectmanager/qmlproject.h>
|
||||||
|
|
||||||
#include <qmldesigner/qmldesignerplugin.h>
|
#include <qmldesigner/qmldesignerplugin.h>
|
||||||
#include <qmldesigner/components/componentcore/theme.h>
|
#include <qmldesigner/components/componentcore/theme.h>
|
||||||
|
|
||||||
@@ -580,9 +583,14 @@ void StudioWelcomePlugin::extensionsInitialized()
|
|||||||
{
|
{
|
||||||
Core::ModeManager::activateMode(m_welcomeMode->id());
|
Core::ModeManager::activateMode(m_welcomeMode->id());
|
||||||
|
|
||||||
// Enable QDS new project dialog
|
// Enable QDS new project dialog and QDS wizards
|
||||||
if (Core::ICore::settings()->value("QML/Designer/StandAloneMode", false).toBool())
|
if (QmlProjectManager::QmlProject::isQtDesignStudio()) {
|
||||||
|
ProjectExplorer::JsonWizardFactory::clearWizardPaths();
|
||||||
|
ProjectExplorer::JsonWizardFactory::addWizardPath(
|
||||||
|
Core::ICore::resourcePath("qmldesigner/studio_templates"));
|
||||||
|
|
||||||
Core::ICore::setNewDialogFactory([](QWidget *parent) { return new QdsNewDialog(parent); });
|
Core::ICore::setNewDialogFactory([](QWidget *parent) { return new QdsNewDialog(parent); });
|
||||||
|
}
|
||||||
|
|
||||||
if (showSplashScreen()) {
|
if (showSplashScreen()) {
|
||||||
connect(Core::ICore::instance(), &Core::ICore::coreOpened, this, [this] {
|
connect(Core::ICore::instance(), &Core::ICore::coreOpened, this, [this] {
|
||||||
|
Reference in New Issue
Block a user