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

Method validate

kdevplatform/language/codegen/utilities.cpp:31–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31QValidator::State IdentifierValidator::validate(QString& input, int&) const
32{
33 //I can't figure out why it wouldn't compile when I tried to use Identifier identifier();
34 Identifier identifier = Identifier(IndexedString(input));
35
36 if (identifier.isUnique())
37 return Acceptable;
38
39 DUChainReadLocker lock(DUChain::lock(), 10);
40 return m_context->findLocalDeclarations(identifier, CursorInRevision::invalid(), nullptr,
41 AbstractType::Ptr(), DUContext::NoFiltering).empty() ? Acceptable : Invalid;
42}
43
44IndexedString fetchImplementationFileForClass(const Declaration& targetClass)
45{

Callers

nothing calls this directly

Calls 6

isUniqueMethod · 0.80
emptyMethod · 0.80
findLocalDeclarationsMethod · 0.80
IndexedStringClass · 0.70
IdentifierFunction · 0.50
invalidFunction · 0.50

Tested by

no test coverage detected