Skip to content
Snippets Groups Projects
Commit 8eaa9b90 authored by Paul Tvete's avatar Paul Tvete
Browse files

QObject::killTimers() doesn't exist anymore

Now we have to kill timers individually.
parent 5f41df57
No related branches found
No related tags found
No related merge requests found
...@@ -61,7 +61,7 @@ void CannonField::shoot() ...@@ -61,7 +61,7 @@ void CannonField::shoot()
shoot_ang = ang; shoot_ang = ang;
shoot_f = f; shoot_f = f;
shooting = true; shooting = true;
startTimer( 50 ); timerId = startTimer( 50 );
} }
void CannonField::newTarget() void CannonField::newTarget()
...@@ -170,7 +170,7 @@ void CannonField::mouseReleaseEvent( QMouseEvent *e ) ...@@ -170,7 +170,7 @@ void CannonField::mouseReleaseEvent( QMouseEvent *e )
void CannonField::stopShooting() void CannonField::stopShooting()
{ {
shooting = false; shooting = false;
killTimers(); killTimer(timerId);
} }
void CannonField::paintShot( QPainter *p ) void CannonField::paintShot( QPainter *p )
......
...@@ -55,6 +55,7 @@ private: ...@@ -55,6 +55,7 @@ private:
bool shooting; bool shooting;
int timerCount; int timerCount;
int timerId;
float shoot_ang; float shoot_ang;
float shoot_f; float shoot_f;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment