appletDestroyed() is emitted in ~Applet(). But this can happen even if

it isn't destroyed but it just have been deleted. So we rename the
appletDestroyed() to appletDeleted().
This commit is contained in:
Antonis Tsiapaliokas 2012-09-24 14:58:54 +03:00
parent dec5744f5f
commit 87c70a42b4
8 changed files with 7 additions and 12 deletions

View File

@ -197,7 +197,7 @@ Applet::Applet(const QString &packagePath, uint appletId, const QVariantList &ar
Applet::~Applet() Applet::~Applet()
{ {
//let people know that i will die //let people know that i will die
emit appletDestroyed(this); emit appletDeleted(this);
// clean up our config dialog, if any // clean up our config dialog, if any
delete KConfigDialog::exists(d->configDialogId()); delete KConfigDialog::exists(d->configDialogId());
@ -388,8 +388,6 @@ bool Applet::destroyed() const
return d->transient; return d->transient;
} }
ConfigLoader *Applet::configScheme() const ConfigLoader *Applet::configScheme() const
{ {
return d->configLoader; return d->configLoader;

View File

@ -671,7 +671,7 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget
/** /**
* Emitted when the applet is deleted * Emitted when the applet is deleted
*/ */
void appletDestroyed(Plasma::Applet *applet); void appletDeleted(Plasma::Applet *applet);
/** /**
* Emitted when the applet status changes * Emitted when the applet status changes

View File

@ -739,7 +739,7 @@ void Containment::addApplet(Applet *applet, const QPointF &pos, bool delayInit)
connect(applet, SIGNAL(configNeedsSaving()), this, SIGNAL(configNeedsSaving())); connect(applet, SIGNAL(configNeedsSaving()), this, SIGNAL(configNeedsSaving()));
connect(applet, SIGNAL(releaseVisualFocus()), this, SIGNAL(releaseVisualFocus())); connect(applet, SIGNAL(releaseVisualFocus()), this, SIGNAL(releaseVisualFocus()));
connect(applet, SIGNAL(appletDestroyed(Plasma::Applet*)), this, SLOT(appletDestroyed(Plasma::Applet*))); connect(applet, SIGNAL(appletDeleted(Plasma::Applet*)), this, SLOT(appletDestroyed(Plasma::Applet*)));
connect(applet, SIGNAL(newStatus(Plasma::ItemStatus)), this, SLOT(checkStatus(Plasma::ItemStatus))); connect(applet, SIGNAL(newStatus(Plasma::ItemStatus)), this, SLOT(checkStatus(Plasma::ItemStatus)));
connect(applet, SIGNAL(activate()), this, SIGNAL(activate())); connect(applet, SIGNAL(activate()), this, SIGNAL(activate()));

View File

@ -607,7 +607,7 @@ Q_SIGNALS:
*/ */
Containment(const QString &packagePath, uint appletId, const QVariantList &args); Containment(const QString &packagePath, uint appletId, const QVariantList &args);
Q_PRIVATE_SLOT(d, void appletDestroyed(Plasma::Applet*)) Q_PRIVATE_SLOT(d, void appletDeleted(Plasma::Applet*))
Q_PRIVATE_SLOT(d, void triggerShowAddWidgets()) Q_PRIVATE_SLOT(d, void triggerShowAddWidgets())
Q_PRIVATE_SLOT(d, void positionToolBox()) Q_PRIVATE_SLOT(d, void positionToolBox())
Q_PRIVATE_SLOT(d, void requestConfiguration()) Q_PRIVATE_SLOT(d, void requestConfiguration())

View File

@ -1,3 +0,0 @@
[Project]
Manager=KDevCMakeManager
Name=plasmaframeworks5

View File

@ -93,7 +93,7 @@ AppletHandle::AppletHandle(Containment *containment, Applet *applet, const QPoin
connect(m_hoverTimer, SIGNAL(timeout()), this, SLOT(hoverTimeout())); connect(m_hoverTimer, SIGNAL(timeout()), this, SLOT(hoverTimeout()));
connect(m_leaveTimer, SIGNAL(timeout()), this, SLOT(leaveTimeout())); connect(m_leaveTimer, SIGNAL(timeout()), this, SLOT(leaveTimeout()));
connect(m_applet, SIGNAL(appletDestroyed(Plasma::Applet*)), this, SLOT(appletDestroyed())); connect(m_applet, SIGNAL(appletDeleted(Plasma::Applet*)), this, SLOT(appletDeleted()));
setAcceptsHoverEvents(true); setAcceptsHoverEvents(true);
m_hoverTimer->start(); m_hoverTimer->start();

View File

@ -927,7 +927,7 @@ bool ContainmentPrivate::regionIsEmpty(const QRectF &region, Applet *ignoredAppl
return true; return true;
} }
void ContainmentPrivate::appletDestroyed(Plasma::Applet *applet) void ContainmentPrivate::appletDeleted(Plasma::Applet *applet)
{ {
applets.removeAll(applet); applets.removeAll(applet);
if (focusedApplet == applet) { if (focusedApplet == applet) {

View File

@ -102,7 +102,7 @@ public:
QPointF preferredPos(Corona *corona) const; QPointF preferredPos(Corona *corona) const;
QPointF preferredPanelPos(Corona *corona) const; QPointF preferredPanelPos(Corona *corona) const;
void setLockToolText(); void setLockToolText();
void appletDestroyed(Applet*); void appletDeleted(Applet*);
void appletAppeared(Applet*); void appletAppeared(Applet*);
void clearDataForMimeJob(KIO::Job *job); void clearDataForMimeJob(KIO::Job *job);
void remoteAppletReady(Plasma::AccessAppletJob *job); void remoteAppletReady(Plasma::AccessAppletJob *job);