Fix uses of uninitialized values reported by valgrind
commitb45756c0a1f977397c8747d58803774417f6ad92
authorAlbert Astals <albert.astals@canonical.com>
dateTue 6 Aug 2013, 15:18 (13 years ago)
parent66bebdd
plugins/Ubuntu/Gestures/Damper.h+2
@@ -24,6 +24,8 @@
2424 */
2525template <class Type> class Damper {
2626public:
27+ Damper() : m_value(0), m_maxDelta(0) { }
28+
2729 // Maximum delta between the raw value and its dampened counterpart.
2830 void setMaxDelta(Type maxDelta) {
2931 if (maxDelta < 0) qFatal("Damper::maxDelta must be a positive number.");
tests/mocks/Ubuntu/Application/ApplicationInfo.cpp+1
@@ -23,6 +23,7 @@
2323
2424ApplicationInfo::ApplicationInfo(QObject *parent)
2525 : QObject(parent)
26+ ,m_handle(0)
2627 ,m_stage(MainStage)
2728 ,m_state(Starting)
2829 ,m_fullscreen(false)