1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "qurlhelper_p.h"
5
6QT_BEGIN_NAMESPACE
7
8namespace Qt3DCore {
9
10QString QUrlHelper::urlToLocalFileOrQrc(const QUrl &url)
11{
12 const QString scheme(url.scheme().toLower());
13 if (scheme == QLatin1String("qrc")) {
14 if (url.authority().isEmpty())
15 return QLatin1Char(':') + url.path();
16 return QString();
17 }
18
19#if defined(Q_OS_ANDROID)
20 if (scheme == QLatin1String("assets")) {
21 if (url.authority().isEmpty())
22 return url.toString();
23 return QString();
24 }
25#endif
26
27 return url.toLocalFile();
28}
29
30} // Qt3DCore
31
32QT_END_NAMESPACE
33

source code of qt3d/src/core/qurlhelper.cpp