X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=chessclockwindow.cpp;fp=chessclockwindow.cpp;h=c5fde01a3c54b072f02243d98f5e7c5359539af0;hb=d145b92ee23ef361bbfd91eef606cfc3ed9994fa;hp=2a7c7cbdfe6babde463878f7d14749bb855c4efb;hpb=e43c493689b3e5a28625a293f811a888bd5042e8;p=chessclock diff --git a/chessclockwindow.cpp b/chessclockwindow.cpp index 2a7c7cb..c5fde01 100644 --- a/chessclockwindow.cpp +++ b/chessclockwindow.cpp @@ -25,6 +25,7 @@ #include "classes/chessclockwidget.h" #include "classes/startwidget.h" #include "classes/timecontrol.h" +#include "classes/turninformation.h" // Time controls #include "classes/timecontrol/notimecontrol.h" @@ -144,6 +145,7 @@ void ChessClockWindow::startGame(TimeControl *timecontrol) clocks_ = newWidget; stack_->addWidget(clocks_); stack_->setCurrentWidget(clocks_); + connect( clocks_, SIGNAL(TurnFinished(TurnInformation*)), this, SLOT(dontEatMemory(TurnInformation*))); } } @@ -163,3 +165,8 @@ bool ChessClockWindow::eventFilter(QObject *obj, QEvent *event) return QObject::eventFilter(obj, event); } } + +void ChessClockWindow::dontEatMemory(TurnInformation *turnInformation) +{ + delete turnInformation; // hopefully don't cause Segematation Fault +}