diff --git a/data/schema/language.xsd b/data/schema/language.xsd --- a/data/schema/language.xsd +++ b/data/schema/language.xsd @@ -311,16 +311,16 @@ lineEndContext: Next context if end of line is encountered lineEmptyContext: Next context if an empty line is encountered [optional] fallthrough: Use a fallthrough context [optional] + deprecated since 5.62 but preserved to maintain compatibility in older versions of KF5 fallthroughContext: Fall through to this context [optional] dynamic: Dynamic context [boolean, optional] noIndentationBasedFolding: Python uses indentation based folding. However, Python has parts where it does not use indentation based folding (e.g. for """ strings). In this case switch to an own context and set this attribute to true. Then the indentation based folding will ignore this parts and not change folding markers. [optional] TODO: - Explain fallthrough. - - Do we need fallthrough at all? It could be true, if fallthroughContext is set, false otherwise. - Make lineEndContext optional, defaults to '#stay'. Reasonable? --> @@ -350,7 +350,15 @@ - + + + + + + + + + diff --git a/src/lib/context.cpp b/src/lib/context.cpp --- a/src/lib/context.cpp +++ b/src/lib/context.cpp @@ -61,12 +61,10 @@ m_attribute = reader.attributes().value(QStringLiteral("attribute")).toString(); m_lineEndContext.parse(reader.attributes().value(QStringLiteral("lineEndContext"))); m_lineEmptyContext.parse(reader.attributes().value(QStringLiteral("lineEmptyContext"))); - m_fallthrough = Xml::attrToBool(reader.attributes().value(QStringLiteral("fallthrough"))); m_fallthroughContext.parse(reader.attributes().value(QStringLiteral("fallthroughContext"))); - if (m_fallthroughContext.isStay()) - m_fallthrough = false; + m_fallthrough = !m_fallthroughContext.isStay(); m_noIndentationBasedFolding = Xml::attrToBool(reader.attributes().value(QStringLiteral("noIndentationBasedFolding"))); reader.readNext(); while (!reader.atEnd()) { switch (reader.tokenType()) {