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
=== modified file 'libclickscope/click/configuration.h'
--- libclickscope/click/configuration.h 2014-08-01 05:12:28 +0000
+++ libclickscope/click/configuration.h 2014-09-11 20:19:32 +0000
@@ -46,6 +46,7 @@
46 constexpr static const char* LANGUAGE_ENVVAR {"LANGUAGE"};46 constexpr static const char* LANGUAGE_ENVVAR {"LANGUAGE"};
47 constexpr static const char* PURCHASES_ENVVAR {"CLICK_STORE_ENABLE_PURCHASES"};47 constexpr static const char* PURCHASES_ENVVAR {"CLICK_STORE_ENABLE_PURCHASES"};
48 constexpr static const bool PURCHASES_DEFAULT = false;48 constexpr static const bool PURCHASES_DEFAULT = false;
49 constexpr static const char* CURRENCY_USD {"US$"};
49 static const std::vector<const char*> FULL_LANG_CODES;50 static const std::vector<const char*> FULL_LANG_CODES;
5051
51 virtual std::vector<std::string> get_available_frameworks();52 virtual std::vector<std::string> get_available_frameworks();
5253
=== modified file 'libclickscope/click/preview.cpp'
--- libclickscope/click/preview.cpp 2014-08-26 15:16:25 +0000
+++ libclickscope/click/preview.cpp 2014-09-11 20:19:32 +0000
@@ -868,7 +868,7 @@
868 && result["purchased"].get_bool() == false) {868 && result["purchased"].get_bool() == false) {
869 scopes::PreviewWidget payments("purchase", "payments");869 scopes::PreviewWidget payments("purchase", "payments");
870 scopes::VariantMap tuple;870 scopes::VariantMap tuple;
871 tuple["currency"] = "$";871 tuple["currency"] = Configuration::CURRENCY_USD;
872 qDebug() << "Price is" << details.package.price;872 qDebug() << "Price is" << details.package.price;
873 tuple["price"] = scopes::Variant(details.package.price);873 tuple["price"] = scopes::Variant(details.package.price);
874 tuple["store_item_id"] = details.package.name;874 tuple["store_item_id"] = details.package.name;
875875
=== modified file 'scope/clickstore/store-query.cpp'
--- scope/clickstore/store-query.cpp 2014-08-28 19:35:41 +0000
+++ scope/clickstore/store-query.cpp 2014-09-11 20:19:32 +0000
@@ -337,7 +337,7 @@
337 res[click::Query::ResultKeys::PURCHASED] = false;337 res[click::Query::ResultKeys::PURCHASED] = false;
338 if (pkg.price > 0.00f) {338 if (pkg.price > 0.00f) {
339 QLocale locale;339 QLocale locale;
340 price = locale.toCurrencyString(pkg.price, "$").toUtf8().data();340 price = locale.toCurrencyString(pkg.price, Configuration::CURRENCY_USD).toUtf8().data();
341 }341 }
342 }342 }
343343

Subscribers

People subscribed via source and target branches

to all changes: