forked from qt-creator/qt-creator
QmlDesiger: Use ProjectExplorer::Target instead of Project plus Kit
A Target is pretty much exactly that. Change-Id: Icd6041428ecd616906d5fbf74a5b87ea4b5c8103 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -76,7 +76,7 @@ DesignDocument::DesignDocument(QObject *parent) :
|
||||
m_subComponentManager(new SubComponentManager(m_documentModel.data(), this)),
|
||||
m_rewriterView (new RewriterView(RewriterView::Amend, m_documentModel.data())),
|
||||
m_documentLoaded(false),
|
||||
m_currentKit(nullptr)
|
||||
m_currentTarget(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -216,9 +216,9 @@ Utils::FilePath DesignDocument::fileName() const
|
||||
return Utils::FilePath();
|
||||
}
|
||||
|
||||
Kit *DesignDocument::currentKit() const
|
||||
ProjectExplorer::Target *DesignDocument::currentTarget() const
|
||||
{
|
||||
return m_currentKit;
|
||||
return m_currentTarget;
|
||||
}
|
||||
|
||||
bool DesignDocument::isDocumentLoaded() const
|
||||
@@ -551,8 +551,8 @@ void DesignDocument::setEditor(Core::IEditor *editor)
|
||||
connect(editor->document(), &Core::IDocument::filePathChanged,
|
||||
this, &DesignDocument::updateFileName);
|
||||
|
||||
updateActiveQtVersion();
|
||||
updateCurrentProject();
|
||||
updateActiveTarget();
|
||||
updateActiveTarget();
|
||||
}
|
||||
|
||||
Core::IEditor *DesignDocument::editor() const
|
||||
@@ -594,53 +594,38 @@ void DesignDocument::redo()
|
||||
viewManager().resetPropertyEditorView();
|
||||
}
|
||||
|
||||
static inline Kit *getActiveKit(DesignDocument *designDocument)
|
||||
static Target *getActiveTarget(DesignDocument *designDocument)
|
||||
{
|
||||
ProjectExplorer::Project *currentProject = ProjectExplorer::SessionManager::projectForFile(designDocument->fileName());
|
||||
Project *currentProject = SessionManager::projectForFile(designDocument->fileName());
|
||||
|
||||
if (!currentProject)
|
||||
currentProject = ProjectExplorer::ProjectTree::currentProject();
|
||||
currentProject = ProjectTree::currentProject();
|
||||
|
||||
if (!currentProject)
|
||||
return nullptr;
|
||||
|
||||
|
||||
QObject::connect(ProjectTree::instance(), &ProjectTree::currentProjectChanged,
|
||||
designDocument, &DesignDocument::updateActiveQtVersion, Qt::UniqueConnection);
|
||||
designDocument, &DesignDocument::updateActiveTarget, Qt::UniqueConnection);
|
||||
|
||||
QObject::connect(currentProject, &Project::activeTargetChanged,
|
||||
designDocument, &DesignDocument::updateActiveQtVersion, Qt::UniqueConnection);
|
||||
|
||||
QObject::connect(ProjectTree::instance(), &ProjectTree::currentProjectChanged,
|
||||
designDocument, &DesignDocument::updateCurrentProject, Qt::UniqueConnection);
|
||||
|
||||
QObject::connect(currentProject, &Project::activeTargetChanged,
|
||||
designDocument, &DesignDocument::updateCurrentProject, Qt::UniqueConnection);
|
||||
|
||||
designDocument, &DesignDocument::updateActiveTarget, Qt::UniqueConnection);
|
||||
|
||||
Target *target = currentProject->activeTarget();
|
||||
|
||||
if (!target)
|
||||
if (!target || !target->kit()->isValid())
|
||||
return nullptr;
|
||||
|
||||
if (!target->kit() || !target->kit()->isValid())
|
||||
return nullptr;
|
||||
QObject::connect(target, &Target::kitChanged,
|
||||
designDocument, &DesignDocument::updateActiveQtVersion, Qt::UniqueConnection);
|
||||
designDocument, &DesignDocument::updateActiveTarget, Qt::UniqueConnection);
|
||||
|
||||
return target->kit();
|
||||
return target;
|
||||
}
|
||||
|
||||
void DesignDocument::updateActiveQtVersion()
|
||||
void DesignDocument::updateActiveTarget()
|
||||
{
|
||||
m_currentKit = getActiveKit(this);
|
||||
viewManager().setNodeInstanceViewKit(m_currentKit);
|
||||
}
|
||||
|
||||
void DesignDocument::updateCurrentProject()
|
||||
{
|
||||
ProjectExplorer::Project *currentProject = ProjectExplorer::SessionManager::projectForFile(fileName());
|
||||
viewManager().setNodeInstanceViewProject(currentProject);
|
||||
m_currentTarget = getActiveTarget(this);
|
||||
viewManager().setNodeInstanceViewTarget(m_currentTarget);
|
||||
}
|
||||
|
||||
void DesignDocument::contextHelp(const Core::IContext::HelpCallback &callback) const
|
||||
|
||||
@@ -39,12 +39,11 @@
|
||||
#include <QStackedWidget>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QWidget;
|
||||
class QPlainTextEdit;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace ProjectExplorer {
|
||||
class Kit;
|
||||
class Target;
|
||||
}
|
||||
|
||||
namespace QmlDesigner {
|
||||
@@ -91,7 +90,7 @@ public:
|
||||
TextEditor::BaseTextEditor *textEditor() const;
|
||||
QPlainTextEdit *plainTextEdit() const;
|
||||
Utils::FilePath fileName() const;
|
||||
ProjectExplorer::Kit *currentKit() const;
|
||||
ProjectExplorer::Target *currentTarget() const;
|
||||
bool isDocumentLoaded() const;
|
||||
|
||||
void resetToDocumentModel();
|
||||
@@ -115,8 +114,7 @@ public:
|
||||
void selectAll();
|
||||
void undo();
|
||||
void redo();
|
||||
void updateActiveQtVersion();
|
||||
void updateCurrentProject();
|
||||
void updateActiveTarget();
|
||||
void changeToSubComponent(const ModelNode &componentNode);
|
||||
void changeToMaster();
|
||||
|
||||
@@ -152,7 +150,7 @@ private: // variables
|
||||
QScopedPointer<RewriterView> m_rewriterView;
|
||||
|
||||
bool m_documentLoaded;
|
||||
ProjectExplorer::Kit *m_currentKit;
|
||||
ProjectExplorer::Target *m_currentTarget;
|
||||
};
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
||||
@@ -40,16 +40,8 @@
|
||||
#include <QRectF>
|
||||
#include <QTime>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QDeclarativeEngine;
|
||||
class QGraphicsView;
|
||||
class QFileSystemWatcher;
|
||||
class QPainter;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace ProjectExplorer {
|
||||
class Kit;
|
||||
class Project;
|
||||
class Target;
|
||||
}
|
||||
|
||||
namespace QmlDesigner {
|
||||
@@ -131,8 +123,7 @@ public:
|
||||
|
||||
QImage statePreviewImage(const ModelNode &stateNode) const;
|
||||
|
||||
void setKit(ProjectExplorer::Kit *kit);
|
||||
void setProject(ProjectExplorer::Project *project);
|
||||
void setTarget(ProjectExplorer::Target *newTarget);
|
||||
|
||||
void sendToken(const QString &token, int number, const QVector<ModelNode> &nodeVector);
|
||||
|
||||
@@ -208,8 +199,7 @@ private: //variables
|
||||
QImage m_baseStatePreviewImage;
|
||||
QElapsedTimer m_lastCrashTime;
|
||||
NodeInstanceServerInterface::RunModus m_runModus;
|
||||
ProjectExplorer::Kit *m_currentKit = nullptr;
|
||||
ProjectExplorer::Project *m_currentProject = nullptr;
|
||||
ProjectExplorer::Target *m_currentTarget = nullptr;
|
||||
int m_restartProcessTimerId;
|
||||
RewriterTransaction m_puppetTransaction;
|
||||
};
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
namespace ProjectExplorer {
|
||||
class Kit;
|
||||
class Project;
|
||||
class Target;
|
||||
}
|
||||
|
||||
namespace QmlDesigner {
|
||||
@@ -66,8 +65,7 @@ public:
|
||||
void setItemLibraryViewResourcePath(const QString &resourcePath);
|
||||
void setComponentNode(const ModelNode &componentNode);
|
||||
void setComponentViewToMaster();
|
||||
void setNodeInstanceViewKit(ProjectExplorer::Kit *kit);
|
||||
void setNodeInstanceViewProject(ProjectExplorer::Project *project);
|
||||
void setNodeInstanceViewTarget(ProjectExplorer::Target *target);
|
||||
|
||||
void resetPropertyEditorView();
|
||||
|
||||
|
||||
@@ -103,8 +103,7 @@ void NodeInstanceServerProxy::showCannotConnectToPuppetWarningAndSwitchToEditMod
|
||||
|
||||
NodeInstanceServerProxy::NodeInstanceServerProxy(NodeInstanceView *nodeInstanceView,
|
||||
RunModus runModus,
|
||||
ProjectExplorer::Kit *kit,
|
||||
ProjectExplorer::Project *project)
|
||||
ProjectExplorer::Target *target)
|
||||
: NodeInstanceServerInterface(nodeInstanceView),
|
||||
m_localServer(new QLocalServer(this)),
|
||||
m_nodeInstanceView(nodeInstanceView),
|
||||
@@ -117,7 +116,7 @@ NodeInstanceServerProxy::NodeInstanceServerProxy(NodeInstanceView *nodeInstanceV
|
||||
m_localServer->listen(socketToken);
|
||||
m_localServer->setMaxPendingConnections(3);
|
||||
|
||||
PuppetCreator puppetCreator(kit, project, nodeInstanceView->model());
|
||||
PuppetCreator puppetCreator(target, nodeInstanceView->model());
|
||||
puppetCreator.setQrcMappingString(qrcMappingString());
|
||||
|
||||
puppetCreator.createQml2PuppetExecutableIfMissing();
|
||||
|
||||
@@ -40,8 +40,7 @@ class QProcess;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace ProjectExplorer {
|
||||
class Kit;
|
||||
class Project;
|
||||
class Target;
|
||||
}
|
||||
|
||||
namespace QmlDesigner {
|
||||
@@ -63,8 +62,7 @@ public:
|
||||
|
||||
explicit NodeInstanceServerProxy(NodeInstanceView *nodeInstanceView,
|
||||
RunModus runModus,
|
||||
ProjectExplorer::Kit *kit,
|
||||
ProjectExplorer::Project *project);
|
||||
ProjectExplorer::Target *target);
|
||||
~NodeInstanceServerProxy() override;
|
||||
void createInstances(const CreateInstancesCommand &command) override;
|
||||
void changeFileUrl(const ChangeFileUrlCommand &command) override;
|
||||
|
||||
@@ -123,7 +123,7 @@ NodeInstanceView::~NodeInstanceView()
|
||||
{
|
||||
removeAllInstanceNodeRelationships();
|
||||
delete nodeInstanceServer();
|
||||
m_currentKit = nullptr;
|
||||
m_currentTarget = nullptr;
|
||||
}
|
||||
|
||||
//\{
|
||||
@@ -173,7 +173,7 @@ bool static parentTakesOverRendering(const ModelNode &modelNode)
|
||||
void NodeInstanceView::modelAttached(Model *model)
|
||||
{
|
||||
AbstractView::modelAttached(model);
|
||||
auto server = new NodeInstanceServerProxy(this, m_runModus, m_currentKit, m_currentProject);
|
||||
auto server = new NodeInstanceServerProxy(this, m_runModus, m_currentTarget);
|
||||
m_nodeInstanceServer = server;
|
||||
m_lastCrashTime.start();
|
||||
connect(server, &NodeInstanceServerProxy::processCrashed, this, &NodeInstanceView::handleCrash);
|
||||
@@ -256,7 +256,7 @@ void NodeInstanceView::restartProcess()
|
||||
if (model()) {
|
||||
delete nodeInstanceServer();
|
||||
|
||||
auto server = new NodeInstanceServerProxy(this, m_runModus, m_currentKit, m_currentProject);
|
||||
auto server = new NodeInstanceServerProxy(this, m_runModus, m_currentTarget);
|
||||
m_nodeInstanceServer = server;
|
||||
connect(server, &NodeInstanceServerProxy::processCrashed, this, &NodeInstanceView::handleCrash);
|
||||
|
||||
@@ -1300,18 +1300,10 @@ QImage NodeInstanceView::statePreviewImage(const ModelNode &stateNode) const
|
||||
return m_statePreviewImage.value(stateNode);
|
||||
}
|
||||
|
||||
void NodeInstanceView::setKit(ProjectExplorer::Kit *newKit)
|
||||
void NodeInstanceView::setTarget(ProjectExplorer::Target *newTarget)
|
||||
{
|
||||
if (m_currentKit != newKit) {
|
||||
m_currentKit = newKit;
|
||||
restartProcess();
|
||||
}
|
||||
}
|
||||
|
||||
void NodeInstanceView::setProject(ProjectExplorer::Project *project)
|
||||
{
|
||||
if (m_currentProject != project) {
|
||||
m_currentProject = project;
|
||||
if (m_currentTarget != newTarget) {
|
||||
m_currentTarget = newTarget;
|
||||
restartProcess();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ QHash<Core::Id, PuppetCreator::PuppetType> PuppetCreator::m_qml2PuppetForKitPupp
|
||||
|
||||
QByteArray PuppetCreator::qtHash() const
|
||||
{
|
||||
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_kit);
|
||||
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_target->kit());
|
||||
if (currentQtVersion) {
|
||||
return QCryptographicHash::hash(currentQtVersion->dataPath().toString().toUtf8(),
|
||||
QCryptographicHash::Sha1)
|
||||
@@ -102,7 +102,7 @@ QByteArray PuppetCreator::qtHash() const
|
||||
|
||||
QDateTime PuppetCreator::qtLastModified() const
|
||||
{
|
||||
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_kit);
|
||||
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_target->kit());
|
||||
if (currentQtVersion)
|
||||
return currentQtVersion->libraryPath().toFileInfo().lastModified();
|
||||
|
||||
@@ -140,10 +140,10 @@ QDateTime PuppetCreator::puppetSourceLastModified() const
|
||||
bool PuppetCreator::useOnlyFallbackPuppet() const
|
||||
{
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
if (!m_kit || !m_kit->isValid())
|
||||
if (!m_target || !m_target->kit()->isValid())
|
||||
qWarning() << "Invalid kit for QML puppet";
|
||||
return m_designerSettings.value(DesignerSettingsKey::USE_DEFAULT_PUPPET
|
||||
).toBool() || m_kit == nullptr || !m_kit->isValid();
|
||||
return m_designerSettings.value(DesignerSettingsKey::USE_DEFAULT_PUPPET).toBool()
|
||||
|| m_target == nullptr || !m_target->kit()->isValid();
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
@@ -152,8 +152,8 @@ bool PuppetCreator::useOnlyFallbackPuppet() const
|
||||
QString PuppetCreator::getStyleConfigFileName() const
|
||||
{
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
if (m_currentProject) {
|
||||
for (const Utils::FilePath &fileName : m_currentProject->files(ProjectExplorer::Project::SourceFiles)) {
|
||||
if (m_target) {
|
||||
for (const Utils::FilePath &fileName : m_target->project()->files(ProjectExplorer::Project::SourceFiles)) {
|
||||
if (fileName.fileName() == "qtquickcontrols2.conf")
|
||||
return fileName.toString();
|
||||
}
|
||||
@@ -162,17 +162,14 @@ QString PuppetCreator::getStyleConfigFileName() const
|
||||
return QString();
|
||||
}
|
||||
|
||||
PuppetCreator::PuppetCreator(ProjectExplorer::Kit *kit,
|
||||
ProjectExplorer::Project *project,
|
||||
const Model *model)
|
||||
PuppetCreator::PuppetCreator(ProjectExplorer::Target *target, const Model *model)
|
||||
|
||||
: m_kit(kit)
|
||||
: m_target(target)
|
||||
, m_availablePuppetType(FallbackPuppet)
|
||||
, m_model(model)
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
, m_designerSettings(QmlDesignerPlugin::instance()->settings())
|
||||
#endif
|
||||
, m_currentProject(project)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -330,18 +327,18 @@ void PuppetCreator::createQml2PuppetExecutableIfMissing()
|
||||
if (!useOnlyFallbackPuppet()) {
|
||||
// check if there was an already failing try to get the UserSpacePuppet
|
||||
// -> imagine as result a FallbackPuppet and nothing will happen again
|
||||
if (m_qml2PuppetForKitPuppetHash.value(m_kit->id(), UserSpacePuppet) == UserSpacePuppet ) {
|
||||
if (m_qml2PuppetForKitPuppetHash.value(m_target->id(), UserSpacePuppet) == UserSpacePuppet ) {
|
||||
if (checkPuppetIsReady(qml2PuppetPath(UserSpacePuppet))) {
|
||||
m_availablePuppetType = UserSpacePuppet;
|
||||
} else {
|
||||
if (m_kit->isValid()) {
|
||||
if (m_target->kit()->isValid()) {
|
||||
bool buildSucceeded = build(qml2PuppetProjectFile());
|
||||
if (buildSucceeded)
|
||||
m_availablePuppetType = UserSpacePuppet;
|
||||
} else {
|
||||
warnAboutInvalidKit();
|
||||
}
|
||||
m_qml2PuppetForKitPuppetHash.insert(m_kit->id(), m_availablePuppetType);
|
||||
m_qml2PuppetForKitPuppetHash.insert(m_target->id(), m_availablePuppetType);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -418,8 +415,8 @@ QProcessEnvironment PuppetCreator::processEnvironment() const
|
||||
static const QString pathSep = Utils::HostOsInfo::pathListSeparator();
|
||||
Utils::Environment environment = Utils::Environment::systemEnvironment();
|
||||
if (!useOnlyFallbackPuppet())
|
||||
m_kit->addToEnvironment(environment);
|
||||
const QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(m_kit);
|
||||
m_target->kit()->addToEnvironment(environment);
|
||||
const QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(m_target->kit());
|
||||
if (QTC_GUARD(qt)) { // Kits without a Qt version should not have a puppet!
|
||||
// Update PATH to include QT_HOST_BINS
|
||||
const Utils::FilePath qtBinPath = qt->hostBinPath();
|
||||
@@ -490,13 +487,11 @@ QProcessEnvironment PuppetCreator::processEnvironment() const
|
||||
|
||||
QStringList customFileSelectors;
|
||||
|
||||
if (m_currentProject && m_currentProject->activeTarget()) {
|
||||
QStringList designerImports = m_currentProject->activeTarget()
|
||||
->additionalData("QmlDesignerImportPath").toStringList();
|
||||
if (m_target) {
|
||||
QStringList designerImports = m_target->additionalData("QmlDesignerImportPath").toStringList();
|
||||
importPaths.append(designerImports);
|
||||
|
||||
customFileSelectors = m_currentProject->activeTarget()
|
||||
->additionalData("CustomFileSelectorsData").toStringList();
|
||||
customFileSelectors = m_target->additionalData("CustomFileSelectorsData").toStringList();
|
||||
}
|
||||
|
||||
if (m_availablePuppetType == FallbackPuppet)
|
||||
@@ -519,10 +514,10 @@ QProcessEnvironment PuppetCreator::processEnvironment() const
|
||||
QString PuppetCreator::buildCommand() const
|
||||
{
|
||||
Utils::Environment environment = Utils::Environment::systemEnvironment();
|
||||
m_kit->addToEnvironment(environment);
|
||||
m_target->kit()->addToEnvironment(environment);
|
||||
|
||||
ProjectExplorer::ToolChain *toolChain
|
||||
= ProjectExplorer::ToolChainKitAspect::toolChain(m_kit,
|
||||
= ProjectExplorer::ToolChainKitAspect::toolChain(m_target->kit(),
|
||||
ProjectExplorer::Constants::CXX_LANGUAGE_ID);
|
||||
|
||||
if (toolChain)
|
||||
@@ -533,7 +528,7 @@ QString PuppetCreator::buildCommand() const
|
||||
|
||||
QString PuppetCreator::qmakeCommand() const
|
||||
{
|
||||
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_kit);
|
||||
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_target->kit());
|
||||
if (currentQtVersion)
|
||||
return currentQtVersion->qmakeCommand().toString();
|
||||
|
||||
@@ -620,7 +615,7 @@ static bool nonEarlyQt5Version(const QtSupport::QtVersionNumber ¤tQtVersio
|
||||
|
||||
bool PuppetCreator::qtIsSupported() const
|
||||
{
|
||||
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_kit);
|
||||
QtSupport::BaseQtVersion *currentQtVersion = QtSupport::QtKitAspect::qtVersion(m_target->kit());
|
||||
|
||||
return currentQtVersion
|
||||
&& currentQtVersion->isValid()
|
||||
|
||||
@@ -33,8 +33,7 @@
|
||||
#include <coreplugin/id.h>
|
||||
|
||||
namespace ProjectExplorer {
|
||||
class Kit;
|
||||
class Project;
|
||||
class Target;
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
namespace QmlDesigner {
|
||||
@@ -50,9 +49,7 @@ public:
|
||||
UserSpacePuppet
|
||||
};
|
||||
|
||||
PuppetCreator(ProjectExplorer::Kit *kit,
|
||||
ProjectExplorer::Project *project,
|
||||
const Model *model);
|
||||
PuppetCreator(ProjectExplorer::Target *target, const Model *model);
|
||||
|
||||
void createQml2PuppetExecutableIfMissing();
|
||||
|
||||
@@ -106,7 +103,7 @@ protected:
|
||||
|
||||
private:
|
||||
mutable QString m_compileLog;
|
||||
ProjectExplorer::Kit *m_kit = nullptr;
|
||||
ProjectExplorer::Target *m_target = nullptr;
|
||||
PuppetType m_availablePuppetType;
|
||||
static QHash<Core::Id, PuppetType> m_qml2PuppetForKitPuppetHash;
|
||||
const Model *m_model = nullptr;
|
||||
@@ -114,7 +111,6 @@ private:
|
||||
const DesignerSettings m_designerSettings;
|
||||
#endif
|
||||
QString m_qrcMapping;
|
||||
ProjectExplorer::Project *m_currentProject = nullptr;
|
||||
};
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
||||
@@ -109,7 +109,7 @@ void ViewManager::attachNodeInstanceView()
|
||||
|
||||
qCInfo(viewBenchmark) << Q_FUNC_INFO;
|
||||
|
||||
setNodeInstanceViewKit(currentDesignDocument()->currentKit());
|
||||
setNodeInstanceViewTarget(currentDesignDocument()->currentTarget());
|
||||
currentModel()->setNodeInstanceView(&d->nodeInstanceView);
|
||||
|
||||
qCInfo(viewBenchmark) << "NodeInstanceView:" << time.elapsed();
|
||||
@@ -328,14 +328,9 @@ void ViewManager::setComponentViewToMaster()
|
||||
d->componentView.setComponentToMaster();
|
||||
}
|
||||
|
||||
void ViewManager::setNodeInstanceViewKit(ProjectExplorer::Kit *kit)
|
||||
void ViewManager::setNodeInstanceViewTarget(ProjectExplorer::Target *target)
|
||||
{
|
||||
d->nodeInstanceView.setKit(kit);
|
||||
}
|
||||
|
||||
void QmlDesigner::ViewManager::setNodeInstanceViewProject(ProjectExplorer::Project *project)
|
||||
{
|
||||
d->nodeInstanceView.setProject(project);
|
||||
d->nodeInstanceView.setTarget(target);
|
||||
}
|
||||
|
||||
QList<WidgetInfo> ViewManager::widgetInfos() const
|
||||
|
||||
@@ -434,8 +434,8 @@ void QmlDesignerPlugin::activateAutoSynchronization()
|
||||
if (!currentDesignDocument()->isDocumentLoaded())
|
||||
currentDesignDocument()->loadDocument(currentDesignDocument()->plainTextEdit());
|
||||
|
||||
currentDesignDocument()->updateActiveQtVersion();
|
||||
currentDesignDocument()->updateCurrentProject();
|
||||
currentDesignDocument()->updateActiveTarget();
|
||||
currentDesignDocument()->updateActiveTarget();
|
||||
d->mainWidget.enableWidgets();
|
||||
currentDesignDocument()->attachRewriterToModel();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user