Calling the methods toolBox or toolBoxItem of a plasma.containment object in a python plasmoid cause a runtime error with the following message : RuntimeError: no access to protected functions or signals for objects not created from Python This was previously working before upgrading to python-sip 4.15.1, and is still crashing after updating to 4.15.2. This is tested on a machine running openSUSE tumbleweed, on which python-sip was updated around 18-09-2013. Reproducible: Always Steps to Reproduce: 1. Make sure python-sip is installed with version >= 4.15.1 2. Create a basic python plasmoid based on the tutorial [http://techbase.kde.org/Development/Tutorials/Plasma/PythonPlasmoid] 3. Add one of the following line at the end of the init method: self.containment().toolBoxItem() self.containment().toolBox() 4. Start the plasmoid with plasmoidviewer Actual Results: This is the output to the console running pasmoidviewer: Connecting to battery you don't appear to have a battery. Traceback (most recent call last): File "/usr/share/kde4/apps/plasma_scriptengine_python/pyappletscript.py", line 75, in init self.pyapplet.init() File "/home/user/plasmoid-tutorial/contents/code/main.py", line 21, in init self.containment().toolBox() RuntimeError: no access to protected functions or signals for objects not created from Python Expected Results: The plasmoid should run without crashing.
I've got this issue with python-sip 4.14.5 and pykde4 4.11.2.
Had to revert these commits to make it work with python-sip 4.14 again: http://quickgit.kde.org/?p=pykde4.git&a=commit&h=783d073f30e253e8db52d8801c1c829e6f405e60 http://quickgit.kde.org/?p=pykde4.git&a=commit&h=7c0648b3931e069892943bc645dc61f246375cdf
I voted 20 votes for this bug.. And I bet lots of other people would vote for this bug too if they knew they could.. This regression really needs to be fixed!.. My experience with KDE is going to be more aggravating until this bug is fixed.. As I'm sure many many other KDE users' experience will be as well.. I think aaron seigo him self should have to fix this bug since he is the one that was so adamant about keeping a certain "feature" in KDE.. −_−
That API is not intended for external consumption. p.s. Baconmon's comment is exactly the sort of the thing that drove me to having far less to do with KDE than I used to; the community has no problems with people taking pot-shots at other people and generally being assholes to each other, which is not the sort of environment I choose to work in.
Ah, and to expand on that "not intended" bit: Plasmoids are not supposed to be able to touch the containment or other plasmoids (for obvious safety and security reasons), the only reason they could was because of limitations in QGraphicsView in this regard. With QML2, Plasma 2 seals this off entirely. So even "fixing" this now will simply be broken in future. Please stop working around things with dangerous and unsupported *hacks* and do it properly: use a containment that does not have a toolbox. That has been the option for what, 6 years now? Nobody bothers to do it even though it would be far less work than maintaining these broken-by-design plasmoids. Why people insist on taking the wrong approach when there is a clearly supported useful approach that would do precisely what they want is beyond me.
*** This bug has been confirmed by popular vote. ***