[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/generic/scriptengines/python
From: Luca Beltrame <einar () heavensinferno ! net>
Date: 2010-08-02 20:15:29
Message-ID: 20100802201529.E0AFAAC7A9 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1158475 by lbeltrame:
Get rid of exceptions when running Python plasmoids and when deleting them. For some \
reason (which needs to be investigated) __dtor__ is called about 4 times before the \
actual deletion occurs, and so the applet is not yet initialized. The other fixed \
exception regards size() which can be called before the initialization is complete. \
This used to return None, which caused TypeError in the receiver of this function. \
Having it return a null QPainterPath fixed it. Patch OK'd on plasma-devel, and I \
used it without side effects for about a week. It will be backported.
M +4 -1 pyappletscript.py
--- trunk/KDE/kdebase/workspace/plasma/generic/scriptengines/python/pyappletscript.py \
#1158474:1158475 @@ -77,6 +77,9 @@
def __dtor__(self):
#print("~PythonAppletScript()")
+ if not self.initialized:
+ return
+
PythonAppletScript.importer.unregister_top_level(self.pluginName)
self.pyapplet = None
@@ -122,7 +125,7 @@
def shape(self):
if not self.initialized:
- return
+ return QPainterPath()
return self.pyapplet.shape()
def eventFilter(self, obj, event):
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic