Ticket #7162: programs_mythfrontend-uninit

File programs_mythfrontend-uninit, 1.7 KB (added by Erik Hovland <erik@…>, 15 years ago)

Initialize variables in mythfrontend

Line 
1Deal with initialization defects (especially in ctors).
2
3From: Erik Hovland <erik@hovland.org>
4
5
6---
7
8 mythtv/programs/mythfrontend/manualschedule.cpp |    5 +++--
9 mythtv/programs/mythfrontend/manualschedule.h   |    4 ++--
10 2 files changed, 5 insertions(+), 4 deletions(-)
11
12
13diff --git a/mythtv/programs/mythfrontend/manualschedule.cpp b/mythtv/programs/mythfrontend/manualschedule.cpp
14index c76d7fb..4e2a5ab 100644
15--- a/mythtv/programs/mythfrontend/manualschedule.cpp
16+++ b/mythtv/programs/mythfrontend/manualschedule.cpp
17@@ -35,6 +35,7 @@ ManualSchedule::ManualSchedule(MythScreenStack *parent)
18     m_dateformat = gContext->GetSetting("DateFormat", "ddd MMMM d");
19     m_timeformat = gContext->GetSetting("TimeFormat", "h:mm AP");
20 
21+    m_daysahead = 0;
22     m_title = NULL;
23     m_channel = NULL;
24     m_recordButton = m_cancelButton = NULL;
25@@ -170,8 +171,8 @@ void ManualSchedule::minuteRollover(void)
26 void ManualSchedule::dateChanged(void)
27 {
28     disconnectSignals();
29-    daysahead = m_startdate->GetCurrentPos();
30-    m_startDateTime.setDate(m_nowDateTime.addDays(daysahead).date());
31+    m_daysahead = m_startdate->GetIntValue();
32+    m_startDateTime.setDate(m_nowDateTime.addDays(m_daysahead).date());
33 
34     int hr = m_starthour->GetIntValue();
35     int min = m_startminute->GetIntValue();
36diff --git a/mythtv/programs/mythfrontend/manualschedule.h b/mythtv/programs/mythfrontend/manualschedule.h
37index cfea4c8..0603699 100644
38--- a/mythtv/programs/mythfrontend/manualschedule.h
39+++ b/mythtv/programs/mythfrontend/manualschedule.h
40@@ -34,8 +34,8 @@ class ManualSchedule : public MythScreenType
41   private:
42     void connectSignals();
43     void disconnectSignals();
44-    int daysahead;
45-    int prev_weekday;
46+
47+    int m_daysahead;
48 
49     QStringList m_chanids;
50