Reputation: 401
I'm learning how to develop Kde Plasma 5 plasmoids, and testing it with a small widget, consistent of just two qmls. I read some information sources, like https://techbase.kde.org or https://api.kde.org/frameworks/ and created a package structure and sources for my test plasmoid, which looks like this:
$ ls -lR test
test:
total 8
drwxr-xr-x 3 alberto alberto 4096 nov 26 14:28 contents
-rw-r--r-- 1 alberto alberto 459 nov 26 14:28 metadata.desktop
test/contents:
total 4
drwxr-xr-x 2 alberto alberto 4096 nov 26 14:33 ui
test/contents/ui:
total 8
-rw-r--r-- 1 alberto alberto 275 nov 26 14:28 main.qml
-rw-r--r-- 1 alberto alberto 465 nov 26 14:33 RootContainer.qml
The RootContainer is just the fullRepresentation of the widget, and contains only a label with the text "prueba1". So, as i read in the documentation, i used the command plasmapkg2 to install the widget as follows:
$ plasmapkg2 --install test
pluginname: "org.matrixland.test"
Generated "/home/xxx/.local/share/plasma/plasmoids//kpluginindex.json" ( 3 plugins)
/home/xxx/Programación/proyectos/plasmoides/test instalado con éxito
Then, i can use it in the kde desktop and everything is fine. It is shown in the desktop, with the text label.
But now, if i change the text of the label, "prueba2", and i remove and reinstall the plugin as follows
$ plasmapkg2 --remove test
Constructing a KPluginInfo object from old style JSON. Please use kcoreaddons_desktop_to_json() for "" instead of kservice_desktop_to_json() in your CMake code.
Calling KPluginInfo::property("X-KDE-PluginInfo-Name") is deprecated, use KPluginInfo::pluginName() in "/usr/lib/x86_64-linux-gnu/qt5/plugins/plasma/packagestructure/plasma_packagestructure_share.so" instead.
Constructing a KPluginInfo object from old style JSON. Please use kcoreaddons_desktop_to_json() for "" instead of kservice_desktop_to_json() in your CMake code.
Calling KPluginInfo::property("X-KDE-PluginInfo-Name") is deprecated, use KPluginInfo::pluginName() in "/usr/lib/x86_64-linux-gnu/qt5/plugins/plasma/packagestructure/plasma_packagestructure_share.so" instead.
Generated "/home/xxx/.local/share/plasma/plasmoids//kpluginindex.json" ( 2 plugins)
/home/xxx/Programación/proyectos/plasmoides/test desinstalado con éxito
>xxx@eleanor:~/Programación/proyectos/plasmoides$ plasmapkg2 --install test
pluginname: "org.matrixland.test"
Generated "/home/alberto/.local/share/plasma/plasmoids//kpluginindex.json" ( 3 plugins)
/home/alberto/Programación/proyectos/plasmoides/test instalado con éxito
If now, i add it again to the desktop, i see the old text instead of the new one. I checked in the /home/xxx/.local/share/plasma/plasmoids/org.matrixland.test directory that the source is up to date and refreshed, so i can't guess why am i obtaining the old text instead of the new one.
Obviously my problem is that none of the changes i make in the qml is reflected in the widget, not only text changes. I don't know if i am doing something wrong, or if i must do anything else to update the widget. Can anybody help me with that?
Upvotes: 6
Views: 4058
Reputation: 799
This is because the old QML is "cached" still. You'll need to restart plasmashell in order to see the changes.
killall plasmashell; kstart5 plasmashell
I used this script to reinstall applets when I want to test live. When I want to test quickly though, I'll use plasmoidviewer
with:
plasmoidviewer -a package -l bottomedge -f horizontal
like in this script.
Upvotes: 6