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:
parent
28b0fe8537
commit
f557424155
1 changed files with 4 additions and 4 deletions
|
@ -12,12 +12,12 @@ QDir Utility::stateDirectory()
|
||||||
}
|
}
|
||||||
|
|
||||||
const QDir homeDir = QStandardPaths::standardLocations(QStandardPaths::HomeLocation)[0];
|
const QDir homeDir = QStandardPaths::standardLocations(QStandardPaths::HomeLocation)[0];
|
||||||
const QDir localDir = homeDir.absoluteFilePath(".local");
|
const QDir localDir = homeDir.absoluteFilePath(QStringLiteral(".local"));
|
||||||
const QDir stateDir = localDir.absoluteFilePath("state");
|
const QDir stateDir = localDir.absoluteFilePath(QStringLiteral("state"));
|
||||||
return stateDir.absoluteFilePath("astra");
|
return stateDir.absoluteFilePath(QStringLiteral("astra"));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Utility::toWindowsPath(const QDir &dir)
|
QString Utility::toWindowsPath(const QDir &dir)
|
||||||
{
|
{
|
||||||
return "Z:" + dir.absolutePath().replace('/', '\\');
|
return QStringLiteral("Z:") + dir.absolutePath().replace(QLatin1Char('/'), QLatin1Char('\\'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue