diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2018-05-14 11:08:23 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-05-14 11:25:45 +0000 |
commit | 4458589b4082ca060384f5b3af8dfcbdb677da4d (patch) | |
tree | 9b2ce685f8f38a810466d8acb8519388b4a0b8cc /src/quickcontrols2/qquickstyle.cpp | |
parent | 6077e77352add46c2f185d724c2c91946ef0b05d (diff) |
Fix external styles in static builds
This fixes a regression caused by d2897a6c. For example, running a
statically built Gallery example with the Material style resulted to:
QQmlApplicationEngine failed to load component
qrc:/gallery.qml:58 Type ApplicationWindow unavailable
file:///path/to/QtQuick/Controls.2/Material/qmldir:-1 module "QtQuick.Controls.Material" plugin "qtquickcontrols2materialstyleplugin" not found
Even if we install .qml files in static builds (so that people can copy
them as a starting point from a Qt for iOS installation), those files
must not be loaded in static builds. Previously this case was handled
by the QT_STATIC guard in the former typeUrl(), but the special case
was missed while taking QQuickStyleSelector into use for the internal
types in d2897a6c.
Change-Id: Ie4d7956c7eccb0f4e67b6f3a2b5368437636fa78
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quickcontrols2/qquickstyle.cpp')
-rw-r--r-- | src/quickcontrols2/qquickstyle.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quickcontrols2/qquickstyle.cpp b/src/quickcontrols2/qquickstyle.cpp index 162f3526..4b5198ca 100644 --- a/src/quickcontrols2/qquickstyle.cpp +++ b/src/quickcontrols2/qquickstyle.cpp @@ -115,7 +115,9 @@ static QStringList defaultImportPathList() { QStringList importPaths; importPaths.reserve(3); +#ifndef QT_STATIC importPaths += QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); +#endif importPaths += envPathList("QML2_IMPORT_PATH"); importPaths += QStringLiteral(":/qt-project.org/imports"); importPaths += QCoreApplication::applicationDirPath(); |