Fix the astyle version matching

In my case astyle returns "Artistic Style Version 3.1" and
it didn't want to match.

Change-Id: Ie3bee186cb39d29f11fa1add2f99c87d5fd67842
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2021-08-05 15:55:15 +02:00
parent 124dc2c6b6
commit 82340dbf73

View File

@@ -71,7 +71,7 @@ ArtisticStyleSettings::ArtisticStyleSettings() :
static int parseVersion(const QString &text)
{
// The version in Artistic Style is printed like "Artistic Style Version 2.04"
const QRegularExpression rx("([2-9]{1})\\.([0-9]{2})(\\.[1-9]{1})?$");
const QRegularExpression rx("([2-9]{1})\\.([0-9]{1,2})(\\.[1-9]{1})?$");
const QRegularExpressionMatch match = rx.match(text);
if (match.hasMatch()) {
const int major = match.captured(1).toInt() * 100;