diff --git a/extenderitem.cpp b/extenderitem.cpp index 24739f6b9..2f48d00a7 100644 --- a/extenderitem.cpp +++ b/extenderitem.cpp @@ -434,6 +434,15 @@ bool ExtenderItem::isCollapsed() const void ExtenderItem::setAutoExpireDelay(uint time) { + if (!time) { + if (d->expirationTimer) { + d->expirationTimer->stop(); + delete d->expirationTimer; + d->expirationTimer = 0; + } + return; + } + if (!isDetached()) { if (!d->expirationTimer) { d->expirationTimer = new QTimer(this); diff --git a/extenderitem.h b/extenderitem.h index 869599260..1f789a9d1 100644 --- a/extenderitem.h +++ b/extenderitem.h @@ -136,7 +136,7 @@ class PLASMA_EXPORT ExtenderItem : public QGraphicsWidget * @param time (in ms) before this extender item destroys itself unless it is detached, * in which case this extender stays around. 0 means forever and is the default. */ - void setAutoExpireDelay(uint time = 0); + void setAutoExpireDelay(uint time); /** * @return whether or not this extender item has an auto expire delay.