diff options
author | Andy Shaw <andy.shaw@qt.io> | 2019-11-15 14:50:46 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2019-11-15 16:24:54 +0100 |
commit | 7db4df2deca52a30b4c068abd4683a1720cf281e (patch) | |
tree | 05d748a9c654e575ea643e25a6d11bafa6a81a5c /src/quickcontrols2/qquickstyle.cpp | |
parent | 9c05807b951167bc0c8385811c9df1bd9d48ca6d (diff) |
Include the Android specific path for the imports
androiddeployqt will put all the files originally in the assets into a
rcc file now instead of having them copied over as before. Therefore the
styles need to be searched for in that path to see if they exist.
Fixes: QTBUG-79952
Change-Id: Ief8fc59257d3b329dd8b5b28190433e1b1a7f12d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Diffstat (limited to 'src/quickcontrols2/qquickstyle.cpp')
-rw-r--r-- | src/quickcontrols2/qquickstyle.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/quickcontrols2/qquickstyle.cpp b/src/quickcontrols2/qquickstyle.cpp index 408a0de3..7a3359ef 100644 --- a/src/quickcontrols2/qquickstyle.cpp +++ b/src/quickcontrols2/qquickstyle.cpp @@ -119,10 +119,15 @@ static QStringList defaultImportPathList() { QStringList importPaths; importPaths.reserve(3); -#ifndef QT_STATIC +#ifdef Q_OS_ANDROID + // androiddeployqt puts the QML files inside a resource file and they are not + // showing up in the Qml2ImportsPath as a result + importPaths += QStringLiteral(":/android_rcc_bundle/qml"); +#else +# ifndef QT_STATIC importPaths += QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); +# endif #endif - importPaths += envPathList("QML2_IMPORT_PATH"); importPaths += QStringLiteral(":/qt-project.org/imports"); importPaths += QCoreApplication::applicationDirPath(); return importPaths; |