From 4f776b73c1c1b16544fa4eb0e16e38f745e12764 Mon Sep 17 00:00:00 2001 From: Chani Armitage Date: Thu, 16 Oct 2008 21:40:21 +0000 Subject: [PATCH] documentation++ warning people not to assume Applet::view() returns a view, because null pointer crashes make me sad :( svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=872326 --- applet.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/applet.h b/applet.h index bb1298791..34a97ee15 100644 --- a/applet.h +++ b/applet.h @@ -200,7 +200,10 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget const Package *package() const; /** - * Returns the view this widget is visible on + * Returns the view this widget is visible on, or 0 if none can be found. + * @warning do NOT assume this will always return a view! + * a null view probably means that either plasma isn't finished loading, or your applet is + * on an activity that's not being shown anywhere. */ QGraphicsView *view() const;