summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-09-03 14:21:52 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-09-03 16:44:08 +0200
commit098d7549c17919683a5ba1600f1fd9b6c3bc420f (patch)
treed87c08b94eea355f47ac065b8a2b8217bd989f0f /src/tools
parentf00e32665679ee225384743849156fbb3bd5eb64 (diff)
Android: Fix architecture extraction from file path in androiddeployqt
The regular expression was too greedy with the ".*" sub-expression, thus if the prefix path contained underscores, the extracted architecture value was wrong. Example prefix: ~/dev/qt/qt514_built_android/qtbase Example captured architecture: built_android/qtbase/plugins/platforms/android/libqtforandroid_x86 First extract the file name from the given path, and then match on just the file name. Change-Id: I8e56e56747096c7a2398e959d91c2d1f65de2495 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/androiddeployqt/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp
index 206c0ff374..794e3b49ae 100644
--- a/src/tools/androiddeployqt/main.cpp
+++ b/src/tools/androiddeployqt/main.cpp
@@ -314,8 +314,10 @@ static QString shellQuote(const QString &arg)
QString architecureFromName(const QString &name)
{
+ const QFileInfo fi(name);
+ const QString extractedFileName = fi.fileName();
QRegExp architecture(QStringLiteral(".*_(.*)\\.so"));
- if (!architecture.exactMatch(name))
+ if (!architecture.exactMatch(extractedFileName))
return {};
return architecture.capturedTexts().last();
}