[Development] Adding support for version number comparisons
Thiago Macieira
thiago.macieira at intel.com
Sun May 11 00:36:01 CEST 2014
Em sáb 10 maio 2014, às 15:28:03, Jake Petroules escreveu:
> 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?).
If you need that, I'd say you should setSuffix(QString()), compare() and, if it
compares equally, implement your own custom comparison.
Anyway, given that this is going to be complex, I propose we make up our own
list and *document* it.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list