Merge lp:~alecu/unity-scope-click/move-libpay-usage into lp:unity-scope-click

Proposed by Alejandro J. Cura
Status: Merged
Approved by: dobey
Approved revision: 320
Merged at revision: 319
Proposed branch: lp:~alecu/unity-scope-click/move-libpay-usage
Merge into: lp:unity-scope-click
Diff against target: 156 lines (+9/-10)
8 files modified
libclickscope/click/CMakeLists.txt (+4/-0)
libclickscope/tests/CMakeLists.txt (+1/-0)
libclickscope/tests/mock_pay.h (+1/-1)
scope/clickstore/CMakeLists.txt (+0/-4)
scope/clickstore/store-query.h (+1/-2)
scope/clickstore/store-scope.h (+1/-1)
scope/tests/CMakeLists.txt (+0/-1)
scope/tests/test_query.cpp (+1/-1)
To merge this branch: bzr merge lp:~alecu/unity-scope-click/move-libpay-usage
Reviewer Review Type Date Requested Status
dobey (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+255833@code.launchpad.net

Commit message

Move libpay usage from store scope to libclickscope

Description of the change

This refactor is needed to support cancelling purchases from the apps scope.

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
dobey (dobey) :
review: Approve
Revision history for this message
dobey (dobey) wrote :

Actually, I think you need to move the tests too, for this.

review: Needs Fixing
320. By Alejandro J. Cura

Move the pay.cpp tests to libclickscope

Revision history for this message
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libclickscope/click/CMakeLists.txt'
2--- libclickscope/click/CMakeLists.txt 2014-07-25 05:35:28 +0000
3+++ libclickscope/click/CMakeLists.txt 2015-04-14 20:43:22 +0000
4@@ -4,6 +4,7 @@
5 find_package (Qt5Sql REQUIRED)
6 pkg_check_modules(JSON_CPP REQUIRED jsoncpp)
7 pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
8+pkg_check_modules(LIBPAY REQUIRED pay-2)
9
10 add_definitions(
11 -DGETTEXT_PACKAGE=\"${PROJECT_NAME}\"
12@@ -25,6 +26,7 @@
13 launcher.cpp
14 network_access_manager.cpp
15 package.cpp
16+ pay.cpp
17 preview.cpp
18 reviews.cpp
19 qtbridge.cpp
20@@ -39,12 +41,14 @@
21
22 include_directories(
23 ${JSON_CPP_INCLUDE_DIRS}
24+ ${LIBPAY_INCLUDE_DIRS}
25 ${GSETTINGS_QT_INCLUDE_DIRS}
26 ${CMAKE_SOURCE_DIR}/libclickscope
27 )
28
29 target_link_libraries (${SCOPE_LIB_NAME}
30 ${JSON_CPP_LDFLAGS}
31+ ${LIBPAY_LDFLAGS}
32 ${UNITY_SCOPES_LDFLAGS}
33 ${UBUNTUONE_LDFLAGS}
34 ${UBUNTU_DOWNLOAD_MANAGER_CLIENT_LDFLAGS}
35
36=== renamed file 'scope/clickstore/pay.cpp' => 'libclickscope/click/pay.cpp'
37=== renamed file 'scope/clickstore/pay.h' => 'libclickscope/click/pay.h'
38=== modified file 'libclickscope/tests/CMakeLists.txt'
39--- libclickscope/tests/CMakeLists.txt 2014-07-25 16:52:39 +0000
40+++ libclickscope/tests/CMakeLists.txt 2015-04-14 20:43:22 +0000
41@@ -31,6 +31,7 @@
42 test_index.cpp
43 test_interface.cpp
44 test_package.cpp
45+ test_pay.cpp
46 test_preview.cpp
47 test_reviews.cpp
48 test_smartconnect.cpp
49
50=== renamed file 'scope/tests/mock_pay.h' => 'libclickscope/tests/mock_pay.h'
51--- scope/tests/mock_pay.h 2015-03-25 21:56:03 +0000
52+++ libclickscope/tests/mock_pay.h 2015-04-14 20:43:22 +0000
53@@ -27,7 +27,7 @@
54 * files in the program, then also delete it here.
55 */
56
57-#include "clickstore/pay.h"
58+#include <click/pay.h>
59
60 #include <click/webclient.h>
61
62
63=== renamed file 'scope/tests/test_pay.cpp' => 'libclickscope/tests/test_pay.cpp'
64=== modified file 'scope/clickstore/CMakeLists.txt'
65--- scope/clickstore/CMakeLists.txt 2015-03-13 23:04:36 +0000
66+++ scope/clickstore/CMakeLists.txt 2015-04-14 20:43:22 +0000
67@@ -3,7 +3,6 @@
68 find_package (Qt5Core REQUIRED)
69 find_package (Qt5Sql REQUIRED)
70 pkg_check_modules(JSON_CPP REQUIRED jsoncpp)
71-pkg_check_modules(LIBPAY REQUIRED pay-2)
72
73 add_definitions(
74 -DGETTEXT_PACKAGE=\"${PROJECT_NAME}\"
75@@ -11,7 +10,6 @@
76 )
77
78 add_library(${STORE_LIB_UNVERSIONED} SHARED
79- pay.cpp
80 store-query.cpp
81 store-scope.cpp
82 )
83@@ -20,7 +18,6 @@
84 include_directories(
85 ${CMAKE_SOURCE_DIR}/libclickscope
86 ${JSON_CPP_INCLUDE_DIRS}
87- ${LIBPAY_INCLUDE_DIRS}
88 )
89
90 qt5_use_modules (${STORE_LIB_UNVERSIONED} Network Sql)
91@@ -30,7 +27,6 @@
92 ${JSON_CPP_LDFLAGS}
93 ${UNITY_SCOPES_LDFLAGS}
94 ${UBUNTUONE_LDFLAGS}
95- ${LIBPAY_LDFLAGS}
96 ${UBUNTU_DOWNLOAD_MANAGER_CLIENT_LDFLAGS}
97 ${UBUNTU_DOWNLOAD_MANAGER_COMMON_LDFLAGS}
98 )
99
100=== modified file 'scope/clickstore/store-query.h'
101--- scope/clickstore/store-query.h 2015-03-05 20:48:35 +0000
102+++ scope/clickstore/store-query.h 2015-04-14 20:43:22 +0000
103@@ -30,8 +30,6 @@
104 #ifndef STORE_QUERY_H
105 #define STORE_QUERY_H
106
107-#include "pay.h"
108-
109 #include <unity/scopes/SearchQueryBase.h>
110 #include <unity/scopes/Department.h>
111
112@@ -42,6 +40,7 @@
113
114 #include <click/department-lookup.h>
115 #include <click/package.h>
116+#include <click/pay.h>
117 #include <click/highlights.h>
118 #include <click/interface.h>
119
120
121=== modified file 'scope/clickstore/store-scope.h'
122--- scope/clickstore/store-scope.h 2014-08-01 15:04:19 +0000
123+++ scope/clickstore/store-scope.h 2015-04-14 20:43:22 +0000
124@@ -30,7 +30,7 @@
125 #ifndef CLICK_SCOPE_H
126 #define CLICK_SCOPE_H
127
128-#include "pay.h"
129+#include <click/pay.h>
130
131 #include <memory>
132 #include <click/network_access_manager.h>
133
134=== modified file 'scope/tests/CMakeLists.txt'
135--- scope/tests/CMakeLists.txt 2014-10-01 15:10:28 +0000
136+++ scope/tests/CMakeLists.txt 2015-04-14 20:43:22 +0000
137@@ -18,7 +18,6 @@
138 )
139
140 add_executable (${CLICKSCOPE_TESTS_TARGET}
141- test_pay.cpp
142 test_query.cpp
143 test_store_scope.cpp
144
145
146=== modified file 'scope/tests/test_query.cpp'
147--- scope/tests/test_query.cpp 2015-03-05 20:48:35 +0000
148+++ scope/tests/test_query.cpp 2015-04-14 20:43:22 +0000
149@@ -27,7 +27,7 @@
150 * files in the program, then also delete it here.
151 */
152
153-#include "mock_pay.h"
154+#include <tests/mock_pay.h>
155
156 #include "clickstore/store-query.h"
157

Subscribers

People subscribed via source and target branches