Bug 332971 - One can not remove applet which have error
Summary: One can not remove applet which have error
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Unclassified
Component: general (show other bugs)
Version: master
Platform: unspecified Linux
: NOR normal
Target Milestone: 1.0
Assignee: Sebastian Kügler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-02 14:54 UTC by Bhushan Shah
Modified: 2014-04-02 17:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
applet (28.42 KB, image/png)
2014-04-02 15:07 UTC, Bhushan Shah
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bhushan Shah 2014-04-02 14:54:56 UTC
1) Have an applet with error (syntax error or whatever)
2) Delete it with applet handle

file:///opt/kf5/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/AppletAppearance.qml:293:21: QML ScriptAction: file:///opt/kf5/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/AppletAppearance.qml:267: TypeError: Property 'action' of object AppletError_QMLTYPE_7(0x8f333a8) is not a function
                        applet.action("remove").trigger();

You get this error in console

3) Restart plasma-shell, notice its still there.
Comment 1 Bhushan Shah 2014-04-02 15:07:34 UTC
Created attachment 85910 [details]
applet
Comment 2 Marco Martin 2014-04-02 17:01:25 UTC
Git commit aeabbe94447631018afc8873b733940982f9aae5 by Marco Martin.
Committed on 02/04/2014 at 16:59.
Pushed by mart into branch 'master'.

new AppletInterface in case of inexistent plugin

if the plugin name is wrong, create a fullfledged appletinterface for the error visualization.
This will make applet removal possible

M  +12   -7    src/plasmaquick/appletquickitem.cpp
M  +33   -0    src/scriptengines/qml/plasmoid/appletinterface.cpp
M  +1    -0    src/scriptengines/qml/plasmoid/appletinterface.h
M  +7    -12   src/scriptengines/qml/plasmoid/containmentinterface.cpp

http://commits.kde.org/plasma-framework/aeabbe94447631018afc8873b733940982f9aae5