summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/runtime/Qt3DSQmlElementHelper.cpp2
-rw-r--r--src/runtime/Qt3DSQmlEngine.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/Qt3DSQmlElementHelper.cpp b/src/runtime/Qt3DSQmlElementHelper.cpp
index 4dad315..0becf4f 100644
--- a/src/runtime/Qt3DSQmlElementHelper.cpp
+++ b/src/runtime/Qt3DSQmlElementHelper.cpp
@@ -80,7 +80,7 @@ TElement *CQmlElementHelper::GetElement(qt3ds::runtime::IApplication &inApplicat
TElement *theElement = inStartElement;
if (delimIndex > 0) {
thePresentation = inApplication.LoadAndGetPresentationById(path.left(delimIndex));
- path = path.right(delimIndex + 1);
+ path = path.right(path.length() - delimIndex - 1);
}
if (thePresentation == nullptr)
diff --git a/src/runtime/Qt3DSQmlEngine.cpp b/src/runtime/Qt3DSQmlEngine.cpp
index d6c563a..fa2a5d7 100644
--- a/src/runtime/Qt3DSQmlEngine.cpp
+++ b/src/runtime/Qt3DSQmlEngine.cpp
@@ -2114,7 +2114,7 @@ TElement *CQmlEngineImpl::getTarget(const QString &component) {
target = CQmlElementHelper::GetElement(
*m_Application,
m_Application->LoadAndGetPresentationById(component.left(delimIndex)),
- component.right(delimIndex + 1), NULL);
+ component.right(component.length() - delimIndex - 1), NULL);
} else {
target = CQmlElementHelper::GetElement(
*m_Application,