spotless
Signed-off-by: wohaopa <2411829240@qq.com>
This commit is contained in:
parent
ab721409ab
commit
caff26222c
@ -48,17 +48,15 @@ static std::shared_ptr<Index> parseIndexInternal(const QJsonObject& obj)
|
||||
}
|
||||
|
||||
// Property
|
||||
static std::shared_ptr<Property> parsePropertyInternal(const QJsonObject& obj){
|
||||
|
||||
static std::shared_ptr<Property> parsePropertyInternal(const QJsonObject& obj)
|
||||
{
|
||||
const QVector<QJsonObject> objects = requireIsArrayOf<QJsonObject>(obj, "properties");
|
||||
QVector<QPair<QString, QString>> properties;
|
||||
properties.reserve(objects.size());
|
||||
|
||||
for (const auto& object : objects)
|
||||
{
|
||||
for (const auto& object : objects) {
|
||||
auto type = requireString(object, "type");
|
||||
if (type == "override")
|
||||
{
|
||||
if (type == "override") {
|
||||
auto field1 = requireString(object, "target");
|
||||
auto field2 = requireString(object, "value");
|
||||
if (!field1.endsWith("Override") || !field2.startsWith("https"))
|
||||
|
@ -36,15 +36,14 @@ void Property::merge(const std::shared_ptr<Property>& other)
|
||||
m_properties = other->m_properties;
|
||||
}
|
||||
|
||||
void Property::applyProperties() {
|
||||
if (!isLoaded())
|
||||
void Property::applyProperties()
|
||||
{
|
||||
if (!isLoaded()) {
|
||||
load(Net::Mode::Online);
|
||||
}
|
||||
|
||||
auto s = APPLICATION->settings();
|
||||
for (auto& property : m_properties)
|
||||
{
|
||||
for (auto& property : m_properties) {
|
||||
if (s->contains(property.first))
|
||||
s->set(property.first, property.second);
|
||||
}
|
||||
|
@ -179,8 +179,6 @@ QList<NetAction::Ptr> Library::getDownloads(const RuntimeContext& runtimeContext
|
||||
else
|
||||
#endif
|
||||
return BuildConfig.LIBRARY_BASE + raw_storage;
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (m_repositoryURL.endsWith('/')) {
|
||||
|
@ -49,10 +49,10 @@
|
||||
|
||||
#include "Application.h"
|
||||
#include "BuildConfig.h"
|
||||
#include "meta/Index.h"
|
||||
#include "net/PasteUpload.h"
|
||||
#include "settings/SettingsObject.h"
|
||||
#include "tools/BaseProfiler.h"
|
||||
#include "meta/Index.h"
|
||||
|
||||
APIPage::APIPage(QWidget* parent) : QWidget(parent), ui(new Ui::APIPage)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user