From ada50151ca1345f381aa8844a284bc0d22dce208 Mon Sep 17 00:00:00 2001 From: Jukka Halonen Date: Mon, 20 Dec 2010 16:47:46 +0200 Subject: Changes: Coverity (UNINIT_CTOR) fixes CID#1420, 1421, 1422, 1423, 1424, 1425, 1426, 1431, 1432, 1433 RevBy: Stanislav Ionascu --- src/corelib/effects/core/mgraphicseffect.cpp | 3 ++- src/corelib/effects/mgraphicsclipeffect.cpp | 5 +++-- src/corelib/events/morientationtracker.cpp | 4 ++++ src/corelib/theme/mpixmaphandle.cpp | 4 +++- src/corelib/widgets/mwindow.cpp | 1 + src/views/mbannerview_p.h | 3 --- src/views/widgets/mlistheader.cpp | 3 ++- src/views/widgets/mlistindextooltip.cpp | 3 ++- tests/ft_mbutton/ft_mbutton.cpp | 1 + tests/ut_minputwidgetrelocator/ut_minputwidgetrelocator.cpp | 2 +- 10 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/corelib/effects/core/mgraphicseffect.cpp b/src/corelib/effects/core/mgraphicseffect.cpp index 58840957..18a5afff 100644 --- a/src/corelib/effects/core/mgraphicseffect.cpp +++ b/src/corelib/effects/core/mgraphicseffect.cpp @@ -22,7 +22,8 @@ #include "mgraphicseffect_p.h" MGraphicsEffectPrivate::MGraphicsEffectPrivate() - : styleContainer(NULL) + : q_ptr(0), + styleContainer(0) { } diff --git a/src/corelib/effects/mgraphicsclipeffect.cpp b/src/corelib/effects/mgraphicsclipeffect.cpp index 1759df7c..4dfaa264 100644 --- a/src/corelib/effects/mgraphicsclipeffect.cpp +++ b/src/corelib/effects/mgraphicsclipeffect.cpp @@ -23,8 +23,9 @@ #include MGraphicsClipEffectPrivate::MGraphicsClipEffectPrivate() - : drawRectangle(0, 0, 0, 0), - margin(0) + : q_ptr(0), + drawRectangle(0, 0, 0, 0), + margin(0) { } diff --git a/src/corelib/events/morientationtracker.cpp b/src/corelib/events/morientationtracker.cpp index e7728475..eddc937d 100644 --- a/src/corelib/events/morientationtracker.cpp +++ b/src/corelib/events/morientationtracker.cpp @@ -56,6 +56,10 @@ MOrientationTrackerPrivate::MOrientationTrackerPrivate(MOrientationTracker *cont , currentAppWindowHadXPropertyChangeMask(false) #endif //Q_WS_X11 , q_ptr(controller) +#ifdef Q_WS_X11 + , orientationAngleAtom(0) + , currentAppWindowAtom(0) +#endif //Q_WS_X11 { if (MComponentData::isOrientationForced()) { M::Orientation orientation = M::Landscape; diff --git a/src/corelib/theme/mpixmaphandle.cpp b/src/corelib/theme/mpixmaphandle.cpp index a6b9389d..0066cddd 100644 --- a/src/corelib/theme/mpixmaphandle.cpp +++ b/src/corelib/theme/mpixmaphandle.cpp @@ -3,7 +3,9 @@ MPixmapHandle::MPixmapHandle() : xHandle(0), eglHandle(0), - shmHandle(QString()) + shmHandle(QString()), + format(QImage::Format_Invalid), + numBytes(0) {} bool MPixmapHandle::isValid() const diff --git a/src/corelib/widgets/mwindow.cpp b/src/corelib/widgets/mwindow.cpp index 22164b8c..19d98339 100644 --- a/src/corelib/widgets/mwindow.cpp +++ b/src/corelib/widgets/mwindow.cpp @@ -73,6 +73,7 @@ namespace { /// Actual class MWindowPrivate::MWindowPrivate() : + glWidget(0), glContext(0), sceneManager(0), oldOrientation(M::Landscape), // the initial value is not used at all diff --git a/src/views/mbannerview_p.h b/src/views/mbannerview_p.h index a48e8279..0b567a47 100644 --- a/src/views/mbannerview_p.h +++ b/src/views/mbannerview_p.h @@ -60,9 +60,6 @@ public: void updateDateFormat() const; protected: - - int MBannerStyle; - MLayout * layout; MLinearLayoutPolicy *landscapePolicy; MLinearLayoutPolicy *portraitPolicy; diff --git a/src/views/widgets/mlistheader.cpp b/src/views/widgets/mlistheader.cpp index d5d32a06..039a37ad 100644 --- a/src/views/widgets/mlistheader.cpp +++ b/src/views/widgets/mlistheader.cpp @@ -25,7 +25,8 @@ #include MListHeaderPrivate::MListHeaderPrivate() - : layout(0), + : q_ptr(0), + layout(0), titleLabel(0) { } diff --git a/src/views/widgets/mlistindextooltip.cpp b/src/views/widgets/mlistindextooltip.cpp index 996bd344..3ee97591 100644 --- a/src/views/widgets/mlistindextooltip.cpp +++ b/src/views/widgets/mlistindextooltip.cpp @@ -29,7 +29,8 @@ #include MListIndexTooltipPrivate::MListIndexTooltipPrivate() - : layout(NULL), + : q_ptr(0), + layout(NULL), arrowOffset(0.0), arrowOffsetAnimation(NULL), snapAnimation(NULL), diff --git a/tests/ft_mbutton/ft_mbutton.cpp b/tests/ft_mbutton/ft_mbutton.cpp index f2838cd7..f964b83e 100644 --- a/tests/ft_mbutton/ft_mbutton.cpp +++ b/tests/ft_mbutton/ft_mbutton.cpp @@ -28,6 +28,7 @@ Ft_MButton::Ft_MButton() + : app(0) { } diff --git a/tests/ut_minputwidgetrelocator/ut_minputwidgetrelocator.cpp b/tests/ut_minputwidgetrelocator/ut_minputwidgetrelocator.cpp index e065965b..3c8d0684 100644 --- a/tests/ut_minputwidgetrelocator/ut_minputwidgetrelocator.cpp +++ b/tests/ut_minputwidgetrelocator/ut_minputwidgetrelocator.cpp @@ -349,7 +349,7 @@ void Ut_MInputWidgetRelocator::updateStubbedStyleValues(M::Orientation orientati // Stubbing MScrollChain MScrollChain::MScrollChain(const QGraphicsItem *, const QGraphicsItem *) - : scrollTarget(0) + : rootItem(0), scrollTarget(0) { } -- cgit v1.2.3