KSyntaxHighlighting
definition.cpp
105 return QCoreApplication::instance()->translate("Language Section", d->section.toUtf8().constData());
227 std::sort(formatList.begin(), formatList.end(), [](const KSyntaxHighlighting::Format &lhs, const KSyntaxHighlighting::Format &rhs) {
486 caseSensitive = Xml::attrToBool(reader.attributes().value(QLatin1String("casesensitive"))) ? Qt::CaseSensitive : Qt::CaseInsensitive;
650 caseSensitive = Xml::attrToBool(reader.attributes().value(QLatin1String("casesensitive"))) ? Qt::CaseSensitive : Qt::CaseInsensitive;
666 indentationBasedFolding = Xml::attrToBool(reader.attributes().value(QLatin1String("indentationsensitive")));
707 const bool isSingleLine = reader.attributes().value(QLatin1String("name")) == QLatin1String("singleLine");
710 const bool afterWhiteSpace = reader.attributes().value(QLatin1String("position")) == QLatin1String("afterwhitespace");
711 singleLineCommentPosition = afterWhiteSpace ? CommentPosition::AfterWhitespace : CommentPosition::StartOfLine;
805 qCWarning(Log) << "Skipping" << fileName << "due to having no valid kateversion attribute:" << verStr;
QString singleLineCommentMarker() const
Returns the marker that starts a single line comment.
Definition: definition.cpp:260
StartElement
int toInt(bool *ok, int base) const const
QStringList foldingIgnoreList() const
If indentationBasedFoldingEnabled() returns true, this function returns a list of regular expressions...
Definition: definition.cpp:190
void skipCurrentElement()
QString name() const
The name of this format as used in the syntax definition file.
Definition: format.cpp:96
bool setKeywordList(const QString &name, const QStringList &content)
Set the contents of the keyword list name to content.
Definition: definition.cpp:209
bool isWordDelimiter(QChar c) const
Returns whether the character c is a word delimiter.
Definition: definition.cpp:153
ReadOnly
CaseSensitive
QString style() const
Generalized language style, used for indentation.
Definition: definition.cpp:133
QCborValue value(qint64 key) const const
QStringRef value(const QString &namespaceUri, const QString &name) const const
QString translate(const char *context, const char *sourceText, const char *disambiguation, int n)
QVector< T > fromList(const QList< T > &list)
Represents the raw xml data of a context and its rules.
Definition: highlightingdata_p.hpp:26
bool isValid() const
Checks whether this object refers to a valid syntax definition.
Definition: definition.cpp:78
QStringView mid(qsizetype start) const const
bool isWordWrapDelimiter(QChar c) const
Returns whether it is safe to break a line at before the character .
Definition: definition.cpp:159
Describes the format to be used for a specific text fragment.
Definition: format.h:33
QPair< QString, QString > multiLineCommentMarker() const
Returns the markers that start and end multiline comments.
Definition: definition.cpp:272
QStringView left(qsizetype length) const const
@ StartOfLine
The comment marker is inserted at the beginning of a line at column 0.
Definition & operator=(Definition &&other) noexcept
Move assignment operator.
bool hasAttribute(const QString &qualifiedName) const const
QStringRef name() const const
QString toString() const const
bool indentationBasedFoldingEnabled() const
Returns whether indentation-based folding is enabled.
Definition: definition.cpp:184
SkipEmptyParts
bool operator!=(const Definition &other) const
Checks two definitions for inequality.
Definition: definition.cpp:73
QVector< QString > extensions() const
File extensions associated with this syntax definition.
Definition: definition.cpp:113
QVector< Definition > includedDefinitions() const
Returns a list of Definitions that are referenced with the IncludeRules rule.
Definition: definition.cpp:234
bool isHidden() const
Returns true if this is an internal definition that should not be displayed to the user.
Definition: definition.cpp:128
QXmlStreamReader::TokenType readNext()
QXmlStreamReader::TokenType tokenType() const const
QCoreApplication * instance()
void push_back(QChar ch)
Definition: abstracthighlighter.h:20
QString toString(const QString &defaultValue) const const
int toInt(bool *ok, int base) const const
QXmlStreamAttributes attributes() const const
QStringList keywordLists() const
Returns the section names of keywords.
Definition: definition.cpp:196
CommentPosition singleLineCommentPosition() const
Returns the insert position of the comment marker for sinle line comments.
Definition: definition.cpp:266
QVector< Format > formats() const
Returns a list of all Format items used by this definition.
Definition: definition.cpp:221
bool toBool(bool defaultValue) const const
QVector< QPair< QChar, QString > > characterEncodings() const
Returns a list of character/string mapping that can be used for spell checking.
Definition: definition.cpp:278
Definition()
Default constructor, creating an empty (invalid) Definition instance.
Definition: definition.cpp:51
KIOCORE_EXPORT CopyJob * move(const QList< QUrl > &src, const QUrl &dest, JobFlags flags=DefaultFlags)
@ AfterWhitespace
The comment marker is inserted after leading whitespaces right befire the first non-whitespace charac...
QString toString() const const
unsigned int version()
bool operator==(const Definition &other) const
Checks two definitions for equality.
Definition: definition.cpp:68
QString name(StandardShortcut id)
QString filePath() const
Returns the full path to the definition XML file containing the syntax definition.
Definition: definition.cpp:83
qsizetype indexOf(QChar c, qsizetype from, Qt::CaseSensitivity cs) const const
bool atEnd() const const
bool foldingEnabled() const
Returns whether the highlighting supports code folding.
Definition: definition.cpp:165
QStringList keywordList(const QString &name) const
Returns the list of keywords for the keyword list name.
Definition: definition.cpp:202
QVector< QString > mimeTypes() const
Mime types associated with this syntax definition.
Definition: definition.cpp:108
qint64 toInteger(qint64 defaultValue) const const
virtual QVariant get(ScriptableExtension *callerPrincipal, quint64 objId, const QString &propName)
float toFloat(bool *ok) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Mar 26 2023 04:09:17 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Mar 26 2023 04:09:17 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.