summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristian Strømme <christian.stromme@qt.io>2018-09-12 17:07:21 +0200
committerChristian Stromme <christian.stromme@qt.io>2018-09-17 12:43:29 +0000
commit1e7e79f2703d20ff5314aabe3d9ed13c7d6e2da4 (patch)
tree737be312e9bd2e87cdabf9995206c70029c0f3e8 /tests
parent80ff8e0cffdef6fa4636cbbfeb707166ce3fa9fa (diff)
Fix getStartAndEndTime()
Take into consideration that a layer on the master slide that doesn't get a property change on a child slide, still has an implicit endTime. Note that this change also contains some textual description of how the function works and some recommendations for future optimizations. The optimizations are left out for now, as they are considered nice to have, but are not critical in any way. Change-Id: I592061f7911489a8130d0374afb10e6213332a67 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/scenes/slideplayer/slideduration/slideduration.uia6
-rw-r--r--tests/scenes/slideplayer/slideduration/slideduration.uip33
2 files changed, 39 insertions, 0 deletions
diff --git a/tests/scenes/slideplayer/slideduration/slideduration.uia b/tests/scenes/slideplayer/slideduration/slideduration.uia
new file mode 100644
index 0000000..57b6fdd
--- /dev/null
+++ b/tests/scenes/slideplayer/slideduration/slideduration.uia
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding='utf-8'?>
+<application xmlns="http://qt.io/qt3dstudio/uia">
+ <assets initial="nn">
+ <presentation id="nn" src="slideduration.uip"/>
+ </assets>
+</application>
diff --git a/tests/scenes/slideplayer/slideduration/slideduration.uip b/tests/scenes/slideplayer/slideduration/slideduration.uip
new file mode 100644
index 0000000..9c64081
--- /dev/null
+++ b/tests/scenes/slideplayer/slideduration/slideduration.uip
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<UIP version="4" >
+ <Project >
+ <ProjectSettings author="" company="" presentationWidth="800" presentationHeight="600" maintainAspect="False" >
+ <CustomColors count="16" >#7391ff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff</CustomColors>
+ </ProjectSettings>
+ <Graph >
+ <Scene id="Scene" >
+ <Layer id="Layer" >
+ <Camera id="Camera" />
+ <Light id="Light" />
+ </Layer>
+ <Layer id="Layer2" >
+ <Camera id="Camera_001" />
+ <Light id="Light_001" />
+ </Layer>
+ </Scene>
+ </Graph>
+ <Logic >
+ <State name="Master Slide" component="#Scene" >
+ <Add ref="#Layer" endtime="12000" />
+ <Add ref="#Camera" endtime="12000" />
+ <Add ref="#Light" endtime="12000" />
+ <State id="Scene-Slide1" name="Slide1" >
+ <!-- NOTE: There's set property for the Layer on this slide, which means it's endtime is 10000 -->
+ <Add ref="#Layer2" name="Layer2" endtime="12000" starttime="2000" />
+ <Add ref="#Camera_001" endtime="12000" starttime="2000" />
+ <Add ref="#Light_001" endtime="12000" starttime="2000" />
+ </State>
+ </State>
+ </Logic>
+ </Project>
+</UIP>