From 1a4594c3962d6788dc325a1d2d107ba7d3f9da7e Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Fri, 6 Sep 2013 09:14:00 +0200 Subject: [PATCH] Android: Fix QString(char*) warnings in qlogging.cpp Both context.file and context.function are already char*, so using qPrintable() here would first convert them to QString() with the scary constructor and then back again. Change-Id: I822655c37fb8b9baaddc8f95d7c1842519859a0e Reviewed-by: Christian Stromme --- src/corelib/global/qlogging.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index a37fc15b61..aab2c7b874 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -850,8 +850,9 @@ static void android_default_message_handler(QtMsgType type, case QtFatalMsg: priority = ANDROID_LOG_FATAL; break; }; - __android_log_print(priority, "Qt", "%s:%d (%s): %s", qPrintable(context.file), context.line, - qPrintable(context.function), qPrintable(message)); + __android_log_print(priority, "Qt", "%s:%d (%s): %s", + context.file, context.line, + context.function, qPrintable(message)); } #endif //Q_OS_ANDROID