Merge lp:~dobey/unity-scope-click/usd-prices into lp:unity-scope-click

Proposed by dobey
Status: Merged
Approved by: Alejandro J. Cura
Approved revision: 274
Merged at revision: 274
Proposed branch: lp:~dobey/unity-scope-click/usd-prices
Merge into: lp:unity-scope-click
Diff against target: 36 lines (+3/-2)
3 files modified
libclickscope/click/configuration.h (+1/-0)
libclickscope/click/preview.cpp (+1/-1)
scope/clickstore/store-query.cpp (+1/-1)
To merge this branch: bzr merge lp:~dobey/unity-scope-click/usd-prices
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+234378@code.launchpad.net

Commit message

Define a constant for the currency symbol to use for USD, and use it.

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
Alejandro J. Cura (alecu) wrote :

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libclickscope/click/configuration.h'
2--- libclickscope/click/configuration.h 2014-08-01 05:12:28 +0000
3+++ libclickscope/click/configuration.h 2014-09-11 20:19:32 +0000
4@@ -46,6 +46,7 @@
5 constexpr static const char* LANGUAGE_ENVVAR {"LANGUAGE"};
6 constexpr static const char* PURCHASES_ENVVAR {"CLICK_STORE_ENABLE_PURCHASES"};
7 constexpr static const bool PURCHASES_DEFAULT = false;
8+ constexpr static const char* CURRENCY_USD {"US$"};
9 static const std::vector<const char*> FULL_LANG_CODES;
10
11 virtual std::vector<std::string> get_available_frameworks();
12
13=== modified file 'libclickscope/click/preview.cpp'
14--- libclickscope/click/preview.cpp 2014-08-26 15:16:25 +0000
15+++ libclickscope/click/preview.cpp 2014-09-11 20:19:32 +0000
16@@ -868,7 +868,7 @@
17 && result["purchased"].get_bool() == false) {
18 scopes::PreviewWidget payments("purchase", "payments");
19 scopes::VariantMap tuple;
20- tuple["currency"] = "$";
21+ tuple["currency"] = Configuration::CURRENCY_USD;
22 qDebug() << "Price is" << details.package.price;
23 tuple["price"] = scopes::Variant(details.package.price);
24 tuple["store_item_id"] = details.package.name;
25
26=== modified file 'scope/clickstore/store-query.cpp'
27--- scope/clickstore/store-query.cpp 2014-08-28 19:35:41 +0000
28+++ scope/clickstore/store-query.cpp 2014-09-11 20:19:32 +0000
29@@ -337,7 +337,7 @@
30 res[click::Query::ResultKeys::PURCHASED] = false;
31 if (pkg.price > 0.00f) {
32 QLocale locale;
33- price = locale.toCurrencyString(pkg.price, "$").toUtf8().data();
34+ price = locale.toCurrencyString(pkg.price, Configuration::CURRENCY_USD).toUtf8().data();
35 }
36 }
37

Subscribers

People subscribed via source and target branches

to all changes: