Improved factory, it will set the animation parent.
svn path=/trunk/KDE/kdelibs/; revision=1038248
This commit is contained in:
parent
82317bda2d
commit
1379d29481
@ -90,7 +90,7 @@ public:
|
|||||||
* Factory to build new animation objects. To control their behavior,
|
* Factory to build new animation objects. To control their behavior,
|
||||||
* check \ref AbstractAnimation properties.
|
* check \ref AbstractAnimation properties.
|
||||||
**/
|
**/
|
||||||
AbstractAnimation *create(Animation type);
|
AbstractAnimation *create(Animation type, QObject *parent = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts a standard animation on a QGraphicsItem.
|
* Starts a standard animation on a QGraphicsItem.
|
||||||
|
@ -220,7 +220,7 @@ Animator *Animator::self()
|
|||||||
return &privateSelf->self;
|
return &privateSelf->self;
|
||||||
}
|
}
|
||||||
|
|
||||||
AbstractAnimation *Animator::create(Animation type)
|
AbstractAnimation *Animator::create(Animation type, QObject *parent)
|
||||||
{
|
{
|
||||||
AbstractAnimation *result = 0;
|
AbstractAnimation *result = 0;
|
||||||
|
|
||||||
@ -260,6 +260,9 @@ AbstractAnimation *Animator::create(Animation type)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (result)
|
||||||
|
result->setParent(parent);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user