[Development] Adding support for version number comparisons

Keith Gardner kreios4004 at gmail.com
Mon Jun 2 14:12:11 CEST 2014


On Mon, Jun 2, 2014 at 2:36 AM, Simon Hausmann <simon.hausmann at digia.com>
wrote:

> On Saturday 31. May 2014 15.02.49 Keith Gardner wrote:
> [...]
> > > And then you'd use: QVersion::compare(a, b, myCompare);
> > >
> > >
> > > Big +1 to everything. This approach should serve everyones' use cases;
> > > let's get this integration rolling.
> >
> > I can agree to that.  I will have an update this weekend with this spec.
>
> On the topic of this new class, I'd like to suggest a name different from
> QVersion.
>
> We have had a global function qVersion() for a long time and I'm worried
> that
> a class name QVersion (as it appears in code completions, etc.) might
> mislead
> users to thinking that it is related to the version of Qt, which it isn't.
>
> I suggest a name that is more centric towards the _function_ of the class,
> comparison of different software versions.
>

QVersionInformation was also proposed as a name in the code review.  I
don't have a problem with changing the name other than it is really long
for a simple class.

As for the qVersion() function, I was thinking of adding some static
functions to get a QVersion of the compiled version compiled and runtime
versions of Qt.  I was planning on adding these two functions in a new
patch because of the duplication of functionality would have its own
discussion.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20140602/cfc53399/attachment.html>


More information about the Development mailing list