diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-10-28 14:10:28 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-10-29 13:41:44 +0100 |
commit | 9f77002fd3106ca4477159212781264d5b688ddb (patch) | |
tree | 767a8cbe4ab1e66ca4c7ca9d9e5f8f727c47e281 /src/plugins/android/src/wrappers/jni | |
parent | c6e934601a3405f80c601aac207b09588e291b89 (diff) |
Update dependencies
Fix some warnings about deprecated API and usage
pf QMutexLocker.
Change-Id: I16a1e66a57d0c638f88478ec250e92178c6a433c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/plugins/android/src/wrappers/jni')
-rw-r--r-- | src/plugins/android/src/wrappers/jni/androidsurfacetexture.cpp | 6 | ||||
-rw-r--r-- | src/plugins/android/src/wrappers/jni/androidsurfaceview.cpp | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/android/src/wrappers/jni/androidsurfacetexture.cpp b/src/plugins/android/src/wrappers/jni/androidsurfacetexture.cpp index c5b670142..d861a355f 100644 --- a/src/plugins/android/src/wrappers/jni/androidsurfacetexture.cpp +++ b/src/plugins/android/src/wrappers/jni/androidsurfacetexture.cpp @@ -52,7 +52,7 @@ Q_GLOBAL_STATIC(QMutex, g_textureMutex); // native method for QtSurfaceTexture.java static void notifyFrameAvailable(JNIEnv* , jobject, jlong id) { - const QMutexLocker lock(g_textureMutex); + const QMutexLocker lock(g_textureMutex()); const int idx = g_surfaceTextures->indexOf(id); if (idx == -1) return; @@ -84,7 +84,7 @@ AndroidSurfaceTexture::AndroidSurfaceTexture(quint32 texName) if (!m_surfaceTexture.isValid()) return; - const QMutexLocker lock(g_textureMutex); + const QMutexLocker lock(g_textureMutex()); g_surfaceTextures->append(jlong(this)); QJNIObjectPrivate listener(QtSurfaceTextureListenerClassName, "(J)V", jlong(this)); setOnFrameAvailableListener(listener); @@ -97,7 +97,7 @@ AndroidSurfaceTexture::~AndroidSurfaceTexture() if (m_surfaceTexture.isValid()) { release(); - const QMutexLocker lock(g_textureMutex); + const QMutexLocker lock(g_textureMutex()); const int idx = g_surfaceTextures->indexOf(jlong(this)); if (idx != -1) g_surfaceTextures->remove(idx); diff --git a/src/plugins/android/src/wrappers/jni/androidsurfaceview.cpp b/src/plugins/android/src/wrappers/jni/androidsurfaceview.cpp index d7587f479..65dfe84b9 100644 --- a/src/plugins/android/src/wrappers/jni/androidsurfaceview.cpp +++ b/src/plugins/android/src/wrappers/jni/androidsurfaceview.cpp @@ -61,7 +61,7 @@ AndroidSurfaceHolder::AndroidSurfaceHolder(QJNIObjectPrivate object) return; { - QMutexLocker locker(shLock); + QMutexLocker locker(shLock()); surfaceHolders->append(this); } @@ -73,7 +73,7 @@ AndroidSurfaceHolder::AndroidSurfaceHolder(QJNIObjectPrivate object) AndroidSurfaceHolder::~AndroidSurfaceHolder() { - QMutexLocker locker(shLock); + QMutexLocker locker(shLock()); const int i = surfaceHolders->indexOf(this); if (Q_UNLIKELY(i == -1)) return; @@ -88,13 +88,13 @@ jobject AndroidSurfaceHolder::surfaceHolder() const bool AndroidSurfaceHolder::isSurfaceCreated() const { - QMutexLocker locker(shLock); + QMutexLocker locker(shLock()); return m_surfaceCreated; } void AndroidSurfaceHolder::handleSurfaceCreated(JNIEnv*, jobject, jlong id) { - QMutexLocker locker(shLock); + QMutexLocker locker(shLock()); const int i = surfaceHolders->indexOf(reinterpret_cast<AndroidSurfaceHolder *>(id)); if (Q_UNLIKELY(i == -1)) return; @@ -105,7 +105,7 @@ void AndroidSurfaceHolder::handleSurfaceCreated(JNIEnv*, jobject, jlong id) void AndroidSurfaceHolder::handleSurfaceDestroyed(JNIEnv*, jobject, jlong id) { - QMutexLocker locker(shLock); + QMutexLocker locker(shLock()); const int i = surfaceHolders->indexOf(reinterpret_cast<AndroidSurfaceHolder *>(id)); if (Q_UNLIKELY(i == -1)) return; @@ -154,7 +154,7 @@ AndroidSurfaceView::AndroidSurfaceView() connect(m_surfaceHolder, &AndroidSurfaceHolder::surfaceCreated, this, &AndroidSurfaceView::surfaceCreated); { // Lock now to avoid a race with handleSurfaceCreated() - QMutexLocker locker(shLock); + QMutexLocker locker(shLock()); m_window = QWindow::fromWinId(WId(m_surfaceView.object())); if (m_pendingVisible != -1) |