Review Request: trivial fixes for some warnings of clang++ (2.99.9999)

Thomas Lübking thomas.luebking at web.de
Mon Nov 28 12:48:44 GMT 2011



> On Nov. 27, 2011, 10:22 a.m., Ben Cooksley wrote:
> > This fix causes a nasty regression which causes the plugin list in KRunner and other apps to be nearly unusable when compiled with gcc. Please adjust the KPluginSelector component of this fix as it must be causing a behaviour change.
> 
> Jaime Torres Amate wrote:
>     Could you explain more about the problems you've noticed or fill a bug report? 
>     Do I have some time to try to fix the problem you've found in KRunner, instead of reverting the code to a wrong status (as not intended by the developer) again?
>
> 
> Ben Cooksley wrote:
>     When trying to configure KRunner with this patch applied, CPU usage by KRunner jumps to about 90% on my system. Checking with gdb shows that quite a few geometry change events are being generated and widgets are being hidden and shown again in very quick succession.
>     
>     Reverting your patch and recompiling leads KRunner to use 0-1% of the CPU when browsing the list of plugins in it's configure dialog.
>     
>     Unfortunately there is no definitive backtrace for this issue.
>     I think you do have some time to find a proper fix for the issue, yes.
>     
>     You can reproduce by opening KRunner and entering it's configuration dialog. The whole of KRunner will become very unresponsive and CPU usage should shoot up to high levels.
> 
> Jaime Torres Amate wrote:
>     100% reproducible. I'll do my best. gdb to the rescue.
> 
> Thomas Lübking wrote:
>     try pushbutton->minimumSizeHint()
> 
> Jaime Torres Amate wrote:
>     I'll try that (minimumSizeHint()).
>      What I've done so far:
>     * kill my krunner process
>     * valgrind --tool=callgrind krunner
>     * Alt+f2, config
>     * whait 2 minutes
>     * Kill the window with Ctrl+Alt+Esc
>     * See the usage with kcachegrind.
>     
>     So far I've seen that (without detecting cycles in kcachegrind) :
>     void KCategorizedView::Private::topToBottomVisualRect(const QModelIndex &index, Item &item,
>                                                           const Block &block, const QPoint &blockPos) const
>      and
>     QRect KCategorizedView::visualRect(const QModelIndex &index) const
>     Are being called too much (mutual recursion?)
>

> I'll try that (minimumSizeHint()).
spare it, only calls sizeHint() for pushbuttons.
I /think/ we had this or a similar issue with kcategorizedview before.
>From Ben's observation of "widgets are being hidden and shown again" i'd suspect sth. about the scrollbar policy.

If it's not fixed then, i'll also have a deeper look tonight.


- Thomas


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


On Nov. 17, 2011, 2:37 p.m., Jaime Torres Amate wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103165/
> -----------------------------------------------------------
> 
> (Updated Nov. 17, 2011, 2:37 p.m.)
> 
> 
> Review request for kdelibs.
> 
> 
> Description
> -------
> 
> Trivial c++ fixes for some warnings of clang++ (2.99.9999)
> memset the structure size, not the pointer size (fortunately, the structure size is greater than pointer size in this case).
> remove double parenthesis
> change false to 0 as pointer parameter
> use parenthesis to clarify preference between ? and +
> 
> 
> Diffs
> -----
> 
>   kdecore/sycoca/kmemfile.cpp a466bde 
>   kdeui/fonts/kfontchooser.cpp 541f7db 
>   kdeui/tests/ktabwidgettest.cpp fdc3161 
>   kross/modules/form.cpp 5e260c1 
>   kutils/kemoticons/kemoticonstheme.cpp c145741 
>   kutils/kpluginselector.cpp 0a39fcc 
> 
> Diff: http://git.reviewboard.kde.org/r/103165/diff/diff
> 
> 
> Testing
> -------
> 
> Still compiles with g++
> 
> 
> Thanks,
> 
> Jaime Torres Amate
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20111128/ad8dac53/attachment.htm>


More information about the kde-core-devel mailing list