diff options
author | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2022-11-12 01:22:57 +0200 |
---|---|---|
committer | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2022-11-14 15:37:00 +0000 |
commit | 70c6c9df8ea961d28e7e513450856db7e497abd7 (patch) | |
tree | 9f96563bf7935fa934932e0101bc4f34c7a1f615 | |
parent | db6da0fe77812ed207e3ed74c494a70f18063a6b (diff) | |
download | qtlocation-70c6c9df8ea961d28e7e513450856db7e497abd7.tar.gz |
Android: use string based location permission calls
Amends ef935f6e37a24f52255e6696b85a0fa9aaa7361a.
Go back to string based calls until the new permissions API is fully
used.
Change-Id: If3c1d63ac0267e820fec89dc63cf801022c1f84a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
-rw-r--r-- | examples/location/geojson_viewer/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/location/geojson_viewer/main.cpp b/examples/location/geojson_viewer/main.cpp index 91c926a0..08fba1ed 100644 --- a/examples/location/geojson_viewer/main.cpp +++ b/examples/location/geojson_viewer/main.cpp @@ -74,6 +74,8 @@ # include <QtCore/private/qandroidextras_p.h> #endif +using namespace Qt::StringLiterals; + class extractor { public: @@ -257,7 +259,7 @@ public: // Request permissions because we're using QStandardPaths::writableLocation() bool requestStoragePermissions() { - const auto permission = QtAndroidPrivate::Storage; + const QString permission = "android.permission.WRITE_EXTERNAL_STORAGE"_L1; auto checkFuture = QtAndroidPrivate::checkPermission(permission); if (checkFuture.result() == QtAndroidPrivate::Denied) { auto requestFuture = QtAndroidPrivate::requestPermission(permission); |