Merge lp:~ken-vandine/content-hub/dont_swallow_deactivate into lp:content-hub

Proposed by Ken VanDine
Status: Merged
Approved by: Ken VanDine
Approved revision: 239
Merged at revision: 240
Proposed branch: lp:~ken-vandine/content-hub/dont_swallow_deactivate
Merge into: lp:content-hub
Diff against target: 29 lines (+5/-8)
1 file modified
src/com/ubuntu/content/hub.cpp (+5/-8)
To merge this branch: bzr merge lp:~ken-vandine/content-hub/dont_swallow_deactivate
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Michael Sheldon (community) Approve
Sebastien Bacher Approve
Review via email: mp+268770@code.launchpad.net

Commit message

Don't swallow QEvent::ApplicationDeactivate

Description of the change

Don't swallow QEvent::ApplicationDeactivate

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Sebastien Bacher (seb128) wrote :

works as it should, great bugfix!

review: Approve
239. By Ken VanDine

warn when we don't call the handler

Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Code looks good

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
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/com/ubuntu/content/hub.cpp'
2--- src/com/ubuntu/content/hub.cpp 2014-08-04 17:56:09 +0000
3+++ src/com/ubuntu/content/hub.cpp 2015-08-21 16:02:51 +0000
4@@ -81,20 +81,17 @@
5
6 bool cuc::Hub::eventFilter(QObject *obj, QEvent *event)
7 {
8- if (event->type() == QEvent::ApplicationDeactivate)
9- return true;
10-
11 if (event->type() == QEvent::ApplicationActivate)
12 {
13 QString id = app_id();
14- if (id.isEmpty())
15+ if (!id.isEmpty())
16+ {
17+ TRACE() << Q_FUNC_INFO << id << "Activated";
18+ d->service->HandlerActive(id);
19+ } else
20 {
21 qWarning() << "APP_ID isn't set, the handler ignored";
22- return true;
23 }
24- TRACE() << Q_FUNC_INFO << id << "Activated";
25- d->service->HandlerActive(id);
26- return true;
27 }
28 return QObject::eventFilter(obj, event);
29 }

Subscribers

People subscribed via source and target branches