Bug 368756 - Plasmashell adds obsolete widgets
Summary: Plasmashell adds obsolete widgets
Status: RESOLVED INTENTIONAL
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (other bugs)
Version First Reported In: 5.5.5
Platform: Kubuntu Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-13 19:09 UTC by RalphB
Modified: 2016-09-15 16:14 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RalphB 2016-09-13 19:09:26 UTC
I do widget development and install new versions of widgets locally with plasmapkg2. But when I want to add this newly installed widget version on the desktop or in the panel, a previous version is installed.

Reproducible: Always

Steps to Reproduce:
1. Create widget (plasmoid), e.g.

import QtQuick 2.0
Item {
    id: main
    Text {
        id: greeting
        anchors.centerIn: main
        text: "hello world"
    }
}

2. Install widget with plasmapkg2 -i hello.

3. Add hello widget to desktop -> you see "hello world".  Remove widget.

4. Change code above into 'text: "good-bye world"'

5. Update widget with plasmapkg2 -u hello.

6. Add widget to desktop -> ???


Actual Results:  
hello world

Expected Results:  
good-bye world
Comment 1 David Edmundson 2016-09-13 22:21:33 UTC
are you quitting plasma in between  3 to 6?
Comment 2 RalphB 2016-09-14 13:44:17 UTC
No, I don't.  So I am supposed to do that?  This makes testing of widgets (where plasmawindowed is not enough) quite difficult.

Is there a workaround/different tool (kpackagetool5?) that won't require logging off?
Comment 3 RalphB 2016-09-14 13:47:56 UTC
BTW, I'm note sure if this is related, but when I "download a new plasma widget", they are shown as "installed", but they won't actually show in the widget menu right away.  This is really confusing at it seems that the installation failed.
Comment 4 RalphB 2016-09-14 13:52:54 UTC
Ah sorry, I withdraw comment 3 -- that installation (from GitHub) DID fail. :-/  Installing as ZIP directly adds the widget to the widget menu.
Comment 5 David Edmundson 2016-09-14 23:00:07 UTC
>No, I don't. So I am supposed to do that? This makes testing of widgets (where plasmawindowed is not enough) quite difficult.

Yes. Sorry.

QML internally has a component cache. So when you instantiate it the seocnd time you're not loading the source again.  Theoretically calling engine->trimComponentCache() on applet removal might do it.. but it will still make it slower for our users.

plasmoidviewer from plasma-sdk should be better than plasmawindowed. (though it's still not great, feel free to improve it)
Comment 6 RalphB 2016-09-15 16:14:19 UTC
OK, that's fine, I understand.

Two suggestions (although this is probably not the best place for this):
1. add a note in the tutorials/documentation
2. create a widget/program that does just call engine->trimComponentCache(), if that is possible