Android: don't directly access m_qtThread member

Task-number: QTBUG-118077
Change-Id: I2103483a2bfa8abe9be832790611b07a5d011f76
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
This commit is contained in:
Assam Boudjelthia 2023-11-22 14:56:36 +02:00
parent c0eca51570
commit 5ab2b8b951
4 changed files with 4 additions and 4 deletions

View File

@ -147,7 +147,7 @@ public class QtActivityBase extends Activity
if (!m_retainNonConfigurationInstance) {
QtNative.terminateQt();
QtNative.setActivity(null);
QtNative.m_qtThread.exit();
QtNative.getQtThread().exit();
System.exit(0);
}
}

View File

@ -9,7 +9,7 @@ public class QtApplicationBase extends Application {
@Override
public void onTerminate() {
QtNative.terminateQt();
QtNative.m_qtThread.exit();
QtNative.getQtThread().exit();
super.onTerminate();
}
}

View File

@ -42,7 +42,7 @@ public class QtNative
private static final ArrayList<Runnable> m_lostActions = new ArrayList<>();
private static boolean m_started = false;
public static QtThread m_qtThread = new QtThread();
private static final QtThread m_qtThread = new QtThread();
private static ClassLoader m_classLoader = null;
private static final Runnable runPendingCppRunnablesRunnable = new Runnable() {

View File

@ -35,7 +35,7 @@ public class QtServiceBase extends Service {
QtNative.quitQtCoreApplication();
QtNative.terminateQt();
QtNative.setService(null);
QtNative.m_qtThread.exit();
QtNative.getQtThread().exit();
System.exit(0);
}