On Sat, May 10, 2014 at 2:28 PM, Jake Petroules <
[email protected]> wrote:

> And what about 1.0.0b2? Wouldn't you expect that to be greater than
> 1.0.0b? The problem with trying to implement one comparison algorithm is
> that there are so many different versioning formats in use (at least,
> within the suffix part) that it's nearly impossible to do something that
> works reasonably well for all of them at the same time.
>
> At the absolute least we should have some means to use a custom suffix
> comparison (compare() overload that takes a function as a parameter?).
>

Correct me if I am wrong but it sounds like there needs to be some
additional information to perform the compare.  It looks like the suffix
needs to be labeled as pre-release or release for each version.  Instead of
putting that into the compare, it could be a member variable for the
QVersion.  This would allow for "1.0.0b2" to compare properly with
"1.0.0beta" without providing extra flags and the label will follow the
instance of QVersion.
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to