diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index e0dbfcf09b..88656e6b86 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1737,9 +1737,10 @@ static bool android_default_message_handler(QtMsgType type, break; }; + // If application name is a tag ensure it has no spaces // If a category is defined, use it as an Android logging tag __android_log_print(priority, isDefaultCategory(context.category) ? - qPrintable(QCoreApplication::applicationName()) : context.category, + qPrintable(QCoreApplication::applicationName().replace(" ", "_")) : context.category, "%s\n", qPrintable(formattedMessage)); return true; // Prevent further output to stderr