MCPcopy Create free account
hub / github.com/KDE/kdevelop / endElement

Method endElement

plugins/cppcheck/parser.cpp:142–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142bool CppcheckParser::endElement(QVector<KDevelop::IProblem::Ptr>& problems)
143{
144 qCDebug(KDEV_CPPCHECK) << "CppcheckParser::endElement: elem: " << qPrintable(name().toString());
145
146 State state = m_stateStack.pop();
147
148 switch (state) {
149 case CppCheck:
150 if (attributes().hasAttribute(QStringLiteral("version"))) {
151 qCDebug(KDEV_CPPCHECK) << "Cppcheck report version: " << attributes().value(QStringLiteral("version"));
152 }
153 break;
154
155 case Errors:
156 // errors finished
157 break;
158
159 case Error:
160 qCDebug(KDEV_CPPCHECK) << "CppcheckParser::endElement: new error elem: line: "
161 << (m_errorLines.isEmpty() ? QStringLiteral("?") : QString::number(m_errorLines.first()))
162 << " at " << (m_errorFiles.isEmpty() ? QStringLiteral("?") : m_errorFiles.first())
163 << ", msg: " << m_errorMessage;
164
165 storeError(problems);
166 break;
167
168 case Results:
169 // results finished
170 break;
171
172 case Location:
173 break;
174
175 default:
176 break;
177 }
178
179 return true;
180}
181
182QVector<KDevelop::IProblem::Ptr> CppcheckParser::parse()
183{

Callers

nothing calls this directly

Calls 6

nameFunction · 0.85
toStringMethod · 0.45
popMethod · 0.45
valueMethod · 0.45
isEmptyMethod · 0.45
firstMethod · 0.45

Tested by

no test coverage detected