Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
80d9cd14
Commit
80d9cd14
authored
3 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
ditto
parent
d09048ee
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!451
various little improvements as suggested by clang-tidy
Pipeline
#49184
passed
3 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
GUI/Model/Session/SessionXML.cpp
+7
-0
7 additions, 0 deletions
GUI/Model/Session/SessionXML.cpp
with
7 additions
and
0 deletions
GUI/Model/Session/SessionXML.cpp
+
7
−
0
View file @
80d9cd14
...
@@ -42,6 +42,7 @@ void report_error(MessageService* messageService, SessionItem* item, const QStri
...
@@ -42,6 +42,7 @@ void report_error(MessageService* messageService, SessionItem* item, const QStri
SessionItem
*
createItem
(
SessionItem
*
item
,
const
QString
&
modelType
,
const
QString
&
tag
)
SessionItem
*
createItem
(
SessionItem
*
item
,
const
QString
&
modelType
,
const
QString
&
tag
)
{
{
ASSERT
(
item
);
if
(
item
->
hasModelType
<
GroupItem
>
())
{
if
(
item
->
hasModelType
<
GroupItem
>
())
{
if
(
auto
groupItem
=
dynamic_cast
<
GroupItem
*>
(
item
))
if
(
auto
groupItem
=
dynamic_cast
<
GroupItem
*>
(
item
))
return
groupItem
->
getItemOfType
(
modelType
);
return
groupItem
->
getItemOfType
(
modelType
);
...
@@ -61,6 +62,8 @@ SessionItem* createItem(SessionItem* item, const QString& modelType, const QStri
...
@@ -61,6 +62,8 @@ SessionItem* createItem(SessionItem* item, const QString& modelType, const QStri
void
GUI
::
Session
::
XML
::
writeTo
(
QXmlStreamWriter
*
writer
,
SessionItem
*
parent
)
void
GUI
::
Session
::
XML
::
writeTo
(
QXmlStreamWriter
*
writer
,
SessionItem
*
parent
)
{
{
ASSERT
(
writer
);
ASSERT
(
parent
);
writer
->
writeStartElement
(
parent
->
model
()
->
getModelTag
());
writer
->
writeStartElement
(
parent
->
model
()
->
getModelTag
());
writer
->
writeAttribute
(
GUI
::
Session
::
XML
::
ModelNameAttribute
,
parent
->
model
()
->
getModelName
());
writer
->
writeAttribute
(
GUI
::
Session
::
XML
::
ModelNameAttribute
,
parent
->
model
()
->
getModelName
());
...
@@ -71,6 +74,7 @@ void GUI::Session::XML::writeTo(QXmlStreamWriter* writer, SessionItem* parent)
...
@@ -71,6 +74,7 @@ void GUI::Session::XML::writeTo(QXmlStreamWriter* writer, SessionItem* parent)
void
GUI
::
Session
::
XML
::
writeItemAndChildItems
(
QXmlStreamWriter
*
writer
,
const
SessionItem
*
item
)
void
GUI
::
Session
::
XML
::
writeItemAndChildItems
(
QXmlStreamWriter
*
writer
,
const
SessionItem
*
item
)
{
{
ASSERT
(
item
);
if
(
item
->
parent
())
{
if
(
item
->
parent
())
{
writer
->
writeStartElement
(
GUI
::
Session
::
XML
::
ItemTag
);
writer
->
writeStartElement
(
GUI
::
Session
::
XML
::
ItemTag
);
writer
->
writeAttribute
(
GUI
::
Session
::
XML
::
ModelTypeAttribute
,
item
->
modelType
());
writer
->
writeAttribute
(
GUI
::
Session
::
XML
::
ModelTypeAttribute
,
item
->
modelType
());
...
@@ -101,6 +105,7 @@ void GUI::Session::XML::writeItemAndChildItems(QXmlStreamWriter* writer, const S
...
@@ -101,6 +105,7 @@ void GUI::Session::XML::writeItemAndChildItems(QXmlStreamWriter* writer, const S
void
GUI
::
Session
::
XML
::
writeVariant
(
QXmlStreamWriter
*
writer
,
QVariant
variant
,
int
role
)
void
GUI
::
Session
::
XML
::
writeVariant
(
QXmlStreamWriter
*
writer
,
QVariant
variant
,
int
role
)
{
{
ASSERT
(
writer
);
if
(
variant
.
isValid
())
{
if
(
variant
.
isValid
())
{
writer
->
writeStartElement
(
GUI
::
Session
::
XML
::
ParameterTag
);
writer
->
writeStartElement
(
GUI
::
Session
::
XML
::
ParameterTag
);
QString
type_name
=
variant
.
typeName
();
QString
type_name
=
variant
.
typeName
();
...
@@ -144,6 +149,7 @@ void GUI::Session::XML::readItems(QXmlStreamReader* reader, SessionItem* parent,
...
@@ -144,6 +149,7 @@ void GUI::Session::XML::readItems(QXmlStreamReader* reader, SessionItem* parent,
MessageService
*
messageService
)
MessageService
*
messageService
)
{
{
bool
legacyDistributionFound
=
false
;
bool
legacyDistributionFound
=
false
;
ASSERT
(
reader
);
ASSERT
(
parent
);
ASSERT
(
parent
);
const
QString
start_type
=
parent
->
model
()
->
getModelTag
();
const
QString
start_type
=
parent
->
model
()
->
getModelTag
();
while
(
!
reader
->
atEnd
())
{
while
(
!
reader
->
atEnd
())
{
...
@@ -213,6 +219,7 @@ void GUI::Session::XML::readItems(QXmlStreamReader* reader, SessionItem* parent,
...
@@ -213,6 +219,7 @@ void GUI::Session::XML::readItems(QXmlStreamReader* reader, SessionItem* parent,
QString
GUI
::
Session
::
XML
::
readProperty
(
QXmlStreamReader
*
reader
,
SessionItem
*
item
,
QString
GUI
::
Session
::
XML
::
readProperty
(
QXmlStreamReader
*
reader
,
SessionItem
*
item
,
MessageService
*
messageService
)
MessageService
*
messageService
)
{
{
ASSERT
(
reader
);
const
QString
parameter_name
=
const
QString
parameter_name
=
reader
->
attributes
().
value
(
GUI
::
Session
::
XML
::
ParameterNameAttribute
).
toString
();
reader
->
attributes
().
value
(
GUI
::
Session
::
XML
::
ParameterNameAttribute
).
toString
();
const
QString
parameter_type
=
const
QString
parameter_type
=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment