diff options
| author | J-P Nurmi <jpnurmi@qt.io> | 2018-05-15 13:35:10 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-05-15 14:31:27 +0000 |
| commit | b8a3b90144041774d02d8e33ca1c92e833e633fb (patch) | |
| tree | a1a5280665ef3497ba06e941aa9a7d77d7089241 /src/qml/jsruntime/qv4arraybuffer.cpp | |
| parent | 6e5251dd3d7b21b67693a79d3470ec2ba80ba97e (diff) | |
Fix QQmlExtensionPlugin::baseUrl() in static builds
Don't assume the file system. Everything is bundled into resources
in static builds. For example, for the QML modules in Qt, the base URL
was "file::/qt-project.org/imports/QtFoo/Bar". This patch fixes it so
that the base URL becomes "qrc:/qt-project.org/imports/QtFoo/Bar".
This fix removes the need for this type of special casing in QQC2 when
resolving the URL for qmlRegisterType() for internal QML composite
types:
#ifdef QT_STATIC
QString url = QLatin1String("qrc") + baseUrl().path();
#else
QString url = baseUrl().toString();
#endif
The piece of code originates from QQC2 commit(s) e3c52b2 (and 199962a)
that were presumably fixing support for static builds.
Change-Id: I4fff354c3ed5309843e9122a0175593f4fbb5661
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4arraybuffer.cpp')
0 files changed, 0 insertions, 0 deletions
