Android: print correct return code of main()
... and print it always after main() returns. Task-number: QTBUG-118077 Change-Id: I1f57b3f7a646d01eebf67d4a4ff6a8d9f6e82cc7 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
This commit is contained in:
parent
d2e163d2e4
commit
9a58062a73
@ -517,7 +517,8 @@ static void startQtApplication(JNIEnv */*env*/, jclass /*clazz*/)
|
|||||||
argv[argc] = nullptr;
|
argv[argc] = nullptr;
|
||||||
|
|
||||||
startQtAndroidPluginCalled.fetchAndAddRelease(1);
|
startQtAndroidPluginCalled.fetchAndAddRelease(1);
|
||||||
int ret = m_main(argc, argv.data());
|
const int ret = m_main(argc, argv.data());
|
||||||
|
qInfo() << "main() returned" << ret;
|
||||||
|
|
||||||
if (m_mainLibraryHnd) {
|
if (m_mainLibraryHnd) {
|
||||||
int res = dlclose(m_mainLibraryHnd);
|
int res = dlclose(m_mainLibraryHnd);
|
||||||
@ -525,10 +526,8 @@ static void startQtApplication(JNIEnv */*env*/, jclass /*clazz*/)
|
|||||||
qWarning() << "dlclose failed:" << dlerror();
|
qWarning() << "dlclose failed:" << dlerror();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_applicationClass) {
|
if (m_applicationClass)
|
||||||
qWarning("exit app 0");
|
|
||||||
QJniObject::callStaticMethod<void>(m_applicationClass, "quitApp", "()V");
|
QJniObject::callStaticMethod<void>(m_applicationClass, "quitApp", "()V");
|
||||||
}
|
|
||||||
|
|
||||||
sem_post(&m_terminateSemaphore);
|
sem_post(&m_terminateSemaphore);
|
||||||
sem_wait(&m_exitSemaphore);
|
sem_wait(&m_exitSemaphore);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user