X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fcommands%2Fmoveeffectcommand.cpp;h=4d34cd0eadf5a5d2dbfd9511f4e2a1653ec0f617;hb=5d4746e4c3e8665de83e6d281dcd08a46cd22c31;hp=ba394793b0ac2aefb9d047240fc0758d3fb6dcd8;hpb=f4699aef75ea62acb69ad499317493facdef04df;p=kdenlive diff --git a/src/commands/moveeffectcommand.cpp b/src/commands/moveeffectcommand.cpp index ba394793..4d34cd0e 100644 --- a/src/commands/moveeffectcommand.cpp +++ b/src/commands/moveeffectcommand.cpp @@ -21,17 +21,18 @@ #include "moveeffectcommand.h" #include "customtrackview.h" -#include +#include +#include MoveEffectCommand::MoveEffectCommand(CustomTrackView *view, const int track, const GenTime &pos, const QList &oldPos, int newPos, QUndoCommand * parent) : - QUndoCommand(parent), - m_view(view), - m_track(track), - m_oldindex(oldPos), - m_pos(pos) + QUndoCommand(parent), + m_view(view), + m_track(track), + m_oldindex(oldPos), + m_pos(pos) { - for (int i = 0; i < m_oldindex.count(); i++) { - m_newindex << newPos + i; + for (int i = 0; i < m_oldindex.count(); ++i) { + m_newindex << newPos + i; } /* QString effectName; QDomElement namenode = effect.firstChildElement("name"); @@ -51,12 +52,14 @@ int MoveEffectCommand::id() const bool MoveEffectCommand::mergeWith(const QUndoCommand * other) { return false; + /* dead code (flaged by coverity), was removed to avoid crash when dropping on group if (other->id() != id()) return false; if (m_track != static_cast(other)->m_track) return false; if (m_pos != static_cast(other)->m_pos) return false; m_oldindex = static_cast(other)->m_oldindex; m_newindex = static_cast(other)->m_newindex; return true; + */ } // virtual