juk: new playlists show all columns (bug 243449)

Γιώργος Κυλάφας (Giorgos Kylafas) gekylafas at gmail.com
Tue May 31 05:42:21 BST 2011

2011/5/24 Michael Pyne <mpyne at kde.org>:
> On Monday, May 23, 2011 14:57:11 Γιώργος Κυλάφας wrote:
>> [...]
>> 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(...). [...]
> 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.

I tried this with my own music collection (about 5000 files) and I did
not notice any measurable delay. This seemed reasonable, as
slotInitialize() is called during startup with or without the change,
just in a different order.

>> 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.

This seems to be working as well, but partly because the previous
solution works, partly because I am uncertain about any side-effects
and partly because of the brief appearance of all the columns before
the selected ones are left, I prefer to apply solution a.

Assuming it should be backported, should I do this against 4.6.4,
which is scheduled to be tagged in just 2 days, or should I wait a bit
for 4.6.5?


Γιώργος Κυλάφας (Giorgos Kylafas)
kde-multimedia mailing list
kde-multimedia at kde.org

More information about the kde-multimedia mailing list