summaryrefslogtreecommitdiffstats
path: root/src/uipparser
diff options
context:
space:
mode:
authorAntti Määttä <antti.maatta@qt.io>2019-07-12 14:27:28 +0300
committerAntti Määttä <antti.maatta@qt.io>2019-08-15 15:53:43 +0300
commitbce235e00353b63cefcc3b41ed78e1d29c583486 (patch)
tree51789f6c4a7c5979c37414e4378129cca0c3a788 /src/uipparser
parent05aaa52fdb679ad13058bfa4bb0bffc9c11f8d81 (diff)
Lazy load subpresentations
Task-number: QT3DS-3731 Change-Id: Ifa7bc5fd3452e0a89576f040c232468af04ed39d Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/uipparser')
-rw-r--r--src/uipparser/Qt3DSUIPParserImpl.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/uipparser/Qt3DSUIPParserImpl.cpp b/src/uipparser/Qt3DSUIPParserImpl.cpp
index d16bc37..380a43c 100644
--- a/src/uipparser/Qt3DSUIPParserImpl.cpp
+++ b/src/uipparser/Qt3DSUIPParserImpl.cpp
@@ -2163,12 +2163,19 @@ BOOL CUIPParserImpl::LoadSlideElementAttrs(IPresentation &inPresentation, bool m
}
if (!IsTrivial(sourcepath) && sourcepath[0] != '#') {
AddSourcePath(sourcepath, ibl);
- if (!masterSlide) {
- theBuilder.AddSourcePath(sourcepath);
+ theBuilder.AddSourcePath(sourcepath);
+ if (!masterSlide)
m_slideSourcePaths.push_back(QString::fromLatin1(sourcepath));
- }
+ if (AreEqual(inElementData.m_Type.c_str(), "Layer"))
+ theBuilder.AddSubPresentation(sourcepath);
+
}
}
+ const char8_t *subpres;
+ if (inReader.UnregisteredAtt("subpresentation", subpres)) {
+ if (!IsTrivial(subpres))
+ theBuilder.AddSubPresentation(subpres);
+ }
const bool dyn = IsDynamicObject(inElementData.m_Type);
Option<qt3dsdm::SMetaDataCustomMaterial> mat;
@@ -2243,10 +2250,9 @@ BOOL CUIPParserImpl::LoadSlideElementAttrs(IPresentation &inPresentation, bool m
bool hasAtt = inReader.UnregisteredAtt(prop.m_Name, theAttValue);
if (hasAtt && !IsTrivial(theAttValue) ) {
AddSourcePath(theAttValue, false);
- if (!masterSlide) {
- theBuilder.AddSourcePath(theAttValue);
+ theBuilder.AddSourcePath(theAttValue);
+ if (!masterSlide)
m_slideSourcePaths.push_back(QString::fromLatin1(theAttValue));
- }
}
}
}