diff options
author | Antti Määttä <antti.maatta@qt.io> | 2019-04-12 13:54:35 +0300 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2019-05-03 09:34:00 +0000 |
commit | 73ebd0f9cf6376a762c96d37ab6046fefd8d4789 (patch) | |
tree | e415e2af7e30002563422ba9cbec02f3276b013e /src/Runtime/Source/uipparser/Qt3DSUIPParserImpl.cpp | |
parent | ccc70e48e576c0dffc289df4850a909fb6fef83d (diff) |
Implement dynamic loading of slide resources
Implements loading of textures and images during runtime instead of load
time.
- Images which are not part of any slide are loaded at load time
- Master slide images are always loaded at load time
- Images used in a slide are loaded when the slide is entered
- Images are unloaded when slide is exited and any other slide does not
use them
Task-number: QT3DS-3208
Change-Id: I7a827a5e828908efd2b104fe25374c66958319d2
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Runtime/Source/uipparser/Qt3DSUIPParserImpl.cpp')
-rw-r--r-- | src/Runtime/Source/uipparser/Qt3DSUIPParserImpl.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Runtime/Source/uipparser/Qt3DSUIPParserImpl.cpp b/src/Runtime/Source/uipparser/Qt3DSUIPParserImpl.cpp index 746d5e58..2ddffe3f 100644 --- a/src/Runtime/Source/uipparser/Qt3DSUIPParserImpl.cpp +++ b/src/Runtime/Source/uipparser/Qt3DSUIPParserImpl.cpp @@ -2089,8 +2089,11 @@ BOOL CUIPParserImpl::LoadSlideElementAttrs(IPresentation &inPresentation, bool, ++theRef; bool isSet = AreEqual(inReader.GetNarrowElementName(), "Set"); const char8_t *sourcepath; - if (inReader.UnregisteredAtt("sourcepath", sourcepath)) + if (inReader.UnregisteredAtt("sourcepath", sourcepath)) { AddSourcePath(sourcepath); + theBuilder.AddSourcePath(sourcepath); + m_slideSourcePaths.push_back(QString::fromLatin1(sourcepath)); + } // We don't force set attributes when a given component has a set command within one of its // child states. This happens in the case of actions (but nothing else). |