Merge lp:~alecu/unity-scope-click/scopes-short-id into lp:unity-scope-click/devel

Proposed by Alejandro J. Cura
Status: Merged
Approved by: Francis Ginther
Approved revision: 335
Merged at revision: 340
Proposed branch: lp:~alecu/unity-scope-click/scopes-short-id
Merge into: lp:unity-scope-click/devel
Diff against target: 87 lines (+9/-9)
3 files modified
libclickscope/click/interface.cpp (+2/-2)
libclickscope/tests/fake_json.cpp (+4/-4)
libclickscope/tests/test_interface.cpp (+3/-3)
To merge this branch: bzr merge lp:~alecu/unity-scope-click/scopes-short-id
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
dobey (community) Approve
Review via email: mp+226820@code.launchpad.net

Commit message

Pass the full scope_id to search queries.

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
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
dobey (dobey) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Francis Ginther (fginther) wrote :

The host which ran both failed autolanding jobs has been disabled, will try again to attempt to determine if that is the root of the build failures.

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 'libclickscope/click/interface.cpp'
2--- libclickscope/click/interface.cpp 2014-07-15 13:00:54 +0000
3+++ libclickscope/click/interface.cpp 2014-07-17 18:37:39 +0000
4@@ -387,14 +387,14 @@
5 BOOST_FOREACH(ptree::value_type &sv, pt.get_child("hooks"))
6 {
7 // FIXME: "primary app or scope" for a package is not defined,
8- // we just use first one here:
9+ // we just use the first one in the manifest:
10 auto app_name = sv.second.get("desktop", "");
11 if (manifest.first_app_name.empty() && !app_name.empty()) {
12 manifest.first_app_name = sv.first;
13 }
14 auto scope_id = sv.second.get("scope", "");
15 if (manifest.first_scope_id.empty() && !scope_id.empty()) {
16- manifest.first_scope_id = manifest.name; // need to change this for more than one scope per click
17+ manifest.first_scope_id = manifest.name + "_" + sv.first;
18 }
19 }
20 qDebug() << "adding manifest: " << manifest.name.c_str() << manifest.version.c_str() << manifest.first_app_name.c_str();
21
22=== modified file 'libclickscope/tests/fake_json.cpp'
23--- libclickscope/tests/fake_json.cpp 2014-07-14 08:49:19 +0000
24+++ libclickscope/tests/fake_json.cpp 2014-07-17 18:37:39 +0000
25@@ -580,7 +580,7 @@
26 "name": "com.example.fake-scope",
27 "version": "0.1",
28 "hooks": {
29- "fake-scope": {
30+ "fake-scope-hook": {
31 "apparmor": "scope-security.json",
32 "scope": "fake-scope"
33 }
34@@ -598,7 +598,7 @@
35 "apparmor": "fake-app.json",
36 "desktop": "fake-app.desktop"
37 },
38- "fake-scope": {
39+ "fake-scope-hook": {
40 "apparmor": "scope-security.json",
41 "scope": "fake-scope"
42 }
43@@ -620,11 +620,11 @@
44 "apparmor": "fake-app2.json",
45 "desktop": "fake-app2.desktop"
46 },
47- "fake-scope1": {
48+ "fake-scope-hook1": {
49 "apparmor": "scope-security1.json",
50 "scope": "fake-scope1"
51 },
52- "fake-scope2": {
53+ "fake-scope-hook2": {
54 "apparmor": "scope-security1.json",
55 "scope": "fake-scope2"
56 }
57
58=== modified file 'libclickscope/tests/test_interface.cpp'
59--- libclickscope/tests/test_interface.cpp 2014-06-16 15:38:49 +0000
60+++ libclickscope/tests/test_interface.cpp 2014-07-17 18:37:39 +0000
61@@ -459,7 +459,7 @@
62 TEST(ClickInterface, testManifestFromJsonOneScope)
63 {
64 Manifest m = manifest_from_json(FAKE_JSON_MANIFEST_ONE_SCOPE);
65- ASSERT_EQ(m.first_scope_id, "com.example.fake-scope");
66+ ASSERT_EQ(m.first_scope_id, "com.example.fake-scope_fake-scope-hook");
67 ASSERT_FALSE(m.has_any_apps());
68 ASSERT_TRUE(m.has_any_scopes());
69 }
70@@ -468,7 +468,7 @@
71 {
72 Manifest m = manifest_from_json(FAKE_JSON_MANIFEST_ONE_APP_ONE_SCOPE);
73 ASSERT_EQ(m.first_app_name, "fake-app");
74- ASSERT_EQ(m.first_scope_id, "com.example.fake-1app-1scope");
75+ ASSERT_EQ(m.first_scope_id, "com.example.fake-1app-1scope_fake-scope-hook");
76 ASSERT_TRUE(m.has_any_apps());
77 ASSERT_TRUE(m.has_any_scopes());
78 }
79@@ -477,7 +477,7 @@
80 {
81 Manifest m = manifest_from_json(FAKE_JSON_MANIFEST_TWO_APPS_TWO_SCOPES);
82 ASSERT_EQ(m.first_app_name, "fake-app1");
83- ASSERT_EQ(m.first_scope_id, "com.example.fake-2apps-2scopes");
84+ ASSERT_EQ(m.first_scope_id, "com.example.fake-2apps-2scopes_fake-scope-hook1");
85 ASSERT_TRUE(m.has_any_apps());
86 ASSERT_TRUE(m.has_any_scopes());
87 }

Subscribers

People subscribed via source and target branches

to all changes: