summaryrefslogtreecommitdiff
path: root/src/plugins/git/gitclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/git/gitclient.cpp')
-rw-r--r--src/plugins/git/gitclient.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp
index 61747141ed..6facdc93a0 100644
--- a/src/plugins/git/gitclient.cpp
+++ b/src/plugins/git/gitclient.cpp
@@ -2373,12 +2373,12 @@ unsigned GitClient::synchronousGitVersion(QString *errorMessage) const
}
// cut 'git version 1.6.5.1.sha'
const QString output = commandOutputFromLocal8Bit(outputText);
- QRegExp versionPattern(QLatin1String("^[^\\d]+([\\d])\\.([\\d])\\.([\\d]).*$"));
+ QRegExp versionPattern(QLatin1String("^[^\\d]+(\\d+)\\.(\\d+)\\.(\\d+).*$"));
QTC_ASSERT(versionPattern.isValid(), return 0);
QTC_ASSERT(versionPattern.exactMatch(output), return 0);
- const unsigned major = versionPattern.cap(1).toUInt();
- const unsigned minor = versionPattern.cap(2).toUInt();
- const unsigned patch = versionPattern.cap(3).toUInt();
+ const unsigned major = versionPattern.cap(1).toUInt(0, 16);
+ const unsigned minor = versionPattern.cap(2).toUInt(0, 16);
+ const unsigned patch = versionPattern.cap(3).toUInt(0, 16);
return version(major, minor, patch);
}