[Development] Upgrading the sources to C++11 keywords (Q_NULLPTR, etc.)

André Pönitz apoenitz at t-online.de
Mon Feb 9 19:59:10 CET 2015


On Mon, Feb 09, 2015 at 08:36:53AM +0100, Bo Thorsen wrote:
> >
> > For the sake of keeping this part of the discussion simple, I specifically
> > mean 'Q_NULLPTR, the macro', _not_ 'nullptr', and I specifically mean the
> > context of initializing a local pointer variable. So: Any advantage? Any
> > advantage outweighing the disadvantages?
> 
> For this simple example, there is absolutely no benefit. Not even if you 
> had replaced Q_NULLPTR with nullptr.

Good. Thanks for answering the question.
 
> But you forget that it isn't about this simple case.  It's about the V
> harder cases, which makes you want to compile your code with warnings 
> about 0 for pointers. And that's impossible if at least the Qt headers 
> are not clean for it.

I am *not* forgetting about the other cases. I am trying to restrict
this part of the discussion on *one* case were everybody might agree.

Accepting/rejecting the use of some idiom in one case does not mean anything
about any other case. If I accept a hammer as a useful tool to drive a nails
it does not mean I have to accept it as a useful tool to clean clothes.

Andre'




More information about the Development mailing list