diff options
author | Axel Waggershauser <awagger@gmail.com> | 2013-03-15 00:42:15 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-16 20:22:50 +0100 |
commit | b11317a64339f5a4bcffc8234ecaf15c7fb416f2 (patch) | |
tree | f81e40ee49f5109b4100048d131d5bb922b448aa /util/lexgen/generator.h | |
parent | 72367a94a750355eb748793ce8c365373a332c9c (diff) |
Whitespace cleanup: remove trailing whitespace
Remove all trailing whitespace from the following list of files:
*.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README
excluding 3rdparty, test-data and auto generated code.
Note A): the only non 3rdparty c++-files that still
have trailing whitespace after this change are:
* src/corelib/codecs/cp949codetbl_p.h
* src/corelib/codecs/qjpunicode.cpp
* src/corelib/codecs/qbig5codec.cpp
* src/corelib/xml/qxmlstream_p.h
* src/tools/qdoc/qmlparser/qqmljsgrammar.cpp
* src/tools/uic/ui4.cpp
* tests/auto/other/qtokenautomaton/tokenizers/*
* tests/benchmarks/corelib/tools/qstring/data.cpp
* util/lexgen/tokenizer.cpp
Note B): in about 30 files some overlapping 'leading tab' and
'TAB character in non-leading whitespace' issues have been fixed
to make the sanity bot happy. Plus some general ws-fixes here
and there as asked for during review.
Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'util/lexgen/generator.h')
-rw-r--r-- | util/lexgen/generator.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/util/lexgen/generator.h b/util/lexgen/generator.h index 7037f13018..c56ee20756 100644 --- a/util/lexgen/generator.h +++ b/util/lexgen/generator.h @@ -82,11 +82,11 @@ public: delete shared; } } - + template <typename T> LineStream &operator<<(const T &value) { (*shared->stream) << value; return *this; } - + SharedStream *shared; }; @@ -101,11 +101,11 @@ public: template <typename T> LineStream operator<<(const T &value) { stream << indentStr; stream << value; return LineStream(&stream); } - + inline void addNewLine() { stream << endl; } - + inline QString toString() const { stream.flush(); return output; } - + private: QString output; mutable QTextStream stream; @@ -121,20 +121,20 @@ public: inline void setName(const QString &name) { fname = name; } inline QString name() const { return fname; } - + inline void setInline(bool i) { iline = i; } inline bool isInline() const { return iline; } - + inline void setReturnType(const QString &type) { rtype = type; } inline QString returnType() const { return rtype; } - + inline void addBody(const QString &_body) { body += _body; } inline void addBody(const CodeBlock &block) { body += block.toString(); } inline bool hasBody() const { return !body.isEmpty(); } - + inline void setConst(bool konst) { cnst = konst; } inline bool isConst() const { return cnst; } - + void printDeclaration(CodeBlock &block, const QString &funcNamePrefix = QString()) const; QString definition() const; @@ -157,19 +157,19 @@ public: inline void setName(const QString &name) { cname = name; } inline QString name() const { return cname; } - + inline void addMember(Access access, const QString &name) { sections[access].variables.append(name); } inline void addMember(Access access, const Function &func) { sections[access].functions.append(func); } - + void addConstructor(Access access, const QString &body, const QString &args = QString()); inline void addConstructor(Access access, const CodeBlock &body, const QString &args = QString()) { addConstructor(access, body.toString(), args); } - + QString declaration() const; QString definition() const; - + private: QString cname; struct Section @@ -177,10 +177,10 @@ private: QVector<Function> functions; QStringList variables; QVector<Function> constructors; - + inline bool isEmpty() const { return functions.isEmpty() && variables.isEmpty() && constructors.isEmpty(); } - + void printDeclaration(const Class *klass, CodeBlock &block) const; QString definition(const Class *klass) const; }; @@ -192,9 +192,9 @@ class Generator { public: Generator(const DFA &dfa, const Config &config); - + QString generate(); - + private: void generateTransitions(CodeBlock &body, const TransitionMap &transitions); bool isSingleReferencedFinalState(int i) const; |