From 8fc4ca35f2a709a30a91fbaf170980fc6d13ce03 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Thu, 30 May 2013 09:21:57 +0200 Subject: [PATCH] Fix includes/remove not necessary virtual keyword. Fix indent --- src/commands/addtrackcommand.cpp | 20 +++++++++++------- src/commands/addtrackcommand.h | 8 ++------ src/commands/addtransitioncommand.cpp | 23 ++++++++++++++------- src/commands/addtransitioncommand.h | 7 ++----- src/commands/changecliptypecommand.cpp | 1 + src/commands/changecliptypecommand.h | 8 ++------ src/commands/changeeffectstatecommand.cpp | 25 ++++++++++++----------- src/commands/changeeffectstatecommand.h | 6 ++---- src/commands/changespeedcommand.h | 6 ++---- src/commands/configtrackscommand.h | 6 ++---- src/commands/editclipcommand.cpp | 4 +++- src/commands/editclipcommand.h | 7 +++---- 12 files changed, 61 insertions(+), 60 deletions(-) diff --git a/src/commands/addtrackcommand.cpp b/src/commands/addtrackcommand.cpp index 135139f5..f36d220c 100644 --- a/src/commands/addtrackcommand.cpp +++ b/src/commands/addtrackcommand.cpp @@ -22,7 +22,7 @@ #include "customtrackview.h" #include - +#include AddTrackCommand::AddTrackCommand(CustomTrackView *view, int ix, const TrackInfo &info, bool addTrack, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), @@ -30,8 +30,10 @@ AddTrackCommand::AddTrackCommand(CustomTrackView *view, int ix, const TrackInfo m_addTrack(addTrack), m_info(info) { - if (addTrack) setText(i18n("Add track")); - else setText(i18n("Delete track")); + if (addTrack) + setText(i18n("Add track")); + else + setText(i18n("Delete track")); } @@ -39,14 +41,18 @@ AddTrackCommand::AddTrackCommand(CustomTrackView *view, int ix, const TrackInfo void AddTrackCommand::undo() { // kDebug()<<"---- undoing action"; - if (m_addTrack) m_view->removeTrack(m_ix); - else m_view->addTrack(m_info, m_ix); + if (m_addTrack) + m_view->removeTrack(m_ix); + else + m_view->addTrack(m_info, m_ix); } // virtual void AddTrackCommand::redo() { kDebug() << "---- redoing action"; - if (m_addTrack) m_view->addTrack(m_info, m_ix); - else m_view->removeTrack(m_ix); + if (m_addTrack) + m_view->addTrack(m_info, m_ix); + else + m_view->removeTrack(m_ix); } diff --git a/src/commands/addtrackcommand.h b/src/commands/addtrackcommand.h index acb4f480..3e36dbd1 100644 --- a/src/commands/addtrackcommand.h +++ b/src/commands/addtrackcommand.h @@ -22,10 +22,6 @@ #define ADDTRACKCOMMAND_H #include -#include -#include - -#include #include "definitions.h" class CustomTrackView; @@ -34,8 +30,8 @@ class AddTrackCommand : public QUndoCommand { public: AddTrackCommand(CustomTrackView *view, int ix, const TrackInfo &info, bool addTrack, QUndoCommand * parent = 0); - virtual void undo(); - virtual void redo(); + void undo(); + void redo(); private: CustomTrackView *m_view; diff --git a/src/commands/addtransitioncommand.cpp b/src/commands/addtransitioncommand.cpp index 6e372bb2..8a8002f2 100644 --- a/src/commands/addtransitioncommand.cpp +++ b/src/commands/addtransitioncommand.cpp @@ -30,27 +30,36 @@ AddTransitionCommand::AddTransitionCommand(CustomTrackView *view, const ItemInfo m_doIt(doIt), m_remove(remove) { - if (m_remove) setText(i18n("Delete transition from clip")); - else setText(i18n("Add transition to clip")); + if (m_remove) + setText(i18n("Delete transition from clip")); + else + setText(i18n("Add transition to 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; + } } // virtual void AddTransitionCommand::undo() { - if (m_remove) m_view->addTransition(m_info, m_track, m_params, m_refresh); - else m_view->deleteTransition(m_info, m_track, m_params, m_refresh); + if (m_remove) + m_view->addTransition(m_info, m_track, m_params, m_refresh); + else + m_view->deleteTransition(m_info, m_track, m_params, m_refresh); } // virtual void AddTransitionCommand::redo() { if (m_doIt) { - if (m_remove) m_view->deleteTransition(m_info, m_track, m_params, m_refresh); - else m_view->addTransition(m_info, m_track, m_params, m_refresh); + if (m_remove) + m_view->deleteTransition(m_info, m_track, m_params, m_refresh); + else + m_view->addTransition(m_info, m_track, m_params, m_refresh); } m_doIt = true; } diff --git a/src/commands/addtransitioncommand.h b/src/commands/addtransitioncommand.h index 5531b79c..b24da3b3 100644 --- a/src/commands/addtransitioncommand.h +++ b/src/commands/addtransitioncommand.h @@ -19,10 +19,7 @@ #define ADDTRANSITIONCOMMAND_H #include -#include -#include #include -#include #include "gentime.h" #include "definitions.h" @@ -33,8 +30,8 @@ class AddTransitionCommand : public QUndoCommand { public: AddTransitionCommand(CustomTrackView *view, const ItemInfo &info, int transitiontrack, const QDomElement ¶ms, bool remove, bool doIt, QUndoCommand * parent = 0); - virtual void undo(); - virtual void redo(); + void undo(); + void redo(); private: CustomTrackView *m_view; diff --git a/src/commands/changecliptypecommand.cpp b/src/commands/changecliptypecommand.cpp index 5df821af..61932cca 100644 --- a/src/commands/changecliptypecommand.cpp +++ b/src/commands/changecliptypecommand.cpp @@ -22,6 +22,7 @@ #include "customtrackview.h" #include +#include ChangeClipTypeCommand::ChangeClipTypeCommand(CustomTrackView *view, const int track, const GenTime &pos, bool videoOnly, bool audioOnly, bool originalVideo, bool originalAudio, QUndoCommand * parent) : QUndoCommand(parent), diff --git a/src/commands/changecliptypecommand.h b/src/commands/changecliptypecommand.h index c9cc82cb..98eb484e 100644 --- a/src/commands/changecliptypecommand.h +++ b/src/commands/changecliptypecommand.h @@ -22,10 +22,6 @@ #define CHANGECLIPTYPECOMMAND_H #include -#include -#include - -#include #include "definitions.h" class GenTime; @@ -35,8 +31,8 @@ class ChangeClipTypeCommand : public QUndoCommand { public: ChangeClipTypeCommand(CustomTrackView *view, const int track, const GenTime &pos, bool videoOnly, bool audioOnly, bool originalVideo, bool originalAudio, QUndoCommand * parent = 0); - virtual void undo(); - virtual void redo(); + void undo(); + void redo(); private: CustomTrackView *m_view; diff --git a/src/commands/changeeffectstatecommand.cpp b/src/commands/changeeffectstatecommand.cpp index 49269f84..adf7884a 100644 --- a/src/commands/changeeffectstatecommand.cpp +++ b/src/commands/changeeffectstatecommand.cpp @@ -24,19 +24,19 @@ #include ChangeEffectStateCommand::ChangeEffectStateCommand(CustomTrackView *view, const int track, const GenTime& pos, const QList & effectIndexes, bool disable, bool refreshEffectStack, bool doIt, QUndoCommand *parent) : - QUndoCommand(parent), - m_view(view), - m_track(track), - m_effectIndexes(effectIndexes), - m_pos(pos), - m_disable(disable), - m_doIt(doIt), - m_refreshEffectStack(refreshEffectStack) + QUndoCommand(parent), + m_view(view), + m_track(track), + m_effectIndexes(effectIndexes), + m_pos(pos), + m_disable(disable), + m_doIt(doIt), + m_refreshEffectStack(refreshEffectStack) { - if (disable) - setText(i18np("Disable effect", "Disable effects", effectIndexes.count())); + if (disable) + setText(i18np("Disable effect", "Disable effects", effectIndexes.count())); else - setText(i18np("Enable effect", "Enable effects", effectIndexes.count())); + setText(i18np("Enable effect", "Enable effects", effectIndexes.count())); } // virtual @@ -47,7 +47,8 @@ void ChangeEffectStateCommand::undo() // virtual void ChangeEffectStateCommand::redo() { - if (m_doIt) m_view->updateEffectState(m_track, m_pos, m_effectIndexes, m_disable, m_refreshEffectStack); + if (m_doIt) + m_view->updateEffectState(m_track, m_pos, m_effectIndexes, m_disable, m_refreshEffectStack); m_doIt = true; m_refreshEffectStack = true; } diff --git a/src/commands/changeeffectstatecommand.h b/src/commands/changeeffectstatecommand.h index f92517be..6dd60e2a 100644 --- a/src/commands/changeeffectstatecommand.h +++ b/src/commands/changeeffectstatecommand.h @@ -22,9 +22,7 @@ #define CHANGEEFFECTSTATECOMMAND_H #include -#include #include -#include class CustomTrackView; @@ -33,8 +31,8 @@ class ChangeEffectStateCommand : public QUndoCommand public: ChangeEffectStateCommand(CustomTrackView *view, const int track, const GenTime &pos, const QList & effectIndexes, bool disable, bool refreshEffectStack, bool doIt, QUndoCommand *parent = 0); - virtual void undo(); - virtual void redo(); + void undo(); + void redo(); private: CustomTrackView *m_view; diff --git a/src/commands/changespeedcommand.h b/src/commands/changespeedcommand.h index 4640f15f..e45f8a80 100644 --- a/src/commands/changespeedcommand.h +++ b/src/commands/changespeedcommand.h @@ -22,8 +22,6 @@ #define CHANGESPEEDCOMMAND_H #include -#include -#include #include "gentime.h" #include "definitions.h" @@ -34,8 +32,8 @@ class ChangeSpeedCommand : public QUndoCommand { public: ChangeSpeedCommand(CustomTrackView *view, const ItemInfo &info, const ItemInfo &speedIndependantInfo, double old_speed, double new_speed, int old_strobe, int new_strobe, const QString &clipId, QUndoCommand * parent = 0); - virtual void undo(); - virtual void redo(); + void undo(); + void redo(); private: CustomTrackView *m_view; diff --git a/src/commands/configtrackscommand.h b/src/commands/configtrackscommand.h index 6dd0a2ed..37b381eb 100644 --- a/src/commands/configtrackscommand.h +++ b/src/commands/configtrackscommand.h @@ -21,8 +21,6 @@ #define CONFIGTRACKSCOMMAND_H #include -#include -#include #include "definitions.h" @@ -32,8 +30,8 @@ class ConfigTracksCommand : public QUndoCommand { public: ConfigTracksCommand(CustomTrackView *view, const QList &oldInfos, const QList &newInfos, QUndoCommand * parent = 0); - virtual void undo(); - virtual void redo(); + void undo(); + void redo(); private: CustomTrackView *m_view; diff --git a/src/commands/editclipcommand.cpp b/src/commands/editclipcommand.cpp index 153cac3f..96c35b9a 100644 --- a/src/commands/editclipcommand.cpp +++ b/src/commands/editclipcommand.cpp @@ -21,6 +21,7 @@ #include "projectlist.h" #include +#include EditClipCommand::EditClipCommand(ProjectList *list, const QString &id, const QMap &oldparams, const QMap &newparams, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), @@ -44,7 +45,8 @@ void EditClipCommand::undo() void EditClipCommand::redo() { kDebug() << "---- redoing action"; - if (m_doIt) m_list->slotUpdateClipProperties(m_id, m_newparams); + if (m_doIt) + m_list->slotUpdateClipProperties(m_id, m_newparams); m_doIt = true; } diff --git a/src/commands/editclipcommand.h b/src/commands/editclipcommand.h index 423f6298..3f751a17 100644 --- a/src/commands/editclipcommand.h +++ b/src/commands/editclipcommand.h @@ -22,8 +22,7 @@ #define EDITCLIPCOMMAND_H #include -#include -#include +#include class ProjectList; @@ -32,8 +31,8 @@ class EditClipCommand : public QUndoCommand public: EditClipCommand(ProjectList *list, const QString &id, const QMap &oldparams, const QMap &newparams, bool doIt, QUndoCommand * parent = 0); - virtual void undo(); - virtual void redo(); + void undo(); + void redo(); private: ProjectList *m_list; -- 2.39.2