Merge remote-tracking branch 'origin/5.12' into 5.13

Change-Id: I83f6ed9480bf21020ce7a9431010d87a88df84a1
This commit is contained in:
Qt Forward Merge Bot 2019-03-02 01:00:07 +01:00
commit 607338f98f
6 changed files with 20 additions and 13 deletions

View File

@ -200,7 +200,9 @@ CMAKE_QT5_MODULE_DEPS = $$join(lib_deps, ";")
CMAKE_INTERFACE_MODULE_DEPS = $$join(aux_mod_deps, ";")
CMAKE_INTERFACE_QT5_MODULE_DEPS = $$join(aux_lib_deps, ";")
CMAKE_QT_STEM = Qt$$QT_MAJOR_VERSION$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}
# TARGET here is the one changed at the end of qt_module.prf,
# which already contains the Qt5 prefix and QT_LIBINFIX suffix
CMAKE_QT_STEM = $${TARGET}
mac {
!isEmpty(CMAKE_STATIC_TYPE) {

View File

@ -338,7 +338,7 @@ defineTest(qtConfParseCommandLine) {
qtConfAddWarning("Command line option -skip is only effective in top-level builds.")
skipOptionWarningAdded = 1
}
$$qtConfGetNextCommandlineArg()
val = $$qtConfGetNextCommandlineArg()
next()
}

View File

@ -532,7 +532,7 @@ MakefileGenerator::init()
QStack<int> state;
enum { IN_CONDITION, MET_CONDITION, PENDING_CONDITION };
for (int count = 1; !in.atEnd(); ++count) {
QString line = QString::fromUtf8(in.readLine());
QString line = QString::fromLatin1(in.readLine());
if (line.startsWith("!!IF ")) {
if (state.isEmpty() || state.top() == IN_CONDITION) {
QString test = line.mid(5, line.length()-(5+1));
@ -578,7 +578,7 @@ MakefileGenerator::init()
contents += project->expand(line, in.fileName(), count);
}
}
contentBytes = contents.toUtf8();
contentBytes = contents.toLatin1();
}
QFile out(outn);
QFileInfo outfi(out);

View File

@ -344,7 +344,9 @@ public class QtActivityDelegate
}
} else if ((inputHints & ImhHiddenText) != 0) {
inputType |= android.text.InputType.TYPE_TEXT_VARIATION_PASSWORD;
} else if ((inputHints & ImhSensitiveData) != 0 || (inputHints & ImhNoPredictiveText) != 0) {
} else if ((inputHints & ImhSensitiveData) != 0 ||
((inputHints & ImhNoPredictiveText) != 0 &&
System.getenv("QT_ANDROID_ENABLE_WORKAROUND_TO_DISABLE_PREDICTIVE_TEXT") != null)) {
inputType |= android.text.InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD;
}

View File

@ -565,10 +565,15 @@ static void quitQtAndroidPlugin(JNIEnv *env, jclass /*clazz*/)
static void terminateQt(JNIEnv *env, jclass /*clazz*/)
{
// QAndroidEventDispatcherStopper is stopped when the user uses the task manager to kill the application
if (!QAndroidEventDispatcherStopper::instance()->stopped()) {
sem_wait(&m_terminateSemaphore);
sem_destroy(&m_terminateSemaphore);
if (QAndroidEventDispatcherStopper::instance()->stopped()) {
QAndroidEventDispatcherStopper::instance()->startAll();
QCoreApplication::quit();
QAndroidEventDispatcherStopper::instance()->goingToStop(false);
}
sem_wait(&m_terminateSemaphore);
sem_destroy(&m_terminateSemaphore);
env->DeleteGlobalRef(m_applicationClass);
env->DeleteGlobalRef(m_classLoaderObject);
if (m_resourcesObj)
@ -588,10 +593,7 @@ static void terminateQt(JNIEnv *env, jclass /*clazz*/)
m_androidPlatformIntegration = nullptr;
delete m_androidAssetsFileEngineHandler;
m_androidAssetsFileEngineHandler = nullptr;
if (!QAndroidEventDispatcherStopper::instance()->stopped()) {
sem_post(&m_exitSemaphore);
}
sem_post(&m_exitSemaphore);
}
static void setSurface(JNIEnv *env, jobject /*thiz*/, jint id, jobject jSurface, jint w, jint h)

View File

@ -47,6 +47,7 @@
#include <QSurfaceFormat>
#include <QtGui/private/qwindow_p.h>
#include <QtGui/qguiapplication.h>
#include <qpa/qwindowsysteminterface.h>
#include <qpa/qplatformscreen.h>
@ -121,7 +122,7 @@ void QAndroidPlatformOpenGLWindow::setGeometry(const QRect &rect)
EGLSurface QAndroidPlatformOpenGLWindow::eglSurface(EGLConfig config)
{
if (QAndroidEventDispatcherStopper::stopped())
if (QAndroidEventDispatcherStopper::stopped() || QGuiApplication::applicationState() == Qt::ApplicationSuspended)
return m_eglSurface;
QMutexLocker lock(&m_surfaceMutex);