[Kdenlive-devel] [RFC] m_doIt member variable in QUndoCommand subclasses

Ray Lehtiniemi rayl at mail.com
Sat Apr 4 17:25:00 UTC 2009

hi all

i've been looking at the m_doIt variable in the command objects.  it seems 
that we can partition these classes into three types:

 a - the m_doIt variable serves an obvious purpose
 b - the m_doIt variable serves no purpose whatsoever
 c - the m_doIt variable seems useless, but actually appears to
     be working around some kind of bug elsewhere in the system

an example of type a would be AddClipCommand, where the variable performs an 
obvious function in the undo() and redo() methods.

an example of type b would be RazorClipCommand. the variable serves no 
apparent purpose in the undo()/redo() methods, and removing it seems to work 
just fine.

an example of type c would be AddTimelineClipCommand, where the variable 
appears to be useless inside the redo() command, but removing it actually 
causes the application to break. in this case, adding a clip actually causes 
two clips to be added.

i have pushed two branches to git for comment:

  - rayl/rfc-doit-1 contains all the type b commands
  - rayl/rfc-doit-2 contains all the type c commands

does anybody have a problem with me killing the m_doIt variable for all type b 
commands?  can anyone explain the purpose of m_doIt in the type c commands?


More information about the Kdenlive mailing list