Selaa lähdekoodia

endl has been deprecated

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
Felix Weilbach 4 vuotta sitten
vanhempi
commit
2fe3a7947e
3 muutettua tiedostoa jossa 18 lisäystä ja 18 poistoa
  1. 11 11
      src/common/utility_unix.cpp
  2. 1 1
      src/libsync/logger.cpp
  3. 6 6
      src/libsync/theme.cpp

+ 11 - 11
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";

+ 1 - 1
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();
         }

+ 6 - 6
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;
 }