From de1ef8eb53921181c88e9ebd23d9f3059b09d44a Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Date: Mon, 8 Sep 2014 16:52:54 +0200 Subject: [PATCH] Android: Make search for import path case insensitive on Windows The file system is case insensitive on Windows, and if you e.g. specified a lower case drive letter in your prefix when building Qt, then we would bail out because we would think the path of any given import was located outside the import paths specified. Task-number: QTBUG-41012 Change-Id: I22a1be32a221cd754dfed93e125d685bade65828 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> --- src/androiddeployqt/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/androiddeployqt/main.cpp b/src/androiddeployqt/main.cpp index e3ed5c226..8452bff22 100644 --- a/src/androiddeployqt/main.cpp +++ b/src/androiddeployqt/main.cpp @@ -1695,7 +1695,13 @@ bool scanImports(Options *options, QSet<QString> *usedDependencies) QString importPathOfThisImport; foreach (QString importPath, importPaths) { - if (info.absoluteFilePath().startsWith(importPath)) { +#if defined(Q_OS_WIN32) + Qt::CaseSensitivity caseSensitivity = Qt::CaseInsensitive; +#else + Qt::CaseSensitivity caseSensitivity = Qt::CaseSensitive; +#endif + QString cleanImportPath = QDir::cleanPath(importPath); + if (info.absoluteFilePath().startsWith(cleanImportPath, caseSensitivity)) { importPathOfThisImport = importPath; break; } -- GitLab