Commit f0ce10ea authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Fixed memory leak due to timer callback

parent 917a58c0
...@@ -363,6 +363,7 @@ QFrame* wrapInFrame(QFrame* widget) ...@@ -363,6 +363,7 @@ QFrame* wrapInFrame(QFrame* widget)
void initOneShotTimer(QTimer* timer, const char* slot, int time) void initOneShotTimer(QTimer* timer, const char* slot, int time)
{ {
QObject::disconnect(timer, 0, 0, 0);
timer->setSingleShot(true); timer->setSingleShot(true);
QObject::connect(timer, SIGNAL(timeout()), timer->parent(), slot); QObject::connect(timer, SIGNAL(timeout()), timer->parent(), slot);
timer->start(time); timer->start(time);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment