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
=== modified file 'libclickscope/click/CMakeLists.txt'
--- libclickscope/click/CMakeLists.txt 2014-07-25 05:35:28 +0000
+++ libclickscope/click/CMakeLists.txt 2015-04-14 20:43:22 +0000
@@ -4,6 +4,7 @@
4find_package (Qt5Sql REQUIRED)4find_package (Qt5Sql REQUIRED)
5pkg_check_modules(JSON_CPP REQUIRED jsoncpp)5pkg_check_modules(JSON_CPP REQUIRED jsoncpp)
6pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)6pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
7pkg_check_modules(LIBPAY REQUIRED pay-2)
78
8add_definitions(9add_definitions(
9 -DGETTEXT_PACKAGE=\"${PROJECT_NAME}\"10 -DGETTEXT_PACKAGE=\"${PROJECT_NAME}\"
@@ -25,6 +26,7 @@
25 launcher.cpp26 launcher.cpp
26 network_access_manager.cpp27 network_access_manager.cpp
27 package.cpp28 package.cpp
29 pay.cpp
28 preview.cpp30 preview.cpp
29 reviews.cpp31 reviews.cpp
30 qtbridge.cpp32 qtbridge.cpp
@@ -39,12 +41,14 @@
3941
40include_directories(42include_directories(
41 ${JSON_CPP_INCLUDE_DIRS}43 ${JSON_CPP_INCLUDE_DIRS}
44 ${LIBPAY_INCLUDE_DIRS}
42 ${GSETTINGS_QT_INCLUDE_DIRS}45 ${GSETTINGS_QT_INCLUDE_DIRS}
43 ${CMAKE_SOURCE_DIR}/libclickscope46 ${CMAKE_SOURCE_DIR}/libclickscope
44)47)
4548
46target_link_libraries (${SCOPE_LIB_NAME}49target_link_libraries (${SCOPE_LIB_NAME}
47 ${JSON_CPP_LDFLAGS}50 ${JSON_CPP_LDFLAGS}
51 ${LIBPAY_LDFLAGS}
48 ${UNITY_SCOPES_LDFLAGS}52 ${UNITY_SCOPES_LDFLAGS}
49 ${UBUNTUONE_LDFLAGS}53 ${UBUNTUONE_LDFLAGS}
50 ${UBUNTU_DOWNLOAD_MANAGER_CLIENT_LDFLAGS}54 ${UBUNTU_DOWNLOAD_MANAGER_CLIENT_LDFLAGS}
5155
=== renamed file 'scope/clickstore/pay.cpp' => 'libclickscope/click/pay.cpp'
=== renamed file 'scope/clickstore/pay.h' => 'libclickscope/click/pay.h'
=== modified file 'libclickscope/tests/CMakeLists.txt'
--- libclickscope/tests/CMakeLists.txt 2014-07-25 16:52:39 +0000
+++ libclickscope/tests/CMakeLists.txt 2015-04-14 20:43:22 +0000
@@ -31,6 +31,7 @@
31 test_index.cpp31 test_index.cpp
32 test_interface.cpp32 test_interface.cpp
33 test_package.cpp33 test_package.cpp
34 test_pay.cpp
34 test_preview.cpp35 test_preview.cpp
35 test_reviews.cpp36 test_reviews.cpp
36 test_smartconnect.cpp37 test_smartconnect.cpp
3738
=== renamed file 'scope/tests/mock_pay.h' => 'libclickscope/tests/mock_pay.h'
--- scope/tests/mock_pay.h 2015-03-25 21:56:03 +0000
+++ libclickscope/tests/mock_pay.h 2015-04-14 20:43:22 +0000
@@ -27,7 +27,7 @@
27 * files in the program, then also delete it here.27 * files in the program, then also delete it here.
28 */28 */
2929
30#include "clickstore/pay.h"30#include <click/pay.h>
3131
32#include <click/webclient.h>32#include <click/webclient.h>
3333
3434
=== renamed file 'scope/tests/test_pay.cpp' => 'libclickscope/tests/test_pay.cpp'
=== modified file 'scope/clickstore/CMakeLists.txt'
--- scope/clickstore/CMakeLists.txt 2015-03-13 23:04:36 +0000
+++ scope/clickstore/CMakeLists.txt 2015-04-14 20:43:22 +0000
@@ -3,7 +3,6 @@
3find_package (Qt5Core REQUIRED)3find_package (Qt5Core REQUIRED)
4find_package (Qt5Sql REQUIRED)4find_package (Qt5Sql REQUIRED)
5pkg_check_modules(JSON_CPP REQUIRED jsoncpp)5pkg_check_modules(JSON_CPP REQUIRED jsoncpp)
6pkg_check_modules(LIBPAY REQUIRED pay-2)
76
8add_definitions(7add_definitions(
9 -DGETTEXT_PACKAGE=\"${PROJECT_NAME}\"8 -DGETTEXT_PACKAGE=\"${PROJECT_NAME}\"
@@ -11,7 +10,6 @@
11)10)
1211
13add_library(${STORE_LIB_UNVERSIONED} SHARED12add_library(${STORE_LIB_UNVERSIONED} SHARED
14 pay.cpp
15 store-query.cpp13 store-query.cpp
16 store-scope.cpp14 store-scope.cpp
17)15)
@@ -20,7 +18,6 @@
20include_directories(18include_directories(
21 ${CMAKE_SOURCE_DIR}/libclickscope19 ${CMAKE_SOURCE_DIR}/libclickscope
22 ${JSON_CPP_INCLUDE_DIRS}20 ${JSON_CPP_INCLUDE_DIRS}
23 ${LIBPAY_INCLUDE_DIRS}
24)21)
2522
26qt5_use_modules (${STORE_LIB_UNVERSIONED} Network Sql)23qt5_use_modules (${STORE_LIB_UNVERSIONED} Network Sql)
@@ -30,7 +27,6 @@
30 ${JSON_CPP_LDFLAGS}27 ${JSON_CPP_LDFLAGS}
31 ${UNITY_SCOPES_LDFLAGS}28 ${UNITY_SCOPES_LDFLAGS}
32 ${UBUNTUONE_LDFLAGS}29 ${UBUNTUONE_LDFLAGS}
33 ${LIBPAY_LDFLAGS}
34 ${UBUNTU_DOWNLOAD_MANAGER_CLIENT_LDFLAGS}30 ${UBUNTU_DOWNLOAD_MANAGER_CLIENT_LDFLAGS}
35 ${UBUNTU_DOWNLOAD_MANAGER_COMMON_LDFLAGS}31 ${UBUNTU_DOWNLOAD_MANAGER_COMMON_LDFLAGS}
36)32)
3733
=== modified file 'scope/clickstore/store-query.h'
--- scope/clickstore/store-query.h 2015-03-05 20:48:35 +0000
+++ scope/clickstore/store-query.h 2015-04-14 20:43:22 +0000
@@ -30,8 +30,6 @@
30#ifndef STORE_QUERY_H30#ifndef STORE_QUERY_H
31#define STORE_QUERY_H31#define STORE_QUERY_H
3232
33#include "pay.h"
34
35#include <unity/scopes/SearchQueryBase.h>33#include <unity/scopes/SearchQueryBase.h>
36#include <unity/scopes/Department.h>34#include <unity/scopes/Department.h>
3735
@@ -42,6 +40,7 @@
4240
43#include <click/department-lookup.h>41#include <click/department-lookup.h>
44#include <click/package.h>42#include <click/package.h>
43#include <click/pay.h>
45#include <click/highlights.h>44#include <click/highlights.h>
46#include <click/interface.h>45#include <click/interface.h>
4746
4847
=== modified file 'scope/clickstore/store-scope.h'
--- scope/clickstore/store-scope.h 2014-08-01 15:04:19 +0000
+++ scope/clickstore/store-scope.h 2015-04-14 20:43:22 +0000
@@ -30,7 +30,7 @@
30#ifndef CLICK_SCOPE_H30#ifndef CLICK_SCOPE_H
31#define CLICK_SCOPE_H31#define CLICK_SCOPE_H
3232
33#include "pay.h"33#include <click/pay.h>
3434
35#include <memory>35#include <memory>
36#include <click/network_access_manager.h>36#include <click/network_access_manager.h>
3737
=== modified file 'scope/tests/CMakeLists.txt'
--- scope/tests/CMakeLists.txt 2014-10-01 15:10:28 +0000
+++ scope/tests/CMakeLists.txt 2015-04-14 20:43:22 +0000
@@ -18,7 +18,6 @@
18)18)
1919
20add_executable (${CLICKSCOPE_TESTS_TARGET}20add_executable (${CLICKSCOPE_TESTS_TARGET}
21 test_pay.cpp
22 test_query.cpp21 test_query.cpp
23 test_store_scope.cpp22 test_store_scope.cpp
2423
2524
=== modified file 'scope/tests/test_query.cpp'
--- scope/tests/test_query.cpp 2015-03-05 20:48:35 +0000
+++ scope/tests/test_query.cpp 2015-04-14 20:43:22 +0000
@@ -27,7 +27,7 @@
27 * files in the program, then also delete it here.27 * files in the program, then also delete it here.
28 */28 */
2929
30#include "mock_pay.h"30#include <tests/mock_pay.h>
3131
32#include "clickstore/store-query.h"32#include "clickstore/store-query.h"
3333

Subscribers

People subscribed via source and target branches