From 7db4df2deca52a30b4c068abd4683a1720cf281e Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 15 Nov 2019 14:50:46 +0100 Subject: 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 Reviewed-by: BogDan Vatra --- src/quickcontrols2/qquickstyle.cpp | 9 +++++++-- 1 file 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; -- cgit v1.2.3