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 <thiago.macieira@intel.com>
This commit is contained in:
André Klitzing 2014-11-25 16:38:34 +01:00
parent 19bb9aa9e5
commit 87ede1fc7a

View File

@ -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