on xenial help sign in
More cleanup for review.
commit22f138cf146f10fb99bc83f7259f1f55619d1d1e authorRodney Dawes <rodney.dawes@canonical.com> dateFri 27 Jun 2014, 13:59 (12 years ago) parentb9dd4e2
2 files changed+10−13
plugins/Ubuntu/Payments/Payments.h−1 qml/Dash/Previews/PreviewPayments.qml+10−12
plugins/Ubuntu/Payments/Payments.h−1
@@ -54,7 +54,6 @@ Q_SIGNALS:
5454 void storeItemIdChanged(const QString &store_item_id);
5555 void formattedPriceChanged(const QString &formatted_price);
5656
57− void purchaseCanceled();
5857 void purchaseError(const QString &error);
5958 void purchaseCompleted();
6059
qml/Dash/Previews/PreviewPayments.qml+10−12
@@ -22,20 +22,16 @@ import Ubuntu.Payments 0.1
2222 *
2323 * When clicked, this button starts the payments service.
2424 * Then it waits until the purchase finishes or fails.
25− * Those events trigger the corresponding signals.
25+ * Those events trigger the corresponding actions.
2626 */
2727
2828PreviewWidget {
2929 id: root
3030
31− implicitHeight: paymentButton.implicitHeight
32− implicitWidth: paymentButton.implicitWidth
33−
3431 Button {
3532 id: paymentButton
36−
37− property var source: widgetData["source"]
3833 objectName: "paymentButton"
34+
3935 color: Theme.palette.selected.foreground
4036 text: paymentClient.formattedPrice
4137 onClicked: paymentClient.start()
@@ -44,12 +40,14 @@ PreviewWidget {
4440
4541 Payments {
4642 id: paymentClient
47− price: paymentButton.source["price"]
48− currency: paymentButton.source["currency"]
49− storeItemId: paymentButton.source["store_item_id"]
50− onPurchaseCompleted: root.triggered(widgetId, "purchaseCompleted", paymentButton.source)
51− onPurchaseCanceled: root.triggered(widgetId, "purchaseCanceled", paymentButton.source)
52− onPurchaseError: root.triggered(widgetId, "purchaseError", paymentButton.source)
43+
44+ property var source: widgetData["source"]
45+
46+ price: source["price"]
47+ currency: source["currency"]
48+ storeItemId: source["store_item_id"]
49+ onPurchaseCompleted: root.triggered(widgetId, "purchaseCompleted", source)
50+ onPurchaseError: root.triggered(widgetId, "purchaseError", source)
5351 }
5452 }
5553}