fix: 修复 Qt 5.12 中 Qt::endl 兼容性问题

Qt::endl 不是 Qt 命名空间成员,改用 '\n'

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alvin Young 2026-05-13 17:57:35 +08:00
parent 806b43215f
commit aa8bb18550

View File

@ -119,7 +119,7 @@ void Logger::writeToFile(const QString& line) {
if (logFile_ && logFile_->isOpen()) { if (logFile_ && logFile_->isOpen()) {
QTextStream stream(logFile_); QTextStream stream(logFile_);
stream.setCodec("UTF-8"); stream.setCodec("UTF-8");
stream << line << Qt::endl; stream << line << '\n';
logFile_->flush(); logFile_->flush();
} }
} }