diff options
author | Mahmoud Badri <mahmoud.badri@qt.io> | 2018-08-27 12:46:20 +0300 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-08-27 10:12:00 +0000 |
commit | 998e6951a695e176bdbfef9409f8cd4af128f422 (patch) | |
tree | a3e23082d18e36880ca4fee8bb043423ee65aae7 | |
parent | ce2e3b3eeaac916521f2a27d17c54bc043ae1492 (diff) |
Fix path resolution
Small fix for how an asset's path is resolved.
Task-number: QT3DS-2027
Task-number: QT3DS-2119
Change-Id: Ic887db7c4eb7fdbb0f3f6446278478ef0626ced9
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
-rw-r--r-- | src/runtime/q3dsuippresentation.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/runtime/q3dsuippresentation.cpp b/src/runtime/q3dsuippresentation.cpp index 1c32d94..a704662 100644 --- a/src/runtime/q3dsuippresentation.cpp +++ b/src/runtime/q3dsuippresentation.cpp @@ -3966,9 +3966,8 @@ QString Q3DSUipPresentation::assetFileName(const QString &xmlFileNameRef, int *p searchPath.append(QLatin1String("/../")); while (!QFileInfo(searchPath + rawName).exists() && ++loops < 3) searchPath.append(QLatin1String("../")); - if (QFileInfo(path).exists()) - path = searchPath + rawName; - else + path = searchPath + rawName; + if (!QFileInfo(path).exists()) path = QFileInfo(fn).absoluteFilePath(); } } |