Android: remove environment variable warnings at app startup.

Change-Id: I8542809fd16465a29b4fb7e8276b63d71e1b9c0e
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
This commit is contained in:
Yoann Lopes 2013-09-24 15:45:11 +02:00 committed by The Qt Project
parent e358c0095e
commit 283ba0ef01

View File

@ -455,7 +455,7 @@ static jboolean startQtApplication(JNIEnv *env, jobject /*object*/, jstring para
env->ReleaseStringUTFChars(environmentString, nativeString); env->ReleaseStringUTFChars(environmentString, nativeString);
m_applicationParams=string.split('\t'); m_applicationParams=string.split('\t');
foreach (string, m_applicationParams) { foreach (string, m_applicationParams) {
if (putenv(string.constData())) if (!string.isEmpty() && putenv(string.constData()))
qWarning() << "Can't set environment" << string; qWarning() << "Can't set environment" << string;
} }