Update code style.
authorCamila <hello@camila.codes>
Tue, 27 Dec 2022 17:24:41 +0000 (18:24 +0100)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Mon, 30 Jan 2023 08:44:17 +0000 (09:44 +0100)
Signed-off-by: Camila <hello@camila.codes>
src/gui/application.cpp

index cdf6360138c82210809be53c7fe747b7af0a2321..2aa726ffa2638993035945245e2d5fb4f010ecdb 100644 (file)
@@ -248,12 +248,22 @@ Application::Application(int &argc, char **argv)
         QT_WARNING_PUSH
         QT_WARNING_DISABLE_DEPRECATED
         QString oldDir = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
-        if (oldDir.endsWith('/')) oldDir.chop(1); // macOS 10.11.x does not like trailing slash for rename/move.
+
+        // macOS 10.11.x does not like trailing slash for rename/move.
+        if (oldDir.endsWith('/')) {
+            oldDir.chop(1);
+        }
+
         QT_WARNING_POP
         setApplicationName(_theme->appName());
         if (QFileInfo(oldDir).isDir()) {
             auto confDir = ConfigFile().configPath();
-            if (confDir.endsWith('/')) confDir.chop(1);  // macOS 10.11.x does not like trailing slash for rename/move.
+
+            // macOS 10.11.x does not like trailing slash for rename/move.
+            if (confDir.endsWith('/')) {
+                confDir.chop(1);
+            }
+
             qCInfo(lcApplication) << "Migrating old config from" << oldDir << "to" << confDir;
 
             if (!QFile::rename(oldDir, confDir)) {