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:
parent
dec5744f5f
commit
87c70a42b4
@ -197,7 +197,7 @@ Applet::Applet(const QString &packagePath, uint appletId, const QVariantList &ar
|
||||
Applet::~Applet()
|
||||
{
|
||||
//let people know that i will die
|
||||
emit appletDestroyed(this);
|
||||
emit appletDeleted(this);
|
||||
|
||||
// clean up our config dialog, if any
|
||||
delete KConfigDialog::exists(d->configDialogId());
|
||||
@ -388,8 +388,6 @@ bool Applet::destroyed() const
|
||||
return d->transient;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ConfigLoader *Applet::configScheme() const
|
||||
{
|
||||
return d->configLoader;
|
||||
|
2
applet.h
2
applet.h
@ -671,7 +671,7 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget
|
||||
/**
|
||||
* Emitted when the applet is deleted
|
||||
*/
|
||||
void appletDestroyed(Plasma::Applet *applet);
|
||||
void appletDeleted(Plasma::Applet *applet);
|
||||
|
||||
/**
|
||||
* Emitted when the applet status changes
|
||||
|
@ -739,7 +739,7 @@ void Containment::addApplet(Applet *applet, const QPointF &pos, bool delayInit)
|
||||
|
||||
connect(applet, SIGNAL(configNeedsSaving()), this, SIGNAL(configNeedsSaving()));
|
||||
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(activate()), this, SIGNAL(activate()));
|
||||
|
||||
|
@ -607,7 +607,7 @@ Q_SIGNALS:
|
||||
*/
|
||||
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 positionToolBox())
|
||||
Q_PRIVATE_SLOT(d, void requestConfiguration())
|
||||
|
@ -1,3 +0,0 @@
|
||||
[Project]
|
||||
Manager=KDevCMakeManager
|
||||
Name=plasmaframeworks5
|
@ -93,7 +93,7 @@ AppletHandle::AppletHandle(Containment *containment, Applet *applet, const QPoin
|
||||
|
||||
connect(m_hoverTimer, SIGNAL(timeout()), this, SLOT(hoverTimeout()));
|
||||
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);
|
||||
m_hoverTimer->start();
|
||||
|
@ -927,7 +927,7 @@ bool ContainmentPrivate::regionIsEmpty(const QRectF ®ion, Applet *ignoredAppl
|
||||
return true;
|
||||
}
|
||||
|
||||
void ContainmentPrivate::appletDestroyed(Plasma::Applet *applet)
|
||||
void ContainmentPrivate::appletDeleted(Plasma::Applet *applet)
|
||||
{
|
||||
applets.removeAll(applet);
|
||||
if (focusedApplet == applet) {
|
||||
|
@ -102,7 +102,7 @@ public:
|
||||
QPointF preferredPos(Corona *corona) const;
|
||||
QPointF preferredPanelPos(Corona *corona) const;
|
||||
void setLockToolText();
|
||||
void appletDestroyed(Applet*);
|
||||
void appletDeleted(Applet*);
|
||||
void appletAppeared(Applet*);
|
||||
void clearDataForMimeJob(KIO::Job *job);
|
||||
void remoteAppletReady(Plasma::AccessAppletJob *job);
|
||||
|
Loading…
Reference in New Issue
Block a user