summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Render/StudioRendererTranslation.cpp
diff options
context:
space:
mode:
authorMäättä Antti <antti.maatta@qt.io>2018-06-01 12:32:53 +0300
committerAntti Määttä <antti.maatta@qt.io>2018-06-19 08:49:35 +0000
commit0196510e727f2501c2c1cf0ad6db92b4fcd380f7 (patch)
tree3da2e29bd60de5daf529333f443c7b955b095201 /src/Authoring/Studio/Render/StudioRendererTranslation.cpp
parentdad11686f36385c579b109861251b0e23a95d4c4 (diff)
Implement preview of qml streamer content in studio
Task-number: QT3DS-665 Change-Id: Ib8adeaa68e7116161bf898dd898215240a64f1ab Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Render/StudioRendererTranslation.cpp')
-rw-r--r--src/Authoring/Studio/Render/StudioRendererTranslation.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Authoring/Studio/Render/StudioRendererTranslation.cpp b/src/Authoring/Studio/Render/StudioRendererTranslation.cpp
index 139ab573..95bba43c 100644
--- a/src/Authoring/Studio/Render/StudioRendererTranslation.cpp
+++ b/src/Authoring/Studio/Render/StudioRendererTranslation.cpp
@@ -219,8 +219,10 @@ struct STranslatorDataModelParser
Q3DStudio::CFilePath theDirectory = m_Context.m_Doc.GetDocumentDirectory();
Q3DStudio::CFilePath theResolvedPath =
Q3DStudio::CFilePath::CombineBaseAndRelative(theDirectory, outValue.c_str());
- outValue =
- m_Context.m_Context.GetStringTable().RegisterStr(theResolvedPath.toCString());
+ if (theResolvedPath.exists()) {
+ outValue = m_Context.m_Context.GetStringTable()
+ .RegisterStr(theResolvedPath.toCString());
+ }
}
return true;
}