Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qdochtmlparser.cpp File Reference

(79ec9ba4b77dd7b411a92f790363c51991b72481)

#include <qdochtmlparser_p.h>
#include <QtCore/qregularexpression.h>
+ Include dependency graph for qdochtmlparser.cpp:

Go to the source code of this file.

Classes

class  ExtractQmlType
 
class  ExtractQmlProperty
 
class  ExtractQmlMethodOrSignal
 

Functions

static QString getContentsByMarks (const QString &html, QString startMark, QString endMark)
 
static void stripAllHtml (QString *html)
 
static void processOutput (QString *html)
 Process the string obtained from start mark to end mark. This is duplicated from QtC's Utils::HtmlExtractor, modified on top of it.
 

Variables

static constexpr qsizetype firstIndexOfParagraphTag = 400
 
static constexpr auto lengthOfSmallestOpeningTag = qsizetype(std::char_traits<char>::length("<p><i>"))
 
static constexpr auto lengthOfStartParagraphTag = qsizetype(std::char_traits<char>::length("<p>"))
 
static constexpr auto lengthOfEndParagraphTag = qsizetype(std::char_traits<char>::length("</p>"))
 
static constexpr auto lengthOfPeriod = qsizetype(std::char_traits<char>::length("."))
 

Function Documentation

◆ getContentsByMarks()

static QString getContentsByMarks ( const QString & html,
QString startMark,
QString endMark )
static

Definition at line 21 of file qdochtmlparser.cpp.

References contents, QString::indexOf(), QString::mid(), and QString::prepend().

Referenced by ExtractQmlType::extract().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processOutput()

static void processOutput ( QString * html)
static

Process the string obtained from start mark to end mark. This is duplicated from QtC's Utils::HtmlExtractor, modified on top of it.

Definition at line 52 of file qdochtmlparser.cpp.

References QString::append(), QString::clear(), firstIndexOfParagraphTag, QString::indexOf(), QString::isEmpty(), QString::lastIndexOf(), lengthOfEndParagraphTag, lengthOfPeriod, lengthOfSmallestOpeningTag, lengthOfStartParagraphTag, Q_ASSERT, and QString::truncate().

Referenced by ExtractQmlProperty::extract(), and ExtractQmlMethodOrSignal::extract().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stripAllHtml()

static void stripAllHtml ( QString * html)
static

Definition at line 42 of file qdochtmlparser.cpp.

References Q_ASSERT, and QString::remove().

Referenced by ExtractQmlType::extract(), ExtractQmlProperty::extract(), and ExtractQmlMethodOrSignal::extract().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ firstIndexOfParagraphTag

constexpr qsizetype firstIndexOfParagraphTag = 400
staticconstexpr

Definition at line 12 of file qdochtmlparser.cpp.

Referenced by processOutput().

◆ lengthOfEndParagraphTag

constexpr auto lengthOfEndParagraphTag = qsizetype(std::char_traits<char>::length("</p>"))
staticconstexpr

Definition at line 18 of file qdochtmlparser.cpp.

Referenced by processOutput().

◆ lengthOfPeriod

constexpr auto lengthOfPeriod = qsizetype(std::char_traits<char>::length("."))
staticconstexpr

Definition at line 19 of file qdochtmlparser.cpp.

Referenced by processOutput().

◆ lengthOfSmallestOpeningTag

constexpr auto lengthOfSmallestOpeningTag = qsizetype(std::char_traits<char>::length("<p><i>"))
staticconstexpr

Definition at line 16 of file qdochtmlparser.cpp.

Referenced by processOutput().

◆ lengthOfStartParagraphTag

constexpr auto lengthOfStartParagraphTag = qsizetype(std::char_traits<char>::length("<p>"))
staticconstexpr

Definition at line 17 of file qdochtmlparser.cpp.

Referenced by processOutput().