forked from qt-creator/qt-creator
Qnx: Fix version comparison
Change-Id: I6f55252bc777bb0dd64698982e62c873c5b9e663 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
a6d8bbbb14
commit
37767bc233
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user