mirror of
https://github.com/lubosz/overte.git
synced 2025-04-19 17:03:43 +02:00
PUshing function to cpp
This commit is contained in:
parent
8e73fa3eb4
commit
3691be4a2f
2 changed files with 10 additions and 11 deletions
|
@ -15,6 +15,15 @@
|
|||
|
||||
using namespace task;
|
||||
|
||||
void JobConfig::setPresetList(const QJsonObject& object) {
|
||||
for (auto it = object.begin(); it != object.end(); it++) {
|
||||
JobConfig* child = findChild<JobConfig*>(it.key(), Qt::FindDirectChildrenOnly);
|
||||
if (child) {
|
||||
child->setPresetList(it.value().toObject());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TaskConfig::connectChildConfig(QConfigPointer childConfig, const std::string& name) {
|
||||
childConfig->setParent(this);
|
||||
childConfig->setObjectName(name.c_str());
|
||||
|
|
|
@ -22,9 +22,6 @@
|
|||
|
||||
#include "Logging.h"
|
||||
|
||||
#include <Profile.h>
|
||||
#include <PerfStat.h>
|
||||
|
||||
namespace task {
|
||||
|
||||
class JobConcept;
|
||||
|
@ -111,14 +108,7 @@ public:
|
|||
bool alwaysEnabled{ true };
|
||||
bool enabled{ true };
|
||||
|
||||
virtual void setPresetList(const QJsonObject& object) {
|
||||
for (auto it = object.begin(); it != object.end(); it++) {
|
||||
JobConfig* child = findChild<JobConfig*>(it.key(), Qt::FindDirectChildrenOnly);
|
||||
if (child) {
|
||||
child->setPresetList(it.value().toObject());
|
||||
}
|
||||
}
|
||||
}
|
||||
virtual void setPresetList(const QJsonObject& object);
|
||||
|
||||
// This must be named toJSON to integrate with the global scripting JSON object
|
||||
Q_INVOKABLE QString toJSON() { return QJsonDocument(toJsonValue(*this).toObject()).toJson(QJsonDocument::Compact); }
|
||||
|
|
Loading…
Reference in a new issue