Format all C++ and Java code via clang-format

Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
Konstantin Pastbin
2025-08-17 14:32:37 +07:00
parent 9f0290c0ec
commit bfffa1fff4
2169 changed files with 56441 additions and 64188 deletions

View File

@@ -63,25 +63,15 @@ bool CopyFile(QString const & oldFile, QString const & newFile)
void CopyFromResources(QString const & name, QString const & output)
{
QString const resourceDir = GetPlatform().ResourcesDir().c_str();
if (!CopyFile(JoinPathQt({resourceDir, name}),
JoinPathQt({output, name})))
{
throw std::runtime_error(std::string("Cannot copy file ") +
name.toStdString() +
" to " + output.toStdString());
}
if (!CopyFile(JoinPathQt({resourceDir, name}), JoinPathQt({output, name})))
throw std::runtime_error(std::string("Cannot copy file ") + name.toStdString() + " to " + output.toStdString());
}
void CopyToResources(QString const & name, QString const & input, QString const & newName)
{
QString const resourceDir = GetPlatform().ResourcesDir().c_str();
if (!CopyFile(JoinPathQt({input, name}),
JoinPathQt({resourceDir, newName.isEmpty() ? name : newName})))
{
throw std::runtime_error(std::string("Cannot copy file ") +
name.toStdString() +
" from " + input.toStdString());
}
if (!CopyFile(JoinPathQt({input, name}), JoinPathQt({resourceDir, newName.isEmpty() ? name : newName})))
throw std::runtime_error(std::string("Cannot copy file ") + name.toStdString() + " from " + input.toStdString());
}
QString JoinPathQt(std::initializer_list<QString> folders)
@@ -102,8 +92,7 @@ QString JoinPathQt(std::initializer_list<QString> folders)
return QDir::cleanPath(result);
}
QString GetExternalPath(QString const & name, QString const & primaryPath,
QString const & secondaryPath)
QString GetExternalPath(QString const & name, QString const & primaryPath, QString const & secondaryPath)
{
QString const resourceDir = GetPlatform().ResourcesDir().c_str();
QString path = JoinPathQt({resourceDir, primaryPath, name});