Review Request 125756: Initialize QFunctionPointer to Q_NULLPTR

Nicolás Alvarez nicolas.alvarez at gmail.com
Thu Oct 22 16:21:21 UTC 2015



> On Oct. 22, 2015, 9:09 a.m., Martin Gräßlin wrote:
> > src/declarativeimports/core/windowthumbnail.h, lines 128-129
> > <https://git.reviewboard.kde.org/r/125756/diff/1/?file=412368#file412368line128>
> >
> >     AFAIK we are not yet allowed to use nullptr in frameworks. You need to use Q_NULLPTR which gets turned into nullptr if available in the compiler settings.
> >     
> >     Also I think header initialization is not yet allowed, so please move to cpp file.
> >     
> >     Meh, I want full C++11 on Linux only code.

Whenever you use `Q_NULLPTR`, please check that the code compiles with either `nullptr` or `0`. I have seen code using `Q_NULLPTR` that didn't actually compile if it was defined to `0` due to the compiler lacking `nullptr` support.


- Nicolás


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125756/#review87260
-----------------------------------------------------------


On Oct. 22, 2015, 10:27 a.m., Dāvis Mosāns wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125756/
> -----------------------------------------------------------
> 
> (Updated Oct. 22, 2015, 10:27 a.m.)
> 
> 
> Review request for KDE Frameworks and Plasma.
> 
> 
> Repository: plasma-framework
> 
> 
> Description
> -------
> 
> Need to initialize QFunctionPointer to Q_NULLPTR because otherwise it's used unitialized
> causing m_eglCreateImageKHR check to pass and crashing plasmashell because of invalid call.
> Look at xcbWindowToTextureEGL function in src/declarativeimports/core/windowthumbnail.cpp
> 
> 
> Diffs
> -----
> 
>   src/declarativeimports/core/windowthumbnail.cpp 5a5274e1eacdb9b91ff500e1ebf9046930891ecf 
> 
> Diff: https://git.reviewboard.kde.org/r/125756/diff/
> 
> 
> Testing
> -------
> 
> Verified that plasmashell doesn't crash anymore.
> 
> 
> Thanks,
> 
> Dāvis Mosāns
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20151022/de132ad7/attachment-0001.html>


More information about the Plasma-devel mailing list