summaryrefslogtreecommitdiff
path: root/src/plugins/position
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-04-11 14:15:24 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-04-11 14:15:24 +0200
commit56e80eb797b55458614599a82c2264c46e6e5eb0 (patch)
tree5740b8ed298559c45f045d5daad8481e4c3eb39b /src/plugins/position
parentba8da105e12f272bd95e2c10e7035edaaaecfa2a (diff)
parent400c7fa8e767c65aab4b8a1d5161b5259080cec9 (diff)
downloadqtlocation-56e80eb797b55458614599a82c2264c46e6e5eb0.tar.gz
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Ib061722a7ebc4b26bf132c67a005910f2d39400f
Diffstat (limited to 'src/plugins/position')
-rw-r--r--src/plugins/position/android/src/jnipositioning.cpp8
-rw-r--r--src/plugins/position/position.pro4
-rw-r--r--src/plugins/position/simulator/qlocationconnection_simulator.cpp5
3 files changed, 9 insertions, 8 deletions
diff --git a/src/plugins/position/android/src/jnipositioning.cpp b/src/plugins/position/android/src/jnipositioning.cpp
index 6b49b9fe..afae1c8e 100644
--- a/src/plugins/position/android/src/jnipositioning.cpp
+++ b/src/plugins/position/android/src/jnipositioning.cpp
@@ -167,7 +167,9 @@ namespace AndroidPositioning {
__android_log_print(ANDROID_LOG_INFO, logTag, "Unknown positioningMethod");
}
}
+
env.jniEnv->ReleaseIntArrayElements(jProviders, providers, 0);
+ env.jniEnv->DeleteLocalRef(jProviders);
return ret;
}
@@ -261,6 +263,7 @@ namespace AndroidPositioning {
info.setAttribute(QGeoPositionInfo::Direction, bearing);
}
+ jniEnv->DeleteLocalRef(thisClass);
return info;
}
@@ -340,7 +343,10 @@ namespace AndroidPositioning {
if (location == 0)
return QGeoPositionInfo();
- return positionInfoFromJavaLocation(env.jniEnv, location);
+ const QGeoPositionInfo info = positionInfoFromJavaLocation(env.jniEnv, location);
+ env.jniEnv->DeleteLocalRef(location);
+
+ return info;
}
inline int positioningMethodToInt(QGeoPositionInfoSource::PositioningMethods m)
diff --git a/src/plugins/position/position.pro b/src/plugins/position/position.pro
index 207b949b..0e2f9a5d 100644
--- a/src/plugins/position/position.pro
+++ b/src/plugins/position/position.pro
@@ -2,10 +2,10 @@ TEMPLATE = subdirs
config_geoclue:SUBDIRS += geoclue
config_gypsy:SUBDIRS += gypsy
-simulator:SUBDIRS += simulator
+qtHaveModule(simulator):SUBDIRS += simulator
blackberry:SUBDIRS += blackberry
ios:SUBDIRS += corelocation
-android:SUBDIRS += android
+android:!android-no-sdk:SUBDIRS += android
SUBDIRS += \
positionpoll
diff --git a/src/plugins/position/simulator/qlocationconnection_simulator.cpp b/src/plugins/position/simulator/qlocationconnection_simulator.cpp
index b78eb1cf..02ccad7a 100644
--- a/src/plugins/position/simulator/qlocationconnection_simulator.cpp
+++ b/src/plugins/position/simulator/qlocationconnection_simulator.cpp
@@ -73,11 +73,6 @@ namespace Simulator
// register for location notifications
mWorker->call("setRequestsLocationInfo");
-
- // wait until initial data is received
- QEventLoop loop;
- connect(this, SIGNAL(initialDataReceived()), &loop, SLOT(quit()));
- loop.exec();
}
LocationConnection::~LocationConnection()