From 46148b3c5c1aa31c36b95479103ea3d8914f4318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Mon, 4 Dec 2023 21:33:06 +0800 Subject: [PATCH] update --- example/src/helper/Log.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/example/src/helper/Log.cpp b/example/src/helper/Log.cpp index 9789087b..cd1125a1 100644 --- a/example/src/helper/Log.cpp +++ b/example/src/helper/Log.cpp @@ -3,7 +3,6 @@ #include #include #include -#include #ifndef QT_ENDL # if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) @@ -35,7 +34,7 @@ static inline void myMessageHandler(const QtMsgType type, const QMessageLogConte } if (!g_logFile) { g_logFile = std::make_unique(); - g_logFile->setFileName(FRAMELESSHELPER_STRING_LITERAL("debug-%1.log").arg(g_app)); + g_logFile->setFileName(QString("debug-%1.log").arg(g_app)); if (!g_logFile->open(QFile::WriteOnly | QFile::Text | QFile::Append)) { std::cerr << "Can't open file to write: " << qUtf8Printable(g_logFile->errorString()) << std::endl; g_logFile.reset(); @@ -62,7 +61,7 @@ void Log::setup(const QString &app) } once = true; g_app = app; - qSetMessagePattern(FRAMELESSHELPER_STRING_LITERAL( + qSetMessagePattern(QString( "[%{time yyyy/MM/dd hh:mm:ss.zzz}] <%{if-info}INFO%{endif}%{if-debug}DEBUG" "%{endif}%{if-warning}WARNING%{endif}%{if-critical}CRITICAL%{endif}%{if-fatal}" "FATAL%{endif}> %{if-category}%{category}: %{endif}%{message}"));