forked from qt-creator/qt-creator
QmlProjectManager: Delay construction of some run worker factories
... until the base factories are there. Change-Id: I0b3541c32eb7f7bbc24461a0fc9c1be85fc4f29b Reviewed-by: Dominik Holland <dominik.holland@qt.io>
This commit is contained in:
@@ -9,6 +9,7 @@ namespace QmlProjectManager {
|
|||||||
namespace Constants {
|
namespace Constants {
|
||||||
|
|
||||||
const char QML_PROJECT_ID[] = "QmlProjectManager.QmlProject";
|
const char QML_PROJECT_ID[] = "QmlProjectManager.QmlProject";
|
||||||
|
const char QML_RUNCONFIG_ID[] = "QmlProjectManager.QmlRunConfiguration.Qml";
|
||||||
const char QML_VIEWER_KEY[] = "QmlProjectManager.QmlRunConfiguration.QDeclarativeViewer";
|
const char QML_VIEWER_KEY[] = "QmlProjectManager.QmlRunConfiguration.QDeclarativeViewer";
|
||||||
const char QML_VIEWER_ARGUMENTS_KEY[] = "QmlProjectManager.QmlRunConfiguration.QDeclarativeViewerArguments";
|
const char QML_VIEWER_ARGUMENTS_KEY[] = "QmlProjectManager.QmlRunConfiguration.QDeclarativeViewerArguments";
|
||||||
const char QML_VIEWER_TARGET_DISPLAY_NAME[] = "QML Viewer";
|
const char QML_VIEWER_TARGET_DISPLAY_NAME[] = "QML Viewer";
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
#include "qdslandingpage.h"
|
#include "qdslandingpage.h"
|
||||||
#include "qmlproject.h"
|
#include "qmlproject.h"
|
||||||
#include "qmlprojectconstants.h"
|
#include "qmlprojectconstants.h"
|
||||||
|
#include "qmlprojectmanagerconstants.h"
|
||||||
#include "qmlprojectmanagertr.h"
|
#include "qmlprojectmanagertr.h"
|
||||||
#include "qmlprojectrunconfiguration.h"
|
#include "qmlprojectrunconfiguration.h"
|
||||||
#include "projectfilecontenttools.h"
|
#include "projectfilecontenttools.h"
|
||||||
@@ -102,9 +103,6 @@ class QmlProjectPluginPrivate
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QmlProjectRunConfigurationFactory runConfigFactory;
|
QmlProjectRunConfigurationFactory runConfigFactory;
|
||||||
SimpleTargetRunnerFactory runWorkerFactory{{runConfigFactory.runConfigurationId()}};
|
|
||||||
SimpleDebugRunnerFactory debugRunWorkerFactory{{runConfigFactory.runConfigurationId()}};
|
|
||||||
SimpleQmlProfilerRunnerFactory qmlProfilerRunWorkerFactory{{runConfigFactory.runConfigurationId()}};
|
|
||||||
QPointer<QMessageBox> lastMessageBox;
|
QPointer<QMessageBox> lastMessageBox;
|
||||||
QdsLandingPage *landingPage = nullptr;
|
QdsLandingPage *landingPage = nullptr;
|
||||||
QdsLandingPageWidget *landingPageWidget = nullptr;
|
QdsLandingPageWidget *landingPageWidget = nullptr;
|
||||||
@@ -258,6 +256,15 @@ public slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void initialize() final;
|
void initialize() final;
|
||||||
|
|
||||||
|
void extensionsInitialized() final
|
||||||
|
{
|
||||||
|
// These rely on the base tool factories being present:
|
||||||
|
static SimpleTargetRunnerFactory runWorkerFactory{{Constants::QML_RUNCONFIG_ID}};
|
||||||
|
static SimpleQmlProfilerRunnerFactory qmlProfilerRunWorkerFactory{{Constants::QML_RUNCONFIG_ID}};
|
||||||
|
static SimpleDebugRunnerFactory debugRunWorkerFactory{{Constants::QML_RUNCONFIG_ID}};
|
||||||
|
}
|
||||||
|
|
||||||
void displayQmlLandingPage();
|
void displayQmlLandingPage();
|
||||||
void hideQmlLandingPage();
|
void hideQmlLandingPage();
|
||||||
void updateQmlLandingPageProjectInfo(const Utils::FilePath &projectFile);
|
void updateQmlLandingPageProjectInfo(const Utils::FilePath &projectFile);
|
||||||
|
@@ -321,9 +321,8 @@ FilePath QmlProjectRunConfiguration::mainScript() const
|
|||||||
QmlProjectRunConfigurationFactory::QmlProjectRunConfigurationFactory()
|
QmlProjectRunConfigurationFactory::QmlProjectRunConfigurationFactory()
|
||||||
: FixedRunConfigurationFactory(Tr::tr("QML Runtime"), false)
|
: FixedRunConfigurationFactory(Tr::tr("QML Runtime"), false)
|
||||||
{
|
{
|
||||||
registerRunConfiguration<QmlProjectRunConfiguration>
|
registerRunConfiguration<QmlProjectRunConfiguration>(Constants::QML_RUNCONFIG_ID);
|
||||||
("QmlProjectManager.QmlRunConfiguration.Qml");
|
addSupportedProjectType(Constants::QML_PROJECT_ID);
|
||||||
addSupportedProjectType(QmlProjectManager::Constants::QML_PROJECT_ID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // QmlProjectManager::Internal
|
} // QmlProjectManager::Internal
|
||||||
|
Reference in New Issue
Block a user