Merge lp:~azzar1/unity/fix-crash-tests into lp:unity

Proposed by Andrea Azzarone on 2013-05-22
Status: Merged
Approved by: Marco Trevisan (Treviño) on 2013-05-22
Approved revision: 3336
Merged at revision: 3341
Proposed branch: lp:~azzar1/unity/fix-crash-tests
Merge into: lp:unity
Diff against target: 33 lines (+4/-1)
2 files modified
dash/DashView.cpp (+3/-1)
dash/DashView.h (+1/-0)
To merge this branch: bzr merge lp:~azzar1/unity/fix-crash-tests
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) 2013-05-22 Approve on 2013-05-22
PS Jenkins bot (community) continuous-integration Approve on 2013-05-22
Review via email: mp+165069@code.launchpad.net

Commit message

Fix crashing tests.

Description of the change

== Problem ==
#1182585 ./test/test-gtest segfaults

== Fix ==
Disconnect nux::GetWindowCompositor().key_nav_focus_change signal in DashView dtor.

== Test ==
N/A

To post a comment you must log in.
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Marco Trevisan (Treviño) (3v1n0) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dash/DashView.cpp'
2--- dash/DashView.cpp 2013-05-13 16:03:47 +0000
3+++ dash/DashView.cpp 2013-05-22 10:57:57 +0000
4@@ -157,7 +157,7 @@
5 }
6
7 // If nux resets the focus, we need to set it back to the default focus item.
8- nux::GetWindowCompositor().key_nav_focus_change.connect([this](nux::Area *area, bool has_focus, nux::KeyNavDirection direction) {
9+ key_nav_focus_change_connection_ = nux::GetWindowCompositor().key_nav_focus_change.connect([this](nux::Area *area, bool has_focus, nux::KeyNavDirection direction) {
10 if (visible_ && !area)
11 nux::GetWindowCompositor().SetKeyFocusArea(default_focus());
12 });
13@@ -166,6 +166,8 @@
14 DashView::~DashView()
15 {
16 scope_can_refine_connection_.disconnect();
17+ key_nav_focus_change_connection_.disconnect();
18+
19 // Do this explicitely, otherwise dee will complain about invalid access
20 // to the scope models
21 RemoveLayout();
22
23=== modified file 'dash/DashView.h'
24--- dash/DashView.h 2013-05-13 16:01:33 +0000
25+++ dash/DashView.h 2013-05-22 10:57:57 +0000
26@@ -153,6 +153,7 @@
27 nux::ObjectPtr<ScopeView> active_scope_view_;
28 nux::ObjectPtr<ScopeView> preview_scope_view_;
29 sigc::connection scope_can_refine_connection_;
30+ sigc::connection key_nav_focus_change_connection_;
31
32 // Drawing related
33 nux::Geometry content_geo_;