From a11f2aac1c373411d3c8c32a4df65a521e4344bf Mon Sep 17 00:00:00 2001 From: reionwong Date: Tue, 31 Aug 2021 00:34:58 +0800 Subject: [PATCH] Fix qt endl --- mimetype/xdgdesktopfile.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mimetype/xdgdesktopfile.cpp b/mimetype/xdgdesktopfile.cpp index bbdc3ff..104928a 100644 --- a/mimetype/xdgdesktopfile.cpp +++ b/mimetype/xdgdesktopfile.cpp @@ -83,11 +83,19 @@ bool XdgDesktopFile::save() if (sect != section) { section = sect; +#if QT_VERSION >= 0x050e00 stream << QLatin1Char('[') << section << QChar(']') << Qt::endl; +#else + stream << QLatin1Char('[') << section << QChar(']') << endl; +#endif } QString key = path.section(QChar('/'), 1); +#if QT_VERSION >= 0x050e00 stream << key << QLatin1Char('=') << i.value().toString() << Qt::endl; +#else + stream << key << QLatin1Char('=') << i.value().toString() << endl; +#endif ++i; }