aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlformat/commentastvisitor.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qmlformat/commentastvisitor.h')
-rw-r--r--tools/qmlformat/commentastvisitor.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/qmlformat/commentastvisitor.h b/tools/qmlformat/commentastvisitor.h
index 21c7eb6416..6ebf8246ba 100644
--- a/tools/qmlformat/commentastvisitor.h
+++ b/tools/qmlformat/commentastvisitor.h
@@ -78,6 +78,14 @@ struct Comment
return false;
}
+ quint32 endLine() const
+ {
+ if (isSyntheticMultiline() || !isValid())
+ return 0;
+
+ return m_srcLocations[0].startLine + m_text.count(QLatin1Char('\n'));
+ }
+
QString m_text;
};