From kde-commits Fri Jan 11 18:16:29 2008 From: =?utf-8?q?Aaron=20J=2E=20Seigo?= Date: Fri, 11 Jan 2008 18:16:29 +0000 To: kde-commits Subject: KDE/kdebase/workspace/plasma/applets/icon Message-Id: <1200075389.666543.19386.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=120007540107400 SVN commit 760001 by aseigo: * pass on the shape of the icon widget * ensure we have a value in our config no matter what, fixes icons not being removed from desktop after turning them on then off at runtime M +15 -0 icon.cpp M +1 -0 icon.h --- trunk/KDE/kdebase/workspace/plasma/applets/icon/icon.cpp #760000:760001 @@ -70,6 +70,16 @@ m_icon->installSceneEventFilter(this); m_icon->resize(contentSize()); + + // we do this right away since we may have our config + // read shortly by the containment. usually applets don't need + // this, but desktop icons requires some hacks. + // + // in particular, if we were created with a url passed into via + // the args parameter in the ctor, then there won't be an entry + // in our config, and desktop icons support banks on the fact + // that there will be + cg.writeEntry("Url", m_url); } IconApplet::~IconApplet() @@ -262,6 +272,11 @@ return 0; } +QPainterPath IconApplet::shape() const +{ + return m_icon->shape(); +} + bool IconApplet::sceneEventFilter( QGraphicsItem * watched, QEvent * event ) { switch (event->type()) { --- trunk/KDE/kdebase/workspace/plasma/applets/icon/icon.h #760000:760001 @@ -50,6 +50,7 @@ int displayLines(); QSizeF sizeHint() const; Qt::Orientations expandingDirections() const; + QPainterPath shape() const; public slots: void openUrl();