diff options
Diffstat (limited to 'src/qdoc/codechunk.h')
-rw-r--r-- | src/qdoc/codechunk.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qdoc/codechunk.h b/src/qdoc/codechunk.h index e7f103fa3..3889d2854 100644 --- a/src/qdoc/codechunk.h +++ b/src/qdoc/codechunk.h @@ -64,15 +64,15 @@ QT_BEGIN_NAMESPACE class CodeChunk { public: - CodeChunk(); - CodeChunk( const QString& str ); + CodeChunk() : hotspot(-1) {} + CodeChunk(const QString& str) : s(str), hotspot(-1) {} void append( const QString& lexeme ); - void appendHotspot(); + void appendHotspot() { if (hotspot == -1) hotspot = s.length(); } bool isEmpty() const { return s.isEmpty(); } void clear() { s.clear(); } - QString toString() const; + QString toString() const { return s; } QStringList toPath() const; QString left() const { return s.left(hotspot == -1 ? s.length() : hotspot); } QString right() const { return s.mid(hotspot == -1 ? s.length() : hotspot); } |