15
16
17
18
22 if (!in.open(QIODevice::ReadOnly)) {
24 QStringLiteral(
"Can't open source file '%1' (%2)").arg(filePath, strerror(errno)));
28 return processQdocComments(in);
32
33
34
35
36std::vector<UntiedDocumentation>
PureDocParser::processQdocComments(QFile& input_file)
38 std::vector<UntiedDocumentation> untied{};
42 const QSet<QString> &commands = CppCodeParser::topic_commands + CppCodeParser::meta_commands;
50 QString comment = tokenizer.lexeme();
54 Doc::trimCStyleComment(start_loc, comment);
58 Doc doc(start_loc, end_loc, comment, commands, CppCodeParser::topic_commands);
60 const auto policy = Config::instance().createInclusionPolicy();
62 doc
.location().warning(QStringLiteral(
"This qdoc comment contains no topic command "
63 "(e.g., '\\%1', '\\%2').")
const Location & location() const
Returns the starting location of a qdoc comment.
bool isInternal() const
Returns true if the set of metacommands used in the doc comment contains {internal}...
TopicList topicsUsed() const
Returns a reference to the list of topic commands used in the current qdoc comment.
static bool processInternalDocs(const InclusionPolicy &policy)
The Location class provides a way to mark a location in a file.
Location(const Location &other)
The copy constructor copies the contents of other into this Location using the assignment operator.
std::vector< UntiedDocumentation > parse_qdoc_file(const QString &filePath)
Parses the source file identified by filePath and adds its parsed contents to the database.
const Location & location() const
Tokenizer(const Location &loc, QFile &file)
bool hasTooManyTopics(const Doc &doc)
Checks if there are too many topic commands in doc.
Combined button and popup list for selecting options.