forked from qt-creator/qt-creator
Android: Fix version mapping from sdk_definitions.json
- Support multi-digit values for version ranges, via "+" in the RegExp - Turn the RegExp expression into a raw string for easier reading - Fix shortVersion (Maj.Min.-1) handling by appending the ".-1" - Explicitly define the Patch number range for 5.15 in sdk_definitions Change-Id: Icf22f2b4f865b4d5bcff48569aa58137294129ce Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -344,13 +344,13 @@ void AndroidConfig::parseDependenciesJson()
|
||||
|
||||
auto fillQtVersionsRange = [](const QString &shortVersion) {
|
||||
QList<QtVersionNumber> versions;
|
||||
QRegularExpression re("([0-9]\\.[0-9]*\\.)\\[([0-9])\\-([0-9])\\]");
|
||||
const QRegularExpression re(R"(([0-9]\.[0-9]+\.)\[([0-9]+)\-([0-9]+)\])");
|
||||
QRegularExpressionMatch match = re.match(shortVersion);
|
||||
if (match.hasMatch() && match.lastCapturedIndex() == 3)
|
||||
for (int i = match.captured(2).toInt(); i <= match.captured(3).toInt(); ++i)
|
||||
versions.append(QtVersionNumber(match.captured(1) + QString::number(i)));
|
||||
else
|
||||
versions.append(QtVersionNumber(shortVersion));
|
||||
versions.append(QtVersionNumber(shortVersion + ".-1"));
|
||||
|
||||
return versions;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user