summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-08-15 12:23:45 +0200
committerLiang Qi <liang.qi@qt.io>2017-08-15 13:29:39 +0200
commit3b4079f9c20e1c33b565b90fc51c05667ebdf421 (patch)
tree352fb92af8608e760bbabde4786530bce72bebfe
parent3d279f86ca9b3f8cf8c24016afeb68f58b63a692 (diff)
parent9c87f11f6d7ae46150b540cf2eee14e8217bb85d (diff)
Merge remote-tracking branch 'origin/5.9' into devv5.10.0-beta2v5.10.0-beta1v5.10.0-alpha1
Conflicts: .qmake.conf Change-Id: I021fd4e8137f77dd927f2342745c67b0387d9bbf
-rw-r--r--dist/changes-5.9.124
-rw-r--r--src/purchasing/inapppurchase/winrt/qwinrtinapppurchasebackend.cpp29
2 files changed, 26 insertions, 27 deletions
diff --git a/dist/changes-5.9.1 b/dist/changes-5.9.1
new file mode 100644
index 0000000..e0a6a4b
--- /dev/null
+++ b/dist/changes-5.9.1
@@ -0,0 +1,24 @@
+Qt 5.9.1 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.9.0.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+http://doc.qt.io/qt-5/index.html
+
+The Qt version 5.9 series is binary compatible with the 5.8.x series.
+Applications compiled for 5.8 will continue to run with 5.9.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+ - This release contains only minor code improvements.
diff --git a/src/purchasing/inapppurchase/winrt/qwinrtinapppurchasebackend.cpp b/src/purchasing/inapppurchase/winrt/qwinrtinapppurchasebackend.cpp
index b57df20..2735d57 100644
--- a/src/purchasing/inapppurchase/winrt/qwinrtinapppurchasebackend.cpp
+++ b/src/purchasing/inapppurchase/winrt/qwinrtinapppurchasebackend.cpp
@@ -280,6 +280,8 @@ void QWinRTInAppPurchaseBackend::createTransactionDelayed(qt_WinRTTransactionDat
switch (data.status) {
case AsyncStatus::Completed: {
reason = QInAppTransaction::NoFailure;
+ if (!data.purchaseResults)
+ break;
ProductPurchaseStatus purchaseStatus;
HRESULT hr = data.purchaseResults->get_Status(&purchaseStatus);
if (FAILED(hr)) {
@@ -628,33 +630,6 @@ void QWinRTInAppPurchaseBackend::purchaseProduct(QWinRTInAppProduct *product)
Q_ASSERT_SUCCEEDED(hr);
return S_OK;
});
- } else if (product->productType() == QInAppProduct::Unlockable) {
- hr = QEventDispatcherWinRT::runOnXamlThread([d, product, &productId, this]() {
- ComPtr<IAsyncOperation<HSTRING>> purchaseOp;
- HRESULT hr;
- hr = d->m_bridge.RequestProductPurchaseAsync(productId.Get(), true, purchaseOp);
- Q_ASSERT_SUCCEEDED(hr);
- auto purchaseCallback = Callback<IAsyncOperationCompletedHandler<HSTRING>>([d, product, this](IAsyncOperation<HSTRING> *op, AsyncStatus status)
- {
- HString receiptH;
- QString receiptQ;
- HRESULT hr;
- hr = op->GetResults(receiptH.GetAddressOf());
- if (SUCCEEDED(hr))
- receiptQ = hStringToQString(receiptH);
- else
- qWarning("Could not receive transaction receipt.");
-
- qt_WinRTTransactionData tData(status, product, receiptQ);
- QMetaObject::invokeMethod(this, "createTransactionDelayed", Qt::QueuedConnection,
- Q_ARG(qt_WinRTTransactionData, tData));
-
- return S_OK;
- });
- hr = purchaseOp->put_Completed(purchaseCallback.Get());
- Q_ASSERT_SUCCEEDED(hr);
- return S_OK;
- });
} else {
hr = QEventDispatcherWinRT::runOnXamlThread([d, product, &productId, this]() {
HRESULT hr;