forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user