From 37767bc2336180f4efcf5deb832f753c39f77e5c Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 19 May 2014 23:35:22 +0300 Subject: Qnx: Fix version comparison Change-Id: I6f55252bc777bb0dd64698982e62c873c5b9e663 Reviewed-by: Tobias Hunger --- src/plugins/qnx/qnxversionnumber.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/qnx/qnxversionnumber.cpp b/src/plugins/qnx/qnxversionnumber.cpp index 15650ac82a..80a5c011f9 100644 --- a/src/plugins/qnx/qnxversionnumber.cpp +++ b/src/plugins/qnx/qnxversionnumber.cpp @@ -73,10 +73,12 @@ bool QnxVersionNumber::operator >(const QnxVersionNumber &b) const int aInt = aParts[j].toInt(&aOk); int bInt = bParts[j].toInt(&bOk); - if (aOk && bOk) + if (aOk && bOk && (aInt != bInt)) return aInt > bInt; - return aParts[j].compare(bParts[j]) > 0; + int compare = aParts[j].compare(bParts[j]); + if (compare != 0) + return compare > 0; } } } -- cgit v1.2.1