Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Telemetry
KUserFeedback
Commits
2767c8ce
Commit
2767c8ce
authored
Jan 04, 2017
by
Volker Krause
Browse files
Remove legacy aggregation setting generation code
parent
ebdf33e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
analyzer/core/product.cpp
View file @
2767c8ce
...
...
@@ -123,24 +123,6 @@ static Product productFromJsonObject(const QJsonObject &obj)
product
.
setName
(
obj
.
value
(
QStringLiteral
(
"name"
)).
toString
());
product
.
setSchema
(
SchemaEntry
::
fromJson
(
obj
.
value
(
QStringLiteral
(
"schema"
)).
toArray
()));
product
.
setAggregations
(
Aggregation
::
fromJson
(
product
,
obj
.
value
(
QLatin1String
(
"aggregation"
)).
toArray
()));
// ### temporary HACK
if
(
product
.
aggregations
().
isEmpty
())
{
QVector
<
Aggregation
>
aggrs
;
for
(
const
auto
&
entry
:
product
.
schema
())
{
for
(
const
auto
&
elem
:
entry
.
elements
())
{
Aggregation
aggr
;
aggr
.
setType
(
Aggregation
::
Category
);
AggregationElement
e
;
e
.
setSchemaEntry
(
entry
);
e
.
setSchemaEntryElement
(
elem
);
aggr
.
setElements
({
e
});
aggrs
.
push_back
(
aggr
);
}
}
product
.
setAggregations
(
aggrs
);
}
return
product
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment