projects
/
chessclock
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Screen will turn black after 30 min
[chessclock]
/
chessclockwindow.cpp
diff --git
a/chessclockwindow.cpp
b/chessclockwindow.cpp
index
2a7c7cb
..
c5fde01
100644
(file)
--- a/
chessclockwindow.cpp
+++ b/
chessclockwindow.cpp
@@
-25,6
+25,7
@@
#include "classes/chessclockwidget.h"
#include "classes/startwidget.h"
#include "classes/timecontrol.h"
#include "classes/chessclockwidget.h"
#include "classes/startwidget.h"
#include "classes/timecontrol.h"
+#include "classes/turninformation.h"
// Time controls
#include "classes/timecontrol/notimecontrol.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_);
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);
}
}
return QObject::eventFilter(obj, event);
}
}
+
+void ChessClockWindow::dontEatMemory(TurnInformation *turnInformation)
+{
+ delete turnInformation; // hopefully don't cause Segematation Fault
+}