attempt to fix clang-format and ubuntu build.
Signed-off-by: cullvox <cullvox@outlook.com>
This commit is contained in:
parent
fbe4043651
commit
b16085f66c
@ -26,6 +26,7 @@
|
||||
#include <quazip/quazipfile.h>
|
||||
|
||||
#include <QCryptographicHash>
|
||||
#include <QRegularExpression>
|
||||
|
||||
namespace ResourcePackUtils {
|
||||
|
||||
@ -263,10 +264,8 @@ bool readFormat(const QJsonObject& obj, TextFormat& format)
|
||||
}
|
||||
}
|
||||
|
||||
return getBoolOrFromText(bold, format.bold) &&
|
||||
getBoolOrFromText(italic, format.italic) &&
|
||||
getBoolOrFromText(underlined, format.underlined) &&
|
||||
getBoolOrFromText(strikethrough, format.strikethrough);
|
||||
return getBoolOrFromText(bold, format.bold) && getBoolOrFromText(italic, format.italic) &&
|
||||
getBoolOrFromText(underlined, format.underlined) && getBoolOrFromText(strikethrough, format.strikethrough);
|
||||
}
|
||||
|
||||
void appendBeginFormat(TextFormat& format, QString& toAppend)
|
||||
@ -282,7 +281,8 @@ void appendBeginFormat(TextFormat& format, QString& toAppend)
|
||||
toAppend.append("<s>");
|
||||
}
|
||||
|
||||
void appendEndFormat(TextFormat& format, QString& toAppend) {
|
||||
void appendEndFormat(TextFormat& format, QString& toAppend)
|
||||
{
|
||||
toAppend.append("</font>");
|
||||
if (format.bold)
|
||||
toAppend.append("</b>");
|
||||
@ -296,7 +296,8 @@ void appendEndFormat(TextFormat& format, QString& toAppend) {
|
||||
|
||||
bool processComponent(const QJsonValue& value, QString& result, TextFormat* parentFormat = nullptr);
|
||||
|
||||
bool processComponentList(const QJsonArray& arr, QString& result, TextFormat* parentFormat = nullptr) {
|
||||
bool processComponentList(const QJsonArray& arr, QString& result, TextFormat* parentFormat = nullptr)
|
||||
{
|
||||
|
||||
for (const QJsonValue& val : arr) {
|
||||
if (!processComponent(val, result, parentFormat))
|
||||
@ -306,7 +307,8 @@ bool processComponentList(const QJsonArray& arr, QString& result, TextFormat* pa
|
||||
return true;
|
||||
}
|
||||
|
||||
bool processComponent(const QJsonValue& value, QString& result, TextFormat* parentFormat) {
|
||||
bool processComponent(const QJsonValue& value, QString& result, TextFormat* parentFormat)
|
||||
{
|
||||
if (value.isString()) {
|
||||
result.append(value.toString());
|
||||
} else if (value.isObject()) {
|
||||
@ -340,9 +342,8 @@ bool processComponent(const QJsonValue& value, QString& result, TextFormat* pare
|
||||
}
|
||||
|
||||
// https://minecraft.fandom.com/wiki/Tutorials/Creating_a_resource_pack#Formatting_pack.mcmeta
|
||||
bool processMCMeta(ResourcePack& pack, QByteArray&& raw_data) {
|
||||
|
||||
|
||||
bool processMCMeta(ResourcePack& pack, QByteArray&& raw_data)
|
||||
{
|
||||
try {
|
||||
auto json_doc = QJsonDocument::fromJson(raw_data);
|
||||
auto pack_obj = Json::requireObject(json_doc.object(), "pack", {});
|
||||
|
Loading…
Reference in New Issue
Block a user