diff options
author | Keith Isdale <keith.isdale@nokia.com> | 2009-07-01 02:35:46 (GMT) |
---|---|---|
committer | Keith Isdale <keith.isdale@nokia.com> | 2009-08-24 05:28:07 (GMT) |
commit | fefd6e45962ac915fe9cd43b245642985c36b36d (patch) | |
tree | 4d0694fcb0720d493b7bb4995533865535c32675 /src/gui/text | |
parent | 6c282e096c160ef0426466042bf4bb4e0e28f0b2 (diff) | |
download | Qt-fefd6e45962ac915fe9cd43b245642985c36b36d.zip Qt-fefd6e45962ac915fe9cd43b245642985c36b36d.tar.gz Qt-fefd6e45962ac915fe9cd43b245642985c36b36d.tar.bz2 |
Make assorted constructors follow good coding practice
Ensure that class members are initialized
Moved some value assignment from constructor body into the the constructor's intializer list
Reviewed-by: Jason McDonald
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qtextobject.cpp | 10 | ||||
-rw-r--r-- | src/gui/text/qtextobject_p.h | 3 |
2 files changed, 2 insertions, 11 deletions
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp index 98c92eb..5dc0c48 100644 --- a/src/gui/text/qtextobject.cpp +++ b/src/gui/text/qtextobject.cpp @@ -412,11 +412,6 @@ QTextFrameLayoutData::~QTextFrameLayoutData() QTextFrame::QTextFrame(QTextDocument *doc) : QTextObject(*new QTextFramePrivate(doc), doc) { - Q_D(QTextFrame); - d->fragment_start = 0; - d->fragment_end = 0; - d->parentFrame = 0; - d->layoutData = 0; } // ### DOC: What does this do to child frames? @@ -435,11 +430,6 @@ QTextFrame::~QTextFrame() QTextFrame::QTextFrame(QTextFramePrivate &p, QTextDocument *doc) : QTextObject(p, doc) { - Q_D(QTextFrame); - d->fragment_start = 0; - d->fragment_end = 0; - d->parentFrame = 0; - d->layoutData = 0; } /*! diff --git a/src/gui/text/qtextobject_p.h b/src/gui/text/qtextobject_p.h index e862b30..0b78547 100644 --- a/src/gui/text/qtextobject_p.h +++ b/src/gui/text/qtextobject_p.h @@ -94,7 +94,8 @@ class QTextFramePrivate : public QTextObjectPrivate Q_DECLARE_PUBLIC(QTextFrame) public: QTextFramePrivate(QTextDocument *doc) - : QTextObjectPrivate(doc) + : QTextObjectPrivate(doc), fragment_start(0), fragment_end(0), + parentFrame(0), layoutData(0) { } virtual void fragmentAdded(const QChar &type, uint fragment); |