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
106d5705
Commit
106d5705
authored
1 year ago
by
Wuttke, Joachim
Committed by
Wuttke, Joachim
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
clang-format
parent
ca5c9f51
No related branches found
No related tags found
1 merge request
!2052
simplify SampleValidator (class -> namespace)
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
GUI/Model/Sample/SampleValidator.cpp
+8
-8
8 additions, 8 deletions
GUI/Model/Sample/SampleValidator.cpp
GUI/Model/Sample/SampleValidator.h
+1
-1
1 addition, 1 deletion
GUI/Model/Sample/SampleValidator.h
GUI/View/Project/SimulationView.cpp
+2
-2
2 additions, 2 deletions
GUI/View/Project/SimulationView.cpp
with
11 additions
and
11 deletions
GUI/Model/Sample/SampleValidator.cpp
+
8
−
8
View file @
106d5705
...
...
@@ -39,14 +39,14 @@ QString SampleValidator::isValidSample(const SampleItem* sample)
if
(
layout
->
itemsWithParticles
().
isEmpty
())
append
(
"Particle layout doesn't contain any particles."
);
for
(
const
auto
*
particle
:
layout
->
containedItemsWithParticles
())
{
if
(
const
auto
*
p
=
dynamic_cast
<
const
CoreAndShellItem
*>
(
particle
))
{
if
(
!
p
->
coreItem
())
append
(
"Sim/shell particle doesn't have core defined."
);
if
(
!
p
->
shellItem
())
append
(
"Sim/shell particle doesn't have shell defined."
);
}
else
if
(
const
auto
*
p
=
dynamic_cast
<
const
CompoundItem
*>
(
particle
))
if
(
p
->
itemsWithParticles
().
isEmpty
())
append
(
"Particle composition doesn't have any particles."
);
if
(
const
auto
*
p
=
dynamic_cast
<
const
CoreAndShellItem
*>
(
particle
))
{
if
(
!
p
->
coreItem
())
append
(
"Sim/shell particle doesn't have core defined."
);
if
(
!
p
->
shellItem
())
append
(
"Sim/shell particle doesn't have shell defined."
);
}
else
if
(
const
auto
*
p
=
dynamic_cast
<
const
CompoundItem
*>
(
particle
))
if
(
p
->
itemsWithParticles
().
isEmpty
())
append
(
"Particle composition doesn't have any particles."
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
GUI/Model/Sample/SampleValidator.h
+
1
−
1
View file @
106d5705
...
...
@@ -21,7 +21,7 @@ class SampleItem;
namespace
SampleValidator
{
QString
isValidSample
(
const
SampleItem
*
sample
);
QString
isValidSample
(
const
SampleItem
*
sample
);
}
...
...
This diff is collapsed.
Click to expand it.
GUI/View/Project/SimulationView.cpp
+
2
−
2
View file @
106d5705
...
...
@@ -230,8 +230,8 @@ QString SimulationView::validateSimulationSetup(bool validateRealData) const
append
(
"No sample selected"
);
else
{
QString
m
=
SampleValidator
::
isValidSample
(
selectedSampleItem
());
if
(
!
m
.
isEmpty
())
append
(
m
);
if
(
!
m
.
isEmpty
())
append
(
m
);
}
if
(
!
selectedInstrumentItem
())
...
...
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