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
|
#ifndef QMLDESIGNER_TEST
|
||||||
view = QmlDesignerPlugin::instance()->viewManager().nodeInstanceView();
|
view = QmlDesignerPlugin::instance()->viewManager().nodeInstanceView();
|
||||||
view->emitCustomNotification("PuppetStatus", {}, {QVariant(m_qrcMapping)});
|
view->emitCustomNotification("PuppetStatus", {}, {QVariant(m_qrcMapping)});
|
||||||
#endif
|
|
||||||
|
|
||||||
QStringList importPaths = m_model->importPaths();
|
|
||||||
|
|
||||||
QmlDesigner::Import import = QmlDesigner::Import::createLibraryImport("QtQuick3D", "1.0");
|
QmlDesigner::Import import = QmlDesigner::Import::createLibraryImport("QtQuick3D", "1.0");
|
||||||
bool view3DEnabled = false;
|
bool view3DEnabled = false;
|
||||||
|
|
||||||
if (view && m_model->hasImport(import, true, true)) {
|
if (m_model->hasImport(import, true, true)) {
|
||||||
if (view->rootModelNode().hasAuxiliaryData("3d-view"))
|
if (view->rootModelNode().hasAuxiliaryData("3d-view"))
|
||||||
view3DEnabled = view->rootModelNode().auxiliaryData("3d-view").toBool();
|
view3DEnabled = view->rootModelNode().auxiliaryData("3d-view").toBool();
|
||||||
else
|
else
|
||||||
@@ -480,6 +477,9 @@ QProcessEnvironment PuppetCreator::processEnvironment() const
|
|||||||
|
|
||||||
if (view3DEnabled)
|
if (view3DEnabled)
|
||||||
environment.set("QMLDESIGNER_QUICK3D_MODE", "true");
|
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 */
|
/* For the fallback puppet we have to remove the path to the original qtbase plugins to avoid conflics */
|
||||||
if (m_availablePuppetType == FallbackPuppet)
|
if (m_availablePuppetType == FallbackPuppet)
|
||||||
|
@@ -424,6 +424,7 @@ void DocumentManager::findPathToIsoProFile(bool *iconResourceFileAlreadyExists,
|
|||||||
|
|
||||||
if (!iconQrcFileNode) {
|
if (!iconQrcFileNode) {
|
||||||
// The QRC file that we want doesn't exist or is not listed under RESOURCES in the .pro.
|
// The QRC file that we want doesn't exist or is not listed under RESOURCES in the .pro.
|
||||||
|
if (project)
|
||||||
*resourceFilePath = project->projectDirectory().toString() + "/" + isoIconsQrcFile;
|
*resourceFilePath = project->projectDirectory().toString() + "/" + isoIconsQrcFile;
|
||||||
|
|
||||||
// We assume that the .pro containing the QML file is an acceptable place to add the .qrc file.
|
// We assume that the .pro containing the QML file is an acceptable place to add the .qrc file.
|
||||||
|
Reference in New Issue
Block a user