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