[Development] Use QT_DEPRECATED_SINCE macro for specific enum values
Keith Gardner
kreios4004 at gmail.com
Wed Aug 12 19:52:34 CEST 2015
On Wed, Aug 12, 2015 at 11:54 AM Denis Shienkov <denis.shienkov at gmail.com>
wrote:
> > skips three making Four == 3.
>
> yes, and what? :)
>
>
> > This obviously needs to be:
> > Four = 4
>
> Ok, seems it was a bad example with One-Four.. Let's consider another
> abstract example:
>
> enum Foo {
> A,
> B,
> #if QT_DEPRECATED_SINCE(5, 2)
> C,
> #endif
> D
> };
>
>
>From your example, the initial values are the following:
A = 0
B = 1
C = 2
D = 3
If you remove C due to the macro, then D is now equal to 3 from
incrementing its value based off of B's value instead of C.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150812/b36a7c9b/attachment.html>
More information about the Development
mailing list