diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-06-17 13:22:34 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-06-28 17:08:51 +0000 |
commit | 7dd98a7b6136d29d3bc8576d940f5e71c941bfbf (patch) | |
tree | a6dca63905794637d9f2133a6941fc0c1eab4a61 /examples/demos/hangman | |
parent | 28812c982cb81f0848bf44f7de977831a251cbed (diff) |
Hangman Demo: Do not crash on non-mobile platforms
If we don't get the in-app purchases we can still do some things.
Pick-to: 6.4 6.3
Change-Id: I93a1abf3c4cfe0c19cd6d566590ec522db26eecd
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'examples/demos/hangman')
-rw-r--r-- | examples/demos/hangman/purchasing/inapp/inappstore.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/demos/hangman/purchasing/inapp/inappstore.cpp b/examples/demos/hangman/purchasing/inapp/inappstore.cpp index acce855c6..698ec0ea3 100644 --- a/examples/demos/hangman/purchasing/inapp/inappstore.cpp +++ b/examples/demos/hangman/purchasing/inapp/inappstore.cpp @@ -35,12 +35,13 @@ InAppStore::~InAppStore() void InAppStore::setupBackend() { - #ifdef Q_OS_ANDROID +#if defined Q_OS_ANDROID d->backend = new AndroidInAppPurchaseBackend; - #endif - #ifdef Q_OS_IOS +#elif defined Q_OS_IOS d->backend = new IosInAppPurchaseBackend; - #endif +#else + return; +#endif d->backend->setStore(this); connect(d->backend, &InAppPurchaseBackend::ready, |