2016-11-26 3 views
1

나는 Kde Plasma 5 플라스마이드를 개발하는 방법을 배우고 있으며 단지 2 개의 qml 만 일관된 작은 위젯으로 테스트하고 있습니다. 나는 https://techbase.kde.org 또는 https://api.kde.org/frameworks/과 같은 몇 가지 정보 소스를 읽고 다음과 같습니다 내 테스트 plasmoid에 대한 패키지 구조와 소스를 만들어 :새로운 플라즈 모드 - 재분석 소스 새로 고침

$ 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". 내가 KDE 데스크탑에서 사용할 수 있습니다,

$ 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 

을 그리고 모든 것이 괜찮 : 내가 문서를 읽어 그래서, 나는 다음과 같이 위젯을 설치하는 명령 plasmapkg2을 사용했다. 바탕 화면에 텍스트 레이블이 표시됩니다. 내가 "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에서 변경 한 사항이 텍스트 변경뿐만 아니라 위젯에도 반영되지 않는다는 것입니다. 내가 뭔가 잘못하고 있는지, 아니면 위젯을 업데이트하기 위해 다른 작업을해야하는지는 알 수 없습니다. 아무도 도와 줄 수 없나요? 이전 QML은 여전히 ​​"캐시"하기 때문에

KDE and Qt version info

답변

1

이다. 변경 사항을 보려면 plasmashell을 다시 시작해야합니다.

killall plasmashell; kstart5 plasmashell 

는 내가 라이브 테스트 할 때 애플릿을 다시 설치 this script을 사용했다.

plasmoidviewer -a package -l bottomedge -f horizontal 

this script처럼 : 나는 빨리 불구하고 테스트 할 때, 나는와 plasmoidviewer를 사용합니다.

+0

감사합니다. @Zren. 지금 나는 내 자신의 플라스 모이드를 쓰는 동안 나의 진보를보기 위해 플라스 모이 드 뷰어를 사용하고있다. 매우 유용합니다. –

관련 문제