mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 13:23:59 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -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});
|
||||
|
||||
Reference in New Issue
Block a user