Skip to content
Snippets Groups Projects
Commit 106d5705 authored by Wuttke, Joachim's avatar Wuttke, Joachim Committed by Wuttke, Joachim
Browse files

clang-format

parent ca5c9f51
No related branches found
No related tags found
1 merge request!2052simplify SampleValidator (class -> namespace)
......@@ -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.");
}
}
}
......
......@@ -21,7 +21,7 @@ class SampleItem;
namespace SampleValidator {
QString isValidSample(const SampleItem* sample);
QString isValidSample(const SampleItem* sample);
}
......
......@@ -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())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment