Bug 332971

Summary: One can not remove applet which have error
Product: [Plasma] plasmashell Reporter: Bhushan Shah <bhush94>
Component: generalAssignee: Sebastian Kügler <sebas>
Status: RESOLVED FIXED    
Severity: normal CC: bhush94
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: applet

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