1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-20 19:57:45 +00:00

Use string literals in Utility

This commit is contained in:
Joshua Goins 2023-09-17 08:56:35 -04:00
parent 28b0fe8537
commit f557424155

View file

@ -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('\\'));
}