Changeset View
Changeset View
Standalone View
Standalone View
libscience/isotopeparser.cpp
Show All 20 Lines | |||||
21 | 21 | | |||
22 | class IsotopeParser::Private | 22 | class IsotopeParser::Private | ||
23 | { | 23 | { | ||
24 | public: | 24 | public: | ||
25 | Private() | 25 | Private() | ||
26 | : currentUnit(KUnitConversion::NoUnit), | 26 | : currentUnit(KUnitConversion::NoUnit), | ||
27 | currentErrorValue(QVariant()), | 27 | currentErrorValue(QVariant()), | ||
28 | currentElementSymbol(QString()), | 28 | currentElementSymbol(QString()), | ||
29 | currentIsotope(0), | 29 | currentIsotope(nullptr), | ||
30 | inIsotope(false), | 30 | inIsotope(false), | ||
31 | inElement(false), | 31 | inElement(false), | ||
32 | inAtomicNumber(false), | 32 | inAtomicNumber(false), | ||
33 | inExactMass(false), | 33 | inExactMass(false), | ||
34 | inSpin(false), | 34 | inSpin(false), | ||
35 | inMagMoment(false), | 35 | inMagMoment(false), | ||
36 | inHalfLife(false), | 36 | inHalfLife(false), | ||
37 | inAlphaDecayLikeliness(false), | 37 | inAlphaDecayLikeliness(false), | ||
▲ Show 20 Lines • Show All 124 Lines • ▼ Show 20 Line(s) | 92 | { | |||
162 | return true; | 162 | return true; | ||
163 | } | 163 | } | ||
164 | 164 | | |||
165 | bool IsotopeParser::endElement(const QString&, const QString& localName, const QString&) | 165 | bool IsotopeParser::endElement(const QString&, const QString& localName, const QString&) | ||
166 | { | 166 | { | ||
167 | if (localName == "isotope") { | 167 | if (localName == "isotope") { | ||
168 | d->isotopes.append(d->currentIsotope); | 168 | d->isotopes.append(d->currentIsotope); | ||
169 | 169 | | |||
170 | d->currentIsotope = 0; | 170 | d->currentIsotope = nullptr; | ||
171 | d->inIsotope = false; | 171 | d->inIsotope = false; | ||
172 | } else if (localName == "isotopeList") { //a new list of isotopes start... | 172 | } else if (localName == "isotopeList") { //a new list of isotopes start... | ||
173 | d->inElement = false; | 173 | d->inElement = false; | ||
174 | } | 174 | } | ||
175 | 175 | | |||
176 | return true; | 176 | return true; | ||
177 | } | 177 | } | ||
178 | 178 | | |||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |