[Nepomuk] Review Request 114390: nepomukctl: Do not create a global static QTextStream.

Vishesh Handa me at vhanda.in
Tue Dec 10 18:00:39 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/114390/#review45492
-----------------------------------------------------------

Ship it!


Ship It!

- Vishesh Handa


On Dec. 10, 2013, 5:37 p.m., Raphael Kubo da Costa wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/114390/
> -----------------------------------------------------------
> 
> (Updated Dec. 10, 2013, 5:37 p.m.)
> 
> 
> Review request for Nepomuk, Gabriel Poesia and Vishesh Handa.
> 
> 
> Repository: nepomuk-core
> 
> 
> Description
> -------
> 
> nepomukctl: Do not create a global static QTextStream.
> 
> Creating global static objects is a big no-no, and is properly documented in
> KDE's policies. One never knows the order in which they are created and
> destroyed, which was causing crashes at least on FreeBSD when libcxxrt is
> used, as Qt's Q_GLOBAL_STATIC cleanup code would destroy QTextCodec
> instances still referenced by that global QTextStream.
> 
> Since the QTextStream was only used as glorified fprintf(), resort to just
> printing to std::cerr directly.
> 
> 
> Diffs
> -----
> 
>   tools/nepomukctl/main.cpp 93d8a78779efb2d64ef5de6072d8d19ff09dd5fe 
> 
> Diff: http://git.reviewboard.kde.org/r/114390/diff/
> 
> 
> Testing
> -------
> 
> `nepomukctl status' and other commands finally work instead of crashing.
> 
> 
> Thanks,
> 
> Raphael Kubo da Costa
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/nepomuk/attachments/20131210/45d47a53/attachment.html>


More information about the Nepomuk mailing list