summaryrefslogtreecommitdiffstats
path: root/src/qdoc/qmlvisitor.h
diff options
context:
space:
mode:
authorPaul Wicking <paul.wicking@qt.io>2019-12-17 06:44:19 +0100
committerPaul Wicking <paul.wicking@qt.io>2019-12-17 09:08:20 +0100
commited6658c2c82e2d91f34d57e88b61648fb301baf4 (patch)
treebf1c298dd4b59acb55f3f3921c6b9edac407192c /src/qdoc/qmlvisitor.h
parent9f13c865439c024364f999680ceceb296d9daeb2 (diff)
clang-format QDoc
This patch is the result of formatting all of QDoc's source with clang-format. The clang-format style is from the qt5 super repo's _clang-format definition. The purpose is unify the style across the code, to avoid spending too much time on style related issues in reviews and cleanup patches. Future changes to QDoc can benefit from using git-clang-format in combination with the git commit hook provided in qtrepotools.git as mentioned in this email to the dev list: https://lists.qt-project.org/pipermail/development/2019-October/037682.html Change-Id: I8af6a051c8334b5f35862a4dcd3becce8ac500c2 Reviewed-by: Martin Smith <martin.smith@qt.io>
Diffstat (limited to 'src/qdoc/qmlvisitor.h')
-rw-r--r--src/qdoc/qmlvisitor.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/qdoc/qmlvisitor.h b/src/qdoc/qmlvisitor.h
index fae02c1e2..6c10c5258 100644
--- a/src/qdoc/qmlvisitor.h
+++ b/src/qdoc/qmlvisitor.h
@@ -34,8 +34,8 @@
#include <QtCore/qstring.h>
#ifndef QT_NO_DECLARATIVE
-#include <private/qqmljsastvisitor_p.h>
-#include <private/qqmljsengine_p.h>
+# include <private/qqmljsastvisitor_p.h>
+# include <private/qqmljsengine_p.h>
#endif
QT_BEGIN_NAMESPACE
@@ -47,7 +47,8 @@ struct QmlPropArgs
QString component_;
QString name_;
- void clear() {
+ void clear()
+ {
type_.clear();
module_.clear();
component_.clear();
@@ -61,11 +62,8 @@ class QmlDocVisitor : public QQmlJS::AST::Visitor
Q_DECLARE_TR_FUNCTIONS(QDoc::QmlDocVisitor)
public:
- QmlDocVisitor(const QString &filePath,
- const QString &code,
- QQmlJS::Engine *engine,
- const QSet<QString> &commands,
- const QSet<QString> &topics);
+ QmlDocVisitor(const QString &filePath, const QString &code, QQmlJS::Engine *engine,
+ const QSet<QString> &commands, const QSet<QString> &topics);
~QmlDocVisitor() override;
bool visit(QQmlJS::AST::UiImport *import) override;
@@ -101,9 +99,7 @@ private:
QQmlJS::AST::SourceLocation precedingComment(quint32 offset) const;
bool applyDocumentation(QQmlJS::AST::SourceLocation location, Node *node);
void applyMetacommands(QQmlJS::AST::SourceLocation location, Node *node, Doc &doc);
- bool splitQmlPropertyArg(const Doc &doc,
- const QString &arg,
- QmlPropArgs& qpa);
+ bool splitQmlPropertyArg(const Doc &doc, const QString &arg, QmlPropArgs &qpa);
QQmlJS::Engine *engine;
quint32 lastEndOffset;