2016-11-26 6 views
1

私はKde Plasma 5プラスモイドをどのように開発し、小さなウィジェットでテストするのかを学んでいます。私はhttps://techbase.kde.orgまたはhttps://api.kde.org/frameworks/のように、いくつかの情報源を読んで、このようになります私のテストプラズモイドのためのパッケージ構造とソースを、作成した:私の新しいplasmoid-reparseソースをリフレッシュ

$ 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 

RootContainerは、ウィジェットのちょうどfullRepresentationある、との唯一のラベルが含まれていますテキスト "prueba1"。私は次のようにウィジェットをインストールするには、コマンドにplasmapkg2を使用し、ドキュメントを読み込むように、:

$ 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 

その後、私は、KDEデスクトップで使用することができますし、すべてが正常です。これはデスクトップにテキストラベルとともに表示されます。

しかし、今、私はラベル、「prueba2」のテキストを変更し、

$ 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 

>[email protected]:~/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 

今の場合を次のように私はプラグインを削除して再インストールした場合、私はデスクトップに再度追加、私は見ます新しいテキストの代わりに古いテキスト。私は/home/xxx/.local/share/plasma/plasmoids/org.matrixland.testディレクトリでソースが最新で最新のものであることを確認したので、なぜ古いテキストを取得しているのかわかりません新しいものの

明らかに私の問題は、私がqmlで行った変更のどれもがテキスト変更だけでなく、ウィジェットに反映されないということです。私は何かが間違っているのか、私がウィジェットを更新するために何か他のことをしなければならないかどうかはわかりません。誰も私に助けてくれますか?

KDE and Qt version info

答えて

1

古いQMLはまだ "キャッシュされ" ているからです。変更を確認するには、plasmashellを再起動する必要があります。

killall plasmashell; kstart5 plasmashell 

私は私が生きてテストしたい時にアプレットを再インストールするthis scriptを使用。 this scriptのよう

plasmoidviewer -a package -l bottomedge -f horizontal 

:私はすぐにテストしたい場合は、私はplasmoidviewerを使用します。

+0

ありがとうございます。今私は私自身のプラスモイドを書くように私の進歩を見るためにplasmoidviewerを使用しています。非常に便利です。 –

関連する問題