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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/qmlformat/commentastvisitor.h b/tools/qmlformat/commentastvisitor.h
index 6ebf8246ba..09bc786985 100644
--- a/tools/qmlformat/commentastvisitor.h
+++ b/tools/qmlformat/commentastvisitor.h
@@ -65,6 +65,7 @@ struct Comment
QList<SourceLocation> m_srcLocations;
+ bool hasSheBang() const { return !m_srcLocations.isEmpty() && m_srcLocations.first().begin() == 0; }
bool isValid() const { return !m_srcLocations.isEmpty(); }
bool isMultiline() const { return m_text.contains("\n"); }
bool isSyntheticMultiline() const { return m_srcLocations.size() > 1; }