[Kdenlive-devel] [PATCH 13/14] definitions.h: initialize TrackInfo

Mikko Rapeli mikko.rapeli at iki.fi
Sun Jul 22 18:28:21 UTC 2012


Just in case someone uses the class/struct without setting all of the
variables.
---
 src/definitions.h |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/definitions.h b/src/definitions.h
index a48306e..3d8ce6a 100644
--- a/src/definitions.h
+++ b/src/definitions.h
@@ -70,7 +70,8 @@ enum TRACKTYPE { AUDIOTRACK = 0, VIDEOTRACK = 1 };
 
 enum CLIPJOBSTATUS { NOJOB = 0, JOBWAITING = -1, JOBWORKING = -2, JOBDONE = -3, JOBCRASHED = -4, JOBABORTED = -5};
 
-struct TrackInfo {
+class TrackInfo {
+public:
     TRACKTYPE type;
     QString trackName;
     bool isMute;
@@ -78,6 +79,12 @@ struct TrackInfo {
     bool isLocked;
     EffectsList effectsList;
     int duration;
+    TrackInfo() :
+        type(VIDEOTRACK),
+        isMute(0),
+        isBlind(0),
+        isLocked(0),
+        duration(0) {};
 };
 
 typedef QMap<QString, QString> stringMap;
-- 
1.7.10.4





More information about the Kdenlive mailing list