From 6687a82476a96922f23d4fd3535d4e7354d9cdab Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Mon, 17 Aug 2009 14:42:48 +0200 Subject: More coverity warnings removed --- src/corelib/io/qfileinfo_p.h | 4 ++-- src/gui/text/qtextobject.cpp | 10 ---------- src/gui/text/qtextobject_p.h | 2 +- src/gui/text/qtexttable_p.h | 2 +- src/svg/qsvgstyle.cpp | 4 +++- 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/corelib/io/qfileinfo_p.h b/src/corelib/io/qfileinfo_p.h index d64a5c4..d92090c 100644 --- a/src/corelib/io/qfileinfo_p.h +++ b/src/corelib/io/qfileinfo_p.h @@ -81,11 +81,11 @@ public: CachedSize =0x08 }; struct Data { inline Data() - : ref(1), fileEngine(0), cache_enabled(1) + : ref(1), fileEngine(0), cache_enabled(1), fileSize(0) { clear(); } inline Data(const Data ©) : ref(1), fileEngine(QAbstractFileEngine::create(copy.fileName)), - fileName(copy.fileName), cache_enabled(copy.cache_enabled) + fileName(copy.fileName), cache_enabled(copy.cache_enabled), fileSize(copy.fileSize) { clear(); } inline ~Data() { delete fileEngine; } inline void clearFlags() { 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..22034c8 100644 --- a/src/gui/text/qtextobject_p.h +++ b/src/gui/text/qtextobject_p.h @@ -94,7 +94,7 @@ 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); diff --git a/src/gui/text/qtexttable_p.h b/src/gui/text/qtexttable_p.h index 4dd52c7..7783b5d 100644 --- a/src/gui/text/qtexttable_p.h +++ b/src/gui/text/qtexttable_p.h @@ -62,7 +62,7 @@ class QTextTablePrivate : public QTextFramePrivate { Q_DECLARE_PUBLIC(QTextTable) public: - QTextTablePrivate(QTextDocument *document) : QTextFramePrivate(document), grid(0), nRows(0), dirty(true), blockFragmentUpdates(false) {} + QTextTablePrivate(QTextDocument *document) : QTextFramePrivate(document), grid(0), nRows(0), nCols(0), dirty(true), blockFragmentUpdates(false) {} ~QTextTablePrivate(); static QTextTable *createTable(QTextDocumentPrivate *, int pos, int rows, int cols, const QTextTableFormat &tableFormat); diff --git a/src/svg/qsvgstyle.cpp b/src/svg/qsvgstyle.cpp index 820f716..1ecf870 100644 --- a/src/svg/qsvgstyle.cpp +++ b/src/svg/qsvgstyle.cpp @@ -90,6 +90,7 @@ QSvgFillStyle::QSvgFillStyle(const QBrush &brush) , m_fillRule(Qt::WindingFill) , m_fillOpacitySet(false) , m_fillOpacity(1.0) + , m_oldOpacity(0) , m_gradientResolved(true) , m_fillSet(true) { @@ -101,6 +102,7 @@ QSvgFillStyle::QSvgFillStyle(QSvgStyleProperty *style) , m_fillRule(Qt::WindingFill) , m_fillOpacitySet(false) , m_fillOpacity(1.0) + , m_oldOpacity(0) , m_gradientResolved(true) , m_fillSet(style != 0) { @@ -858,7 +860,7 @@ QSvgStyleProperty::Type QSvgAnimateColor::type() const } QSvgOpacityStyle::QSvgOpacityStyle(qreal opacity) - : m_opacity(opacity) + : m_opacity(opacity), m_oldOpacity(0) { } -- cgit v0.12