summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-03-10 10:27:36 +0100
committerLiang Qi <liang.qi@qt.io>2017-03-10 10:47:36 +0100
commit9a492e0f47660b4a428fc1fc6dc0fd07b2b3b1b7 (patch)
tree32ec2295ed55123f6ce80b52278cf3baa24aae4c
parent00c6b792a95d72a4deb2bb89d0ba8cbb52681998 (diff)
parentb77af012b1e40e3531838652ea4114b77327bbd2 (diff)
Merge remote-tracking branch 'origin/5.8' into 5.9v5.9.0-beta1
Conflicts: .qmake.conf Change-Id: I59c9a70eba366693053bb684b374cff02650ace0
-rw-r--r--.qmake.conf3
-rw-r--r--dist/changes-5.8.027
-rw-r--r--examples/purchasing/qthangman/hangmangame.cpp2
-rw-r--r--src/purchasing/inapppurchase/android/qandroidinapppurchasebackend.cpp6
-rw-r--r--src/purchasing/inapppurchase/qinapppurchasebackend.cpp2
-rw-r--r--src/purchasing/inapppurchase/winrt/qwinrtinapppurchasebackend.cpp10
6 files changed, 42 insertions, 8 deletions
diff --git a/.qmake.conf b/.qmake.conf
index 8359d9e..d2d37ca 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1,4 +1,7 @@
load(qt_build_config)
+DEFINES += QT_NO_FOREACH
+
MODULE_VERSION = 5.9.0
+
CMAKE_MODULE_TESTS=-
diff --git a/dist/changes-5.8.0 b/dist/changes-5.8.0
new file mode 100644
index 0000000..e05d98f
--- /dev/null
+++ b/dist/changes-5.8.0
@@ -0,0 +1,27 @@
+Qt 5.8 introduces many new features and improvements as well as bugfixes
+over the 5.7.x series. 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.8 series is binary compatible with the 5.7.x series.
+Applications compiled for 5.7 will continue to run with 5.8.
+
+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.
+
+Android
+-------
+
+ - [QTBUG-54518] Fixed test purchases after changes in Google Play that
+ removed the order ID for such transactions.
+
+WinRT
+-----
+
+ - [QTBUG-50550] Added WinRT backend.
diff --git a/examples/purchasing/qthangman/hangmangame.cpp b/examples/purchasing/qthangman/hangmangame.cpp
index f335a52..94b35f4 100644
--- a/examples/purchasing/qthangman/hangmangame.cpp
+++ b/examples/purchasing/qthangman/hangmangame.cpp
@@ -116,7 +116,7 @@ QString HangmanGame::consonants() const
int HangmanGame::errorCount() const
{
int count = 0;
- foreach (QChar c, m_lettersOwned) {
+ for (QChar c : m_lettersOwned) {
if (!m_word.contains(c))
++count;
}
diff --git a/src/purchasing/inapppurchase/android/qandroidinapppurchasebackend.cpp b/src/purchasing/inapppurchase/android/qandroidinapppurchasebackend.cpp
index 0a0a5d1..e6a42cb 100644
--- a/src/purchasing/inapppurchase/android/qandroidinapppurchasebackend.cpp
+++ b/src/purchasing/inapppurchase/android/qandroidinapppurchasebackend.cpp
@@ -103,9 +103,9 @@ bool QAndroidInAppPurchaseBackend::isReady() const
void QAndroidInAppPurchaseBackend::restorePurchases()
{
- QSet<QString> previouslyFinalizedUnlockables = m_finalizedUnlockableProducts;
+ const QSet<QString> previouslyFinalizedUnlockables = std::move(m_finalizedUnlockableProducts);
m_finalizedUnlockableProducts.clear();
- foreach (QString previouslyFinalizedUnlockable, previouslyFinalizedUnlockables) {
+ for (const QString &previouslyFinalizedUnlockable : previouslyFinalizedUnlockables) {
QInAppProduct *product = store()->registeredProduct(previouslyFinalizedUnlockable);
Q_ASSERT(product != 0);
@@ -214,7 +214,7 @@ void QAndroidInAppPurchaseBackend::registerFinalizedUnlockable(const QString &id
}
QDataStream stream(&file);
- foreach (QString finalizedUnlockableProduct, m_finalizedUnlockableProducts)
+ for (const QString &finalizedUnlockableProduct : qAsConst(m_finalizedUnlockableProducts))
stream << finalizedUnlockableProduct;
}
diff --git a/src/purchasing/inapppurchase/qinapppurchasebackend.cpp b/src/purchasing/inapppurchase/qinapppurchasebackend.cpp
index 69e8bd5..6621255 100644
--- a/src/purchasing/inapppurchase/qinapppurchasebackend.cpp
+++ b/src/purchasing/inapppurchase/qinapppurchasebackend.cpp
@@ -48,7 +48,7 @@ bool QInAppPurchaseBackend::isReady() const
void QInAppPurchaseBackend::queryProducts(const QList<Product> &products)
{
- foreach (const Product &product, products)
+ for (const Product &product : products)
queryProduct(product.productType, product.identifier);
}
diff --git a/src/purchasing/inapppurchase/winrt/qwinrtinapppurchasebackend.cpp b/src/purchasing/inapppurchase/winrt/qwinrtinapppurchasebackend.cpp
index 438a9ee..213aece 100644
--- a/src/purchasing/inapppurchase/winrt/qwinrtinapppurchasebackend.cpp
+++ b/src/purchasing/inapppurchase/winrt/qwinrtinapppurchasebackend.cpp
@@ -739,9 +739,13 @@ HRESULT QWinRTInAppPurchaseBackendPrivate::onListingInformation(IAsyncOperation<
ComPtr<IProductListingWithConsumables> converted;
hr = value.As(&converted);
- Q_ASSERT_SUCCEEDED(hr);
- hr = converted->get_ProductType(&nativeInfo->type);
- Q_ASSERT_SUCCEEDED(hr);
+ if (SUCCEEDED(hr)) {
+ hr = converted->get_ProductType(&nativeInfo->type);
+ Q_ASSERT_SUCCEEDED(hr);
+ } else {
+ qWarning("Could not acquire product type. Assuming Unlockable");
+ nativeInfo->type = ProductType_Durable;
+ }
qCDebug(lcPurchasingBackend) << "Detailed info:"
<< " ID:" << QString::fromWCharArray(nativeInfo->productID.GetRawBuffer(nullptr))