Review Request 128711: avoid accesing QCoreApplication in static constant before an instance was created

Alexandr Akulich akulichalexander at gmail.com
Thu Aug 18 17:02:23 UTC 2016


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


Ship it!




Ship It!

- Alexandr Akulich


On Aug. 18, 2016, 9:32 p.m., Martin Koller wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128711/
> -----------------------------------------------------------
> 
> (Updated Aug. 18, 2016, 9:32 p.m.)
> 
> 
> Review request for Telepathy.
> 
> 
> Repository: ktp-contact-list
> 
> 
> Description
> -------
> 
> Without this patch starting ktp-contactlist prints 4 times
> QCoreApplication::arguments: Please instantiate the QApplication object first
> even before hitting a breakpoint in main.
> The reason is the constant definition this patch fixes, since it uses IconSize() which internally uses KIconLoader which somehow accesses QCoreApplication::arguments
> (don't have the full stack here right now).
> The result is also that no icons are shown and when closing the window the program crashes.
> 
> The patch fixes this by not using a const variable which is initialized too early but just uses
> a #define which produces the code which is only run when the class instances are created.
> 
> Now no messages are printed from Qt, icons are shown, and the program no longer crashes on exit.
> 
> 
> Diffs
> -----
> 
>   contact-overlays.cpp e8604be 
> 
> Diff: https://git.reviewboard.kde.org/r/128711/diff/
> 
> 
> Testing
> -------
> 
> yes
> 
> 
> Thanks,
> 
> Martin Koller
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20160818/ec80bd3c/attachment-0001.html>


More information about the KDE-Telepathy mailing list