Bug 190651

Summary: RSS Now Plasmoid fails to render text with Qt 4.5.1
Product: [Unmaintained] plasma4 Reporter: Chuck <cfox04>
Component: widget-miscAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED UPSTREAM    
Severity: normal CC: aseigo, colin.thomson, darktears31, kevin.kofler, rdieter, than
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Chuck 2009-04-25 19:43:38 UTC
Version:            (using KDE 4.2.2)
OS:                Linux
Installed from:    Unspecified Linux

Using Arch Linux with KDE 4.2.2, the "RSS Now" plasmoid fails to render text after an upgrade to Qt 4.5.1 (it had worked fine on Qt 4.5.0).  I do not know if this is a Qt or KDE bug, but as the plasmoid is a KDE application I am reporting it here.  

Symptoms:
   The RSS Now plasmoid does display on the desktop and is successfully pulling RSS feeds since clicking on the blank area of the plasmoid will open the browser window to the website in the RSS feed.  However, no text is being rendered on the plasmoid so it is impossible to see the RSS feed items that should be displayed.


Unsuccessful Steps taken to fix the bug:
   -- The known regression with SVG rendering does not appear to be the source of this bug because the Qt 4.5 package from Arch has the patch fixing that bug included, but the problem persists.
   -- I have stopped KDE & the X server, completely removed the kde cache, and restarted, but the bug persists.
   -- I know some people have had bugs with particular plasma themes.  I am using the "Aya" theme, but I switched to several other themes and none of them have solved the problem.
   -- Adding a new RSS Now plasmoid to the desktop displays the same bug.


Steps to reproduce:
   -- Use KDE 4.2.2 with Qt 4.5.1
   -- Add the RSS Now plasmoid to the desktop
Comment 1 Colin J Thomson 2009-04-25 19:58:45 UTC
I am also seeing this on Fedora 10/KDE-4.2.2 after the Qt update to 4.5.1
Comment 2 Rex Dieter 2009-04-25 20:51:23 UTC
confirmed here as well.
Comment 3 Aaron J. Seigo 2009-04-26 04:14:49 UTC
this is obviously a Qt bug.
Comment 4 Kevin Kofler 2009-04-27 04:24:19 UTC
Is there any report at Qt Software we can monitor? (If not, should we file one?) And more importantly, is there a patch already?
Comment 5 Aaron J. Seigo 2009-04-28 00:25:15 UTC
i don't know if there's a report, if it's been fixed already, etc, but upgrading qt shouldn't break anything painting related. qt 4.5.1 had a few regressions, however, and apparently this is one of them.
Comment 6 Chuck 2009-04-28 00:49:19 UTC
I've reported the bug upstream to the Qt devs and as soon as I get a bug ID number I'll post a link here as a reference.
Comment 7 Chuck 2009-05-03 21:26:31 UTC
OK I have found the source of the bug and have a slightly ugly workaround:

In scroller.cpp @ 65 the Scroller constructor calls: setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);

That is the source of the bug since removing it allows all the child objects (both graphics and text) to draw on the screen.  The plasmoid works, although the scrollers are no longer clipping the child feed items so the plasmoid does look a little ugly while scrolling (you see unclipped feed items moving outside the plasmoid window). 

I do have a question about this bug though, because when I used the plasmoid via plasmoidviewer it worked fine without any changes.  So, is this purely a Qt bug or is there an interaction further up the chain that is causing the bug to display on my desktop, but not in the plasmoidviewer?

I have already tried to report this bug up the chain to Trolltech, but I didn't get a bug # assigned.  I will file a new one that has this information to see if it can get fixed.

In an unrelated note, I found some minor memory leaks since some items like m_html were not being deleted in the SingleFeedItem destructor.  I will file a separate patch for that.

Thanks for your help, and as a bonus I'm starting to learn about how plasmoids work too!
Comment 8 Aaron J. Seigo 2009-05-04 20:31:12 UTC
> setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);

interesting; at least we have an entry point for the bug now! thanks ...

> because when I used the plasmoid via plasmoidviewer it worked fine without 
> any changes.

that is indeed interesting; plasmoidviewer sets things up slightly differently  than the desktop does, at least in 4.2 (i think the two are more similar in current trunk/ though), and often these kinds of subtle bugs are only triggered with Just The Right(tm) series of events.

> m_html were not being deleted in the SingleFeedItem destructor.

that's because they are parented to the SingleFeedItem object and so get automatically memory managed for us.

> as a bonus I'm starting to learn about how plasmoids work too!

:)