forked from qt-creator/qt-creator
QmlDesigner: Fix Coverity scan defects
Change-Id: I07a61fe4498ae0b28baaa969f0decfa5689b4443 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -464,14 +464,11 @@ QProcessEnvironment PuppetCreator::processEnvironment() const
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
view = QmlDesignerPlugin::instance()->viewManager().nodeInstanceView();
|
||||
view->emitCustomNotification("PuppetStatus", {}, {QVariant(m_qrcMapping)});
|
||||
#endif
|
||||
|
||||
QStringList importPaths = m_model->importPaths();
|
||||
|
||||
QmlDesigner::Import import = QmlDesigner::Import::createLibraryImport("QtQuick3D", "1.0");
|
||||
bool view3DEnabled = false;
|
||||
|
||||
if (view && m_model->hasImport(import, true, true)) {
|
||||
if (m_model->hasImport(import, true, true)) {
|
||||
if (view->rootModelNode().hasAuxiliaryData("3d-view"))
|
||||
view3DEnabled = view->rootModelNode().auxiliaryData("3d-view").toBool();
|
||||
else
|
||||
@@ -480,6 +477,9 @@ QProcessEnvironment PuppetCreator::processEnvironment() const
|
||||
|
||||
if (view3DEnabled)
|
||||
environment.set("QMLDESIGNER_QUICK3D_MODE", "true");
|
||||
#endif
|
||||
|
||||
QStringList importPaths = m_model->importPaths();
|
||||
|
||||
/* For the fallback puppet we have to remove the path to the original qtbase plugins to avoid conflics */
|
||||
if (m_availablePuppetType == FallbackPuppet)
|
||||
|
@@ -424,7 +424,8 @@ void DocumentManager::findPathToIsoProFile(bool *iconResourceFileAlreadyExists,
|
||||
|
||||
if (!iconQrcFileNode) {
|
||||
// The QRC file that we want doesn't exist or is not listed under RESOURCES in the .pro.
|
||||
*resourceFilePath = project->projectDirectory().toString() + "/" + isoIconsQrcFile;
|
||||
if (project)
|
||||
*resourceFilePath = project->projectDirectory().toString() + "/" + isoIconsQrcFile;
|
||||
|
||||
// We assume that the .pro containing the QML file is an acceptable place to add the .qrc file.
|
||||
ProjectExplorer::ProjectNode *projectNode = ProjectExplorer::ProjectTree::nodeForFile(qmlFileName)->parentProjectNode();
|
||||
|
Reference in New Issue
Block a user