summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAntti Määttä <antti.maatta@qt.io>2019-06-18 12:55:14 +0300
committerAntti Määttä <antti.maatta@qt.io>2019-06-18 12:57:38 +0300
commit899724924e71ed7e13e5698dec9ade21ba8d40e4 (patch)
tree1e6f0a5d2d193416492f8076809eebfdb322f5e8 /src
parentba909c8bd05fd66eb103eadd69dfd8a03072394e (diff)
Fix preload/unloadSlide component elementPathv2.4.0-beta4
Use the existing helper to resolve elementPath to the component rather than just use the name of a child element. This way the function behaves the same as goToSlide. Change-Id: I87114071d3f8aed8d18307557dfb05b40150c94c Reviewed-by: Jari Karppinen <jari.karppinen@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/runtime/Qt3DSApplication.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/runtime/Qt3DSApplication.cpp b/src/runtime/Qt3DSApplication.cpp
index 9f013a2..d215e2f 100644
--- a/src/runtime/Qt3DSApplication.cpp
+++ b/src/runtime/Qt3DSApplication.cpp
@@ -1623,8 +1623,10 @@ struct SApp : public IApplication
// else assume main presentation and component:slide
}
component = presentation->GetRoot();
- if (!componentName.isNull() && componentName != component->m_Name)
- component = component->FindChild(CHash::HashString(qPrintable(componentName)));
+ if (!componentName.isNull() && componentName != component->m_Name) {
+ component = CQmlElementHelper::GetElement(*this, presentation,
+ qPrintable(componentName), nullptr);
+ }
if (!component) {
qCWarning(WARNING) << "Could not find slide: " << elementPath;
return false;