diff options
author | Paul Wicking <paul.wicking@qt.io> | 2019-12-17 06:44:19 +0100 |
---|---|---|
committer | Paul Wicking <paul.wicking@qt.io> | 2019-12-17 09:08:20 +0100 |
commit | ed6658c2c82e2d91f34d57e88b61648fb301baf4 (patch) | |
tree | bf1c298dd4b59acb55f3f3921c6b9edac407192c /src/qdoc/doc.h | |
parent | 9f13c865439c024364f999680ceceb296d9daeb2 (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/doc.h')
-rw-r--r-- | src/qdoc/doc.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/qdoc/doc.h b/src/qdoc/doc.h index 38c469ee3..758901f1d 100644 --- a/src/qdoc/doc.h +++ b/src/qdoc/doc.h @@ -58,10 +58,14 @@ struct Topic { QString topic; QString args; - Topic() { } - Topic(QString &t, const QString &a) : topic(t), args(a) { } + Topic() {} + Topic(QString &t, const QString &a) : topic(t), args(a) {} bool isEmpty() const { return topic.isEmpty(); } - void clear() { topic.clear(); args.clear(); } + void clear() + { + topic.clear(); + args.clear(); + } }; typedef QVector<Topic> TopicList; @@ -70,8 +74,8 @@ typedef QVector<DitaRef *> DitaRefList; class DitaRef { public: - DitaRef() { } - virtual ~DitaRef() { } + DitaRef() {} + virtual ~DitaRef() {} const QString &navtitle() const { return navtitle_; } const QString &href() const { return href_; } @@ -79,7 +83,7 @@ public: void setHref(const QString &t) { href_ = t; } virtual bool isMapRef() const = 0; virtual const DitaRefList *subrefs() const { return nullptr; } - virtual void appendSubref(DitaRef *) { } + virtual void appendSubref(DitaRef *) {} private: QString navtitle_; @@ -89,7 +93,7 @@ private: class TopicRef : public DitaRef { public: - TopicRef() { } + TopicRef() {} ~TopicRef() override; bool isMapRef() const override { return false; } @@ -103,7 +107,7 @@ private: class MapRef : public DitaRef { public: - MapRef() { } + MapRef() {} bool isMapRef() const override { return true; } }; @@ -125,18 +129,15 @@ public: }; Doc() : priv(nullptr) {} - Doc(const Location &start_loc, - const Location &end_loc, - const QString &source, - const QSet<QString> &metaCommandSet, - const QSet<QString> &topics); + Doc(const Location &start_loc, const Location &end_loc, const QString &source, + const QSet<QString> &metaCommandSet, const QSet<QString> &topics); Doc(const Doc &doc); ~Doc(); Doc &operator=(const Doc &doc); void simplifyEnumDoc(); void setBody(const Text &body); - const DitaRefList& ditamap() const; + const DitaRefList &ditamap() const; const Location &location() const; const Location &startLocation() const; @@ -172,8 +173,7 @@ public: static void trimCStyleComment(Location &location, QString &str); static QString resolveFile(const Location &location, const QString &fileName, QString *userFriendlyFilePath = nullptr); - static CodeMarker *quoteFromFile(const Location &location, - Quoter "er, + static CodeMarker *quoteFromFile(const Location &location, Quoter "er, const QString &fileName); static QString canonicalTitle(const QString &title); static const Config *config() { return config_; } |