[Development] Adding support for version number comparisons

Jake Petroules jake.petroules at petroules.com
Mon Jun 2 14:21:20 CEST 2014


On 2014-06-02, at 08:12 AM, Keith Gardner <kreios4004 at gmail.com> wrote:

> 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.

-1 to QVersionInformation. Let's not let past naming mistakes mangle the new ones. Perhaps we could add qBuildVersion and qRuntimeVersion as you suggest, and deprecate qVersion?
-- 
Jake Petroules - jake.petroules at petroules.com
Chief Technology Officer - Petroules Corporation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20140602/f95422ba/attachment.html>


More information about the Development mailing list