MCPcopy Create free account
hub / github.com/KDE/labplot / readAttributeInt

Method readAttributeInt

src/backend/lib/XmlStreamReader.cpp:169–178  ·  view source on GitHub ↗

! * Read an XML attribute and convert it to int * \param name attribute name * \param ok pointer to report back whether the attribute value could be determined (may be NULL) * \return the attribute value if found and converted, otherwise zero (in this case *ok is false) */

Source from the content-addressed store, hash-verified

167 * \return the attribute value if found and converted, otherwise zero (in this case *ok is false)
168 */
169int XmlStreamReader::readAttributeInt(const QString& name, bool* ok) {
170 QString str = attributes().value(namespaceUri().toString(), name).toString();
171 if (str.isEmpty()) {
172 if (ok)
173 *ok = false;
174 return 0;
175 }
176
177 return str.toInt(ok);
178}

Callers 3

generatePlotMethod · 0.80
XmlReadMaskMethod · 0.80
XmlReadRowMethod · 0.80

Calls 3

toStringMethod · 0.45
valueMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected