Re: [Development] Adding support for version number comparisons

2014-07-11 Thread Keith Gardner
On Thu, Jul 10, 2014 at 8:47 AM, Kobus Jaroslaw jaroslaw.ko...@digia.com wrote: Hi All, With the current state of QVersion (patchset 35) I see the following issues: 1. operator() doesn't take the suffix into account (mentioned below) 2. There is no handling of sub version (you cannot

Re: [Development] Adding support for version number comparisons

2014-07-11 Thread Kobus Jaroslaw
___ From: Keith Gardner [kreios4...@gmail.com] Sent: 11 July 2014 14:34 To: Kobus Jaroslaw Cc: development@qt-project.org Subject: Re: [Development] Adding support for version number comparisons On Thu, Jul 10, 2014 at 8:47 AM, Kobus Jaroslaw

Re: [Development] Adding support for version number comparisons

2014-07-10 Thread Keith Gardner
On Sat, May 31, 2014 at 2:00 PM, Thiago Macieira thiago.macie...@intel.com wrote: Em sex 09 maio 2014, às 11:36:08, Keith Gardner escreveu: I have been working on adding a class to QtCore (QVersion) to support storing version numbers, convert to/from QString, and having comparison

Re: [Development] Adding support for version number comparisons

2014-07-10 Thread Olivier Goffart
On Monday 02 June 2014 13:24:55 Richard Moore wrote: On 2 June 2014 13:12, Keith Gardner kreios4...@gmail.com wrote: On Mon, Jun 2, 2014 at 2:36 AM, Simon Hausmann simon.hausm...@digia.com wrote: I suggest a name that is more centric towards the _function_ of the class, comparison of

Re: [Development] Adding support for version number comparisons

2014-07-10 Thread Keith Gardner
On Thu, Jul 10, 2014 at 7:31 AM, Olivier Goffart oliv...@woboq.com wrote: On Monday 02 June 2014 13:24:55 Richard Moore wrote: On 2 June 2014 13:12, Keith Gardner kreios4...@gmail.com wrote: On Mon, Jun 2, 2014 at 2:36 AM, Simon Hausmann simon.hausm...@digia.com wrote: I suggest

Re: [Development] Adding support for version number comparisons

2014-07-10 Thread Olivier Goffart
On Thursday 10 July 2014 07:53:29 Keith Gardner wrote: On Thu, Jul 10, 2014 at 7:31 AM, Olivier Goffart oliv...@woboq.com wrote: On Monday 02 June 2014 13:24:55 Richard Moore wrote: On 2 June 2014 13:12, Keith Gardner kreios4...@gmail.com wrote: On Mon, Jun 2, 2014 at 2:36 AM, Simon

Re: [Development] Adding support for version number comparisons

2014-07-10 Thread Kobus Jaroslaw
-bounces+jaroslaw.kobus=digia@qt-project.org [development-bounces+jaroslaw.kobus=digia@qt-project.org] on behalf of Keith Gardner [kreios4...@gmail.com] Sent: 10 July 2014 14:21 To: Thiago Macieira Cc: development@qt-project.org Subject: Re: [Development] Adding support for version number

Re: [Development] Adding support for version number comparisons

2014-07-10 Thread Kobus Jaroslaw
-project.org [development-bounces+jaroslaw.kobus=digia@qt-project.org] on behalf of Keith Gardner [kreios4...@gmail.com] Sent: 10 July 2014 14:53 To: Olivier Goffart Cc: development@qt-project.org Subject: Re: [Development] Adding support for version number comparisons On Thu, Jul 10, 2014 at 7:31

Re: [Development] Adding support for version number comparisons

2014-07-10 Thread Thiago Macieira
On Thursday 10 July 2014 07:53:29 Keith Gardner wrote: Currently, the QVersion::compare has an overload to pass a functor that performs the suffix comparison. Are you suggesting having a default in the operators that can be overwritten? No global state, please. -- Thiago Macieira -

Re: [Development] Adding support for version number comparisons

2014-06-02 Thread Simon Hausmann
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

Re: [Development] Adding support for version number comparisons

2014-06-02 Thread Keith Gardner
On Mon, Jun 2, 2014 at 2:36 AM, Simon Hausmann simon.hausm...@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

Re: [Development] Adding support for version number comparisons

2014-06-02 Thread Jake Petroules
On 2014-06-02, at 08:12 AM, Keith Gardner kreios4...@gmail.com wrote: On Mon, Jun 2, 2014 at 2:36 AM, Simon Hausmann simon.hausm...@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

Re: [Development] Adding support for version number comparisons

2014-06-02 Thread Richard Moore
On 2 June 2014 13:12, Keith Gardner kreios4...@gmail.com wrote: On Mon, Jun 2, 2014 at 2:36 AM, Simon Hausmann simon.hausm...@digia.com wrote: I suggest a name that is more centric towards the _function_ of the class, comparison of different software versions. QVersionInformation was

Re: [Development] Adding support for version number comparisons

2014-06-02 Thread Simon Hausmann
On Monday 2. June 2014 13.24.55 Richard Moore wrote: On 2 June 2014 13:12, Keith Gardner kreios4...@gmail.com wrote: On Mon, Jun 2, 2014 at 2:36 AM, Simon Hausmann simon.hausm...@digia.com wrote: I suggest a name that is more centric towards the _function_ of the class, comparison of

Re: [Development] Adding support for version number comparisons

2014-06-02 Thread Jake Petroules
On 2014-06-02, at 08:24 AM, Richard Moore r...@kde.org wrote: On 2 June 2014 13:12, Keith Gardner kreios4...@gmail.com wrote: On Mon, Jun 2, 2014 at 2:36 AM, Simon Hausmann simon.hausm...@digia.com wrote: I suggest a name that is more centric towards the _function_ of the class,

Re: [Development] Adding support for version number comparisons

2014-06-02 Thread Keith Gardner
On Mon, Jun 2, 2014 at 7:33 AM, Jake Petroules jake.petrou...@petroules.com wrote: On 2014-06-02, at 08:24 AM, Richard Moore r...@kde.org wrote: On 2 June 2014 13:12, Keith Gardner kreios4...@gmail.com wrote: On Mon, Jun 2, 2014 at 2:36 AM, Simon Hausmann simon.hausm...@digia.com wrote:

Re: [Development] Adding support for version number comparisons

2014-05-31 Thread Thiago Macieira
Em sex 09 maio 2014, às 11:36:08, Keith Gardner escreveu: I have been working on adding a class to QtCore (QVersion) to support storing version numbers, convert to/from QString, and having comparison operators. My goal was to provide an API to assist in the following use cases: - Plugin

Re: [Development] Adding support for version number comparisons

2014-05-31 Thread Jake Petroules
On 2014-05-31, at 03:00 PM, Thiago Macieira thiago.macie...@intel.com wrote: Em sex 09 maio 2014, às 11:36:08, Keith Gardner escreveu: I have been working on adding a class to QtCore (QVersion) to support storing version numbers, convert to/from QString, and having comparison operators. My

Re: [Development] Adding support for version number comparisons

2014-05-31 Thread Keith Gardner
On Sat, May 31, 2014 at 2:09 PM, Jake Petroules jake.petrou...@petroules.com wrote: On 2014-05-31, at 03:00 PM, Thiago Macieira thiago.macie...@intel.com wrote: Em sex 09 maio 2014, às 11:36:08, Keith Gardner escreveu: I have been working on adding a class to QtCore (QVersion) to support

Re: [Development] Adding support for version number comparisons

2014-05-14 Thread Oswald Buddenhagen
On Tue, May 13, 2014 at 03:31:52PM -0500, Keith Gardner wrote: On Tue, May 13, 2014 at 3:06 PM, Oswald Buddenhagen oswald.buddenha...@digia.com wrote: my point is that this class is becoming unreasonably complex for a rather trivial thing, which only a fraction of the applications will

Re: [Development] Adding support for version number comparisons

2014-05-14 Thread Keith Gardner
1. Numerical groupings should be compared integers instead of characters in order to properly allow for alpha2 alpha11. 2. Delimiters should only be used to denote groups of content but be skipped during the compare. alpha == -alpha == ~alpha == .alpha 1. Can be

Re: [Development] Adding support for version number comparisons

2014-05-14 Thread Stephen Kelly
On Wednesday, May 14, 2014 07:41:20 you wrote: At this moment, the 'v' is optional and if present, will be ignored. Try to ignore the specificness of that. The only point I was making is this: Version number schemes change over time in a way you can't predict. Thanks, -- Join us at Qt

Re: [Development] Adding support for version number comparisons

2014-05-14 Thread Keith Gardner
Well, if you use a virtual, you'd simply subclass to handle the specific format for your project. I haven't thought about using inheritance to simplify the compare but I think that would provide the best compromise. What are your thoughts about comparing a QVersion to a QSpecializedVersion or

Re: [Development] Adding support for version number comparisons

2014-05-14 Thread André Somers
Keith Gardner schreef op 14-5-2014 15:45: Well, if you use a virtual, you'd simply subclass to handle the specific format for your project. I haven't thought about using inheritance to simplify the compare but I think that would provide the best compromise. What are your thoughts

Re: [Development] Adding support for version number comparisons

2014-05-14 Thread Thiago Macieira
Em qua 14 maio 2014, às 08:45:28, Keith Gardner escreveu: Well, if you use a virtual, you'd simply subclass to handle the specific format for your project. I haven't thought about using inheritance to simplify the compare but I think that would provide the best compromise. I don't want

Re: [Development] Adding support for version number comparisons

2014-05-14 Thread Jake Petroules
On 2014-05-14, at 04:26 PM, Thiago Macieira thiago.macie...@intel.com wrote: Em qua 14 maio 2014, às 08:45:28, Keith Gardner escreveu: Well, if you use a virtual, you'd simply subclass to handle the specific format for your project. I haven't thought about using inheritance to simplify the

Re: [Development] Adding support for version number comparisons

2014-05-14 Thread Thiago Macieira
Em qua 14 maio 2014, às 14:12:40, Stephen Kelly escreveu: Note also that version number schemes for particular software are not constant over time. https://blog.qt.digia.com/blog/2009/09/03/qt-4th-edition-feature-pack-7/ That was a joke! Tongue in cheek with how Symbian/S60 named its

Re: [Development] Adding support for version number comparisons

2014-05-14 Thread Thiago Macieira
Em qua 14 maio 2014, às 13:36:30, Thiago Macieira escreveu: QSysInfo::osVersion() will return Windows 8 but QSysInfo::osKernelRelease() will return 6.2.9200. BTW, on Linux: $ qtdiag | head -2 Qt 5.3.1 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 4.8.1 20130909

Re: [Development] Adding support for version number comparisons

2014-05-13 Thread Thiago Macieira
Em ter 13 maio 2014, às 11:58:15, Oswald Buddenhagen escreveu: On Mon, May 12, 2014 at 06:25:34PM -0700, Thiago Macieira wrote: Em seg 12 maio 2014, às 12:27:46, Oswald Buddenhagen escreveu: any a-priori transformations needed to make it actually work with random versioning schemes are

Re: [Development] Adding support for version number comparisons

2014-05-13 Thread Oswald Buddenhagen
On Tue, May 13, 2014 at 07:43:18AM -0700, Thiago Macieira wrote: Em ter 13 maio 2014, às 11:58:15, Oswald Buddenhagen escreveu: what is the added value of hard-coding arbitrary policies (and thereby restricting possible use cases) instead of providing a minimalistic solution (or two, one

Re: [Development] Adding support for version number comparisons

2014-05-13 Thread Thiago Macieira
Em ter 13 maio 2014, às 17:47:59, Oswald Buddenhagen escreveu: On Tue, May 13, 2014 at 07:43:18AM -0700, Thiago Macieira wrote: Em ter 13 maio 2014, às 11:58:15, Oswald Buddenhagen escreveu: what is the added value of hard-coding arbitrary policies (and thereby restricting possible use

Re: [Development] Adding support for version number comparisons

2014-05-13 Thread Oswald Buddenhagen
On Tue, May 13, 2014 at 08:51:09AM -0700, Thiago Macieira wrote: Em ter 13 maio 2014, às 17:47:59, Oswald Buddenhagen escreveu: the analogy is entirely bogus. the thresholds for usefulness and the user's ability to manipulate the input into something the qt code can work with are entirely

Re: [Development] Adding support for version number comparisons

2014-05-13 Thread Thiago Macieira
Em ter 13 maio 2014, às 18:26:32, Oswald Buddenhagen escreveu: On Tue, May 13, 2014 at 08:51:09AM -0700, Thiago Macieira wrote: Em ter 13 maio 2014, às 17:47:59, Oswald Buddenhagen escreveu: the analogy is entirely bogus. the thresholds for usefulness and the user's ability to manipulate

Re: [Development] Adding support for version number comparisons

2014-05-13 Thread Oswald Buddenhagen
On Tue, May 13, 2014 at 09:38:03AM -0700, Thiago Macieira wrote: Em ter 13 maio 2014, às 18:26:32, Oswald Buddenhagen escreveu: the user has complete control over the input of qversion, and can apply any transformations which his use case may require. also, the effort would be quite trivial

Re: [Development] Adding support for version number comparisons

2014-05-13 Thread Keith Gardner
but then there is also the semantical perspective. keith's last proposal i saw considered only numerical segments specially. Did you intend to say suffix? What I wrote on May 11th spoke specifically to the suffix compare: From what I have found, there are some key words that can be used to

Re: [Development] Adding support for version number comparisons

2014-05-13 Thread Thiago Macieira
Em ter 13 maio 2014, às 19:13:56, Oswald Buddenhagen escreveu: If you think the QVersion constructor should be strict, I won't disagree. Then we should have a QVersion::fromUserInput, like the QUrl version, which is lax and has heuristics. that would work from an api perspective. but

Re: [Development] Adding support for version number comparisons

2014-05-13 Thread Oswald Buddenhagen
On Tue, May 13, 2014 at 12:59:10PM -0500, Keith Gardner wrote: but then there is also the semantical perspective. keith's last proposal i saw considered only numerical segments specially. Did you intend to say suffix? What I wrote on May 11th spoke specifically to the suffix compare: i

Re: [Development] Adding support for version number comparisons

2014-05-13 Thread Keith Gardner
On Tue, May 13, 2014 at 3:06 PM, Oswald Buddenhagen oswald.buddenha...@digia.com wrote: On Tue, May 13, 2014 at 12:59:10PM -0500, Keith Gardner wrote: but then there is also the semantical perspective. keith's last proposal i saw considered only numerical segments specially. Did you

Re: [Development] Adding support for version number comparisons

2014-05-12 Thread Oswald Buddenhagen
On Sat, May 10, 2014 at 03:39:51PM -0700, Thiago Macieira wrote: Em sáb 10 maio 2014, às 22:04:26, Sune Vuorela escreveu: On 2014-05-10, Thiago Macieira thiago.macie...@intel.com wrote: How do you make 5.3.0-rc1 compare less than 5.3.0? we call them 5.3.0~rc1. And how does 5.3.0~rc1

Re: [Development] Adding support for version number comparisons

2014-05-12 Thread Keith Gardner
- Plugin loading where there are multiple versions on the same system. - File format validation. - Executing an already installed command line application where the behavior is dependent on the called application's version. - Performing software installations and

Re: [Development] Adding support for version number comparisons

2014-05-12 Thread Thiago Macieira
Em seg 12 maio 2014, às 12:27:46, Oswald Buddenhagen escreveu: - Plugin loading where there are multiple versions on the same system. - File format validation. - Executing an already installed command line application where the behavior is dependent on the called

Re: [Development] Adding support for version number comparisons

2014-05-11 Thread Richard Moore
On 11 May 2014 02:16, Keith Gardner kreios4...@gmail.com wrote: 1. Usually more condensed than the pre-release. 2. Some projects experience multiple releases with the same version of software (1.0.0-2). 3. Libjpeg and OpenSSL use a single letter to represent a level of

Re: [Development] Adding support for version number comparisons

2014-05-11 Thread Keith Gardner
1. Usually more condensed than the pre-release. 2. Some projects experience multiple releases with the same version of software (1.0.0-2). 3. Libjpeg and OpenSSL use a single letter to represent a level of security for some software (1.0.0g). openssl actually use a

Re: [Development] Adding support for version number comparisons

2014-05-10 Thread Sune Vuorela
On 2014-05-09, Keith Gardner kreios4...@gmail.com wrote: 2. What semantics should be used for version comparisons? Numerical segments are more clearly defined but when introducing a non-null suffix, many different methods are being proposed. 3. Are there any other versioning

Re: [Development] Adding support for version number comparisons

2014-05-10 Thread Thiago Macieira
Em sáb 10 maio 2014, às 14:26:44, Sune Vuorela escreveu: On 2014-05-09, Keith Gardner kreios4...@gmail.com wrote: 2. What semantics should be used for version comparisons? Numerical segments are more clearly defined but when introducing a non-null suffix, many different

Re: [Development] Adding support for version number comparisons

2014-05-10 Thread Jake Petroules
On 2014-05-10, at 01:57 PM, Thiago Macieira thiago.macie...@intel.com wrote: Em sáb 10 maio 2014, às 14:26:44, Sune Vuorela escreveu: On 2014-05-09, Keith Gardner kreios4...@gmail.com wrote: 2. What semantics should be used for version comparisons? Numerical segments are more clearly

Re: [Development] Adding support for version number comparisons

2014-05-10 Thread Thiago Macieira
Em sáb 10 maio 2014, às 14:03:10, Jake Petroules escreveu: With all the debate, I'm beginning to think that having distinct formats available to conform to might not be such a bad idea after all (SemVer, RpmVer, Dpkg, Freeform, etc...). So how do you mean 1.0.0b compare greater than 1.0.0?

Re: [Development] Adding support for version number comparisons

2014-05-10 Thread Jake Petroules
On 2014-05-10, at 02:11 PM, Thiago Macieira thiago.macie...@intel.com wrote: Em sáb 10 maio 2014, às 14:03:10, Jake Petroules escreveu: With all the debate, I'm beginning to think that having distinct formats available to conform to might not be such a bad idea after all (SemVer, RpmVer,

Re: [Development] Adding support for version number comparisons

2014-05-10 Thread Keith Gardner
Let's not make it that complicated. If the suffix is one character, assume that it stands for a released version. If the suffix is greater than one character, assume it references a pre-released version. With this rule, comparisons will work properly. 1.0.0beta 1.0.0 1.0.0b. On Sat, May 10,

Re: [Development] Adding support for version number comparisons

2014-05-10 Thread Giuseppe D'Angelo
Il 10/05/2014 21:20, Keith Gardner ha scritto: Let's not make it that complicated. I think it IS complicated; there are several established (and sometimes documented) conventions. Supporting a random one is just going to annoy people used to any other. My 2 cents, -- Join us Oct 6-8 at BCC

Re: [Development] Adding support for version number comparisons

2014-05-10 Thread Jake Petroules
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

Re: [Development] Adding support for version number comparisons

2014-05-10 Thread Keith Gardner
On Sat, May 10, 2014 at 2:28 PM, Jake Petroules jake.petrou...@petroules.com 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

Re: [Development] Adding support for version number comparisons

2014-05-10 Thread Sune Vuorela
On 2014-05-10, Thiago Macieira thiago.macie...@intel.com wrote: How do you make 5.3.0-rc1 compare less than 5.3.0? we call them 5.3.0~rc1. /Sune ___ Development mailing list Development@qt-project.org

Re: [Development] Adding support for version number comparisons

2014-05-10 Thread Thiago Macieira
Em sáb 10 maio 2014, às 22:04:26, Sune Vuorela escreveu: On 2014-05-10, Thiago Macieira thiago.macie...@intel.com wrote: How do you make 5.3.0-rc1 compare less than 5.3.0? we call them 5.3.0~rc1. And how does 5.3.0~rc1 compare less than 5.3.0? Anyway, you can't change the version string.

Re: [Development] Adding support for version number comparisons

2014-05-10 Thread Thiago Macieira
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)

Re: [Development] Adding support for version number comparisons

2014-05-10 Thread Keith Gardner
Anyway, given that this is going to be complex, I propose we make up our own list and *document* it. I think that to come up with our own list, we need to identify the tree different types of suffixes that we are talking about: pre-release, null, and release. The null suffix is obvious,

[Development] Adding support for version number comparisons

2014-05-09 Thread Keith Gardner
Greetings, I have been working on adding a class to QtCore (QVersion) to support storing version numbers, convert to/from QString, and having comparison operators. My goal was to provide an API to assist in the following use cases: - Plugin loading where there are multiple versions on the