Removed the default value in setAutoExpireDelay, and allow the auto expire timer to be
cancelled by calling setAutoExpireDelay(0). svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=841701
This commit is contained in:
parent
bfb9e05b91
commit
cfcda8ddf3
@ -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);
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user