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>
This commit is contained in:
parent
f00e326656
commit
098d7549c1
@ -314,8 +314,10 @@ static QString shellQuote(const QString &arg)
|
|||||||
|
|
||||||
QString architecureFromName(const QString &name)
|
QString architecureFromName(const QString &name)
|
||||||
{
|
{
|
||||||
|
const QFileInfo fi(name);
|
||||||
|
const QString extractedFileName = fi.fileName();
|
||||||
QRegExp architecture(QStringLiteral(".*_(.*)\\.so"));
|
QRegExp architecture(QStringLiteral(".*_(.*)\\.so"));
|
||||||
if (!architecture.exactMatch(name))
|
if (!architecture.exactMatch(extractedFileName))
|
||||||
return {};
|
return {};
|
||||||
return architecture.capturedTexts().last();
|
return architecture.capturedTexts().last();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user