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:
parent
806b43215f
commit
aa8bb18550
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user