From 87ede1fc7a2b8f184733c8f09ccd8732b6b60353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Klitzing?= Date: Tue, 25 Nov 2014 16:38:34 +0100 Subject: Fix constant "Qt" LOG_TAG in Android The LOG_TAG for Android can be set by QCoreApplication::applicationName instead of a constant "Qt" tag. This will avoid that multiple apps will use the same tag. Also it will be easier to filter the logs for different apps instead of "adb logcat -s Qt" for all Qt apps. Change-Id: I422cc3adf8b526634b5daa9a1bb1b90403de5618 Reviewed-by: Thiago Macieira --- src/corelib/global/qlogging.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 843ec6b0ca..0271573445 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1286,8 +1286,8 @@ static void android_default_message_handler(QtMsgType type, case QtFatalMsg: priority = ANDROID_LOG_FATAL; break; }; - __android_log_print(priority, "Qt", "%s:%d (%s): %s\n", - context.file, context.line, + __android_log_print(priority, qPrintable(QCoreApplication::applicationName()), + "%s:%d (%s): %s\n", context.file, context.line, context.function, qPrintable(message)); } #endif //Q_OS_ANDROID -- cgit v1.2.3