From f5574241555c5e94224c7ac68c1e242a30f18dbf Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sun, 17 Sep 2023 08:56:35 -0400 Subject: [PATCH] Use string literals in Utility --- launcher/src/utility.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/launcher/src/utility.cpp b/launcher/src/utility.cpp index ac3e1e5..7cd0598 100644 --- a/launcher/src/utility.cpp +++ b/launcher/src/utility.cpp @@ -12,12 +12,12 @@ QDir Utility::stateDirectory() } const QDir homeDir = QStandardPaths::standardLocations(QStandardPaths::HomeLocation)[0]; - const QDir localDir = homeDir.absoluteFilePath(".local"); - const QDir stateDir = localDir.absoluteFilePath("state"); - return stateDir.absoluteFilePath("astra"); + const QDir localDir = homeDir.absoluteFilePath(QStringLiteral(".local")); + const QDir stateDir = localDir.absoluteFilePath(QStringLiteral("state")); + return stateDir.absoluteFilePath(QStringLiteral("astra")); } QString Utility::toWindowsPath(const QDir &dir) { - return "Z:" + dir.absolutePath().replace('/', '\\'); + return QStringLiteral("Z:") + dir.absolutePath().replace(QLatin1Char('/'), QLatin1Char('\\')); }