Merge lp:~xavi-garcia-mena/keeper/stop-inactivity-timer-bug into lp:keeper

Proposed by Xavi Garcia
Status: Merged
Merged at revision: 49
Proposed branch: lp:~xavi-garcia-mena/keeper/stop-inactivity-timer-bug
Merge into: lp:keeper
Diff against target: 31 lines (+7/-0)
1 file modified
src/helper/backup-helper.cpp (+7/-0)
To merge this branch: bzr merge lp:~xavi-garcia-mena/keeper/stop-inactivity-timer-bug
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
Review via email: mp+301273@code.launchpad.net

Commit message

Simple change to stop the inactivity timer when the helper stops.

Description of the change

Simple change to stop the inactivity timer when the helper stops.

I saw testing on the phone that the inactivity timer never stopped although the helper was not running.

To post a comment you must log in.
Revision history for this message
Charles Kerr (charlesk) wrote :

Good catch.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/helper/backup-helper.cpp'
2--- src/helper/backup-helper.cpp 2016-07-15 21:46:53 +0000
3+++ src/helper/backup-helper.cpp 2016-07-27 13:56:05 +0000
4@@ -140,6 +140,7 @@
5
6 void on_inactivity_detected()
7 {
8+ stop_inactivity_timer();
9 qWarning() << "Inactivity detected in the helper...stopping it";
10 stop();
11 }
12@@ -203,6 +204,11 @@
13 timer_->start(MAX_TIME_WAITING_FOR_DATA);
14 }
15
16+ void stop_inactivity_timer()
17+ {
18+ timer_->stop();
19+ }
20+
21 void check_for_done()
22 {
23 if (n_uploaded_ == q_ptr->expected_size())
24@@ -281,6 +287,7 @@
25 qDebug() << "HELPER STOPPED +++++++++++++++++++++++++++++++++++++ " << appid;
26 auto self = static_cast<BackupHelperPrivate*>(vself);
27 self->check_for_done();
28+ self->stop_inactivity_timer();
29 }
30
31 std::vector<ubuntu::app_launch::Helper::URL> get_helper_urls(QString const & /*appId*/)

Subscribers

People subscribed via source and target branches

to all changes: