From 2fe3a7947ef39ed4cdbdf61a6bc66aa8e4a254a7 Mon Sep 17 00:00:00 2001 From: Felix Weilbach Date: Sat, 21 Aug 2021 12:11:33 +0200 Subject: [PATCH] endl has been deprecated Signed-off-by: Felix Weilbach --- src/common/utility_unix.cpp | 22 +++++++++++----------- src/libsync/logger.cpp | 2 +- src/libsync/theme.cpp | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/common/utility_unix.cpp b/src/common/utility_unix.cpp index 010408395..087254e60 100644 --- a/src/common/utility_unix.cpp +++ b/src/common/utility_unix.cpp @@ -80,17 +80,17 @@ void setLaunchOnStartup_private(const QString &appName, const QString &guiName, QTextStream ts(&iniFile); ts.setCodec("UTF-8"); - ts << QLatin1String("[Desktop Entry]") << endl - << QLatin1String("Name=") << guiName << endl - << QLatin1String("GenericName=") << QLatin1String("File Synchronizer") << endl - << QLatin1String("Exec=\"") << executablePath << "\" --background" << endl - << QLatin1String("Terminal=") << "false" << endl - << QLatin1String("Icon=") << APPLICATION_ICON_NAME << endl - << QLatin1String("Categories=") << QLatin1String("Network") << endl - << QLatin1String("Type=") << QLatin1String("Application") << endl - << QLatin1String("StartupNotify=") << "false" << endl - << QLatin1String("X-GNOME-Autostart-enabled=") << "true" << endl - << QLatin1String("X-GNOME-Autostart-Delay=10") << endl; + ts << QLatin1String("[Desktop Entry]\n") + << QLatin1String("Name=") << guiName << QLatin1Char('\n') + << QLatin1String("GenericName=") << QLatin1String("File Synchronizer\n") + << QLatin1String("Exec=\"") << executablePath << "\" --background\n" + << QLatin1String("Terminal=") << "false\n" + << QLatin1String("Icon=") << APPLICATION_ICON_NAME << QLatin1Char('\n') + << QLatin1String("Categories=") << QLatin1String("Network\n") + << QLatin1String("Type=") << QLatin1String("Application\n") + << QLatin1String("StartupNotify=") << "false\n" + << QLatin1String("X-GNOME-Autostart-enabled=") << "true\n" + << QLatin1String("X-GNOME-Autostart-Delay=10") << Qt::endl; } else { if (!QFile::remove(desktopFileLocation)) { qCWarning(lcUtility) << "Could not remove autostart desktop file"; diff --git a/src/libsync/logger.cpp b/src/libsync/logger.cpp index b43dc28cd..8aa0360c2 100644 --- a/src/libsync/logger.cpp +++ b/src/libsync/logger.cpp @@ -92,7 +92,7 @@ void Logger::doLog(QtMsgType type, const QMessageLogContext &ctx, const QString _crashLogIndex = (_crashLogIndex + 1) % CrashLogSize; _crashLog[_crashLogIndex] = msg; if (_logstream) { - (*_logstream) << msg << endl; + (*_logstream) << msg << Qt::endl; if (_doFileFlush) _logstream->flush(); } diff --git a/src/libsync/theme.cpp b/src/libsync/theme.cpp index d66fa8d81..c4e6e83b7 100644 --- a/src/libsync/theme.cpp +++ b/src/libsync/theme.cpp @@ -705,17 +705,17 @@ QString Theme::versionSwitchOutput() const QTextStream stream(&helpText); stream << appName() << QLatin1String(" version ") - << version() << endl; + << version() << Qt::endl; #ifdef GIT_SHA1 - stream << "Git revision " << GIT_SHA1 << endl; + stream << "Git revision " << GIT_SHA1 << Qt::endl; #endif - stream << "Using Qt " << qVersion() << ", built against Qt " << QT_VERSION_STR << endl; + stream << "Using Qt " << qVersion() << ", built against Qt " << QT_VERSION_STR << Qt::endl; if(!QGuiApplication::platformName().isEmpty()) - stream << "Using Qt platform plugin '" << QGuiApplication::platformName() << "'" << endl; + stream << "Using Qt platform plugin '" << QGuiApplication::platformName() << "'" << Qt::endl; - stream << "Using '" << QSslSocket::sslLibraryVersionString() << "'" << endl; - stream << "Running on " << Utility::platformName() << ", " << QSysInfo::currentCpuArchitecture() << endl; + stream << "Using '" << QSslSocket::sslLibraryVersionString() << "'" << Qt::endl; + stream << "Running on " << Utility::platformName() << ", " << QSysInfo::currentCpuArchitecture() << Qt::endl; return helpText; } -- 2.30.2