diff options
author | Andy Shaw <andy.shaw@digia.com> | 2015-01-14 01:09:55 +0100 |
---|---|---|
committer | Alex Blasche <alexander.blasche@theqtcompany.com> | 2015-01-16 09:02:53 +0100 |
commit | c2d230954690f83ffc19b752dfe300f293da0998 (patch) | |
tree | 1508a831003bccbd4a468b0d84944bdcbaac3de6 | |
parent | 01d3663a044b650e0bfa797c5e02b0e8bb37246a (diff) | |
download | qtlocation-c2d230954690f83ffc19b752dfe300f293da0998.tar.gz |
Remove "qrc:/" if it is the start of the nmea source url
If a relative path is given and the source of the qml file is inside the
qrc then it will cause "qrc:/" to be prepended causing it to fail to find
the file. Therefore it should also remove "qrc:/" from the start of the
url if that exists.
Change-Id: I369ae933d77511a8f7b9db7585922b8ad70ef571
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
-rw-r--r-- | src/imports/positioning/qdeclarativepositionsource.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/imports/positioning/qdeclarativepositionsource.cpp b/src/imports/positioning/qdeclarativepositionsource.cpp index 26b67895..a770e664 100644 --- a/src/imports/positioning/qdeclarativepositionsource.cpp +++ b/src/imports/positioning/qdeclarativepositionsource.cpp @@ -240,6 +240,8 @@ void QDeclarativePositionSource::setNmeaSource(const QUrl &nmeaSource) localFileName.remove(0, 7); } else if (localFileName.startsWith("file:///")) { localFileName.remove(0, 7); + } else if (localFileName.startsWith("qrc:/")) { + localFileName.remove(0, 5); } if (!QFile::exists(localFileName) && localFileName.startsWith("/")) { localFileName.remove(0,1); |