on xenial help sign in
Fix uses of uninitialized values reported by valgrind.
94d749cAlbert Astals
plugins/Ubuntu/Gestures/Damper.h+2
@@ -24,6 +24,8 @@
24 */
24 */
25template <class Type> class Damper {
25template <class Type> class Damper {
26public:
26public:
27+ Damper() : m_value(0), m_maxDelta(0) { }
28+
27 // Maximum delta between the raw value and its dampened counterpart.
29 // Maximum delta between the raw value and its dampened counterpart.
28 void setMaxDelta(Type maxDelta) {
30 void setMaxDelta(Type maxDelta) {
29 if (maxDelta < 0) qFatal("Damper::maxDelta must be a positive number.");
31 if (maxDelta < 0) qFatal("Damper::maxDelta must be a positive number.");
tests/mocks/Ubuntu/Application/ApplicationInfo.cpp+1
@@ -23,6 +23,7 @@
23
23
24ApplicationInfo::ApplicationInfo(QObject *parent)
24ApplicationInfo::ApplicationInfo(QObject *parent)
25 : QObject(parent)
25 : QObject(parent)
26+ ,m_handle(0)
26 ,m_stage(MainStage)
27 ,m_stage(MainStage)
27 ,m_state(Starting)
28 ,m_state(Starting)
28 ,m_fullscreen(false)
29 ,m_fullscreen(false)