From: Montel Laurent Date: Thu, 30 May 2013 07:49:20 +0000 (+0200) Subject: Remove not necessary virtual keyword. Fix includes; fix indent X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=c0ce09e2c0f5a8237b30afb54d91f5ef271d9cc9;p=kdenlive Remove not necessary virtual keyword. Fix includes; fix indent --- diff --git a/src/commands/locktrackcommand.cpp b/src/commands/locktrackcommand.cpp index 8b35773b..1f334a9b 100644 --- a/src/commands/locktrackcommand.cpp +++ b/src/commands/locktrackcommand.cpp @@ -23,13 +23,15 @@ #include LockTrackCommand::LockTrackCommand(CustomTrackView *view, int ix, bool lock, QUndoCommand * parent) : - QUndoCommand(parent), - m_view(view), - m_ix(ix), - m_lock(lock) + QUndoCommand(parent), + m_view(view), + m_ix(ix), + m_lock(lock) { - if (lock) setText(i18n("Lock track")); - else setText(i18n("Unlock track")); + if (lock) + setText(i18n("Lock track")); + else + setText(i18n("Unlock track")); } diff --git a/src/commands/locktrackcommand.h b/src/commands/locktrackcommand.h index 1d17a634..468f077f 100644 --- a/src/commands/locktrackcommand.h +++ b/src/commands/locktrackcommand.h @@ -22,7 +22,6 @@ #define LOCKTRACKCOMMAND_H #include -#include class CustomTrackView; @@ -30,8 +29,8 @@ class LockTrackCommand : public QUndoCommand { public: LockTrackCommand(CustomTrackView *view, int ix, bool lock, QUndoCommand * parent = 0); - virtual void undo(); - virtual void redo(); + void undo(); + void redo(); private: CustomTrackView *m_view; diff --git a/src/commands/moveclipcommand.cpp b/src/commands/moveclipcommand.cpp index 1ab92312..b41ebf8c 100644 --- a/src/commands/moveclipcommand.cpp +++ b/src/commands/moveclipcommand.cpp @@ -24,19 +24,21 @@ #include -MoveClipCommand::MoveClipCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, QUndoCommand * parent) : - QUndoCommand(parent), - m_view(view), - m_startPos(start), - m_endPos(end), - m_doIt(doIt), - m_success(true) +MoveClipCommand::MoveClipCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, QUndoCommand * parent) + : QUndoCommand(parent), + m_view(view), + m_startPos(start), + m_endPos(end), + m_doIt(doIt), + m_success(true) { setText(i18n("Move clip")); if (parent) { // command has a parent, so there are several operations ongoing, do not refresh monitor m_refresh = false; - } else m_refresh = true; + } else { + m_refresh = true; + } } @@ -52,9 +54,9 @@ void MoveClipCommand::undo() void MoveClipCommand::redo() { if (m_doIt) { -// qDebug() << "Executing move clip command. End now:" << m_endPos; + // qDebug() << "Executing move clip command. End now:" << m_endPos; m_success = m_view->moveClip(m_startPos, m_endPos, m_refresh, &m_endPos); -// qDebug() << "Move clip command executed. End now: " << m_endPos; + // qDebug() << "Move clip command executed. End now: " << m_endPos; } m_doIt = true; } diff --git a/src/commands/moveclipcommand.h b/src/commands/moveclipcommand.h index 0159ad42..253ee067 100644 --- a/src/commands/moveclipcommand.h +++ b/src/commands/moveclipcommand.h @@ -32,8 +32,8 @@ class MoveClipCommand : public QUndoCommand { public: MoveClipCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, QUndoCommand * parent = 0); - virtual void undo(); - virtual void redo(); + void undo(); + void redo(); private: CustomTrackView *m_view; diff --git a/src/commands/moveeffectcommand.cpp b/src/commands/moveeffectcommand.cpp index e290ff2a..5be578e2 100644 --- a/src/commands/moveeffectcommand.cpp +++ b/src/commands/moveeffectcommand.cpp @@ -22,16 +22,17 @@ #include "customtrackview.h" #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; + m_newindex << newPos + i; } /* QString effectName; QDomElement namenode = effect.firstChildElement("name"); diff --git a/src/commands/moveeffectcommand.h b/src/commands/moveeffectcommand.h index ee86ffb2..47d17ded 100644 --- a/src/commands/moveeffectcommand.h +++ b/src/commands/moveeffectcommand.h @@ -22,9 +22,7 @@ #define MOVEEFFECTCOMMAND_H #include -#include #include -#include class CustomTrackView; @@ -35,8 +33,8 @@ public: virtual int id() const; virtual bool mergeWith(const QUndoCommand * command); - virtual void undo(); - virtual void redo(); + void undo(); + void redo(); private: CustomTrackView *m_view; diff --git a/src/commands/movegroupcommand.cpp b/src/commands/movegroupcommand.cpp index efc0f3e8..651a602d 100644 --- a/src/commands/movegroupcommand.cpp +++ b/src/commands/movegroupcommand.cpp @@ -24,13 +24,13 @@ #include MoveGroupCommand::MoveGroupCommand(CustomTrackView *view, const QList &startClip, const QList &startTransition, const GenTime &offset, const int trackOffset, bool doIt, QUndoCommand * parent) : - QUndoCommand(parent), - m_view(view), - m_startClip(startClip), - m_startTransition(startTransition), - m_offset(offset), - m_trackOffset(trackOffset), - m_doIt(doIt) + QUndoCommand(parent), + m_view(view), + m_startClip(startClip), + m_startTransition(startTransition), + m_offset(offset), + m_trackOffset(trackOffset), + m_doIt(doIt) { setText(i18n("Move group")); } @@ -39,7 +39,7 @@ MoveGroupCommand::MoveGroupCommand(CustomTrackView *view, const QList // virtual void MoveGroupCommand::undo() { -// kDebug()<<"---- undoing action"; + // kDebug()<<"---- undoing action"; m_doIt = true; m_view->moveGroup(m_startClip, m_startTransition, GenTime() - m_offset, - m_trackOffset, true); } diff --git a/src/commands/movegroupcommand.h b/src/commands/movegroupcommand.h index c2df2644..377712bd 100644 --- a/src/commands/movegroupcommand.h +++ b/src/commands/movegroupcommand.h @@ -31,8 +31,8 @@ class MoveGroupCommand : public QUndoCommand { public: MoveGroupCommand(CustomTrackView *view, const QList &startClip, const QList &startTransition, const GenTime &offset, const int trackOffset, bool doIt, QUndoCommand * parent = 0); - virtual void undo(); - virtual void redo(); + void undo(); + void redo(); private: CustomTrackView *m_view; diff --git a/src/commands/movetransitioncommand.cpp b/src/commands/movetransitioncommand.cpp index 629110f6..2a24d2f6 100644 --- a/src/commands/movetransitioncommand.cpp +++ b/src/commands/movetransitioncommand.cpp @@ -21,11 +21,11 @@ #include MoveTransitionCommand::MoveTransitionCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, QUndoCommand * parent) : - QUndoCommand(parent), - m_view(view), - m_startPos(start), - m_endPos(end), - m_doIt(doIt) + QUndoCommand(parent), + m_view(view), + m_startPos(start), + m_endPos(end), + m_doIt(doIt) { setText(i18n("Move transition")); if (parent) { @@ -38,7 +38,7 @@ MoveTransitionCommand::MoveTransitionCommand(CustomTrackView *view, const ItemIn // virtual void MoveTransitionCommand::undo() { -// kDebug()<<"---- undoing action"; + // kDebug()<<"---- undoing action"; m_doIt = true; m_view->moveTransition(m_endPos, m_startPos, m_refresh); } @@ -46,7 +46,8 @@ void MoveTransitionCommand::undo() void MoveTransitionCommand::redo() { //kDebug() << "---- redoing action"; - if (m_doIt) m_view->moveTransition(m_startPos, m_endPos, m_refresh); + if (m_doIt) + m_view->moveTransition(m_startPos, m_endPos, m_refresh); m_doIt = true; } diff --git a/src/commands/movetransitioncommand.h b/src/commands/movetransitioncommand.h index 42f1967f..8b5e7641 100644 --- a/src/commands/movetransitioncommand.h +++ b/src/commands/movetransitioncommand.h @@ -28,8 +28,8 @@ class MoveTransitionCommand : public QUndoCommand { public: MoveTransitionCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, QUndoCommand * parent = 0); - virtual void undo(); - virtual void redo(); + void undo(); + void redo(); private: CustomTrackView *m_view; diff --git a/src/commands/razorclipcommand.cpp b/src/commands/razorclipcommand.cpp index 07af951c..8abf0647 100644 --- a/src/commands/razorclipcommand.cpp +++ b/src/commands/razorclipcommand.cpp @@ -24,11 +24,11 @@ #include RazorClipCommand::RazorClipCommand(CustomTrackView *view, const ItemInfo &info, EffectsList stack, const GenTime &cutTime, bool doIt, QUndoCommand * parent) : - QUndoCommand(parent), - m_view(view), - m_info(info), - m_cutTime(cutTime), - m_doIt(doIt) + QUndoCommand(parent), + m_view(view), + m_info(info), + m_cutTime(cutTime), + m_doIt(doIt) { m_originalStack.clone(stack); setText(i18n("Razor clip")); @@ -45,7 +45,7 @@ void RazorClipCommand::redo() { // kDebug() << "---- redoing action cut: " << m_cutTime.frames(25); if (m_doIt) { - m_view->cutClip(m_info, m_cutTime, true); + m_view->cutClip(m_info, m_cutTime, true); } m_doIt = true; } diff --git a/src/commands/razorclipcommand.h b/src/commands/razorclipcommand.h index 1f01cd20..c595ff7f 100644 --- a/src/commands/razorclipcommand.h +++ b/src/commands/razorclipcommand.h @@ -34,8 +34,8 @@ class RazorClipCommand : public QUndoCommand { public: RazorClipCommand(CustomTrackView *view, const ItemInfo &info, EffectsList stack, const GenTime &cutTime, bool doIt = true, QUndoCommand * parent = 0); - virtual void undo(); - virtual void redo(); + void undo(); + void redo(); private: CustomTrackView *m_view; diff --git a/src/commands/rebuildgroupcommand.cpp b/src/commands/rebuildgroupcommand.cpp index a80b2f4e..5d2b4e5c 100644 --- a/src/commands/rebuildgroupcommand.cpp +++ b/src/commands/rebuildgroupcommand.cpp @@ -22,10 +22,10 @@ #include "customtrackview.h" RebuildGroupCommand::RebuildGroupCommand(CustomTrackView* view, int childTrack, const GenTime &childPos, QUndoCommand* parent) : - QUndoCommand(parent), - m_view(view), - m_childTrack(childTrack), - m_childPos(childPos) + QUndoCommand(parent), + m_view(view), + m_childTrack(childTrack), + m_childPos(childPos) { setText(i18n("Rebuild Group")); } diff --git a/src/commands/rebuildgroupcommand.h b/src/commands/rebuildgroupcommand.h index dbc80ef8..e9d864cd 100644 --- a/src/commands/rebuildgroupcommand.h +++ b/src/commands/rebuildgroupcommand.h @@ -30,8 +30,8 @@ class RebuildGroupCommand : public QUndoCommand { public: RebuildGroupCommand(CustomTrackView *view, int childTrack, const GenTime &childPos, QUndoCommand* parent = 0); - virtual void undo(); - virtual void redo(); + void undo(); + void redo(); private: CustomTrackView *m_view; diff --git a/src/commands/refreshmonitorcommand.cpp b/src/commands/refreshmonitorcommand.cpp index 384c79d6..f0391dee 100644 --- a/src/commands/refreshmonitorcommand.cpp +++ b/src/commands/refreshmonitorcommand.cpp @@ -23,10 +23,10 @@ RefreshMonitorCommand::RefreshMonitorCommand(CustomTrackView *view, bool execute, bool refreshOnUndo, QUndoCommand * parent) : - QUndoCommand(parent), - m_view(view), - m_exec(execute), - m_execOnUndo(refreshOnUndo) + QUndoCommand(parent), + m_view(view), + m_exec(execute), + m_execOnUndo(refreshOnUndo) { } @@ -34,13 +34,14 @@ RefreshMonitorCommand::RefreshMonitorCommand(CustomTrackView *view, bool execute // virtual void RefreshMonitorCommand::undo() { - if (m_execOnUndo) m_view->monitorRefresh(); + if (m_execOnUndo) + m_view->monitorRefresh(); } // virtual void RefreshMonitorCommand::redo() { if (m_exec && !m_execOnUndo) - m_view->monitorRefresh(); + m_view->monitorRefresh(); m_exec = true; } diff --git a/src/commands/refreshmonitorcommand.h b/src/commands/refreshmonitorcommand.h index 111daa42..14755a2d 100644 --- a/src/commands/refreshmonitorcommand.h +++ b/src/commands/refreshmonitorcommand.h @@ -29,8 +29,8 @@ class RefreshMonitorCommand : public QUndoCommand { public: RefreshMonitorCommand(CustomTrackView *view, bool execute, bool refreshOnUndo, QUndoCommand * parent = 0); - virtual void undo(); - virtual void redo(); + void undo(); + void redo(); private: CustomTrackView *m_view; diff --git a/src/commands/resizeclipcommand.cpp b/src/commands/resizeclipcommand.cpp index a0103c06..aef17634 100644 --- a/src/commands/resizeclipcommand.cpp +++ b/src/commands/resizeclipcommand.cpp @@ -24,12 +24,12 @@ #include ResizeClipCommand::ResizeClipCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, bool dontWorry, QUndoCommand * parent) : - QUndoCommand(parent), - m_view(view), - m_startPos(start), - m_endPos(end), - m_doIt(doIt), - m_dontWorry(dontWorry) + QUndoCommand(parent), + m_view(view), + m_startPos(start), + m_endPos(end), + m_doIt(doIt), + m_dontWorry(dontWorry) { setText(i18n("Resize clip")); } @@ -43,7 +43,7 @@ void ResizeClipCommand::undo() void ResizeClipCommand::redo() { if (m_doIt) { - m_view->resizeClip(m_startPos, m_endPos, m_dontWorry); + m_view->resizeClip(m_startPos, m_endPos, m_dontWorry); } m_doIt = true; } diff --git a/src/commands/resizeclipcommand.h b/src/commands/resizeclipcommand.h index 9e326e0f..386c6022 100644 --- a/src/commands/resizeclipcommand.h +++ b/src/commands/resizeclipcommand.h @@ -22,10 +22,6 @@ #define RESIZECLIPCOMMAND_H #include -#include -#include - -#include #include "definitions.h" @@ -35,8 +31,8 @@ class ResizeClipCommand : public QUndoCommand { public: ResizeClipCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, bool dontWorry, QUndoCommand * parent = 0); - virtual void undo(); - virtual void redo(); + void undo(); + void redo(); private: CustomTrackView *m_view; diff --git a/src/commands/splitaudiocommand.cpp b/src/commands/splitaudiocommand.cpp index e2507e63..ee259136 100644 --- a/src/commands/splitaudiocommand.cpp +++ b/src/commands/splitaudiocommand.cpp @@ -24,11 +24,11 @@ #include SplitAudioCommand::SplitAudioCommand(CustomTrackView *view, const int track, const GenTime &pos, const EffectsList &effects, QUndoCommand * parent) : - QUndoCommand(parent), - m_view(view), - m_pos(pos), - m_track(track), - m_effects(effects) + QUndoCommand(parent), + m_view(view), + m_pos(pos), + m_track(track), + m_effects(effects) { setText(i18n("Split audio")); } diff --git a/src/commands/splitaudiocommand.h b/src/commands/splitaudiocommand.h index b0eb0d38..5773799b 100644 --- a/src/commands/splitaudiocommand.h +++ b/src/commands/splitaudiocommand.h @@ -22,10 +22,7 @@ #define SPLITAUDIOCOMMAND_H #include -#include -#include -#include #include "definitions.h" class GenTime; @@ -35,8 +32,8 @@ class SplitAudioCommand : public QUndoCommand { public: SplitAudioCommand(CustomTrackView *view, const int track, const GenTime &pos, const EffectsList &effects, QUndoCommand * parent = 0); - virtual void undo(); - virtual void redo(); + void undo(); + void redo(); private: CustomTrackView *m_view;