Merge lp:~jamesh/thumbnailer/bug-1467751 into lp:thumbnailer/devel

Proposed by James Henstridge
Status: Merged
Approved by: James Henstridge
Approved revision: 233
Merged at revision: 234
Proposed branch: lp:~jamesh/thumbnailer/bug-1467751
Merge into: lp:thumbnailer/devel
Diff against target: 66 lines (+2/-9)
1 file modified
src/service/handler.cpp (+2/-9)
To merge this branch: bzr merge lp:~jamesh/thumbnailer/bug-1467751
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Michi Henning (community) Approve
Review via email: mp+262660@code.launchpad.net

This proposal supersedes a proposal from 2015-06-23.

Commit message

Set finish_time within the Handler::sendThumbnail and sendError methods so it is guaranteed to be set before the finished signal is emitted.

Description of the change

Set finish_time within the Handler::sendThumbnail and sendError methods so it is guaranteed to be set before the finished signal is emitted.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michi Henning (michihenning) wrote :

This is a big improvement, thanks!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~jamesh/thumbnailer/bug-1467751 updated
233. By James Henstridge

Merge from devel, fixing conflicts

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/service/handler.cpp'
2--- src/service/handler.cpp 2015-06-22 10:18:13 +0000
3+++ src/service/handler.cpp 2015-06-23 08:34:17 +0000
4@@ -252,8 +252,6 @@
5
6 void Handler::checkFinished()
7 {
8- p->finish_time = chrono::system_clock::now(); // Set finish_time in case something below throws.
9-
10 if (p->cancelled)
11 {
12 return;
13@@ -281,8 +279,6 @@
14 if (fd_error.fd.isValid())
15 {
16 sendThumbnail(fd_error.fd);
17- // Set time again, because sending the thumbnail could take a while.
18- p->finish_time = chrono::system_clock::now();
19 return;
20 }
21
22@@ -297,14 +293,12 @@
23 // LCOV_EXCL_START
24 catch (std::exception const& e)
25 {
26- p->finish_time = chrono::system_clock::now();
27 sendError("Handler::checkFinished(): download error: " + details() + e.what());
28 }
29 // LCOV_EXCL_STOP
30 return;
31 }
32
33- p->finish_time = chrono::system_clock::now();
34 sendError("Handler::check_finished(): no artwork for " + details() + ": " + status());
35 }
36
37@@ -350,8 +344,6 @@
38
39 void Handler::createFinished()
40 {
41- // Set finish_time in case something below throws.
42- p->finish_time = chrono::system_clock::now();
43 if (p->cancelled)
44 {
45 return;
46@@ -382,12 +374,12 @@
47 {
48 sendError("Handler::createFinished(): invalid file descriptor for " + details()); // LCOV_EXCL_LINE
49 }
50- p->finish_time = chrono::system_clock::now();
51 }
52
53 void Handler::sendThumbnail(QDBusUnixFileDescriptor const& unix_fd)
54 {
55 p->bus.send(p->message.createReply(QVariant::fromValue(unix_fd)));
56+ p->finish_time = chrono::system_clock::now();
57 Q_EMIT finished();
58 }
59
60@@ -398,6 +390,7 @@
61 qWarning() << error;
62 }
63 p->bus.send(p->message.createErrorReply(ART_ERROR, error));
64+ p->finish_time = chrono::system_clock::now();
65 Q_EMIT finished();
66 }
67

Subscribers

People subscribed via source and target branches

to all changes: