From 4458589b4082ca060384f5b3af8dfcbdb677da4d Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 14 May 2018 11:08:23 +0200 Subject: 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 --- src/quickcontrols2/qquickstyle.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/quickcontrols2') 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(); -- cgit v1.2.3