juk: new playlists show all columns (bug 243449)

Michael Pyne mpyne at kde.org
Tue May 24 02:41:33 BST 2011

On Monday, May 23, 2011 14:57:11 Γιώργος Κυλάφας wrote:
> Hi all,
> I have found two ways to fix this, however I am not sure for either of them:
> a. Explicitly call slotInitialize() in Playlist::setup(), instead of
> using QTimer::singleShot(...).
> This has the disadvantage that is goes against the documentation of
> slotInitialize() which says:
> "Handle the necessary tasks needed to create and setup the playlist
> that don't need to happen in the ctor [...]"
> Maybe we do not mind making slotInitialize() part of the ctor
> processing, but I am not in a position to judge this.

IIRC this was added (unsuccessfully, for the most part) to try to reduce the 
amount of time it took to get JuK to working out of a normal event loop, 
especially as it seemed to interfere with Plasma startup if the systray icon 
was enabled (this is much less noticeable in Plasma nowadays, probably thanks 
to the new-style DBus system tray).

Either way you could simply try calling slotInitialize on a large 
CollectionList and comparing startup time, but I don't think the effect would 
be very large, which makes this a suitable fix.

> b. Call Playlist::SharedSettings::apply() at the end of slotInitialize().
> This has the disadvantages that apply() is called twice and that for a
> brief moment all columns are visible, which looks bad UI-wise.

Well, if you notice in Playlist::showEvent, the SharedSettings::apply call is 
only made if m_applySharedSettings is true, and that is typically done from 
the Playlist constructors. We could instead default the constructor to setting 
m_applySharedSettings to false and then having slotInitialize run 
SharedSettings::apply itself. I'm not super-sure of the other possible effects 
however, although I think it's worth a shot.

 - Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20110523/256aba66/attachment.sig>
-------------- next part --------------
kde-multimedia mailing list
kde-multimedia at kde.org

More information about the kde-multimedia mailing list